From cf0002f8321d618a67dfe80b4bf0ee4e6dfc0743 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Mon, 13 Jul 2026 22:59:44 +0000 Subject: [PATCH 1/2] feat: add agent, agent_sessions, and agent_anomaly fields to Finding PiperOrigin-RevId: 947235402 Source-Link: https://github.com/googleapis/googleapis/commit/d41800ab483bc51a002d49f501dca2f19727c878 Source-Link: https://github.com/googleapis/googleapis-gen/commit/db4efb0fbd349c293f1e2ec50e4b173494124d44 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXNlY3VyaXR5X2NlbnRlci12Mi8uT3dsQm90LnlhbWwiLCJoIjoiZGI0ZWZiMGZiZDM0OWMyOTNmMWUyZWM1MGU0YjE3MzQ5NDEyNGQ0NCJ9 --- .../.gitignore | 22 + .../.repo-metadata.json | 18 + .../.rubocop.yml | 33 + .../google-cloud-security_center-v2/.toys.rb | 28 + .../google-cloud-security_center-v2/.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../google-cloud-security_center-v2/Gemfile | 14 + .../LICENSE.md | 201 + .../google-cloud-security_center-v2/README.md | 154 + .../google-cloud-security_center-v2/Rakefile | 169 + .../gapic_metadata.json | 218 + .../google-cloud-security_center-v2.gemspec | 29 + .../lib/google-cloud-security_center-v2.rb | 21 + .../lib/google/cloud/security_center/v2.rb | 45 + .../google/cloud/security_center/v2/rest.rb | 37 + .../security_center/v2/security_center.rb | 56 + .../v2/security_center/client.rb | 4793 +++++++++++++++++ .../v2/security_center/credentials.rb | 51 + .../v2/security_center/operations.rb | 843 +++ .../v2/security_center/paths.rb | 1068 ++++ .../v2/security_center/rest.rb | 53 + .../v2/security_center/rest/client.rb | 4395 +++++++++++++++ .../v2/security_center/rest/operations.rb | 926 ++++ .../v2/security_center/rest/service_stub.rb | 3336 ++++++++++++ .../cloud/security_center/v2/version.rb | 28 + .../cloud/securitycenter/v2/access_pb.rb | 23 + .../v2/affected_resources_pb.rb | 21 + .../securitycenter/v2/agent_anomaly_pb.rb | 24 + .../cloud/securitycenter/v2/agent_pb.rb | 21 + .../securitycenter/v2/agent_session_pb.rb | 21 + .../cloud/securitycenter/v2/ai_model_pb.rb | 22 + .../cloud/securitycenter/v2/application_pb.rb | 21 + .../securitycenter/v2/attack_exposure_pb.rb | 25 + .../cloud/securitycenter/v2/attack_path_pb.rb | 28 + .../v2/backup_disaster_recovery_pb.rb | 23 + .../securitycenter/v2/bigquery_export_pb.rb | 25 + .../cloud/securitycenter/v2/chokepoint_pb.rb | 21 + .../cloud/securitycenter/v2/cloud_armor_pb.rb | 27 + .../v2/cloud_dlp_data_profile_pb.rb | 24 + .../v2/cloud_dlp_inspection_pb.rb | 23 + .../cloud/securitycenter/v2/compliance_pb.rb | 21 + .../cloud/securitycenter/v2/connection_pb.rb | 22 + .../securitycenter/v2/contact_details_pb.rb | 22 + .../cloud/securitycenter/v2/container_pb.rb | 24 + .../securitycenter/v2/data_access_event_pb.rb | 24 + .../securitycenter/v2/data_flow_event_pb.rb | 24 + .../v2/data_retention_deletion_event_pb.rb | 25 + .../cloud/securitycenter/v2/database_pb.rb | 21 + .../google/cloud/securitycenter/v2/disk_pb.rb | 21 + .../securitycenter/v2/exfiltration_pb.rb | 22 + .../securitycenter/v2/external_system_pb.rb | 25 + .../google/cloud/securitycenter/v2/file_pb.rb | 24 + .../cloud/securitycenter/v2/finding_pb.rb | 77 + .../cloud/securitycenter/v2/folder_pb.rb | 21 + .../securitycenter/v2/group_membership_pb.rb | 22 + .../cloud/securitycenter/v2/iam_binding_pb.rb | 22 + .../cloud/securitycenter/v2/indicator_pb.rb | 26 + .../cloud/securitycenter/v2/ip_rules_pb.rb | 28 + .../google/cloud/securitycenter/v2/job_pb.rb | 24 + .../securitycenter/v2/kernel_rootkit_pb.rb | 21 + .../cloud/securitycenter/v2/kubernetes_pb.rb | 34 + .../cloud/securitycenter/v2/label_pb.rb | 21 + .../securitycenter/v2/load_balancer_pb.rb | 21 + .../cloud/securitycenter/v2/log_entry_pb.rb | 24 + .../securitycenter/v2/mitre_attack_pb.rb | 23 + .../cloud/securitycenter/v2/mute_config_pb.rb | 26 + .../cloud/securitycenter/v2/network_pb.rb | 21 + .../cloud/securitycenter/v2/notebook_pb.rb | 23 + .../v2/notification_config_pb.rb | 26 + .../v2/notification_message_pb.rb | 24 + .../cloud/securitycenter/v2/org_policy_pb.rb | 24 + .../cloud/securitycenter/v2/process_pb.rb | 24 + .../cloud/securitycenter/v2/resource_pb.rb | 39 + .../v2/resource_value_config_pb.rb | 28 + .../securitycenter/v2/security_marks_pb.rb | 23 + .../securitycenter/v2/security_posture_pb.rb | 22 + .../v2/securitycenter_service_pb.rb | 101 + .../v2/securitycenter_service_services_pb.rb | 167 + .../cloud/securitycenter/v2/simulation_pb.rb | 27 + .../cloud/securitycenter/v2/source_pb.rb | 23 + .../securitycenter/v2/toxic_combination_pb.rb | 21 + .../securitycenter/v2/valued_resource_pb.rb | 25 + .../cloud/securitycenter/v2/vertex_ai_pb.rb | 23 + .../securitycenter/v2/vulnerability_pb.rb | 37 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 ++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../proto_docs/google/api/routing.rb | 463 ++ .../google/cloud/securitycenter/v2/access.rb | 120 + .../securitycenter/v2/affected_resources.rb | 35 + .../google/cloud/securitycenter/v2/agent.rb | 39 + .../cloud/securitycenter/v2/agent_anomaly.rb | 98 + .../cloud/securitycenter/v2/agent_session.rb | 35 + .../cloud/securitycenter/v2/ai_model.rb | 71 + .../cloud/securitycenter/v2/application.rb | 40 + .../securitycenter/v2/attack_exposure.rb | 73 + .../cloud/securitycenter/v2/attack_path.rb | 147 + .../v2/backup_disaster_recovery.rb | 90 + .../securitycenter/v2/bigquery_export.rb | 96 + .../cloud/securitycenter/v2/chokepoint.rb | 39 + .../cloud/securitycenter/v2/cloud_armor.rb | 138 + .../v2/cloud_dlp_data_profile.rb | 52 + .../securitycenter/v2/cloud_dlp_inspection.rb | 50 + .../cloud/securitycenter/v2/compliance.rb | 43 + .../cloud/securitycenter/v2/connection.rb | 70 + .../securitycenter/v2/contact_details.rb | 44 + .../cloud/securitycenter/v2/container.rb | 49 + .../securitycenter/v2/data_access_event.rb | 61 + .../securitycenter/v2/data_flow_event.rb | 65 + .../v2/data_retention_deletion_event.rb | 69 + .../cloud/securitycenter/v2/database.rb | 67 + .../google/cloud/securitycenter/v2/disk.rb | 36 + .../cloud/securitycenter/v2/exfiltration.rb | 64 + .../securitycenter/v2/external_system.rb | 106 + .../google/cloud/securitycenter/v2/file.rb | 105 + .../google/cloud/securitycenter/v2/finding.rb | 533 ++ .../google/cloud/securitycenter/v2/folder.rb | 40 + .../securitycenter/v2/group_membership.rb | 51 + .../cloud/securitycenter/v2/iam_binding.rb | 56 + .../cloud/securitycenter/v2/indicator.rb | 116 + .../cloud/securitycenter/v2/ip_rules.rb | 122 + .../google/cloud/securitycenter/v2/job.rb | 65 + .../cloud/securitycenter/v2/kernel_rootkit.rb | 66 + .../cloud/securitycenter/v2/kubernetes.rb | 241 + .../google/cloud/securitycenter/v2/label.rb | 41 + .../cloud/securitycenter/v2/load_balancer.rb | 36 + .../cloud/securitycenter/v2/log_entry.rb | 58 + .../cloud/securitycenter/v2/mitre_attack.rb | 521 ++ .../cloud/securitycenter/v2/mute_config.rb | 113 + .../google/cloud/securitycenter/v2/network.rb | 36 + .../cloud/securitycenter/v2/notebook.rb | 46 + .../securitycenter/v2/notification_config.rb | 94 + .../securitycenter/v2/notification_message.rb | 42 + .../cloud/securitycenter/v2/org_policy.rb | 37 + .../google/cloud/securitycenter/v2/process.rb | 83 + .../cloud/securitycenter/v2/resource.rb | 314 ++ .../v2/resource_value_config.rb | 127 + .../cloud/securitycenter/v2/security_marks.rb | 84 + .../securitycenter/v2/security_posture.rb | 83 + .../v2/securitycenter_service.rb | 1216 +++++ .../cloud/securitycenter/v2/simulation.rb | 46 + .../google/cloud/securitycenter/v2/source.rb | 65 + .../securitycenter/v2/toxic_combination.rb | 46 + .../securitycenter/v2/valued_resource.rb | 86 + .../cloud/securitycenter/v2/vertex_ai.rb | 68 + .../cloud/securitycenter/v2/vulnerability.rb | 365 ++ .../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 + .../security_center/create_finding.rb | 47 + .../security_center/create_mute_config.rb | 47 + .../create_notification_config.rb | 47 + .../snippets/security_center/create_source.rb | 47 + .../delete_big_query_export.rb | 47 + .../security_center/delete_mute_config.rb | 47 + .../delete_notification_config.rb | 47 + .../delete_resource_value_config.rb | 47 + .../security_center/get_big_query_export.rb | 47 + .../security_center/get_iam_policy.rb | 47 + .../security_center/get_mute_config.rb | 47 + .../get_notification_config.rb | 47 + .../get_resource_value_config.rb | 47 + .../security_center/get_simulation.rb | 47 + .../snippets/security_center/get_source.rb | 47 + .../security_center/get_valued_resource.rb | 47 + .../security_center/group_findings.rb | 51 + .../security_center/list_attack_paths.rb | 51 + .../security_center/list_big_query_exports.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 + .../snippets/security_center/list_sources.rb | 51 + .../security_center/list_valued_resources.rb | 51 + .../security_center/set_finding_state.rb | 47 + .../security_center/set_iam_policy.rb | 47 + .../snippets/security_center/set_mute.rb | 47 + .../security_center/test_iam_permissions.rb | 47 + .../update_big_query_export.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_resource_value_config.rb | 47 + .../security_center/update_security_marks.rb | 47 + .../snippets/security_center/update_source.rb | 47 + ...tadata_google.cloud.securitycenter.v2.json | 1615 ++++++ .../v2/security_center_operations_test.rb | 400 ++ .../v2/security_center_paths_test.rb | 403 ++ .../v2/security_center_rest_test.rb | 2311 ++++++++ .../v2/security_center_test.rb | 2592 +++++++++ .../test/helper.rb | 26 + 208 files changed, 37528 insertions(+) create mode 100644 owl-bot-staging/google-cloud-security_center-v2/.gitignore create mode 100644 owl-bot-staging/google-cloud-security_center-v2/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-security_center-v2/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-security_center-v2/.toys.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/.yardopts create mode 100644 owl-bot-staging/google-cloud-security_center-v2/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-security_center-v2/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-security_center-v2/Gemfile create mode 100644 owl-bot-staging/google-cloud-security_center-v2/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-security_center-v2/README.md create mode 100644 owl-bot-staging/google-cloud-security_center-v2/Rakefile create mode 100644 owl-bot-staging/google-cloud-security_center-v2/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-security_center-v2/google-cloud-security_center-v2.gemspec create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google-cloud-security_center-v2.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/rest.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/client.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/credentials.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/operations.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/paths.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/version.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/access_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/affected_resources_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/agent_anomaly_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/agent_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/agent_session_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/ai_model_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/application_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/attack_exposure_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/attack_path_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/backup_disaster_recovery_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/bigquery_export_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/chokepoint_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/cloud_armor_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/cloud_dlp_data_profile_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/cloud_dlp_inspection_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/compliance_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/connection_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/contact_details_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/container_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/data_access_event_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/data_flow_event_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/data_retention_deletion_event_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/database_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/disk_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/exfiltration_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/external_system_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/file_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/finding_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/folder_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/group_membership_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/iam_binding_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/indicator_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/ip_rules_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/job_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/kernel_rootkit_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/kubernetes_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/label_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/load_balancer_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/log_entry_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/mitre_attack_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/mute_config_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/network_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/notebook_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/notification_config_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/notification_message_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/org_policy_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/process_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/resource_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/resource_value_config_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/security_marks_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/security_posture_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/securitycenter_service_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/securitycenter_service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/simulation_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/source_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/toxic_combination_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/valued_resource_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/vertex_ai_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/vulnerability_pb.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/api/routing.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/access.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/affected_resources.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/agent.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/agent_anomaly.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/agent_session.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/ai_model.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/application.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/attack_exposure.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/attack_path.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/backup_disaster_recovery.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/bigquery_export.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/chokepoint.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/cloud_armor.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/cloud_dlp_data_profile.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/cloud_dlp_inspection.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/compliance.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/connection.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/contact_details.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/container.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/data_access_event.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/data_flow_event.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/data_retention_deletion_event.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/database.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/disk.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/exfiltration.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/external_system.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/file.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/finding.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/folder.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/group_membership.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/iam_binding.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/indicator.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/ip_rules.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/job.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/kernel_rootkit.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/kubernetes.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/label.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/load_balancer.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/log_entry.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/mitre_attack.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/mute_config.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/network.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/notebook.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/notification_config.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/notification_message.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/org_policy.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/process.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/resource.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/resource_value_config.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/security_marks.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/security_posture.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/securitycenter_service.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/simulation.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/source.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/toxic_combination.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/valued_resource.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/vertex_ai.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/vulnerability.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/iam/v1/iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/iam/v1/options.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/iam/v1/policy.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/struct.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/batch_create_resource_value_configs.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/bulk_mute_findings.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_big_query_export.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_finding.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_mute_config.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_notification_config.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_source.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/delete_big_query_export.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/delete_mute_config.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/delete_notification_config.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/delete_resource_value_config.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_big_query_export.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_mute_config.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_notification_config.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_resource_value_config.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_simulation.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_source.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_valued_resource.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/group_findings.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_attack_paths.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_big_query_exports.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_findings.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_mute_configs.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_notification_configs.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_resource_value_configs.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_sources.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_valued_resources.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/set_finding_state.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/set_iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/set_mute.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/test_iam_permissions.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_big_query_export.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_external_system.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_finding.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_mute_config.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_notification_config.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_resource_value_config.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_security_marks.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_source.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/snippet_metadata_google.cloud.securitycenter.v2.json create mode 100644 owl-bot-staging/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_test.rb create mode 100644 owl-bot-staging/google-cloud-security_center-v2/test/helper.rb diff --git a/owl-bot-staging/google-cloud-security_center-v2/.gitignore b/owl-bot-staging/google-cloud-security_center-v2/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/.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-v2/.repo-metadata.json b/owl-bot-staging/google-cloud-security_center-v2/.repo-metadata.json new file mode 100644 index 000000000000..0473cc4ee50a --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/.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-v2/latest", + "distribution_name": "google-cloud-security_center-v2", + "is_cloud": true, + "language": "ruby", + "name": "securitycenter", + "name_pretty": "Security Command Center V2 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-v2 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-v2/.rubocop.yml b/owl-bot-staging/google-cloud-security_center-v2/.rubocop.yml new file mode 100644 index 000000000000..ca95d31c752a --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-security_center-v2.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-v2.rb" diff --git a/owl-bot-staging/google-cloud-security_center-v2/.toys.rb b/owl-bot-staging/google-cloud-security_center-v2/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/.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-v2/.yardopts b/owl-bot-staging/google-cloud-security_center-v2/.yardopts new file mode 100644 index 000000000000..ce63c0dd16df --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Security Command Center V2 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-v2/AUTHENTICATION.md b/owl-bot-staging/google-cloud-security_center-v2/AUTHENTICATION.md new file mode 100644 index 000000000000..f1313afe9378 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-security_center-v2 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-v2 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/v2" + +client = ::Google::Cloud::SecurityCenter::V2::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/v2" + +::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::SecurityCenter::V2::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-v2 +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/v2" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::SecurityCenter::V2::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-v2/CHANGELOG.md b/owl-bot-staging/google-cloud-security_center-v2/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-security_center-v2/Gemfile b/owl-bot-staging/google-cloud-security_center-v2/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/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-v2/LICENSE.md b/owl-bot-staging/google-cloud-security_center-v2/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/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-v2/README.md b/owl-bot-staging/google-cloud-security_center-v2/README.md new file mode 100644 index 000000000000..c2224047d696 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Security Command Center V2 API + +Security Command Center API provides access to temporal views of assets and findings within an organization. + +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 Security Command Center V2 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-v2 +``` + +## 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/v2" + +client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new +request = ::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsRequest.new # (request fields as keyword arguments...) +response = client.batch_create_resource_value_configs request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-security_center-v2/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/v2" +require "logger" + +client = ::Google::Cloud::SecurityCenter::V2::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-v2`. +_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-v2`. + +### 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-v2/Rakefile b/owl-bot-staging/google-cloud-security_center-v2/Rakefile new file mode 100644 index 000000000000..3f3dda612226 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/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-v2 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/v2/security_center/credentials" + ::Google::Cloud::SecurityCenter::V2::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-v2 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-v2 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-v2 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-v2 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-security_center-v2" + header "google-cloud-security_center-v2 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-security_center-v2 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-security_center-v2 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-v2 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-v2 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-v2/gapic_metadata.json b/owl-bot-staging/google-cloud-security_center-v2/gapic_metadata.json new file mode 100644 index 000000000000..8859452b344a --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/gapic_metadata.json @@ -0,0 +1,218 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.securitycenter.v2", + "libraryPackage": "::Google::Cloud::SecurityCenter::V2", + "services": { + "SecurityCenter": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client", + "rpcs": { + "BatchCreateResourceValueConfigs": { + "methods": [ + "batch_create_resource_value_configs" + ] + }, + "BulkMuteFindings": { + "methods": [ + "bulk_mute_findings" + ] + }, + "CreateBigQueryExport": { + "methods": [ + "create_big_query_export" + ] + }, + "CreateFinding": { + "methods": [ + "create_finding" + ] + }, + "CreateMuteConfig": { + "methods": [ + "create_mute_config" + ] + }, + "CreateNotificationConfig": { + "methods": [ + "create_notification_config" + ] + }, + "CreateSource": { + "methods": [ + "create_source" + ] + }, + "DeleteBigQueryExport": { + "methods": [ + "delete_big_query_export" + ] + }, + "DeleteMuteConfig": { + "methods": [ + "delete_mute_config" + ] + }, + "DeleteNotificationConfig": { + "methods": [ + "delete_notification_config" + ] + }, + "DeleteResourceValueConfig": { + "methods": [ + "delete_resource_value_config" + ] + }, + "GetBigQueryExport": { + "methods": [ + "get_big_query_export" + ] + }, + "GetSimulation": { + "methods": [ + "get_simulation" + ] + }, + "GetValuedResource": { + "methods": [ + "get_valued_resource" + ] + }, + "GetIamPolicy": { + "methods": [ + "get_iam_policy" + ] + }, + "GetMuteConfig": { + "methods": [ + "get_mute_config" + ] + }, + "GetNotificationConfig": { + "methods": [ + "get_notification_config" + ] + }, + "GetResourceValueConfig": { + "methods": [ + "get_resource_value_config" + ] + }, + "GetSource": { + "methods": [ + "get_source" + ] + }, + "GroupFindings": { + "methods": [ + "group_findings" + ] + }, + "ListAttackPaths": { + "methods": [ + "list_attack_paths" + ] + }, + "ListBigQueryExports": { + "methods": [ + "list_big_query_exports" + ] + }, + "ListFindings": { + "methods": [ + "list_findings" + ] + }, + "ListMuteConfigs": { + "methods": [ + "list_mute_configs" + ] + }, + "ListNotificationConfigs": { + "methods": [ + "list_notification_configs" + ] + }, + "ListResourceValueConfigs": { + "methods": [ + "list_resource_value_configs" + ] + }, + "ListSources": { + "methods": [ + "list_sources" + ] + }, + "ListValuedResources": { + "methods": [ + "list_valued_resources" + ] + }, + "SetFindingState": { + "methods": [ + "set_finding_state" + ] + }, + "SetIamPolicy": { + "methods": [ + "set_iam_policy" + ] + }, + "SetMute": { + "methods": [ + "set_mute" + ] + }, + "TestIamPermissions": { + "methods": [ + "test_iam_permissions" + ] + }, + "UpdateBigQueryExport": { + "methods": [ + "update_big_query_export" + ] + }, + "UpdateExternalSystem": { + "methods": [ + "update_external_system" + ] + }, + "UpdateFinding": { + "methods": [ + "update_finding" + ] + }, + "UpdateMuteConfig": { + "methods": [ + "update_mute_config" + ] + }, + "UpdateNotificationConfig": { + "methods": [ + "update_notification_config" + ] + }, + "UpdateResourceValueConfig": { + "methods": [ + "update_resource_value_config" + ] + }, + "UpdateSecurityMarks": { + "methods": [ + "update_security_marks" + ] + }, + "UpdateSource": { + "methods": [ + "update_source" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-security_center-v2/google-cloud-security_center-v2.gemspec b/owl-bot-staging/google-cloud-security_center-v2/google-cloud-security_center-v2.gemspec new file mode 100644 index 000000000000..8cb5140c90c7 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/google-cloud-security_center-v2.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/security_center/v2/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-security_center-v2" + gem.version = Google::Cloud::SecurityCenter::V2::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-v2 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-v2/lib/google-cloud-security_center-v2.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google-cloud-security_center-v2.rb new file mode 100644 index 000000000000..fbfebf50a08d --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google-cloud-security_center-v2.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/v2" diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2.rb new file mode 100644 index 000000000000..cb448baa8c34 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2.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/v2/security_center" +require "google/cloud/security_center/v2/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/v2" + # client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/security_center/v2" + # client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + module V2 + end + end + end +end + +helper_path = ::File.join __dir__, "v2", "_helpers.rb" +require "google/cloud/security_center/v2/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/rest.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/rest.rb new file mode 100644 index 000000000000..25ca637b14ef --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/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/v2/security_center/rest" +require "google/cloud/security_center/v2/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/v2/rest" + # client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + module V2 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center.rb new file mode 100644 index 000000000000..b2e61e4933b2 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/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/v2/version" + +require "google/cloud/security_center/v2/security_center/credentials" +require "google/cloud/security_center/v2/security_center/paths" +require "google/cloud/security_center/v2/security_center/operations" +require "google/cloud/security_center/v2/security_center/client" +require "google/cloud/security_center/v2/security_center/rest" + +module Google + module Cloud + module SecurityCenter + module V2 + ## + # V2 APIs for Security Center service. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/security_center/v2/security_center" + # client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/security_center/v2/security_center/rest" + # client = ::Google::Cloud::SecurityCenter::V2::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/v2/security_center/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/client.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/client.rb new file mode 100644 index 000000000000..e1de0b6ba7ae --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/client.rb @@ -0,0 +1,4793 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/v2/securitycenter_service_pb" + +module Google + module Cloud + module SecurityCenter + module V2 + module SecurityCenter + ## + # Client for the SecurityCenter service. + # + # V2 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::V2::SecurityCenter::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all SecurityCenter clients + # ::Google::Cloud::SecurityCenter::V2::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", "V2"] + 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 + 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::V2::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::V2::SecurityCenter::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::SecurityCenter::V2::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/v2/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::V2::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::V2::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 + + ## + # 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::V2::BatchCreateResourceValueConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::BatchCreateResourceValueConfigsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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 + + ## + # Kicks off an LRO to bulk mute findings for a parent based on a filter. If + # no location is specified, findings are muted in global. 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::V2::BulkMuteFindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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_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. If no + # location is specified, findings are updated in global. The following list + # shows some examples: + # + # + `organizations/[organization_id]` + # + `organizations/[organization_id]/locations/[location_id]` + # + `folders/[folder_id]` + # + `folders/[folder_id]/locations/[location_id]` + # + `projects/[project_id]` + # + `projects/[project_id]/locations/[location_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_state [::Google::Cloud::SecurityCenter::V2::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/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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 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::V2::CreateBigQueryExportRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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]/locations/[location_id]`, + # `folders/[folder_id]/locations/[location_id]`, or + # `projects/[project_id]/locations/[location_id]`. + # @param big_query_export [::Google::Cloud::SecurityCenter::V2::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::V2::BigQueryExport] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V2::BigQueryExport] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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 + + ## + # Creates a finding in a location. 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::V2::CreateFindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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. The following list + # shows some examples of the format: + # + + # `organizations/[organization_id]/sources/[source_id]` + # + + # `organizations/[organization_id]/sources/[source_id]/locations/[location_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::V2::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::V2::Finding] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V2::Finding] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::CreateFindingRequest.new + # + # # Call the create_finding method. + # result = client.create_finding request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::CreateMuteConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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]/locations/[location_id]`, + # `folders/[folder_id]/locations/[location_id]`, or + # `projects/[project_id]/locations/[location_id]`. + # @param mute_config [::Google::Cloud::SecurityCenter::V2::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::V2::MuteConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V2::MuteConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::CreateMuteConfigRequest.new + # + # # Call the create_mute_config method. + # result = client.create_mute_config request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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 + regex_match = %r{^projects/[^/]+/locations/(?[^/]+)/?$}.match request.parent + if regex_match + header_params["location"] = regex_match["location".to_s] + end + end + if request.parent + regex_match = %r{^organizations/[^/]+/locations/(?[^/]+)/?$}.match request.parent + if regex_match + header_params["location"] = regex_match["location".to_s] + end + end + if request.parent + regex_match = %r{^folders/[^/]+/locations/(?[^/]+)/?$}.match request.parent + if regex_match + header_params["location"] = regex_match["location".to_s] + end + end + + request_params_header = URI.encode_www_form header_params + 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::V2::CreateNotificationConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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]/locations/[location_id]`, + # `folders/[folder_id]/locations/[location_id]`, or + # `projects/[project_id]/locations/[location_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::V2::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::V2::NotificationConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V2::NotificationConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::CreateNotificationConfigRequest.new + # + # # Call the create_notification_config method. + # result = client.create_notification_config request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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 + + ## + # Creates a source. + # + # @overload create_source(request, options = nil) + # Pass arguments to `create_source` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::CreateSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::Source] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V2::Source] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::CreateSourceRequest.new + # + # # Call the create_source method. + # result = client.create_source request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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 + + ## + # 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::V2::DeleteBigQueryExportRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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. The following list + # shows some examples of the format: + # + # + + # `organizations/{organization}/locations/{location}/bigQueryExports/{export_id}` + # + `folders/{folder}/locations/{location}/bigQueryExports/{export_id}` + # + `projects/{project}/locations/{location}/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/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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 + + ## + # Deletes an existing mute config. If no location is specified, default is + # global. + # + # @overload delete_mute_config(request, options = nil) + # Pass arguments to `delete_mute_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::DeleteMuteConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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. The following list shows some + # examples of the format: + # + # + `organizations/{organization}/muteConfigs/{config_id}` + # + + # `organizations/{organization}/locations/{location}/muteConfigs/{config_id}` + # + `folders/{folder}/muteConfigs/{config_id}` + # + `folders/{folder}/locations/{location}/muteConfigs/{config_id}` + # + `projects/{project}/muteConfigs/{config_id}` + # + `projects/{project}/locations/{location}/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/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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 + regex_match = %r{^projects/[^/]+/locations/(?[^/]+)/muteConfigs/[^/]+/?$}.match request.name + if regex_match + header_params["location"] = regex_match["location".to_s] + end + end + if request.name + regex_match = %r{^organizations/[^/]+/locations/(?[^/]+)/muteConfigs/[^/]+/?$}.match request.name + if regex_match + header_params["location"] = regex_match["location".to_s] + end + end + if request.name + regex_match = %r{^folders/[^/]+/locations/(?[^/]+)/muteConfigs/[^/]+/?$}.match request.name + if regex_match + header_params["location"] = regex_match["location".to_s] + end + end + + request_params_header = URI.encode_www_form header_params + 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::V2::DeleteNotificationConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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. The following list + # shows some examples of the format: + # + # + + # `organizations/[organization_id]/locations/[location_id]/notificationConfigs/[config_id]` + # + + # `folders/[folder_id]/locations/[location_id]notificationConfigs/[config_id]` + # + + # `projects/[project_id]/locations/[location_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/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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 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::V2::DeleteResourceValueConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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 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::V2::GetBigQueryExportRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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. The following list shows + # some examples of the format: + # + # + + # `organizations/{organization}/locations/{location}/bigQueryExports/{export_id}` + # + `folders/{folder}/locations/{location}/bigQueryExports/{export_id}` + # + `projects/{project}locations/{location}//bigQueryExports/{export_id}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V2::BigQueryExport] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V2::BigQueryExport] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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 + + ## + # 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::V2::GetSimulationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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::V2::Simulation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V2::Simulation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::GetSimulationRequest.new + # + # # Call the get_simulation method. + # result = client.get_simulation request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::GetValuedResourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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::V2::ValuedResource] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V2::ValuedResource] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::GetValuedResourceRequest.new + # + # # Call the get_valued_resource method. + # result = client.get_valued_resource request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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 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/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::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::V2::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. If no location is specified, default is + # global. + # + # @overload get_mute_config(request, options = nil) + # Pass arguments to `get_mute_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::GetMuteConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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. The following list shows + # some examples of the format: + # + # + `organizations/{organization}/muteConfigs/{config_id}` + # + + # `organizations/{organization}/locations/{location}/muteConfigs/{config_id}` + # + `folders/{folder}/muteConfigs/{config_id}` + # + `folders/{folder}/locations/{location}/muteConfigs/{config_id}` + # + `projects/{project}/muteConfigs/{config_id}` + # + `projects/{project}/locations/{location}/muteConfigs/{config_id}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V2::MuteConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V2::MuteConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::GetMuteConfigRequest.new + # + # # Call the get_mute_config method. + # result = client.get_mute_config request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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 + regex_match = %r{^projects/[^/]+/locations/(?[^/]+)/muteConfigs/[^/]+/?$}.match request.name + if regex_match + header_params["location"] = regex_match["location".to_s] + end + end + if request.name + regex_match = %r{^organizations/[^/]+/locations/(?[^/]+)/muteConfigs/[^/]+/?$}.match request.name + if regex_match + header_params["location"] = regex_match["location".to_s] + end + end + if request.name + regex_match = %r{^folders/[^/]+/locations/(?[^/]+)/muteConfigs/[^/]+/?$}.match request.name + if regex_match + header_params["location"] = regex_match["location".to_s] + end + end + + request_params_header = URI.encode_www_form header_params + 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::V2::GetNotificationConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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. The following list shows + # some examples of the format: + # + # + + # `organizations/[organization_id]/locations/[location_id]/notificationConfigs/[config_id]` + # + + # `folders/[folder_id]/locations/[location_id]/notificationConfigs/[config_id]` + # + + # `projects/[project_id]/locations/[location_id]/notificationConfigs/[config_id]` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V2::NotificationConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V2::NotificationConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::GetNotificationConfigRequest.new + # + # # Call the get_notification_config method. + # result = client.get_notification_config request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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 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::V2::GetResourceValueConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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::V2::ResourceValueConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V2::ResourceValueConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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 + + ## + # Gets a source. + # + # @overload get_source(request, options = nil) + # Pass arguments to `get_source` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::GetSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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::V2::Source] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V2::Source] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::GetSourceRequest.new + # + # # Call the get_source method. + # result = client.get_source request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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 or source's findings and groups them by their + # specified properties in a location. If no location is specified, findings + # are assumed to be in global + # + # To group across all sources provide a `-` as the source id. + # The following list shows some examples: + # + # + `/v2/organizations/{organization_id}/sources/-/findings` + # + + # `/v2/organizations/{organization_id}/sources/-/locations/{location_id}/findings` + # + `/v2/folders/{folder_id}/sources/-/findings` + # + `/v2/folders/{folder_id}/sources/-/locations/{location_id}/findings` + # + `/v2/projects/{project_id}/sources/-/findings` + # + `/v2/projects/{project_id}/sources/-/locations/{location_id}/findings` + # + # @overload group_findings(request, options = nil) + # Pass arguments to `group_findings` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::GroupFindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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, 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. If no location is specified, + # finding is assumed to be in global. + # The following list shows some examples: + # + # + `organizations/[organization_id]/sources/[source_id]` + # + + # `organizations/[organization_id]/sources/[source_id]/locations/[location_id]` + # + `folders/[folder_id]/sources/[source_id]` + # + `folders/[folder_id]/sources/[source_id]/locations/[location_id]` + # + `projects/[project_id]/sources/[source_id]` + # + `projects/[project_id]/sources/[source_id]/locations/[location_id]` + # + # To groupBy across all sources provide a source_id of `-`. The following + # list shows some examples: + # + # + `organizations/{organization_id}/sources/-` + # + `organizations/{organization_id}/sources/-/locations/[location_id]` + # + `folders/{folder_id}/sources/-` + # + `folders/{folder_id}/sources/-/locations/[location_id]` + # + `projects/{project_id}/sources/-` + # + `projects/{project_id}/sources/-/locations/[location_id]` + # @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 + # * 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: `=`, `:` + # * security_marks.marks: `=`, `:` + # * 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. + # The string value should follow SQL syntax: comma separated list of fields. + # For example: "parent,resource_name". + # @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::V2::GroupResult>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::GroupResult>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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 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::V2::ListAttackPathsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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::V2::AttackPath>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::AttackPath>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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 + + ## + # 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::V2::ListBigQueryExportsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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]/locations/[location_id]`, + # `folders/[folder_id]/locations/[location_id]`, or + # `projects/[project_id]/locations/[location_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::V2::BigQueryExport>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::BigQueryExport>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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 + + ## + # Lists an organization or source's findings. + # + # To list across all sources for a given location provide a `-` as the source + # id. If no location is specified, finding are assumed to be in global. + # The following list shows some examples: + # + # + `/v2/organizations/{organization_id}/sources/-/findings` + # + + # `/v2/organizations/{organization_id}/sources/-/locations/{location_id}/findings` + # + # @overload list_findings(request, options = nil) + # Pass arguments to `list_findings` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::ListFindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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, 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. If no location is + # specified, the default is global. The following list shows some examples: + # + # + `organizations/[organization_id]/sources/[source_id]` + # + + # `organizations/[organization_id]/sources/[source_id]/locations/[location_id]` + # + `folders/[folder_id]/sources/[source_id]` + # + `folders/[folder_id]/sources/[source_id]/locations/[location_id]` + # + `projects/[project_id]/sources/[source_id]` + # + `projects/[project_id]/sources/[source_id]/locations/[location_id]` + # + # To list across all sources provide a source_id of `-`. The following + # list shows some examples: + # + # + `organizations/{organization_id}/sources/-` + # + `organizations/{organization_id}/sources/-/locations/{location_id}` + # + `folders/{folder_id}/sources/-` + # + `folders/{folder_id}/sources/-locations/{location_id}` + # + `projects/{projects_id}/sources/-` + # + `projects/{projects_id}/sources/-/locations/{location_id}` + # @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 + # * 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: `=`, `:` + # * security_marks.marks: `=`, `:` + # * 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,parent". 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,parent". Redundant space characters in the + # syntax are insignificant. "name desc,parent" and " + # name desc , parent " are equivalent. + # + # The following fields are supported: + # name + # parent + # state + # category + # resource_name + # event_time + # security_marks.marks + # @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::V2::ListFindingsResponse::ListFindingsResult>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::ListFindingsResponse::ListFindingsResult>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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. If no location is specified, default is + # global. + # + # @overload list_mute_configs(request, options = nil) + # Pass arguments to `list_mute_configs` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::ListMuteConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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]`, + # `organizations/[organization_id]/locations/[location_id]`, + # `folders/[folder_id]/locations/[location_id]`, + # `projects/[project_id]/locations/[location_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::V2::MuteConfig>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::MuteConfig>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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 + regex_match = %r{^projects/[^/]+/locations/(?[^/]+)/muteConfigs/?$}.match request.parent + if regex_match + header_params["location"] = regex_match["location".to_s] + end + end + if request.parent + regex_match = %r{^organizations/[^/]+/locations/(?[^/]+)/muteConfigs/?$}.match request.parent + if regex_match + header_params["location"] = regex_match["location".to_s] + end + end + if request.parent + regex_match = %r{^folders/[^/]+/locations/(?[^/]+)/muteConfigs/?$}.match request.parent + if regex_match + header_params["location"] = regex_match["location".to_s] + end + end + + request_params_header = URI.encode_www_form header_params + 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::V2::ListNotificationConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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]/locations/[location_id]", + # "folders/[folder_id]/locations/[location_id]", or + # "projects/[project_id]/locations/[location_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::V2::NotificationConfig>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::NotificationConfig>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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 + + ## + # 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::V2::ListResourceValueConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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 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 `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::V2::ResourceValueConfig>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::ResourceValueConfig>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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 + + ## + # 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::V2::ListSourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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::V2::Source>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::Source>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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 + + ## + # 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::V2::ListValuedResourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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 exposed 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` + # + # 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::V2::ValuedResource>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::ValuedResource>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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 + + ## + # Updates the state of a finding. If no location is specified, finding is + # assumed to be in global + # + # @overload set_finding_state(request, options = nil) + # Pass arguments to `set_finding_state` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::SetFindingStateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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) + # 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. If no location is specified, finding is assumed to be in + # global. The following list shows some examples: + # + # + + # `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}` + # + + # `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + # + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}` + # + + # `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + # + `projects/{project_id}/sources/{source_id}/findings/{finding_id}` + # + + # `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + # @param state [::Google::Cloud::SecurityCenter::V2::Finding::State] + # Required. The desired State of the finding. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V2::Finding] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V2::Finding] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::SetFindingStateRequest.new + # + # # Call the set_finding_state method. + # result = client.set_finding_state request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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 + + ## + # 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/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::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::V2::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 + + ## + # Updates the mute state of a finding. If no location is specified, finding + # is assumed to be in global + # + # @overload set_mute(request, options = nil) + # Pass arguments to `set_mute` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::SetMuteRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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. If no location is specified, finding is assumed to be in + # global. The following list shows some examples: + # + # + + # `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}` + # + + # `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + # + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}` + # + + # `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + # + `projects/{project_id}/sources/{source_id}/findings/{finding_id}` + # + + # `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + # @param mute [::Google::Cloud::SecurityCenter::V2::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::V2::Finding] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V2::Finding] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::SetMuteRequest.new + # + # # Call the set_mute method. + # result = client.set_mute request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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 + + ## + # 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/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::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::V2::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 + + ## + # 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::V2::UpdateBigQueryExportRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::BigQueryExport] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V2::BigQueryExport] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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 + + ## + # Updates external system. This is for a given finding. If no location is + # specified, finding is assumed to be in global + # + # @overload update_external_system(request, options = nil) + # Pass arguments to `update_external_system` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::UpdateExternalSystemRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::ExternalSystem] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V2::ExternalSystem] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::UpdateExternalSystemRequest.new + # + # # Call the update_external_system method. + # result = client.update_external_system request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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. If no location is specified, finding is + # assumed to be in global. 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::V2::UpdateFindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::Finding] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V2::Finding] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::UpdateFindingRequest.new + # + # # Call the update_finding method. + # result = client.update_finding request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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. If no location is specified, default is + # global. + # + # @overload update_mute_config(request, options = nil) + # Pass arguments to `update_mute_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::UpdateMuteConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::MuteConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V2::MuteConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::UpdateMuteConfigRequest.new + # + # # Call the update_mute_config method. + # result = client.update_mute_config request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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 + regex_match = %r{^projects/[^/]+/locations/(?[^/]+)/muteConfigs/[^/]+/?$}.match request.mute_config.name + if regex_match + header_params["location"] = regex_match["location".to_s] + end + end + if request.mute_config&.name + regex_match = %r{^organizations/[^/]+/locations/(?[^/]+)/muteConfigs/[^/]+/?$}.match request.mute_config.name + if regex_match + header_params["location"] = regex_match["location".to_s] + end + end + if request.mute_config&.name + regex_match = %r{^folders/[^/]+/locations/(?[^/]+)/muteConfigs/[^/]+/?$}.match request.mute_config.name + if regex_match + header_params["location"] = regex_match["location".to_s] + end + end + + request_params_header = URI.encode_www_form header_params + 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::V2::UpdateNotificationConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::NotificationConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V2::NotificationConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::UpdateNotificationConfigRequest.new + # + # # Call the update_notification_config method. + # result = client.update_notification_config request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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 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::V2::UpdateResourceValueConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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::V2::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. + # + # To update nested fields, include the top level field in the mask + # For example, to update gcp_metadata.resource_type, include the + # "gcp_metadata" field mask + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V2::ResourceValueConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V2::ResourceValueConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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 + + ## + # Updates security marks. For Finding Security marks, if no location is + # specified, finding is assumed to be in global. Assets Security Marks can + # only be accessed through global endpoint. + # + # @overload update_security_marks(request, options = nil) + # Pass arguments to `update_security_marks` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::UpdateSecurityMarksRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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) + # 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::V2::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.". + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::SecurityCenter::V2::SecurityMarks] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V2::SecurityMarks] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::UpdateSecurityMarksRequest.new + # + # # Call the update_security_marks method. + # result = client.update_security_marks request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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 + + ## + # Updates a source. + # + # @overload update_source(request, options = nil) + # Pass arguments to `update_source` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::UpdateSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::Source] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::SecurityCenter::V2::Source] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::UpdateSourceRequest.new + # + # # Call the update_source method. + # result = client.update_source request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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 + + ## + # 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::V2::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 + # # batch_create_resource_value_configs to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.batch_create_resource_value_configs.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.batch_create_resource_value_configs.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::V2::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 `batch_create_resource_value_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_create_resource_value_configs + ## + # RPC-specific configuration for `bulk_mute_findings` + # @return [::Gapic::Config::Method] + # + attr_reader :bulk_mute_findings + ## + # RPC-specific configuration for `create_big_query_export` + # @return [::Gapic::Config::Method] + # + attr_reader :create_big_query_export + ## + # 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 `create_source` + # @return [::Gapic::Config::Method] + # + attr_reader :create_source + ## + # RPC-specific configuration for `delete_big_query_export` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_big_query_export + ## + # 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_resource_value_config` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_resource_value_config + ## + # RPC-specific configuration for `get_big_query_export` + # @return [::Gapic::Config::Method] + # + attr_reader :get_big_query_export + ## + # 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_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_resource_value_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_resource_value_config + ## + # RPC-specific configuration for `get_source` + # @return [::Gapic::Config::Method] + # + attr_reader :get_source + ## + # RPC-specific configuration for `group_findings` + # @return [::Gapic::Config::Method] + # + attr_reader :group_findings + ## + # RPC-specific configuration for `list_attack_paths` + # @return [::Gapic::Config::Method] + # + attr_reader :list_attack_paths + ## + # RPC-specific configuration for `list_big_query_exports` + # @return [::Gapic::Config::Method] + # + attr_reader :list_big_query_exports + ## + # 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_resource_value_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_resource_value_configs + ## + # RPC-specific configuration for `list_sources` + # @return [::Gapic::Config::Method] + # + attr_reader :list_sources + ## + # RPC-specific configuration for `list_valued_resources` + # @return [::Gapic::Config::Method] + # + attr_reader :list_valued_resources + ## + # RPC-specific configuration for `set_finding_state` + # @return [::Gapic::Config::Method] + # + attr_reader :set_finding_state + ## + # RPC-specific configuration for `set_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy + ## + # RPC-specific configuration for `set_mute` + # @return [::Gapic::Config::Method] + # + attr_reader :set_mute + ## + # RPC-specific configuration for `test_iam_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :test_iam_permissions + ## + # RPC-specific configuration for `update_big_query_export` + # @return [::Gapic::Config::Method] + # + attr_reader :update_big_query_export + ## + # 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_resource_value_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_resource_value_config + ## + # RPC-specific configuration for `update_security_marks` + # @return [::Gapic::Config::Method] + # + attr_reader :update_security_marks + ## + # RPC-specific configuration for `update_source` + # @return [::Gapic::Config::Method] + # + attr_reader :update_source + + # @private + def initialize parent_rpcs = nil + 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 + 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_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 + 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 + create_source_config = parent_rpcs.create_source if parent_rpcs.respond_to? :create_source + @create_source = ::Gapic::Config::Method.new create_source_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 + 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_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_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_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_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_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 + get_source_config = parent_rpcs.get_source if parent_rpcs.respond_to? :get_source + @get_source = ::Gapic::Config::Method.new get_source_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_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 + 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 + 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_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 + list_sources_config = parent_rpcs.list_sources if parent_rpcs.respond_to? :list_sources + @list_sources = ::Gapic::Config::Method.new list_sources_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 + 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_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 + set_mute_config = parent_rpcs.set_mute if parent_rpcs.respond_to? :set_mute + @set_mute = ::Gapic::Config::Method.new set_mute_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 + 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 + 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_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 + 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 + update_source_config = parent_rpcs.update_source if parent_rpcs.respond_to? :update_source + @update_source = ::Gapic::Config::Method.new update_source_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-v2/lib/google/cloud/security_center/v2/security_center/credentials.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/credentials.rb new file mode 100644 index 000000000000..a53a263683eb --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/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 V2 + 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-v2/lib/google/cloud/security_center/v2/security_center/operations.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/operations.rb new file mode 100644 index 000000000000..2b55ca838dc8 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/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 V2 + 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::V2::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::V2::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::V2::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::V2::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::V2::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-v2/lib/google/cloud/security_center/v2/security_center/paths.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/paths.rb new file mode 100644 index 000000000000..680b1675791d --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/paths.rb @@ -0,0 +1,1068 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 V2 + module SecurityCenter + # Path helper methods for the SecurityCenter API. + module Paths + ## + # Create a fully-qualified BigQueryExport resource string. + # + # @overload big_query_export_path(organization:, location:, export:) + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/bigQueryExports/{export}` + # + # @param organization [String] + # @param location [String] + # @param export [String] + # + # @overload big_query_export_path(folder:, location:, export:) + # The resource will be in the following format: + # + # `folders/{folder}/locations/{location}/bigQueryExports/{export}` + # + # @param folder [String] + # @param location [String] + # @param export [String] + # + # @overload big_query_export_path(project:, location:, export:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/bigQueryExports/{export}` + # + # @param project [String] + # @param location [String] + # @param export [String] + # + # @return [::String] + def big_query_export_path **args + resources = { + "export:location:organization" => (proc do |organization:, location:, export:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/bigQueryExports/#{export}" + end), + "export:folder:location" => (proc do |folder:, location:, export:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "folders/#{folder}/locations/#{location}/bigQueryExports/#{export}" + end), + "export:location:project" => (proc do |project:, location:, export:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/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 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(organization:, source:, location:, finding:, externalsystem:) + # The resource will be in the following format: + # + # `organizations/{organization}/sources/{source}/locations/{location}/findings/{finding}/externalSystems/{externalsystem}` + # + # @param organization [String] + # @param source [String] + # @param location [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(folder:, source:, location:, finding:, externalsystem:) + # The resource will be in the following format: + # + # `folders/{folder}/sources/{source}/locations/{location}/findings/{finding}/externalSystems/{externalsystem}` + # + # @param folder [String] + # @param source [String] + # @param location [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] + # + # @overload external_system_path(project:, source:, location:, finding:, externalsystem:) + # The resource will be in the following format: + # + # `projects/{project}/sources/{source}/locations/{location}/findings/{finding}/externalSystems/{externalsystem}` + # + # @param project [String] + # @param source [String] + # @param location [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:location:organization:source" => (proc do |organization:, source:, location:, finding:, externalsystem:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "finding cannot contain /" if finding.to_s.include? "/" + + "organizations/#{organization}/sources/#{source}/locations/#{location}/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:folder:location:source" => (proc do |folder:, source:, location:, finding:, externalsystem:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "finding cannot contain /" if finding.to_s.include? "/" + + "folders/#{folder}/sources/#{source}/locations/#{location}/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), + "externalsystem:finding:location:project:source" => (proc do |project:, source:, location:, finding:, externalsystem:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "finding cannot contain /" if finding.to_s.include? "/" + + "projects/#{project}/sources/#{source}/locations/#{location}/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(organization:, source:, location:, finding:) + # The resource will be in the following format: + # + # `organizations/{organization}/sources/{source}/locations/{location}/findings/{finding}` + # + # @param organization [String] + # @param source [String] + # @param location [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(folder:, source:, location:, finding:) + # The resource will be in the following format: + # + # `folders/{folder}/sources/{source}/locations/{location}/findings/{finding}` + # + # @param folder [String] + # @param source [String] + # @param location [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] + # + # @overload finding_path(project:, source:, location:, finding:) + # The resource will be in the following format: + # + # `projects/{project}/sources/{source}/locations/{location}/findings/{finding}` + # + # @param project [String] + # @param source [String] + # @param location [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:location:organization:source" => (proc do |organization:, source:, location:, finding:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "organizations/#{organization}/sources/#{source}/locations/#{location}/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:folder:location:source" => (proc do |folder:, source:, location:, finding:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "folders/#{folder}/sources/#{source}/locations/#{location}/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), + "finding:location:project:source" => (proc do |project:, source:, location:, finding:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/sources/#{source}/locations/#{location}/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(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:, 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(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:, 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(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), + "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:mute_config" => (proc do |folder:, mute_config:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + + "folders/#{folder}/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), + "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: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:, location:, notification_config:) + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/notificationConfigs/{notification_config}` + # + # @param organization [String] + # @param location [String] + # @param notification_config [String] + # + # @overload notification_config_path(folder:, location:, notification_config:) + # The resource will be in the following format: + # + # `folders/{folder}/locations/{location}/notificationConfigs/{notification_config}` + # + # @param folder [String] + # @param location [String] + # @param notification_config [String] + # + # @overload notification_config_path(project:, location:, notification_config:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/notificationConfigs/{notification_config}` + # + # @param project [String] + # @param location [String] + # @param notification_config [String] + # + # @return [::String] + def notification_config_path **args + resources = { + "location:notification_config:organization" => (proc do |organization:, location:, notification_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}/notificationConfigs/#{notification_config}" + end), + "folder:location:notification_config" => (proc do |folder:, location:, notification_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}/notificationConfigs/#{notification_config}" + end), + "location:notification_config:project" => (proc do |project:, location:, notification_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}/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 OrganizationValuedResource resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/simulations/{simulation}/valuedResources/{valued_resource}` + # + # @param organization [String] + # @param location [String] + # @param simulation [String] + # @param valued_resource [String] + # + # @return [::String] + def organization_valued_resource_path organization:, location:, simulation:, valued_resource: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "simulation cannot contain /" if simulation.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/simulations/#{simulation}/valuedResources/#{valued_resource}" + 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. + # + # @overload resource_value_config_path(organization:, resource_value_config:) + # The resource will be in the following format: + # + # `organizations/{organization}/resourceValueConfigs/{resource_value_config}` + # + # @param organization [String] + # @param resource_value_config [String] + # + # @overload resource_value_config_path(organization:, location:, resource_value_config:) + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/resourceValueConfigs/{resource_value_config}` + # + # @param organization [String] + # @param location [String] + # @param resource_value_config [String] + # + # @return [::String] + def resource_value_config_path **args + resources = { + "organization:resource_value_config" => (proc do |organization:, resource_value_config:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/resourceValueConfigs/#{resource_value_config}" + end), + "location:organization:resource_value_config" => (proc do |organization:, location:, resource_value_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}/resourceValueConfigs/#{resource_value_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 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(organization:, source:, location:, finding:) + # The resource will be in the following format: + # + # `organizations/{organization}/sources/{source}/locations/{location}/findings/{finding}/securityMarks` + # + # @param organization [String] + # @param source [String] + # @param location [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(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(folder:, source:, location:, finding:) + # The resource will be in the following format: + # + # `folders/{folder}/sources/{source}/locations/{location}/findings/{finding}/securityMarks` + # + # @param folder [String] + # @param source [String] + # @param location [String] + # @param finding [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(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] + # + # @overload security_marks_path(project:, source:, location:, finding:) + # The resource will be in the following format: + # + # `projects/{project}/sources/{source}/locations/{location}/findings/{finding}/securityMarks` + # + # @param project [String] + # @param source [String] + # @param location [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), + "finding:location:organization:source" => (proc do |organization:, source:, location:, finding:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "organizations/#{organization}/sources/#{source}/locations/#{location}/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), + "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:folder:location:source" => (proc do |folder:, source:, location:, finding:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "folders/#{folder}/sources/#{source}/locations/#{location}/findings/#{finding}/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: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), + "finding:location:project:source" => (proc do |project:, source:, location:, finding:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/sources/#{source}/locations/#{location}/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. + # + # @overload simulation_path(organization:, simulation:) + # The resource will be in the following format: + # + # `organizations/{organization}/simulations/{simulation}` + # + # @param organization [String] + # @param simulation [String] + # + # @overload simulation_path(organization:, location:, simluation:) + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/simulations/{simluation}` + # + # @param organization [String] + # @param location [String] + # @param simluation [String] + # + # @return [::String] + def simulation_path **args + resources = { + "organization:simulation" => (proc do |organization:, simulation:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/simulations/#{simulation}" + end), + "location:organization:simluation" => (proc do |organization:, location:, simluation:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/simulations/#{simluation}" + 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 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. + # + # @overload valued_resource_path(organization:, simulation:, valued_resource:) + # 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] + # + # @overload valued_resource_path(organization:, location:, simluation:, valued_resource:) + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/simulations/{simluation}/valuedResources/{valued_resource}` + # + # @param organization [String] + # @param location [String] + # @param simluation [String] + # @param valued_resource [String] + # + # @return [::String] + def valued_resource_path **args + resources = { + "organization:simulation:valued_resource" => (proc do |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), + "location:organization:simluation:valued_resource" => (proc do |organization:, location:, simluation:, valued_resource:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "simluation cannot contain /" if simluation.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/simulations/#{simluation}/valuedResources/#{valued_resource}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest.rb new file mode 100644 index 000000000000..f11c34c53b84 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/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/v2/version" + +require "google/cloud/security_center/v2/security_center/credentials" +require "google/cloud/security_center/v2/security_center/paths" +require "google/cloud/security_center/v2/security_center/rest/operations" +require "google/cloud/security_center/v2/security_center/rest/client" + +module Google + module Cloud + module SecurityCenter + module V2 + ## + # V2 APIs for Security Center service. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/security_center/v2/security_center/rest" + # client = ::Google::Cloud::SecurityCenter::V2::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/v2/security_center/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest/client.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest/client.rb new file mode 100644 index 000000000000..6109ce4de572 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest/client.rb @@ -0,0 +1,4395 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/v2/securitycenter_service_pb" +require "google/cloud/security_center/v2/security_center/rest/service_stub" + +module Google + module Cloud + module SecurityCenter + module V2 + module SecurityCenter + module Rest + ## + # REST client for the SecurityCenter service. + # + # V2 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::V2::SecurityCenter::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all SecurityCenter clients + # ::Google::Cloud::SecurityCenter::V2::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", "V2"] + 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 + 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::V2::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::V2::SecurityCenter::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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 + + ## + # 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::V2::BatchCreateResourceValueConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::BatchCreateResourceValueConfigsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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 + + ## + # Kicks off an LRO to bulk mute findings for a parent based on a filter. If + # no location is specified, findings are muted in global. 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::V2::BulkMuteFindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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_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. If no + # location is specified, findings are updated in global. The following list + # shows some examples: + # + # + `organizations/[organization_id]` + # + `organizations/[organization_id]/locations/[location_id]` + # + `folders/[folder_id]` + # + `folders/[folder_id]/locations/[location_id]` + # + `projects/[project_id]` + # + `projects/[project_id]/locations/[location_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_state [::Google::Cloud::SecurityCenter::V2::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/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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 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::V2::CreateBigQueryExportRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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]/locations/[location_id]`, + # `folders/[folder_id]/locations/[location_id]`, or + # `projects/[project_id]/locations/[location_id]`. + # @param big_query_export [::Google::Cloud::SecurityCenter::V2::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::V2::BigQueryExport] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::BigQueryExport] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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 + + ## + # Creates a finding in a location. 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::V2::CreateFindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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. The following list + # shows some examples of the format: + # + + # `organizations/[organization_id]/sources/[source_id]` + # + + # `organizations/[organization_id]/sources/[source_id]/locations/[location_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::V2::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::V2::Finding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::Finding] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::CreateFindingRequest.new + # + # # Call the create_finding method. + # result = client.create_finding request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::CreateMuteConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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]/locations/[location_id]`, + # `folders/[folder_id]/locations/[location_id]`, or + # `projects/[project_id]/locations/[location_id]`. + # @param mute_config [::Google::Cloud::SecurityCenter::V2::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::V2::MuteConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::MuteConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::CreateMuteConfigRequest.new + # + # # Call the create_mute_config method. + # result = client.create_mute_config request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::CreateNotificationConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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]/locations/[location_id]`, + # `folders/[folder_id]/locations/[location_id]`, or + # `projects/[project_id]/locations/[location_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::V2::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::V2::NotificationConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::NotificationConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::CreateNotificationConfigRequest.new + # + # # Call the create_notification_config method. + # result = client.create_notification_config request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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 + + ## + # Creates a source. + # + # @overload create_source(request, options = nil) + # Pass arguments to `create_source` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::CreateSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::Source] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::Source] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::CreateSourceRequest.new + # + # # Call the create_source method. + # result = client.create_source request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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 + + ## + # 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::V2::DeleteBigQueryExportRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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. The following list + # shows some examples of the format: + # + # + + # `organizations/{organization}/locations/{location}/bigQueryExports/{export_id}` + # + `folders/{folder}/locations/{location}/bigQueryExports/{export_id}` + # + `projects/{project}/locations/{location}/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/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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 + + ## + # Deletes an existing mute config. If no location is specified, default is + # global. + # + # @overload delete_mute_config(request, options = nil) + # Pass arguments to `delete_mute_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::DeleteMuteConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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. The following list shows some + # examples of the format: + # + # + `organizations/{organization}/muteConfigs/{config_id}` + # + + # `organizations/{organization}/locations/{location}/muteConfigs/{config_id}` + # + `folders/{folder}/muteConfigs/{config_id}` + # + `folders/{folder}/locations/{location}/muteConfigs/{config_id}` + # + `projects/{project}/muteConfigs/{config_id}` + # + `projects/{project}/locations/{location}/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/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::DeleteNotificationConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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. The following list + # shows some examples of the format: + # + # + + # `organizations/[organization_id]/locations/[location_id]/notificationConfigs/[config_id]` + # + + # `folders/[folder_id]/locations/[location_id]notificationConfigs/[config_id]` + # + + # `projects/[project_id]/locations/[location_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/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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 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::V2::DeleteResourceValueConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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 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::V2::GetBigQueryExportRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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. The following list shows + # some examples of the format: + # + # + + # `organizations/{organization}/locations/{location}/bigQueryExports/{export_id}` + # + `folders/{folder}/locations/{location}/bigQueryExports/{export_id}` + # + `projects/{project}locations/{location}//bigQueryExports/{export_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V2::BigQueryExport] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::BigQueryExport] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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 + + ## + # 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::V2::GetSimulationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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::V2::Simulation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::Simulation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::GetSimulationRequest.new + # + # # Call the get_simulation method. + # result = client.get_simulation request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::GetValuedResourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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::V2::ValuedResource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::ValuedResource] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::GetValuedResourceRequest.new + # + # # Call the get_valued_resource method. + # result = client.get_valued_resource request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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 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/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::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::V2::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. If no location is specified, default is + # global. + # + # @overload get_mute_config(request, options = nil) + # Pass arguments to `get_mute_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::GetMuteConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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. The following list shows + # some examples of the format: + # + # + `organizations/{organization}/muteConfigs/{config_id}` + # + + # `organizations/{organization}/locations/{location}/muteConfigs/{config_id}` + # + `folders/{folder}/muteConfigs/{config_id}` + # + `folders/{folder}/locations/{location}/muteConfigs/{config_id}` + # + `projects/{project}/muteConfigs/{config_id}` + # + `projects/{project}/locations/{location}/muteConfigs/{config_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V2::MuteConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::MuteConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::GetMuteConfigRequest.new + # + # # Call the get_mute_config method. + # result = client.get_mute_config request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::GetNotificationConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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. The following list shows + # some examples of the format: + # + # + + # `organizations/[organization_id]/locations/[location_id]/notificationConfigs/[config_id]` + # + + # `folders/[folder_id]/locations/[location_id]/notificationConfigs/[config_id]` + # + + # `projects/[project_id]/locations/[location_id]/notificationConfigs/[config_id]` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V2::NotificationConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::NotificationConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::GetNotificationConfigRequest.new + # + # # Call the get_notification_config method. + # result = client.get_notification_config request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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 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::V2::GetResourceValueConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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::V2::ResourceValueConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::ResourceValueConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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 + + ## + # Gets a source. + # + # @overload get_source(request, options = nil) + # Pass arguments to `get_source` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::GetSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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::V2::Source] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::Source] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::GetSourceRequest.new + # + # # Call the get_source method. + # result = client.get_source request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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 or source's findings and groups them by their + # specified properties in a location. If no location is specified, findings + # are assumed to be in global + # + # To group across all sources provide a `-` as the source id. + # The following list shows some examples: + # + # + `/v2/organizations/{organization_id}/sources/-/findings` + # + + # `/v2/organizations/{organization_id}/sources/-/locations/{location_id}/findings` + # + `/v2/folders/{folder_id}/sources/-/findings` + # + `/v2/folders/{folder_id}/sources/-/locations/{location_id}/findings` + # + `/v2/projects/{project_id}/sources/-/findings` + # + `/v2/projects/{project_id}/sources/-/locations/{location_id}/findings` + # + # @overload group_findings(request, options = nil) + # Pass arguments to `group_findings` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::GroupFindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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, 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. If no location is specified, + # finding is assumed to be in global. + # The following list shows some examples: + # + # + `organizations/[organization_id]/sources/[source_id]` + # + + # `organizations/[organization_id]/sources/[source_id]/locations/[location_id]` + # + `folders/[folder_id]/sources/[source_id]` + # + `folders/[folder_id]/sources/[source_id]/locations/[location_id]` + # + `projects/[project_id]/sources/[source_id]` + # + `projects/[project_id]/sources/[source_id]/locations/[location_id]` + # + # To groupBy across all sources provide a source_id of `-`. The following + # list shows some examples: + # + # + `organizations/{organization_id}/sources/-` + # + `organizations/{organization_id}/sources/-/locations/[location_id]` + # + `folders/{folder_id}/sources/-` + # + `folders/{folder_id}/sources/-/locations/[location_id]` + # + `projects/{project_id}/sources/-` + # + `projects/{project_id}/sources/-/locations/[location_id]` + # @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 + # * 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: `=`, `:` + # * security_marks.marks: `=`, `:` + # * 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. + # The string value should follow SQL syntax: comma separated list of fields. + # For example: "parent,resource_name". + # @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::V2::GroupResult>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::GroupResult>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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 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::V2::ListAttackPathsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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::V2::AttackPath>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::AttackPath>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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 + + ## + # 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::V2::ListBigQueryExportsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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]/locations/[location_id]`, + # `folders/[folder_id]/locations/[location_id]`, or + # `projects/[project_id]/locations/[location_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::V2::BigQueryExport>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::BigQueryExport>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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 + + ## + # Lists an organization or source's findings. + # + # To list across all sources for a given location provide a `-` as the source + # id. If no location is specified, finding are assumed to be in global. + # The following list shows some examples: + # + # + `/v2/organizations/{organization_id}/sources/-/findings` + # + + # `/v2/organizations/{organization_id}/sources/-/locations/{location_id}/findings` + # + # @overload list_findings(request, options = nil) + # Pass arguments to `list_findings` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::ListFindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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, 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. If no location is + # specified, the default is global. The following list shows some examples: + # + # + `organizations/[organization_id]/sources/[source_id]` + # + + # `organizations/[organization_id]/sources/[source_id]/locations/[location_id]` + # + `folders/[folder_id]/sources/[source_id]` + # + `folders/[folder_id]/sources/[source_id]/locations/[location_id]` + # + `projects/[project_id]/sources/[source_id]` + # + `projects/[project_id]/sources/[source_id]/locations/[location_id]` + # + # To list across all sources provide a source_id of `-`. The following + # list shows some examples: + # + # + `organizations/{organization_id}/sources/-` + # + `organizations/{organization_id}/sources/-/locations/{location_id}` + # + `folders/{folder_id}/sources/-` + # + `folders/{folder_id}/sources/-locations/{location_id}` + # + `projects/{projects_id}/sources/-` + # + `projects/{projects_id}/sources/-/locations/{location_id}` + # @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 + # * 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: `=`, `:` + # * security_marks.marks: `=`, `:` + # * 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,parent". 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,parent". Redundant space characters in the + # syntax are insignificant. "name desc,parent" and " + # name desc , parent " are equivalent. + # + # The following fields are supported: + # name + # parent + # state + # category + # resource_name + # event_time + # security_marks.marks + # @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::V2::ListFindingsResponse::ListFindingsResult>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::ListFindingsResponse::ListFindingsResult>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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. If no location is specified, default is + # global. + # + # @overload list_mute_configs(request, options = nil) + # Pass arguments to `list_mute_configs` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::ListMuteConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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]`, + # `organizations/[organization_id]/locations/[location_id]`, + # `folders/[folder_id]/locations/[location_id]`, + # `projects/[project_id]/locations/[location_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::V2::MuteConfig>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::MuteConfig>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::ListNotificationConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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]/locations/[location_id]", + # "folders/[folder_id]/locations/[location_id]", or + # "projects/[project_id]/locations/[location_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::V2::NotificationConfig>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::NotificationConfig>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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 + + ## + # 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::V2::ListResourceValueConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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 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 `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::V2::ResourceValueConfig>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::ResourceValueConfig>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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 + + ## + # 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::V2::ListSourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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::V2::Source>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::Source>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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 + + ## + # 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::V2::ListValuedResourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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 exposed 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` + # + # 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::V2::ValuedResource>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::ValuedResource>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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 + + ## + # Updates the state of a finding. If no location is specified, finding is + # assumed to be in global + # + # @overload set_finding_state(request, options = nil) + # Pass arguments to `set_finding_state` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::SetFindingStateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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) + # 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. If no location is specified, finding is assumed to be in + # global. The following list shows some examples: + # + # + + # `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}` + # + + # `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + # + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}` + # + + # `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + # + `projects/{project_id}/sources/{source_id}/findings/{finding_id}` + # + + # `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + # @param state [::Google::Cloud::SecurityCenter::V2::Finding::State] + # Required. The desired State of the finding. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V2::Finding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::Finding] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::SetFindingStateRequest.new + # + # # Call the set_finding_state method. + # result = client.set_finding_state request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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 + + ## + # 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/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::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::V2::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 + + ## + # Updates the mute state of a finding. If no location is specified, finding + # is assumed to be in global + # + # @overload set_mute(request, options = nil) + # Pass arguments to `set_mute` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::SetMuteRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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. If no location is specified, finding is assumed to be in + # global. The following list shows some examples: + # + # + + # `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}` + # + + # `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + # + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}` + # + + # `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + # + `projects/{project_id}/sources/{source_id}/findings/{finding_id}` + # + + # `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + # @param mute [::Google::Cloud::SecurityCenter::V2::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::V2::Finding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::Finding] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::SetMuteRequest.new + # + # # Call the set_mute method. + # result = client.set_mute request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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 + + ## + # 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/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::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::V2::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 + + ## + # 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::V2::UpdateBigQueryExportRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::BigQueryExport] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::BigQueryExport] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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 + + ## + # Updates external system. This is for a given finding. If no location is + # specified, finding is assumed to be in global + # + # @overload update_external_system(request, options = nil) + # Pass arguments to `update_external_system` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::UpdateExternalSystemRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::ExternalSystem] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::ExternalSystem] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::UpdateExternalSystemRequest.new + # + # # Call the update_external_system method. + # result = client.update_external_system request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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. If no location is specified, finding is + # assumed to be in global. 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::V2::UpdateFindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::Finding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::Finding] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::UpdateFindingRequest.new + # + # # Call the update_finding method. + # result = client.update_finding request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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. If no location is specified, default is + # global. + # + # @overload update_mute_config(request, options = nil) + # Pass arguments to `update_mute_config` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::UpdateMuteConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::MuteConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::MuteConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::UpdateMuteConfigRequest.new + # + # # Call the update_mute_config method. + # result = client.update_mute_config request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::UpdateNotificationConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::NotificationConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::NotificationConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::UpdateNotificationConfigRequest.new + # + # # Call the update_notification_config method. + # result = client.update_notification_config request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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 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::V2::UpdateResourceValueConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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::V2::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. + # + # To update nested fields, include the top level field in the mask + # For example, to update gcp_metadata.resource_type, include the + # "gcp_metadata" field mask + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V2::ResourceValueConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::ResourceValueConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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 + + ## + # Updates security marks. For Finding Security marks, if no location is + # specified, finding is assumed to be in global. Assets Security Marks can + # only be accessed through global endpoint. + # + # @overload update_security_marks(request, options = nil) + # Pass arguments to `update_security_marks` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::UpdateSecurityMarksRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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) + # 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::V2::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.". + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::SecurityCenter::V2::SecurityMarks] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::SecurityMarks] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::UpdateSecurityMarksRequest.new + # + # # Call the update_security_marks method. + # result = client.update_security_marks request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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 + + ## + # Updates a source. + # + # @overload update_source(request, options = nil) + # Pass arguments to `update_source` via a request object, either of type + # {::Google::Cloud::SecurityCenter::V2::UpdateSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::Source] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::Source] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/security_center/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::SecurityCenter::V2::UpdateSourceRequest.new + # + # # Call the update_source method. + # result = client.update_source request + # + # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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 + + ## + # 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::V2::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 + # # batch_create_resource_value_configs to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.batch_create_resource_value_configs.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.batch_create_resource_value_configs.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 `batch_create_resource_value_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_create_resource_value_configs + ## + # RPC-specific configuration for `bulk_mute_findings` + # @return [::Gapic::Config::Method] + # + attr_reader :bulk_mute_findings + ## + # RPC-specific configuration for `create_big_query_export` + # @return [::Gapic::Config::Method] + # + attr_reader :create_big_query_export + ## + # 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 `create_source` + # @return [::Gapic::Config::Method] + # + attr_reader :create_source + ## + # RPC-specific configuration for `delete_big_query_export` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_big_query_export + ## + # 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_resource_value_config` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_resource_value_config + ## + # RPC-specific configuration for `get_big_query_export` + # @return [::Gapic::Config::Method] + # + attr_reader :get_big_query_export + ## + # 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_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_resource_value_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_resource_value_config + ## + # RPC-specific configuration for `get_source` + # @return [::Gapic::Config::Method] + # + attr_reader :get_source + ## + # RPC-specific configuration for `group_findings` + # @return [::Gapic::Config::Method] + # + attr_reader :group_findings + ## + # RPC-specific configuration for `list_attack_paths` + # @return [::Gapic::Config::Method] + # + attr_reader :list_attack_paths + ## + # RPC-specific configuration for `list_big_query_exports` + # @return [::Gapic::Config::Method] + # + attr_reader :list_big_query_exports + ## + # 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_resource_value_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_resource_value_configs + ## + # RPC-specific configuration for `list_sources` + # @return [::Gapic::Config::Method] + # + attr_reader :list_sources + ## + # RPC-specific configuration for `list_valued_resources` + # @return [::Gapic::Config::Method] + # + attr_reader :list_valued_resources + ## + # RPC-specific configuration for `set_finding_state` + # @return [::Gapic::Config::Method] + # + attr_reader :set_finding_state + ## + # RPC-specific configuration for `set_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy + ## + # RPC-specific configuration for `set_mute` + # @return [::Gapic::Config::Method] + # + attr_reader :set_mute + ## + # RPC-specific configuration for `test_iam_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :test_iam_permissions + ## + # RPC-specific configuration for `update_big_query_export` + # @return [::Gapic::Config::Method] + # + attr_reader :update_big_query_export + ## + # 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_resource_value_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_resource_value_config + ## + # RPC-specific configuration for `update_security_marks` + # @return [::Gapic::Config::Method] + # + attr_reader :update_security_marks + ## + # RPC-specific configuration for `update_source` + # @return [::Gapic::Config::Method] + # + attr_reader :update_source + + # @private + def initialize parent_rpcs = nil + 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 + 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_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 + 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 + create_source_config = parent_rpcs.create_source if parent_rpcs.respond_to? :create_source + @create_source = ::Gapic::Config::Method.new create_source_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 + 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_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_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_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_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_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 + get_source_config = parent_rpcs.get_source if parent_rpcs.respond_to? :get_source + @get_source = ::Gapic::Config::Method.new get_source_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_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 + 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 + 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_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 + list_sources_config = parent_rpcs.list_sources if parent_rpcs.respond_to? :list_sources + @list_sources = ::Gapic::Config::Method.new list_sources_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 + 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_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 + set_mute_config = parent_rpcs.set_mute if parent_rpcs.respond_to? :set_mute + @set_mute = ::Gapic::Config::Method.new set_mute_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 + 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 + 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_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 + 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 + update_source_config = parent_rpcs.update_source if parent_rpcs.respond_to? :update_source + @update_source = ::Gapic::Config::Method.new update_source_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-v2/lib/google/cloud/security_center/v2/security_center/rest/operations.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest/operations.rb new file mode 100644 index 000000000000..76b36a0a23ac --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/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 V2 + 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::V2::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::V2::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::V2::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::V2::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: "/v2/{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: "/v2/{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: "/v2/{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: "/v2/{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-v2/lib/google/cloud/security_center/v2/security_center/rest/service_stub.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest/service_stub.rb new file mode 100644 index 000000000000..49be184914d1 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest/service_stub.rb @@ -0,0 +1,3336 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/v2/securitycenter_service_pb" + +module Google + module Cloud + module SecurityCenter + module V2 + 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 batch_create_resource_value_configs REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::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::V2::BatchCreateResourceValueConfigsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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 bulk_mute_findings REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::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_big_query_export REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::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::V2::BigQueryExport] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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 create_finding REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::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::V2::Finding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::MuteConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::NotificationConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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 create_source REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::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::V2::Source] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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 delete_big_query_export REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::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 delete_mute_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::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::V2::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_resource_value_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::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_big_query_export REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::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::V2::BigQueryExport] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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_simulation REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::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::V2::Simulation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::ValuedResource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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_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::V2::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::V2::MuteConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::NotificationConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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_resource_value_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::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::V2::ResourceValueConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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 get_source REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::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::V2::Source] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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_findings REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::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::V2::GroupFindingsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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_attack_paths REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::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::V2::ListAttackPathsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::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::V2::ListAttackPathsResponse.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::V2::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::V2::ListBigQueryExportsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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 list_findings REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::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::V2::ListFindingsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::ListMuteConfigsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::ListNotificationConfigsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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_resource_value_configs REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::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::V2::ListResourceValueConfigsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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 list_sources REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::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::V2::ListSourcesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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 list_valued_resources REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::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::V2::ListValuedResourcesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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 set_finding_state REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::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::V2::Finding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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 set_mute REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::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::V2::Finding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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 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 update_big_query_export REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::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::V2::BigQueryExport] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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 update_external_system REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::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::V2::ExternalSystem] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::Finding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::MuteConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::NotificationConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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_resource_value_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::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::V2::ResourceValueConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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 update_security_marks REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::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::V2::SecurityMarks] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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 update_source REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::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::V2::Source] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::SecurityCenter::V2::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::V2::Source.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 batch_create_resource_value_configs REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::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: "/v2/{parent}/resourceValueConfigs:batchCreate", + body: "*", + matches: [ + ["parent", %r{^organizations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/resourceValueConfigs:batchCreate", + body: "*", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the bulk_mute_findings REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::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: "/v2/{parent}/findings:bulkMute", + body: "*", + matches: [ + ["parent", %r{^organizations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/findings:bulkMute", + body: "*", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/findings:bulkMute", + body: "*", + matches: [ + ["parent", %r{^folders/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/findings:bulkMute", + body: "*", + matches: [ + ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/findings:bulkMute", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/findings:bulkMute", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, 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::V2::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: "/v2/{parent}/bigQueryExports", + body: "big_query_export", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/bigQueryExports", + body: "big_query_export", + matches: [ + ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/bigQueryExports", + body: "big_query_export", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_finding REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::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: "/v2/{parent}/findings", + body: "finding", + matches: [ + ["parent", %r{^organizations/[^/]+/sources/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{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::V2::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: "/v2/{parent}/muteConfigs", + body: "mute_config", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/muteConfigs", + body: "mute_config", + matches: [ + ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/muteConfigs", + body: "mute_config", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/muteConfigs", + body: "mute_config", + matches: [ + ["parent", %r{^organizations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/muteConfigs", + body: "mute_config", + matches: [ + ["parent", %r{^folders/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/muteConfigs", + body: "mute_config", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_notification_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::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: "/v2/{parent}/notificationConfigs", + body: "notification_config", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/notificationConfigs", + body: "notification_config", + matches: [ + ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/notificationConfigs", + body: "notification_config", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_source REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::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: "/v2/{parent}/sources", + body: "source", + matches: [ + ["parent", %r{^organizations/[^/]+/?$}, 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::V2::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: "/v2/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/bigQueryExports/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^folders/[^/]+/locations/[^/]+/bigQueryExports/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/bigQueryExports/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_mute_config REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::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: "/v2/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^folders/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^folders/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v2/{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::V2::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: "/v2/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/notificationConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^folders/[^/]+/locations/[^/]+/notificationConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/notificationConfigs/[^/]+/?$}, 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::V2::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: "/v2/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/resourceValueConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/resourceValueConfigs/[^/]+/?$}, 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::V2::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: "/v2/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/bigQueryExports/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^folders/[^/]+/locations/[^/]+/bigQueryExports/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/bigQueryExports/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_simulation REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::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: "/v2/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/simulations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/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::V2::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: "/v2/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/simulations/[^/]+/valuedResources/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/simulations/[^/]+/valuedResources/[^/]+/?$}, 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: "/v2/{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::V2::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: "/v2/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^folders/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^folders/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{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::V2::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: "/v2/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/notificationConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^folders/[^/]+/locations/[^/]+/notificationConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/notificationConfigs/[^/]+/?$}, 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::V2::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: "/v2/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/resourceValueConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/resourceValueConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_source REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::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: "/v2/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the group_findings REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::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: "/v2/{parent}/findings:group", + body: "*", + matches: [ + ["parent", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/findings:group", + body: "*", + matches: [ + ["parent", %r{^organizations/[^/]+/sources/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/findings:group", + body: "*", + matches: [ + ["parent", %r{^folders/[^/]+/sources/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/findings:group", + body: "*", + matches: [ + ["parent", %r{^folders/[^/]+/sources/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/findings:group", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/sources/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/findings:group", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/sources/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_attack_paths REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::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: "/v2/{parent}/attackPaths", + matches: [ + ["parent", %r{^organizations/[^/]+/simulations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/attackPaths", + matches: [ + ["parent", %r{^organizations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/attackPaths", + matches: [ + ["parent", %r{^organizations/[^/]+/simulations/[^/]+/valuedResources/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/attackPaths", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/simulations/[^/]+/valuedResources/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/attackPaths", + matches: [ + ["parent", %r{^organizations/[^/]+/simulations/[^/]+/attackExposureResults/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/attackPaths", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/simulations/[^/]+/attackExposureResults/[^/]+/?$}, 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::V2::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: "/v2/{parent}/bigQueryExports", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/bigQueryExports", + matches: [ + ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/bigQueryExports", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_findings REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::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: "/v2/{parent}/findings", + matches: [ + ["parent", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/findings", + matches: [ + ["parent", %r{^organizations/[^/]+/sources/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/findings", + matches: [ + ["parent", %r{^folders/[^/]+/sources/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/findings", + matches: [ + ["parent", %r{^folders/[^/]+/sources/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/findings", + matches: [ + ["parent", %r{^projects/[^/]+/sources/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/findings", + matches: [ + ["parent", %r{^projects/[^/]+/sources/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_mute_configs REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::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: "/v2/{parent}/muteConfigs", + matches: [ + ["parent", %r{^organizations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/muteConfigs", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/muteConfigs", + matches: [ + ["parent", %r{^folders/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/muteConfigs", + matches: [ + ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/muteConfigs", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/muteConfigs", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_notification_configs REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::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: "/v2/{parent}/notificationConfigs", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/notificationConfigs", + matches: [ + ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/notificationConfigs", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, 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::V2::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: "/v2/{parent}/resourceValueConfigs", + matches: [ + ["parent", %r{^organizations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/resourceValueConfigs", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_sources REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::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: "/v2/{parent}/sources", + matches: [ + ["parent", %r{^organizations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/sources", + matches: [ + ["parent", %r{^folders/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/sources", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_valued_resources REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::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: "/v2/{parent}/valuedResources", + matches: [ + ["parent", %r{^organizations/[^/]+/simulations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/valuedResources", + matches: [ + ["parent", %r{^organizations/[^/]+/simulations/[^/]+/attackExposureResults/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/valuedResources", + 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::V2::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: "/v2/{name}:setState", + body: "*", + matches: [ + ["name", %r{^organizations/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{name}:setState", + body: "*", + matches: [ + ["name", %r{^organizations/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{name}:setState", + body: "*", + matches: [ + ["name", %r{^folders/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{name}:setState", + body: "*", + matches: [ + ["name", %r{^folders/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{name}:setState", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{name}:setState", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/sources/[^/]+/locations/[^/]+/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: "/v2/{resource}:setIamPolicy", + body: "*", + matches: [ + ["resource", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the set_mute REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::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: "/v2/{name}:setMute", + body: "*", + matches: [ + ["name", %r{^organizations/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{name}:setMute", + body: "*", + matches: [ + ["name", %r{^organizations/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{name}:setMute", + body: "*", + matches: [ + ["name", %r{^folders/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{name}:setMute", + body: "*", + matches: [ + ["name", %r{^folders/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{name}:setMute", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v2/{name}:setMute", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/?$}, 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: "/v2/{resource}:testIamPermissions", + body: "*", + matches: [ + ["resource", %r{^organizations/[^/]+/sources/[^/]+/?$}, 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::V2::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: "/v2/{big_query_export.name}", + body: "big_query_export", + matches: [ + ["big_query_export.name", %r{^organizations/[^/]+/locations/[^/]+/bigQueryExports/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{big_query_export.name}", + body: "big_query_export", + matches: [ + ["big_query_export.name", %r{^folders/[^/]+/locations/[^/]+/bigQueryExports/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{big_query_export.name}", + body: "big_query_export", + matches: [ + ["big_query_export.name", %r{^projects/[^/]+/locations/[^/]+/bigQueryExports/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_external_system REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::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: "/v2/{external_system.name}", + body: "external_system", + matches: [ + ["external_system.name", %r{^organizations/[^/]+/sources/[^/]+/findings/[^/]+/externalSystems/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{external_system.name}", + body: "external_system", + matches: [ + ["external_system.name", %r{^organizations/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/externalSystems/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{external_system.name}", + body: "external_system", + matches: [ + ["external_system.name", %r{^folders/[^/]+/sources/[^/]+/findings/[^/]+/externalSystems/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{external_system.name}", + body: "external_system", + matches: [ + ["external_system.name", %r{^folders/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/externalSystems/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{external_system.name}", + body: "external_system", + matches: [ + ["external_system.name", %r{^projects/[^/]+/sources/[^/]+/findings/[^/]+/externalSystems/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{external_system.name}", + body: "external_system", + matches: [ + ["external_system.name", %r{^projects/[^/]+/sources/[^/]+/locations/[^/]+/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::V2::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: "/v2/{finding.name}", + body: "finding", + matches: [ + ["finding.name", %r{^organizations/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{finding.name}", + body: "finding", + matches: [ + ["finding.name", %r{^organizations/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{finding.name}", + body: "finding", + matches: [ + ["finding.name", %r{^folders/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{finding.name}", + body: "finding", + matches: [ + ["finding.name", %r{^folders/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{finding.name}", + body: "finding", + matches: [ + ["finding.name", %r{^projects/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{finding.name}", + body: "finding", + matches: [ + ["finding.name", %r{^projects/[^/]+/sources/[^/]+/locations/[^/]+/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::V2::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: "/v2/{mute_config.name}", + body: "mute_config", + matches: [ + ["mute_config.name", %r{^organizations/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{mute_config.name}", + body: "mute_config", + matches: [ + ["mute_config.name", %r{^organizations/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{mute_config.name}", + body: "mute_config", + matches: [ + ["mute_config.name", %r{^folders/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{mute_config.name}", + body: "mute_config", + matches: [ + ["mute_config.name", %r{^folders/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{mute_config.name}", + body: "mute_config", + matches: [ + ["mute_config.name", %r{^projects/[^/]+/muteConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{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::V2::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: "/v2/{notification_config.name}", + body: "notification_config", + matches: [ + ["notification_config.name", %r{^organizations/[^/]+/locations/[^/]+/notificationConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{notification_config.name}", + body: "notification_config", + matches: [ + ["notification_config.name", %r{^folders/[^/]+/locations/[^/]+/notificationConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{notification_config.name}", + body: "notification_config", + matches: [ + ["notification_config.name", %r{^projects/[^/]+/locations/[^/]+/notificationConfigs/[^/]+/?$}, 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::V2::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: "/v2/{resource_value_config.name}", + body: "resource_value_config", + matches: [ + ["resource_value_config.name", %r{^organizations/[^/]+/resourceValueConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{resource_value_config.name}", + body: "resource_value_config", + matches: [ + ["resource_value_config.name", %r{^organizations/[^/]+/locations/[^/]+/resourceValueConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_security_marks REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::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: "/v2/{security_marks.name}", + body: "security_marks", + matches: [ + ["security_marks.name", %r{^organizations/[^/]+/sources/[^/]+/findings/[^/]+/securityMarks/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{security_marks.name}", + body: "security_marks", + matches: [ + ["security_marks.name", %r{^organizations/[^/]+/assets/[^/]+/securityMarks/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{security_marks.name}", + body: "security_marks", + matches: [ + ["security_marks.name", %r{^organizations/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/securityMarks/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{security_marks.name}", + body: "security_marks", + matches: [ + ["security_marks.name", %r{^folders/[^/]+/sources/[^/]+/findings/[^/]+/securityMarks/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{security_marks.name}", + body: "security_marks", + matches: [ + ["security_marks.name", %r{^folders/[^/]+/assets/[^/]+/securityMarks/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{security_marks.name}", + body: "security_marks", + matches: [ + ["security_marks.name", %r{^folders/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/securityMarks/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{security_marks.name}", + body: "security_marks", + matches: [ + ["security_marks.name", %r{^projects/[^/]+/sources/[^/]+/findings/[^/]+/securityMarks/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{security_marks.name}", + body: "security_marks", + matches: [ + ["security_marks.name", %r{^projects/[^/]+/assets/[^/]+/securityMarks/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{security_marks.name}", + body: "security_marks", + matches: [ + ["security_marks.name", %r{^projects/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/securityMarks/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_source REST call + # + # @param request_pb [::Google::Cloud::SecurityCenter::V2::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: "/v2/{source.name}", + body: "source", + matches: [ + ["source.name", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/version.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/version.rb new file mode 100644 index 000000000000..543e0946f0de --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/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 V2 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/access_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/access_pb.rb new file mode 100644 index 000000000000..626f8a57d25d --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/access_pb.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/access.proto + +require 'google/protobuf' + + +descriptor_data = "\n+google/cloud/securitycenter/v2/access.proto\x12\x1egoogle.cloud.securitycenter.v2\"\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.v2.Geolocation\x12\x19\n\x11user_agent_family\x18\x04 \x01(\t\x12\x12\n\nuser_agent\x18\x05 \x01(\t\x12\x14\n\x0cservice_name\x18\x06 \x01(\t\x12\x13\n\x0bmethod_name\x18\x07 \x01(\t\x12\x19\n\x11principal_subject\x18\x08 \x01(\t\x12 \n\x18service_account_key_name\x18\t \x01(\t\x12\x65\n\x1fservice_account_delegation_info\x18\n \x03(\x0b\x32<.google.cloud.securitycenter.v2.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.v2B\x0b\x41\x63\x63\x65ssProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + Access = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Access").msgclass + ServiceAccountDelegationInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ServiceAccountDelegationInfo").msgclass + Geolocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Geolocation").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/affected_resources_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/affected_resources_pb.rb new file mode 100644 index 000000000000..b2ded5cca4eb --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/affected_resources_pb.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/affected_resources.proto + +require 'google/protobuf' + + +descriptor_data = "\n7google/cloud/securitycenter/v2/affected_resources.proto\x12\x1egoogle.cloud.securitycenter.v2\"\"\n\x11\x41\x66\x66\x65\x63tedResources\x12\r\n\x05\x63ount\x18\x01 \x01(\x03\x42\xf0\x01\n\"com.google.cloud.securitycenter.v2B\x16\x41\x66\x66\x65\x63tedResourcesProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + AffectedResources = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AffectedResources").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/agent_anomaly_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/agent_anomaly_pb.rb new file mode 100644 index 000000000000..01a07022c2fe --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/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/v2/agent_anomaly.proto + +require 'google/protobuf' + + +descriptor_data = "\n2google/cloud/securitycenter/v2/agent_anomaly.proto\x12\x1egoogle.cloud.securitycenter.v2\"\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.v2.DetectorReference\x12R\n\x15invocation_references\x18\x03 \x03(\x0b\x32\x33.google.cloud.securitycenter.v2.InvocationReference\"\x8c\x02\n\x11\x44\x65tectorReference\x12L\n\x08severity\x18\x01 \x01(\x0e\x32:.google.cloud.securitycenter.v2.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.v2B\x11\x41gentAnomalyProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + AgentAnomaly = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AgentAnomaly").msgclass + DetectorReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.DetectorReference").msgclass + DetectorReference::Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.DetectorReference.Severity").enummodule + InvocationReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.InvocationReference").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/agent_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/agent_pb.rb new file mode 100644 index 000000000000..109bb02aa5a0 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/agent_pb.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/agent.proto + +require 'google/protobuf' + + +descriptor_data = "\n*google/cloud/securitycenter/v2/agent.proto\x12\x1egoogle.cloud.securitycenter.v2\")\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.v2B\nAgentProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + Agent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Agent").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/agent_session_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/agent_session_pb.rb new file mode 100644 index 000000000000..d708ada7a87f --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/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/v2/agent_session.proto + +require 'google/protobuf' + + +descriptor_data = "\n2google/cloud/securitycenter/v2/agent_session.proto\x12\x1egoogle.cloud.securitycenter.v2\"\"\n\x0c\x41gentSession\x12\x12\n\nsession_id\x18\x01 \x01(\tB\xeb\x01\n\"com.google.cloud.securitycenter.v2B\x11\x41gentSessionProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + AgentSession = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AgentSession").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/ai_model_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/ai_model_pb.rb new file mode 100644 index 000000000000..e0d357ddd795 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/ai_model_pb.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/ai_model.proto + +require 'google/protobuf' + + +descriptor_data = "\n-google/cloud/securitycenter/v2/ai_model.proto\x12\x1egoogle.cloud.securitycenter.v2\"\xbe\x02\n\x07\x41iModel\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0e\n\x06\x64omain\x18\x02 \x01(\t\x12\x0f\n\x07library\x18\x03 \x01(\t\x12\x10\n\x08location\x18\x04 \x01(\t\x12\x11\n\tpublisher\x18\x05 \x01(\t\x12W\n\x13\x64\x65ployment_platform\x18\x06 \x01(\x0e\x32:.google.cloud.securitycenter.v2.AiModel.DeploymentPlatform\x12\x14\n\x0c\x64isplay_name\x18\x07 \x01(\t\"p\n\x12\x44\x65ploymentPlatform\x12#\n\x1f\x44\x45PLOYMENT_PLATFORM_UNSPECIFIED\x10\x00\x12\r\n\tVERTEX_AI\x10\x01\x12\x07\n\x03GKE\x10\x02\x12\x07\n\x03GCE\x10\x03\x12\x14\n\x10\x46INE_TUNED_MODEL\x10\x04\x42\xe6\x01\n\"com.google.cloud.securitycenter.v2B\x0c\x41iModelProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + AiModel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AiModel").msgclass + AiModel::DeploymentPlatform = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AiModel.DeploymentPlatform").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/application_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/application_pb.rb new file mode 100644 index 000000000000..3adcac6a59b9 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/application_pb.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/application.proto + +require 'google/protobuf' + + +descriptor_data = "\n0google/cloud/securitycenter/v2/application.proto\x12\x1egoogle.cloud.securitycenter.v2\"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.v2B\x10\x41pplicationProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + Application = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Application").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/attack_exposure_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/attack_exposure_pb.rb new file mode 100644 index 000000000000..2455e60ba1f7 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/attack_exposure_pb.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/attack_exposure.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n4google/cloud/securitycenter/v2/attack_exposure.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x8f\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\x12H\n\x05state\x18\x04 \x01(\x0e\x32\x34.google.cloud.securitycenter.v2.AttackExposure.StateB\x03\xe0\x41\x03\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.v2B\x13\x41ttackExposureProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + AttackExposure = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AttackExposure").msgclass + AttackExposure::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AttackExposure.State").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/attack_path_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/attack_path_pb.rb new file mode 100644 index 000000000000..29d28dc5bf3c --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/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/v2/attack_path.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' + + +descriptor_data = "\n0google/cloud/securitycenter/v2/attack_path.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x19google/api/resource.proto\"\xf0\n\n\nAttackPath\x12\x0c\n\x04name\x18\x01 \x01(\t\x12M\n\npath_nodes\x18\x02 \x03(\x0b\x32\x39.google.cloud.securitycenter.v2.AttackPath.AttackPathNode\x12H\n\x05\x65\x64ges\x18\x03 \x03(\x0b\x32\x39.google.cloud.securitycenter.v2.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.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding\x12\x0c\n\x04uuid\x18\x05 \x01(\t\x12^\n\x0c\x61ttack_steps\x18\x06 \x03(\x0b\x32H.google.cloud.securitycenter.v2.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.v2.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.v2.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:\xc3\x02\xea\x41\xbf\x02\n(securitycenter.googleapis.com/AttackPath\x12qorganizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}/attackPaths/{attack_path}\x12\x86\x01organizations/{organization}/locations/{location}/simulations/{simulation}/valuedResources/{valued_resource}/attackPaths/{attack_path}*\x0b\x61ttackPaths2\nattackPathB\xe9\x01\n\"com.google.cloud.securitycenter.v2B\x0f\x41ttackPathProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + AttackPath = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AttackPath").msgclass + AttackPath::AttackPathNode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AttackPath.AttackPathNode").msgclass + AttackPath::AttackPathNode::PathNodeAssociatedFinding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding").msgclass + AttackPath::AttackPathNode::AttackStepNode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode").msgclass + AttackPath::AttackPathNode::NodeType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AttackPath.AttackPathNode.NodeType").enummodule + AttackPath::AttackPathEdge = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AttackPath.AttackPathEdge").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/backup_disaster_recovery_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/backup_disaster_recovery_pb.rb new file mode 100644 index 000000000000..1d0185074970 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/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/v2/backup_disaster_recovery.proto + +require 'google/protobuf' + +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n=google/cloud/securitycenter/v2/backup_disaster_recovery.proto\x12\x1egoogle.cloud.securitycenter.v2\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.v2B\x1b\x42\x61\x63kupDisasterRecoveryProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + BackupDisasterRecovery = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.BackupDisasterRecovery").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/bigquery_export_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/bigquery_export_pb.rb new file mode 100644 index 000000000000..c0ea27ff0b00 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/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/v2/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/v2/bigquery_export.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa2\x04\n\x0e\x42igQueryExport\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\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:\xa1\x02\xea\x41\x9d\x02\n,securitycenter.googleapis.com/BigQueryExport\x12Jorganizations/{organization}/locations/{location}/bigQueryExports/{export}\x12>folders/{folder}/locations/{location}/bigQueryExports/{export}\x12@projects/{project}/locations/{location}/bigQueryExports/{export}*\x0f\x62igQueryExports2\x0e\x62igQueryExportB\xed\x01\n\"com.google.cloud.securitycenter.v2B\x13\x42igQueryExportProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + BigQueryExport = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.BigQueryExport").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/chokepoint_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/chokepoint_pb.rb new file mode 100644 index 000000000000..077e14997c90 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/chokepoint_pb.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/chokepoint.proto + +require 'google/protobuf' + + +descriptor_data = "\n/google/cloud/securitycenter/v2/chokepoint.proto\x12\x1egoogle.cloud.securitycenter.v2\"&\n\nChokepoint\x12\x18\n\x10related_findings\x18\x01 \x03(\tB\xe9\x01\n\"com.google.cloud.securitycenter.v2B\x0f\x43hokepointProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + Chokepoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Chokepoint").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/cloud_armor_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/cloud_armor_pb.rb new file mode 100644 index 000000000000..6cd7e16d09a3 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/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/v2/cloud_armor.proto + +require 'google/protobuf' + +require 'google/protobuf/duration_pb' + + +descriptor_data = "\n0google/cloud/securitycenter/v2/cloud_armor.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1egoogle/protobuf/duration.proto\"\xde\x02\n\nCloudArmor\x12G\n\x0fsecurity_policy\x18\x01 \x01(\x0b\x32..google.cloud.securitycenter.v2.SecurityPolicy\x12:\n\x08requests\x18\x02 \x01(\x0b\x32(.google.cloud.securitycenter.v2.Requests\x12O\n\x13\x61\x64\x61ptive_protection\x18\x03 \x01(\x0b\x32\x32.google.cloud.securitycenter.v2.AdaptiveProtection\x12\x36\n\x06\x61ttack\x18\x04 \x01(\x0b\x32&.google.cloud.securitycenter.v2.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\"\x82\x01\n\x06\x41ttack\x12\x17\n\x0fvolume_pps_long\x18\x04 \x01(\x03\x12\x17\n\x0fvolume_bps_long\x18\x05 \x01(\x03\x12\x16\n\x0e\x63lassification\x18\x03 \x01(\t\x12\x16\n\nvolume_pps\x18\x01 \x01(\x05\x42\x02\x18\x01\x12\x16\n\nvolume_bps\x18\x02 \x01(\x05\x42\x02\x18\x01\x42\xe9\x01\n\"com.google.cloud.securitycenter.v2B\x0f\x43loudArmorProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + CloudArmor = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.CloudArmor").msgclass + SecurityPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.SecurityPolicy").msgclass + Requests = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Requests").msgclass + AdaptiveProtection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AdaptiveProtection").msgclass + Attack = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Attack").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/cloud_dlp_data_profile_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/cloud_dlp_data_profile_pb.rb new file mode 100644 index 000000000000..388023feb3f9 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/cloud_dlp_data_profile_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/cloud_dlp_data_profile.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' + + +descriptor_data = "\n;google/cloud/securitycenter/v2/cloud_dlp_data_profile.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x19google/api/resource.proto\"\xf4\x01\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.v2.CloudDlpDataProfile.ParentType\"H\n\nParentType\x12\x1b\n\x17PARENT_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0cORGANIZATION\x10\x01\x12\x0b\n\x07PROJECT\x10\x02\x42\x94\x03\n\"com.google.cloud.securitycenter.v2B\x18\x43loudDlpDataProfileProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2\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 V2 + CloudDlpDataProfile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.CloudDlpDataProfile").msgclass + CloudDlpDataProfile::ParentType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.CloudDlpDataProfile.ParentType").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/cloud_dlp_inspection_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/cloud_dlp_inspection_pb.rb new file mode 100644 index 000000000000..98b7cb9b4a86 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/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/v2/cloud_dlp_inspection.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' + + +descriptor_data = "\n9google/cloud/securitycenter/v2/cloud_dlp_inspection.proto\x12\x1egoogle.cloud.securitycenter.v2\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.v2B\x17\x43loudDlpInspectionProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2\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 V2 + CloudDlpInspection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.CloudDlpInspection").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/compliance_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/compliance_pb.rb new file mode 100644 index 000000000000..547a8fe23d36 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/compliance_pb.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/compliance.proto + +require 'google/protobuf' + + +descriptor_data = "\n/google/cloud/securitycenter/v2/compliance.proto\x12\x1egoogle.cloud.securitycenter.v2\"<\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.v2B\x0f\x43omplianceProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + Compliance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Compliance").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/connection_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/connection_pb.rb new file mode 100644 index 000000000000..b0144d4d939a --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/connection_pb.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/connection.proto + +require 'google/protobuf' + + +descriptor_data = "\n/google/cloud/securitycenter/v2/connection.proto\x12\x1egoogle.cloud.securitycenter.v2\"\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.v2.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.v2B\x0f\x43onnectionProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + Connection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Connection").msgclass + Connection::Protocol = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Connection.Protocol").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/contact_details_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/contact_details_pb.rb new file mode 100644 index 000000000000..06a5286cc3de --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/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/v2/contact_details.proto + +require 'google/protobuf' + + +descriptor_data = "\n4google/cloud/securitycenter/v2/contact_details.proto\x12\x1egoogle.cloud.securitycenter.v2\"K\n\x0e\x43ontactDetails\x12\x39\n\x08\x63ontacts\x18\x01 \x03(\x0b\x32\'.google.cloud.securitycenter.v2.Contact\"\x18\n\x07\x43ontact\x12\r\n\x05\x65mail\x18\x01 \x01(\tB\xed\x01\n\"com.google.cloud.securitycenter.v2B\x13\x43ontactDetailsProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + ContactDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ContactDetails").msgclass + Contact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Contact").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/container_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/container_pb.rb new file mode 100644 index 000000000000..14bc2a2bab9f --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/container_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/container.proto + +require 'google/protobuf' + +require 'google/cloud/securitycenter/v2/label_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n.google/cloud/securitycenter/v2/container.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a*google/cloud/securitycenter/v2/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.v2.Label\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\xe8\x01\n\"com.google.cloud.securitycenter.v2B\x0e\x43ontainerProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + Container = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Container").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/data_access_event_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/data_access_event_pb.rb new file mode 100644 index 000000000000..77d3859aa987 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/data_access_event_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/data_access_event.proto + +require 'google/protobuf' + +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n6google/cloud/securitycenter/v2/data_access_event.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/protobuf/timestamp.proto\"\x80\x02\n\x0f\x44\x61taAccessEvent\x12\x10\n\x08\x65vent_id\x18\x01 \x01(\t\x12\x17\n\x0fprincipal_email\x18\x02 \x01(\t\x12L\n\toperation\x18\x03 \x01(\x0e\x32\x39.google.cloud.securitycenter.v2.DataAccessEvent.Operation\x12.\n\nevent_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"D\n\tOperation\x12\x19\n\x15OPERATION_UNSPECIFIED\x10\x00\x12\x08\n\x04READ\x10\x01\x12\x08\n\x04MOVE\x10\x02\x12\x08\n\x04\x43OPY\x10\x03\x42\xee\x01\n\"com.google.cloud.securitycenter.v2B\x14\x44\x61taAccessEventProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + DataAccessEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.DataAccessEvent").msgclass + DataAccessEvent::Operation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.DataAccessEvent.Operation").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/data_flow_event_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/data_flow_event_pb.rb new file mode 100644 index 000000000000..418d09d93c4a --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/data_flow_event_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/data_flow_event.proto + +require 'google/protobuf' + +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n4google/cloud/securitycenter/v2/data_flow_event.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/protobuf/timestamp.proto\"\x97\x02\n\rDataFlowEvent\x12\x10\n\x08\x65vent_id\x18\x01 \x01(\t\x12\x17\n\x0fprincipal_email\x18\x02 \x01(\t\x12J\n\toperation\x18\x03 \x01(\x0e\x32\x37.google.cloud.securitycenter.v2.DataFlowEvent.Operation\x12\x19\n\x11violated_location\x18\x04 \x01(\t\x12.\n\nevent_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"D\n\tOperation\x12\x19\n\x15OPERATION_UNSPECIFIED\x10\x00\x12\x08\n\x04READ\x10\x01\x12\x08\n\x04MOVE\x10\x02\x12\x08\n\x04\x43OPY\x10\x03\x42\xec\x01\n\"com.google.cloud.securitycenter.v2B\x12\x44\x61taFlowEventProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + DataFlowEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.DataFlowEvent").msgclass + DataFlowEvent::Operation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.DataFlowEvent.Operation").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/data_retention_deletion_event_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/data_retention_deletion_event_pb.rb new file mode 100644 index 000000000000..17693433fba7 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/data_retention_deletion_event_pb.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/data_retention_deletion_event.proto + +require 'google/protobuf' + +require 'google/protobuf/duration_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\nBgoogle/cloud/securitycenter/v2/data_retention_deletion_event.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xcf\x02\n\x1a\x44\x61taRetentionDeletionEvent\x12\x38\n\x14\x65vent_detection_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x19\n\x11\x64\x61ta_object_count\x18\x03 \x01(\x03\x12\x38\n\x15max_retention_allowed\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12X\n\nevent_type\x18\x05 \x01(\x0e\x32\x44.google.cloud.securitycenter.v2.DataRetentionDeletionEvent.EventType\"H\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\x1f\n\x1b\x45VENT_TYPE_MAX_TTL_EXCEEDED\x10\x01\x42\xf9\x01\n\"com.google.cloud.securitycenter.v2B\x1f\x44\x61taRetentionDeletionEventProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + DataRetentionDeletionEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.DataRetentionDeletionEvent").msgclass + DataRetentionDeletionEvent::EventType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.DataRetentionDeletionEvent.EventType").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/database_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/database_pb.rb new file mode 100644 index 000000000000..32310070d4bc --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/database_pb.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/database.proto + +require 'google/protobuf' + + +descriptor_data = "\n-google/cloud/securitycenter/v2/database.proto\x12\x1egoogle.cloud.securitycenter.v2\"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.v2B\rDatabaseProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + Database = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Database").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/disk_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/disk_pb.rb new file mode 100644 index 000000000000..a62acf2da0c4 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/disk_pb.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/disk.proto + +require 'google/protobuf' + + +descriptor_data = "\n)google/cloud/securitycenter/v2/disk.proto\x12\x1egoogle.cloud.securitycenter.v2\"\x14\n\x04\x44isk\x12\x0c\n\x04name\x18\x01 \x01(\tB\xe3\x01\n\"com.google.cloud.securitycenter.v2B\tDiskProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + Disk = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Disk").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/exfiltration_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/exfiltration_pb.rb new file mode 100644 index 000000000000..4e217d9041f6 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/exfiltration_pb.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/exfiltration.proto + +require 'google/protobuf' + + +descriptor_data = "\n1google/cloud/securitycenter/v2/exfiltration.proto\x12\x1egoogle.cloud.securitycenter.v2\"\xaf\x01\n\x0c\x45xfiltration\x12>\n\x07sources\x18\x01 \x03(\x0b\x32-.google.cloud.securitycenter.v2.ExfilResource\x12>\n\x07targets\x18\x02 \x03(\x0b\x32-.google.cloud.securitycenter.v2.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.v2B\x11\x45xfiltrationProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + Exfiltration = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Exfiltration").msgclass + ExfilResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ExfilResource").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/external_system_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/external_system_pb.rb new file mode 100644 index 000000000000..684f53455eeb --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/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/v2/external_system.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n4google/cloud/securitycenter/v2/external_system.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd4\t\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.v2.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:\x97\x05\xea\x41\x93\x05\n,securitycenter.googleapis.com/ExternalSystem\x12\x61organizations/{organization}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}\x12vorganizations/{organization}/sources/{source}/locations/{location}/findings/{finding}/externalSystems/{externalsystem}\x12Ufolders/{folder}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}\x12jfolders/{folder}/sources/{source}/locations/{location}/findings/{finding}/externalSystems/{externalsystem}\x12Wprojects/{project}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}\x12lprojects/{project}/sources/{source}/locations/{location}/findings/{finding}/externalSystems/{externalsystem}B\xed\x01\n\"com.google.cloud.securitycenter.v2B\x13\x45xternalSystemProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + ExternalSystem = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ExternalSystem").msgclass + ExternalSystem::TicketInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ExternalSystem.TicketInfo").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/file_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/file_pb.rb new file mode 100644 index 000000000000..3004389fa02c --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/file_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/file.proto + +require 'google/protobuf' + + +descriptor_data = "\n)google/cloud/securitycenter/v2/file.proto\x12\x1egoogle.cloud.securitycenter.v2\"\x83\x04\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.v2.File.DiskPath\x12\x46\n\noperations\x18\x08 \x03(\x0b\x32\x32.google.cloud.securitycenter.v2.File.FileOperation\x1a\x39\n\x08\x44iskPath\x12\x16\n\x0epartition_uuid\x18\x01 \x01(\t\x12\x15\n\rrelative_path\x18\x02 \x01(\t\x1a\xc8\x01\n\rFileOperation\x12N\n\x04type\x18\x01 \x01(\x0e\x32@.google.cloud.securitycenter.v2.File.FileOperation.OperationType\"g\n\rOperationType\x12\x1e\n\x1aOPERATION_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04OPEN\x10\x01\x12\x08\n\x04READ\x10\x02\x12\n\n\x06RENAME\x10\x03\x12\t\n\x05WRITE\x10\x04\x12\x0b\n\x07\x45XECUTE\x10\x05\x42\xe3\x01\n\"com.google.cloud.securitycenter.v2B\tFileProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + File = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.File").msgclass + File::DiskPath = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.File.DiskPath").msgclass + File::FileOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.File.FileOperation").msgclass + File::FileOperation::OperationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.File.FileOperation.OperationType").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/finding_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/finding_pb.rb new file mode 100644 index 000000000000..8dc9f5c367d6 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/finding_pb.rb @@ -0,0 +1,77 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/finding.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/securitycenter/v2/access_pb' +require 'google/cloud/securitycenter/v2/affected_resources_pb' +require 'google/cloud/securitycenter/v2/agent_pb' +require 'google/cloud/securitycenter/v2/agent_anomaly_pb' +require 'google/cloud/securitycenter/v2/agent_session_pb' +require 'google/cloud/securitycenter/v2/ai_model_pb' +require 'google/cloud/securitycenter/v2/application_pb' +require 'google/cloud/securitycenter/v2/attack_exposure_pb' +require 'google/cloud/securitycenter/v2/backup_disaster_recovery_pb' +require 'google/cloud/securitycenter/v2/chokepoint_pb' +require 'google/cloud/securitycenter/v2/cloud_armor_pb' +require 'google/cloud/securitycenter/v2/cloud_dlp_data_profile_pb' +require 'google/cloud/securitycenter/v2/cloud_dlp_inspection_pb' +require 'google/cloud/securitycenter/v2/compliance_pb' +require 'google/cloud/securitycenter/v2/connection_pb' +require 'google/cloud/securitycenter/v2/contact_details_pb' +require 'google/cloud/securitycenter/v2/container_pb' +require 'google/cloud/securitycenter/v2/data_access_event_pb' +require 'google/cloud/securitycenter/v2/data_flow_event_pb' +require 'google/cloud/securitycenter/v2/data_retention_deletion_event_pb' +require 'google/cloud/securitycenter/v2/database_pb' +require 'google/cloud/securitycenter/v2/disk_pb' +require 'google/cloud/securitycenter/v2/exfiltration_pb' +require 'google/cloud/securitycenter/v2/external_system_pb' +require 'google/cloud/securitycenter/v2/file_pb' +require 'google/cloud/securitycenter/v2/group_membership_pb' +require 'google/cloud/securitycenter/v2/iam_binding_pb' +require 'google/cloud/securitycenter/v2/indicator_pb' +require 'google/cloud/securitycenter/v2/ip_rules_pb' +require 'google/cloud/securitycenter/v2/job_pb' +require 'google/cloud/securitycenter/v2/kernel_rootkit_pb' +require 'google/cloud/securitycenter/v2/kubernetes_pb' +require 'google/cloud/securitycenter/v2/load_balancer_pb' +require 'google/cloud/securitycenter/v2/log_entry_pb' +require 'google/cloud/securitycenter/v2/mitre_attack_pb' +require 'google/cloud/securitycenter/v2/network_pb' +require 'google/cloud/securitycenter/v2/notebook_pb' +require 'google/cloud/securitycenter/v2/org_policy_pb' +require 'google/cloud/securitycenter/v2/process_pb' +require 'google/cloud/securitycenter/v2/security_marks_pb' +require 'google/cloud/securitycenter/v2/security_posture_pb' +require 'google/cloud/securitycenter/v2/toxic_combination_pb' +require 'google/cloud/securitycenter/v2/vertex_ai_pb' +require 'google/cloud/securitycenter/v2/vulnerability_pb' +require 'google/protobuf/struct_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n,google/cloud/securitycenter/v2/finding.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a+google/cloud/securitycenter/v2/access.proto\x1a\x37google/cloud/securitycenter/v2/affected_resources.proto\x1a*google/cloud/securitycenter/v2/agent.proto\x1a\x32google/cloud/securitycenter/v2/agent_anomaly.proto\x1a\x32google/cloud/securitycenter/v2/agent_session.proto\x1a-google/cloud/securitycenter/v2/ai_model.proto\x1a\x30google/cloud/securitycenter/v2/application.proto\x1a\x34google/cloud/securitycenter/v2/attack_exposure.proto\x1a=google/cloud/securitycenter/v2/backup_disaster_recovery.proto\x1a/google/cloud/securitycenter/v2/chokepoint.proto\x1a\x30google/cloud/securitycenter/v2/cloud_armor.proto\x1a;google/cloud/securitycenter/v2/cloud_dlp_data_profile.proto\x1a\x39google/cloud/securitycenter/v2/cloud_dlp_inspection.proto\x1a/google/cloud/securitycenter/v2/compliance.proto\x1a/google/cloud/securitycenter/v2/connection.proto\x1a\x34google/cloud/securitycenter/v2/contact_details.proto\x1a.google/cloud/securitycenter/v2/container.proto\x1a\x36google/cloud/securitycenter/v2/data_access_event.proto\x1a\x34google/cloud/securitycenter/v2/data_flow_event.proto\x1a\x42google/cloud/securitycenter/v2/data_retention_deletion_event.proto\x1a-google/cloud/securitycenter/v2/database.proto\x1a)google/cloud/securitycenter/v2/disk.proto\x1a\x31google/cloud/securitycenter/v2/exfiltration.proto\x1a\x34google/cloud/securitycenter/v2/external_system.proto\x1a)google/cloud/securitycenter/v2/file.proto\x1a\x35google/cloud/securitycenter/v2/group_membership.proto\x1a\x30google/cloud/securitycenter/v2/iam_binding.proto\x1a.google/cloud/securitycenter/v2/indicator.proto\x1a-google/cloud/securitycenter/v2/ip_rules.proto\x1a(google/cloud/securitycenter/v2/job.proto\x1a\x33google/cloud/securitycenter/v2/kernel_rootkit.proto\x1a/google/cloud/securitycenter/v2/kubernetes.proto\x1a\x32google/cloud/securitycenter/v2/load_balancer.proto\x1a.google/cloud/securitycenter/v2/log_entry.proto\x1a\x31google/cloud/securitycenter/v2/mitre_attack.proto\x1a,google/cloud/securitycenter/v2/network.proto\x1a-google/cloud/securitycenter/v2/notebook.proto\x1a/google/cloud/securitycenter/v2/org_policy.proto\x1a,google/cloud/securitycenter/v2/process.proto\x1a\x33google/cloud/securitycenter/v2/security_marks.proto\x1a\x35google/cloud/securitycenter/v2/security_posture.proto\x1a\x36google/cloud/securitycenter/v2/toxic_combination.proto\x1a.google/cloud/securitycenter/v2/vertex_ai.proto\x1a\x32google/cloud/securitycenter/v2/vulnerability.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xdf*\n\x07\x46inding\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1b\n\x0e\x63\x61nonical_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x0e\n\x06parent\x18\x03 \x01(\t\x12\x1a\n\rresource_name\x18\x04 \x01(\tB\x03\xe0\x41\x05\x12\x41\n\x05state\x18\x06 \x01(\x0e\x32-.google.cloud.securitycenter.v2.Finding.StateB\x03\xe0\x41\x03\x12\x15\n\x08\x63\x61tegory\x18\x07 \x01(\tB\x03\xe0\x41\x05\x12\x14\n\x0c\x65xternal_uri\x18\x08 \x01(\t\x12X\n\x11source_properties\x18\t \x03(\x0b\x32=.google.cloud.securitycenter.v2.Finding.SourcePropertiesEntry\x12J\n\x0esecurity_marks\x18\n \x01(\x0b\x32-.google.cloud.securitycenter.v2.SecurityMarksB\x03\xe0\x41\x03\x12.\n\nevent_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x0b\x63reate_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x42\n\x08severity\x18\x0e \x01(\x0e\x32\x30.google.cloud.securitycenter.v2.Finding.Severity\x12:\n\x04mute\x18\x0f \x01(\x0e\x32,.google.cloud.securitycenter.v2.Finding.Mute\x12H\n\tmute_info\x18\x35 \x01(\x0b\x32\x30.google.cloud.securitycenter.v2.Finding.MuteInfoB\x03\xe0\x41\x03\x12K\n\rfinding_class\x18\x10 \x01(\x0e\x32\x34.google.cloud.securitycenter.v2.Finding.FindingClass\x12<\n\tindicator\x18\x11 \x01(\x0b\x32).google.cloud.securitycenter.v2.Indicator\x12\x44\n\rvulnerability\x18\x12 \x01(\x0b\x32-.google.cloud.securitycenter.v2.Vulnerability\x12\x39\n\x10mute_update_time\x18\x13 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12[\n\x10\x65xternal_systems\x18\x14 \x03(\x0b\x32<.google.cloud.securitycenter.v2.Finding.ExternalSystemsEntryB\x03\xe0\x41\x03\x12\x41\n\x0cmitre_attack\x18\x15 \x01(\x0b\x32+.google.cloud.securitycenter.v2.MitreAttack\x12\x36\n\x06\x61\x63\x63\x65ss\x18\x16 \x01(\x0b\x32&.google.cloud.securitycenter.v2.Access\x12?\n\x0b\x63onnections\x18\x17 \x03(\x0b\x32*.google.cloud.securitycenter.v2.Connection\x12\x16\n\x0emute_initiator\x18\x18 \x01(\t\x12:\n\tprocesses\x18\x19 \x03(\x0b\x32\'.google.cloud.securitycenter.v2.Process\x12L\n\x08\x63ontacts\x18\x1a \x03(\x0b\x32\x35.google.cloud.securitycenter.v2.Finding.ContactsEntryB\x03\xe0\x41\x03\x12?\n\x0b\x63ompliances\x18\x1b \x03(\x0b\x32*.google.cloud.securitycenter.v2.Compliance\x12 \n\x13parent_display_name\x18\x1d \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x0b\x64\x65scription\x18\x1e \x01(\t\x12\x42\n\x0c\x65xfiltration\x18\x1f \x01(\x0b\x32,.google.cloud.securitycenter.v2.Exfiltration\x12@\n\x0ciam_bindings\x18 \x03(\x0b\x32*.google.cloud.securitycenter.v2.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.v2.Container\x12>\n\nkubernetes\x18$ \x01(\x0b\x32*.google.cloud.securitycenter.v2.Kubernetes\x12:\n\x08\x64\x61tabase\x18% \x01(\x0b\x32(.google.cloud.securitycenter.v2.Database\x12G\n\x0f\x61ttack_exposure\x18& \x01(\x0b\x32..google.cloud.securitycenter.v2.AttackExposure\x12\x33\n\x05\x66iles\x18\' \x03(\x0b\x32$.google.cloud.securitycenter.v2.File\x12P\n\x14\x63loud_dlp_inspection\x18( \x01(\x0b\x32\x32.google.cloud.securitycenter.v2.CloudDlpInspection\x12S\n\x16\x63loud_dlp_data_profile\x18) \x01(\x0b\x32\x33.google.cloud.securitycenter.v2.CloudDlpDataProfile\x12\x45\n\x0ekernel_rootkit\x18* \x01(\x0b\x32-.google.cloud.securitycenter.v2.KernelRootkit\x12?\n\x0corg_policies\x18+ \x03(\x0b\x32).google.cloud.securitycenter.v2.OrgPolicy\x12\x30\n\x03job\x18, \x01(\x0b\x32#.google.cloud.securitycenter.v2.Job\x12@\n\x0b\x61pplication\x18- \x01(\x0b\x32+.google.cloud.securitycenter.v2.Application\x12\x39\n\x08ip_rules\x18. \x01(\x0b\x32\'.google.cloud.securitycenter.v2.IpRules\x12X\n\x18\x62\x61\x63kup_disaster_recovery\x18/ \x01(\x0b\x32\x36.google.cloud.securitycenter.v2.BackupDisasterRecovery\x12I\n\x10security_posture\x18\x30 \x01(\x0b\x32/.google.cloud.securitycenter.v2.SecurityPosture\x12=\n\x0blog_entries\x18\x31 \x03(\x0b\x32(.google.cloud.securitycenter.v2.LogEntry\x12\x44\n\x0eload_balancers\x18\x32 \x03(\x0b\x32,.google.cloud.securitycenter.v2.LoadBalancer\x12?\n\x0b\x63loud_armor\x18\x33 \x01(\x0b\x32*.google.cloud.securitycenter.v2.CloudArmor\x12:\n\x08notebook\x18\x37 \x01(\x0b\x32(.google.cloud.securitycenter.v2.Notebook\x12K\n\x11toxic_combination\x18\x38 \x01(\x0b\x32\x30.google.cloud.securitycenter.v2.ToxicCombination\x12J\n\x11group_memberships\x18\x39 \x03(\x0b\x32/.google.cloud.securitycenter.v2.GroupMembership\x12\x32\n\x04\x64isk\x18: \x01(\x0b\x32$.google.cloud.securitycenter.v2.Disk\x12K\n\x12\x64\x61ta_access_events\x18= \x03(\x0b\x32/.google.cloud.securitycenter.v2.DataAccessEvent\x12G\n\x10\x64\x61ta_flow_events\x18> \x03(\x0b\x32-.google.cloud.securitycenter.v2.DataFlowEvent\x12\x39\n\x08networks\x18? \x03(\x0b\x32\'.google.cloud.securitycenter.v2.Network\x12\x62\n\x1e\x64\x61ta_retention_deletion_events\x18@ \x03(\x0b\x32:.google.cloud.securitycenter.v2.DataRetentionDeletionEvent\x12M\n\x12\x61\x66\x66\x65\x63ted_resources\x18\x41 \x01(\x0b\x32\x31.google.cloud.securitycenter.v2.AffectedResources\x12\x39\n\x08\x61i_model\x18\x42 \x01(\x0b\x32\'.google.cloud.securitycenter.v2.AiModel\x12>\n\nchokepoint\x18\x45 \x01(\x0b\x32*.google.cloud.securitycenter.v2.Chokepoint\x12;\n\tvertex_ai\x18H \x01(\x0b\x32(.google.cloud.securitycenter.v2.VertexAi\x12\x34\n\x05\x61gent\x18Q \x01(\x0b\x32%.google.cloud.securitycenter.v2.Agent\x12\x44\n\x0e\x61gent_sessions\x18R \x03(\x0b\x32,.google.cloud.securitycenter.v2.AgentSession\x12\x43\n\ragent_anomaly\x18S \x01(\x0b\x32,.google.cloud.securitycenter.v2.AgentAnomaly\x1a\x93\x03\n\x08MuteInfo\x12P\n\x0bstatic_mute\x18\x01 \x01(\x0b\x32;.google.cloud.securitycenter.v2.Finding.MuteInfo.StaticMute\x12`\n\x14\x64ynamic_mute_records\x18\x02 \x03(\x0b\x32\x42.google.cloud.securitycenter.v2.Finding.MuteInfo.DynamicMuteRecord\x1ay\n\nStaticMute\x12;\n\x05state\x18\x01 \x01(\x0e\x32,.google.cloud.securitycenter.v2.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.v2.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.v2.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\x03\"\xd9\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:\xdd\x03\xea\x41\xd9\x03\n%securitycenter.googleapis.com/Finding\x12@organizations/{organization}/sources/{source}/findings/{finding}\x12Uorganizations/{organization}/sources/{source}/locations/{location}/findings/{finding}\x12\x34\x66olders/{folder}/sources/{source}/findings/{finding}\x12Ifolders/{folder}/sources/{source}/locations/{location}/findings/{finding}\x12\x36projects/{project}/sources/{source}/findings/{finding}\x12Kprojects/{project}/sources/{source}/locations/{location}/findings/{finding}*\x08\x66indings2\x07\x66indingB\xe6\x01\n\"com.google.cloud.securitycenter.v2B\x0c\x46indingProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + Finding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Finding").msgclass + Finding::MuteInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Finding.MuteInfo").msgclass + Finding::MuteInfo::StaticMute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Finding.MuteInfo.StaticMute").msgclass + Finding::MuteInfo::DynamicMuteRecord = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Finding.MuteInfo.DynamicMuteRecord").msgclass + Finding::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Finding.State").enummodule + Finding::Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Finding.Severity").enummodule + Finding::Mute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Finding.Mute").enummodule + Finding::FindingClass = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Finding.FindingClass").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/folder_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/folder_pb.rb new file mode 100644 index 000000000000..fe84677148ee --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/folder_pb.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/folder.proto + +require 'google/protobuf' + + +descriptor_data = "\n+google/cloud/securitycenter/v2/folder.proto\x12\x1egoogle.cloud.securitycenter.v2\"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.v2B\x0b\x46olderProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + Folder = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Folder").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/group_membership_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/group_membership_pb.rb new file mode 100644 index 000000000000..9f419b9c2065 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/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/v2/group_membership.proto + +require 'google/protobuf' + + +descriptor_data = "\n5google/cloud/securitycenter/v2/group_membership.proto\x12\x1egoogle.cloud.securitycenter.v2\"\xd8\x01\n\x0fGroupMembership\x12M\n\ngroup_type\x18\x01 \x01(\x0e\x32\x39.google.cloud.securitycenter.v2.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.v2B\x14GroupMembershipProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + GroupMembership = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.GroupMembership").msgclass + GroupMembership::GroupType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.GroupMembership.GroupType").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/iam_binding_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/iam_binding_pb.rb new file mode 100644 index 000000000000..16a3bb17f83a --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/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/v2/iam_binding.proto + +require 'google/protobuf' + + +descriptor_data = "\n0google/cloud/securitycenter/v2/iam_binding.proto\x12\x1egoogle.cloud.securitycenter.v2\"\xa4\x01\n\nIamBinding\x12\x41\n\x06\x61\x63tion\x18\x01 \x01(\x0e\x32\x31.google.cloud.securitycenter.v2.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.v2B\x0fIamBindingProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + IamBinding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.IamBinding").msgclass + IamBinding::Action = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.IamBinding.Action").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/indicator_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/indicator_pb.rb new file mode 100644 index 000000000000..ed506ac1a11d --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/indicator_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/indicator.proto + +require 'google/protobuf' + + +descriptor_data = "\n.google/cloud/securitycenter/v2/indicator.proto\x12\x1egoogle.cloud.securitycenter.v2\"\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.v2.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.v2.Indicator.ProcessSignature.MemoryHashSignatureH\x00\x12k\n\x13yara_rule_signature\x18\x07 \x01(\x0b\x32L.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignatureH\x00\x12`\n\x0esignature_type\x18\x08 \x01(\x0e\x32H.google.cloud.securitycenter.v2.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.v2.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.v2B\x0eIndicatorProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + Indicator = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Indicator").msgclass + Indicator::ProcessSignature = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Indicator.ProcessSignature").msgclass + Indicator::ProcessSignature::MemoryHashSignature = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature").msgclass + Indicator::ProcessSignature::MemoryHashSignature::Detection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection").msgclass + Indicator::ProcessSignature::YaraRuleSignature = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature").msgclass + Indicator::ProcessSignature::SignatureType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Indicator.ProcessSignature.SignatureType").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/ip_rules_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/ip_rules_pb.rb new file mode 100644 index 000000000000..b6597fce0c8c --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/ip_rules_pb.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/ip_rules.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' + + +descriptor_data = "\n-google/cloud/securitycenter/v2/ip_rules.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/api/field_behavior.proto\"\xe2\x02\n\x07IpRules\x12\x44\n\tdirection\x18\x01 \x01(\x0e\x32\x31.google.cloud.securitycenter.v2.IpRules.Direction\x12:\n\x07\x61llowed\x18\x02 \x01(\x0b\x32\'.google.cloud.securitycenter.v2.AllowedH\x00\x12\x38\n\x06\x64\x65nied\x18\x03 \x01(\x0b\x32&.google.cloud.securitycenter.v2.DeniedH\x00\x12\x18\n\x10source_ip_ranges\x18\x04 \x03(\t\x12\x1d\n\x15\x64\x65stination_ip_ranges\x18\x05 \x03(\t\x12\x18\n\x10\x65xposed_services\x18\x06 \x03(\t\"?\n\tDirection\x12\x19\n\x15\x44IRECTION_UNSPECIFIED\x10\x00\x12\x0b\n\x07INGRESS\x10\x01\x12\n\n\x06\x45GRESS\x10\x02\x42\x07\n\x05rules\"\x8d\x01\n\x06IpRule\x12\x10\n\x08protocol\x18\x01 \x01(\t\x12J\n\x0bport_ranges\x18\x02 \x03(\x0b\x32\x30.google.cloud.securitycenter.v2.IpRule.PortRangeB\x03\xe0\x41\x01\x1a%\n\tPortRange\x12\x0b\n\x03min\x18\x01 \x01(\x03\x12\x0b\n\x03max\x18\x02 \x01(\x03\"H\n\x07\x41llowed\x12=\n\x08ip_rules\x18\x01 \x03(\x0b\x32&.google.cloud.securitycenter.v2.IpRuleB\x03\xe0\x41\x01\"G\n\x06\x44\x65nied\x12=\n\x08ip_rules\x18\x01 \x03(\x0b\x32&.google.cloud.securitycenter.v2.IpRuleB\x03\xe0\x41\x01\x42\xe6\x01\n\"com.google.cloud.securitycenter.v2B\x0cIpRulesProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + IpRules = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.IpRules").msgclass + IpRules::Direction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.IpRules.Direction").enummodule + IpRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.IpRule").msgclass + IpRule::PortRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.IpRule.PortRange").msgclass + Allowed = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Allowed").msgclass + Denied = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Denied").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/job_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/job_pb.rb new file mode 100644 index 000000000000..c079059f9826 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/job_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/job.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' + + +descriptor_data = "\n(google/cloud/securitycenter/v2/job.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/api/field_behavior.proto\"w\n\x03Job\x12\x0c\n\x04name\x18\x01 \x01(\t\x12<\n\x05state\x18\x02 \x01(\x0e\x32(.google.cloud.securitycenter.v2.JobStateB\x03\xe0\x41\x03\x12\x12\n\nerror_code\x18\x03 \x01(\x05\x12\x10\n\x08location\x18\x04 \x01(\t*Z\n\x08JobState\x12\x19\n\x15JOB_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\r\n\tSUCCEEDED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\x42\xe2\x01\n\"com.google.cloud.securitycenter.v2B\x08JobProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + Job = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Job").msgclass + JobState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.JobState").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/kernel_rootkit_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/kernel_rootkit_pb.rb new file mode 100644 index 000000000000..eba594bf469d --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/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/v2/kernel_rootkit.proto + +require 'google/protobuf' + + +descriptor_data = "\n3google/cloud/securitycenter/v2/kernel_rootkit.proto\x12\x1egoogle.cloud.securitycenter.v2\"\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.v2B\x12KernelRootkitProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + KernelRootkit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.KernelRootkit").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/kubernetes_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/kubernetes_pb.rb new file mode 100644 index 000000000000..2f1bf77bd0f6 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/kubernetes_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/kubernetes.proto + +require 'google/protobuf' + +require 'google/cloud/securitycenter/v2/container_pb' +require 'google/cloud/securitycenter/v2/label_pb' + + +descriptor_data = "\n/google/cloud/securitycenter/v2/kubernetes.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a.google/cloud/securitycenter/v2/container.proto\x1a*google/cloud/securitycenter/v2/label.proto\"\x82\x0c\n\nKubernetes\x12<\n\x04pods\x18\x01 \x03(\x0b\x32..google.cloud.securitycenter.v2.Kubernetes.Pod\x12>\n\x05nodes\x18\x02 \x03(\x0b\x32/.google.cloud.securitycenter.v2.Kubernetes.Node\x12G\n\nnode_pools\x18\x03 \x03(\x0b\x32\x33.google.cloud.securitycenter.v2.Kubernetes.NodePool\x12>\n\x05roles\x18\x04 \x03(\x0b\x32/.google.cloud.securitycenter.v2.Kubernetes.Role\x12\x44\n\x08\x62indings\x18\x05 \x03(\x0b\x32\x32.google.cloud.securitycenter.v2.Kubernetes.Binding\x12O\n\x0e\x61\x63\x63\x65ss_reviews\x18\x06 \x03(\x0b\x32\x37.google.cloud.securitycenter.v2.Kubernetes.AccessReview\x12\x42\n\x07objects\x18\x07 \x03(\x0b\x32\x31.google.cloud.securitycenter.v2.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.v2.Label\x12=\n\ncontainers\x18\x04 \x03(\x0b\x32).google.cloud.securitycenter.v2.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.v2.Kubernetes.Node\x1a\x9e\x01\n\x04Role\x12\x42\n\x04kind\x18\x01 \x01(\x0e\x32\x34.google.cloud.securitycenter.v2.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.v2.Kubernetes.Role\x12\x44\n\x08subjects\x18\x04 \x03(\x0b\x32\x32.google.cloud.securitycenter.v2.Kubernetes.Subject\x1a\xbe\x01\n\x07Subject\x12I\n\x04kind\x18\x01 \x01(\x0e\x32;.google.cloud.securitycenter.v2.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.v2.ContainerB\xe9\x01\n\"com.google.cloud.securitycenter.v2B\x0fKubernetesProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + Kubernetes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Kubernetes").msgclass + Kubernetes::Pod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Kubernetes.Pod").msgclass + Kubernetes::Node = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Kubernetes.Node").msgclass + Kubernetes::NodePool = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Kubernetes.NodePool").msgclass + Kubernetes::Role = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Kubernetes.Role").msgclass + Kubernetes::Role::Kind = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Kubernetes.Role.Kind").enummodule + Kubernetes::Binding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Kubernetes.Binding").msgclass + Kubernetes::Subject = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Kubernetes.Subject").msgclass + Kubernetes::Subject::AuthType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Kubernetes.Subject.AuthType").enummodule + Kubernetes::AccessReview = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Kubernetes.AccessReview").msgclass + Kubernetes::Object = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Kubernetes.Object").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/label_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/label_pb.rb new file mode 100644 index 000000000000..3cdb278899ec --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/label_pb.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/label.proto + +require 'google/protobuf' + + +descriptor_data = "\n*google/cloud/securitycenter/v2/label.proto\x12\x1egoogle.cloud.securitycenter.v2\"$\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.v2B\nLabelProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + Label = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Label").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/load_balancer_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/load_balancer_pb.rb new file mode 100644 index 000000000000..b23d3a4cfd9f --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/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/v2/load_balancer.proto + +require 'google/protobuf' + + +descriptor_data = "\n2google/cloud/securitycenter/v2/load_balancer.proto\x12\x1egoogle.cloud.securitycenter.v2\"\x1c\n\x0cLoadBalancer\x12\x0c\n\x04name\x18\x01 \x01(\tB\xeb\x01\n\"com.google.cloud.securitycenter.v2B\x11LoadBalancerProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + LoadBalancer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.LoadBalancer").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/log_entry_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/log_entry_pb.rb new file mode 100644 index 000000000000..b3704ddc1826 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/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/v2/log_entry.proto + +require 'google/protobuf' + +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n.google/cloud/securitycenter/v2/log_entry.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/protobuf/timestamp.proto\"i\n\x08LogEntry\x12P\n\x13\x63loud_logging_entry\x18\x01 \x01(\x0b\x32\x31.google.cloud.securitycenter.v2.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.v2B\rLogEntryProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + LogEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.LogEntry").msgclass + CloudLoggingEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.CloudLoggingEntry").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/mitre_attack_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/mitre_attack_pb.rb new file mode 100644 index 000000000000..08d45bd18d1a --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/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/v2/mitre_attack.proto + +require 'google/protobuf' + + +descriptor_data = "\n1google/cloud/securitycenter/v2/mitre_attack.proto\x12\x1egoogle.cloud.securitycenter.v2\"\xca%\n\x0bMitreAttack\x12J\n\x0eprimary_tactic\x18\x01 \x01(\x0e\x32\x32.google.cloud.securitycenter.v2.MitreAttack.Tactic\x12Q\n\x12primary_techniques\x18\x02 \x03(\x0e\x32\x35.google.cloud.securitycenter.v2.MitreAttack.Technique\x12N\n\x12\x61\x64\x64itional_tactics\x18\x03 \x03(\x0e\x32\x32.google.cloud.securitycenter.v2.MitreAttack.Tactic\x12T\n\x15\x61\x64\x64itional_techniques\x18\x04 \x03(\x0e\x32\x35.google.cloud.securitycenter.v2.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\"\xad \n\tTechnique\x12\x19\n\x15TECHNIQUE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x44\x41TA_OBFUSCATION\x10\x46\x12\"\n\x1e\x44\x41TA_OBFUSCATION_STEGANOGRAPHY\x10G\x12\x19\n\x15OS_CREDENTIAL_DUMPING\x10r\x12)\n%OS_CREDENTIAL_DUMPING_PROC_FILESYSTEM\x10s\x12\x35\n1OS_CREDENTIAL_DUMPING_ETC_PASSWORD_AND_ETC_SHADOW\x10z\x12\x1a\n\x16\x44\x41TA_FROM_LOCAL_SYSTEM\x10u\x12\x1a\n\x16\x41UTOMATED_EXFILTRATION\x10\x44\x12\x1c\n\x18OBFUSCATED_FILES_OR_INFO\x10H\x12\x11\n\rSTEGANOGRAPHY\x10I\x12\x1a\n\x16\x43OMPILE_AFTER_DELIVERY\x10J\x12\x17\n\x13\x43OMMAND_OBFUSCATION\x10K\x12\x16\n\x12SCHEDULED_TRANSFER\x10x\x12\x1f\n\x1bSYSTEM_OWNER_USER_DISCOVERY\x10v\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\x16\n\x12SCHEDULED_TASK_JOB\x10Y\x12\x1b\n\x17SCHEDULED_TASK_JOB_CRON\x10w\x12\x1f\n\x1b\x43ONTAINER_ORCHESTRATION_JOB\x10Z\x12\x15\n\x11PROCESS_INJECTION\x10]\x12\x11\n\rINPUT_CAPTURE\x10g\x12\x1c\n\x18INPUT_CAPTURE_KEYLOGGING\x10h\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\x15\n\x11INDICATOR_REMOVAL\x10{\x12\x34\n0INDICATOR_REMOVAL_CLEAR_LINUX_OR_MAC_SYSTEM_LOGS\x10|\x12+\n\'INDICATOR_REMOVAL_CLEAR_COMMAND_HISTORY\x10}\x12#\n\x1fINDICATOR_REMOVAL_FILE_DELETION\x10@\x12 \n\x1bINDICATOR_REMOVAL_TIMESTOMP\x10\x80\x01\x12(\n$INDICATOR_REMOVAL_CLEAR_MAILBOX_DATA\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 \n\x1c\x46ILE_AND_DIRECTORY_DISCOVERY\x10y\x12#\n\x1f\x41\x43\x43OUNT_DISCOVERY_LOCAL_ACCOUNT\x10t\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\x1a\n\x16\x41\x44\x44ITIONAL_CLOUD_ROLES\x10\x43\x12\x17\n\x13SSH_AUTHORIZED_KEYS\x10\x17\x12&\n\"ADDITIONAL_CONTAINER_CLUSTER_ROLES\x10:\x12\x18\n\x14MULTI_STAGE_CHANNELS\x10L\x12\x19\n\x15INGRESS_TOOL_TRANSFER\x10\x03\x12\x0e\n\nNATIVE_API\x10\x04\x12\x0f\n\x0b\x42RUTE_FORCE\x10,\x12\x18\n\x14\x41UTOMATED_COLLECTION\x10^\x12\x12\n\x0eSHARED_MODULES\x10\x05\x12\x11\n\rDATA_ENCODING\x10M\x12\x15\n\x11STANDARD_ENCODING\x10N\x12\x1d\n\x19\x41\x43\x43\x45SS_TOKEN_MANIPULATION\x10!\x12 \n\x1cTOKEN_IMPERSONATION_OR_THEFT\x10\'\x12\x12\n\x0e\x43REATE_ACCOUNT\x10O\x12\x11\n\rLOCAL_ACCOUNT\x10P\x12$\n DEOBFUSCATE_DECODE_FILES_OR_INFO\x10_\x12%\n!EXPLOIT_PUBLIC_FACING_APPLICATION\x10\x1b\x12\x1c\n\x17SUPPLY_CHAIN_COMPROMISE\x10\x81\x01\x12;\n6COMPROMISE_SOFTWARE_DEPENDENCIES_AND_DEVELOPMENT_TOOLS\x10\x82\x01\x12&\n!EXPLOITATION_FOR_CLIENT_EXECUTION\x10\x86\x01\x12\x12\n\x0eUSER_EXECUTION\x10\x45\x12>\n9LINUX_AND_MAC_FILE_AND_DIRECTORY_PERMISSIONS_MODIFICATION\x10\x87\x01\x12\x1e\n\x1a\x44OMAIN_POLICY_MODIFICATION\x10\x1e\x12\x14\n\x10\x44\x41TA_DESTRUCTION\x10\x1d\x12\x1e\n\x19\x44\x41TA_ENCRYPTED_FOR_IMPACT\x10\x84\x01\x12\x10\n\x0cSERVICE_STOP\x10\x34\x12\x1b\n\x17INHIBIT_SYSTEM_RECOVERY\x10$\x12\x17\n\x13\x46IRMWARE_CORRUPTION\x10Q\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\"\n\x1eTRANSFER_DATA_TO_CLOUD_ACCOUNT\x10[\x12\x1c\n\x18STEAL_WEB_SESSION_COOKIE\x10\x19\x12#\n\x1f\x43REATE_OR_MODIFY_SYSTEM_PROCESS\x10\x18\x12\x1d\n\x19\x45VENT_TRIGGERED_EXECUTION\x10\x41\x12%\n!BOOT_OR_LOGON_AUTOSTART_EXECUTION\x10R\x12!\n\x1dKERNEL_MODULES_AND_EXTENSIONS\x10S\x12\x19\n\x15SHORTCUT_MODIFICATION\x10\x7f\x12%\n!ABUSE_ELEVATION_CONTROL_MECHANISM\x10\"\x12\x38\n3ABUSE_ELEVATION_CONTROL_MECHANISM_SETUID_AND_SETGID\x10\x88\x01\x12;\n7ABUSE_ELEVATION_CONTROL_MECHANISM_SUDO_AND_SUDO_CACHING\x10m\x12\x19\n\x15UNSECURED_CREDENTIALS\x10\r\x12\x18\n\x14\x43REDENTIALS_IN_FILES\x10i\x12\x10\n\x0c\x42\x41SH_HISTORY\x10`\x12\x10\n\x0cPRIVATE_KEYS\x10\x61\x12\x19\n\x15SUBVERT_TRUST_CONTROL\x10j\x12\x1c\n\x18INSTALL_ROOT_CERTIFICATE\x10k\x12#\n\x1f\x43OMPROMISE_HOST_SOFTWARE_BINARY\x10T\x12$\n CREDENTIALS_FROM_PASSWORD_STORES\x10\x62\x12!\n\x1dMODIFY_AUTHENTICATION_PROCESS\x10\x1c\x12$\n PLUGGABLE_AUTHENTICATION_MODULES\x10l\x12 \n\x1bMULTI_FACTOR_AUTHENTICATION\x10\x89\x01\x12\x13\n\x0fIMPAIR_DEFENSES\x10\x1f\x12\x1b\n\x17\x44ISABLE_OR_MODIFY_TOOLS\x10\x37\x12\x16\n\x12INDICATOR_BLOCKING\x10n\x12(\n$DISABLE_OR_MODIFY_LINUX_AUDIT_SYSTEM\x10o\x12\x12\n\x0eHIDE_ARTIFACTS\x10U\x12 \n\x1cHIDDEN_FILES_AND_DIRECTORIES\x10V\x12\x10\n\x0cHIDDEN_USERS\x10W\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\x19\n\x15HIJACK_EXECUTION_FLOW\x10p\x12\x32\n.HIJACK_EXECUTION_FLOW_DYNAMIC_LINKER_HIJACKING\x10q\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\x18\n\x14\x44\x45VELOP_CAPABILITIES\x10\x63\x12 \n\x1c\x44\x45VELOP_CAPABILITIES_MALWARE\x10\x64\x12\x17\n\x13OBTAIN_CAPABILITIES\x10+\x12\x1f\n\x1bOBTAIN_CAPABILITIES_MALWARE\x10\x65\x12(\n#OBTAIN_CAPABILITIES_VULNERABILITIES\x10\x85\x01\x12\x13\n\x0f\x41\x43TIVE_SCANNING\x10\x01\x12\x16\n\x12SCANNING_IP_BLOCKS\x10\x02\x12\x16\n\x12STAGE_CAPABILITIES\x10X\x12\x12\n\x0eUPLOAD_MALWARE\x10\x66\x12$\n CONTAINER_ADMINISTRATION_COMMAND\x10<\x12\x14\n\x10\x44\x45PLOY_CONTAINER\x10\x42\x12\x12\n\x0e\x45SCAPE_TO_HOST\x10=\x12$\n CONTAINER_AND_RESOURCE_DISCOVERY\x10\x39\x12\x1b\n\x17REFLECTIVE_CODE_LOADING\x10\\\x12.\n*STEAL_OR_FORGE_AUTHENTICATION_CERTIFICATES\x10>\x12\x14\n\x0f\x46INANCIAL_THEFT\x10\x83\x01\x42\xea\x01\n\"com.google.cloud.securitycenter.v2B\x10MitreAttackProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + MitreAttack = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.MitreAttack").msgclass + MitreAttack::Tactic = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.MitreAttack.Tactic").enummodule + MitreAttack::Technique = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.MitreAttack.Technique").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/mute_config_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/mute_config_pb.rb new file mode 100644 index 000000000000..1fa427767438 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/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/v2/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/v2/mute_config.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd4\x06\n\nMuteConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x13\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1f\n\x12most_recent_editor\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12L\n\x04type\x18\x08 \x01(\x0e\x32\x39.google.cloud.securitycenter.v2.MuteConfig.MuteConfigTypeB\x03\xe0\x41\x02\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}\x12Korganizations/{organization}/locations/{location}/muteConfigs/{mute_config}\x12*folders/{folder}/muteConfigs/{mute_config}\x12?folders/{folder}/locations/{location}/muteConfigs/{mute_config}\x12,projects/{project}/muteConfigs/{mute_config}\x12\x41projects/{project}/locations/{location}/muteConfigs/{mute_config}*\x0bmuteConfigs2\nmuteConfigB\xe9\x01\n\"com.google.cloud.securitycenter.v2B\x0fMuteConfigProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + MuteConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.MuteConfig").msgclass + MuteConfig::MuteConfigType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.MuteConfig.MuteConfigType").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/network_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/network_pb.rb new file mode 100644 index 000000000000..b3adfa3e0d12 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/network_pb.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/network.proto + +require 'google/protobuf' + + +descriptor_data = "\n,google/cloud/securitycenter/v2/network.proto\x12\x1egoogle.cloud.securitycenter.v2\"\x17\n\x07Network\x12\x0c\n\x04name\x18\x01 \x01(\tB\xe6\x01\n\"com.google.cloud.securitycenter.v2B\x0cNetworkProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + Network = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Network").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/notebook_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/notebook_pb.rb new file mode 100644 index 000000000000..648e79e5aff6 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/notebook_pb.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/notebook.proto + +require 'google/protobuf' + +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n-google/cloud/securitycenter/v2/notebook.proto\x12\x1egoogle.cloud.securitycenter.v2\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.v2B\rNotebookProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + Notebook = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Notebook").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/notification_config_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/notification_config_pb.rb new file mode 100644 index 000000000000..36db41862bbd --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/notification_config_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/notification_config.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n8google/cloud/securitycenter/v2/notification_config.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xbf\x05\n\x12NotificationConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\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.v2.NotificationConfig.StreamingConfigH\x00\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1a!\n\x0fStreamingConfig\x12\x0e\n\x06\x66ilter\x18\x01 \x01(\t:\xe0\x02\xea\x41\xdc\x02\n0securitycenter.googleapis.com/NotificationConfig\x12[organizations/{organization}/locations/{location}/notificationConfigs/{notification_config}\x12Ofolders/{folder}/locations/{location}/notificationConfigs/{notification_config}\x12Qprojects/{project}/locations/{location}/notificationConfigs/{notification_config}*\x13notificationConfigs2\x12notificationConfigB\x0f\n\rnotify_configB\xb4\x02\n\"com.google.cloud.securitycenter.v2B\x17NotificationConfigProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2\xea\x41@\n\x1bpubsub.googleapis.com/Topic\x12!projects/{project}/topics/{topic}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + NotificationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.NotificationConfig").msgclass + NotificationConfig::StreamingConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/notification_message_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/notification_message_pb.rb new file mode 100644 index 000000000000..77017de51eeb --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/notification_message_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/notification_message.proto + +require 'google/protobuf' + +require 'google/cloud/securitycenter/v2/finding_pb' +require 'google/cloud/securitycenter/v2/resource_pb' + + +descriptor_data = "\n9google/cloud/securitycenter/v2/notification_message.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a,google/cloud/securitycenter/v2/finding.proto\x1a-google/cloud/securitycenter/v2/resource.proto\"\xb8\x01\n\x13NotificationMessage\x12 \n\x18notification_config_name\x18\x01 \x01(\t\x12:\n\x07\x66inding\x18\x02 \x01(\x0b\x32\'.google.cloud.securitycenter.v2.FindingH\x00\x12:\n\x08resource\x18\x03 \x01(\x0b\x32(.google.cloud.securitycenter.v2.ResourceB\x07\n\x05\x65ventB\xf2\x01\n\"com.google.cloud.securitycenter.v2B\x18NotificationMessageProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + NotificationMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.NotificationMessage").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/org_policy_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/org_policy_pb.rb new file mode 100644 index 000000000000..9668bef4e937 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/org_policy_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/org_policy.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n/google/cloud/securitycenter/v2/org_policy.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xdb\x01\n\tOrgPolicy\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08:\xba\x01\xea\x41\xb6\x01\n\x1forgpolicy.googleapis.com/Policy\x12\x37organizations/{organization}/policies/{constraint_name}\x12+folders/{folder}/policies/{constraint_name}\x12-projects/{project}/policies/{constraint_name}B\xe8\x01\n\"com.google.cloud.securitycenter.v2B\x0eOrgPolicyProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + OrgPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.OrgPolicy").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/process_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/process_pb.rb new file mode 100644 index 000000000000..d7368f3889e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/process_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/process.proto + +require 'google/protobuf' + +require 'google/cloud/securitycenter/v2/file_pb' + + +descriptor_data = "\n,google/cloud/securitycenter/v2/process.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a)google/cloud/securitycenter/v2/file.proto\"\x86\x03\n\x07Process\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x34\n\x06\x62inary\x18\x02 \x01(\x0b\x32$.google.cloud.securitycenter.v2.File\x12\x37\n\tlibraries\x18\x03 \x03(\x0b\x32$.google.cloud.securitycenter.v2.File\x12\x34\n\x06script\x18\x04 \x01(\x0b\x32$.google.cloud.securitycenter.v2.File\x12\x0c\n\x04\x61rgs\x18\x05 \x03(\t\x12\x1b\n\x13\x61rguments_truncated\x18\x06 \x01(\x08\x12J\n\renv_variables\x18\x07 \x03(\x0b\x32\x33.google.cloud.securitycenter.v2.EnvironmentVariable\x12\x1f\n\x17\x65nv_variables_truncated\x18\x08 \x01(\x08\x12\x0b\n\x03pid\x18\t \x01(\x03\x12\x12\n\nparent_pid\x18\n \x01(\x03\x12\x0f\n\x07user_id\x18\x0b \x01(\x03\"0\n\x13\x45nvironmentVariable\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0b\n\x03val\x18\x02 \x01(\tB\xe6\x01\n\"com.google.cloud.securitycenter.v2B\x0cProcessProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + Process = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Process").msgclass + EnvironmentVariable = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.EnvironmentVariable").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/resource_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/resource_pb.rb new file mode 100644 index 000000000000..2537d399e0df --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/resource_pb.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/resource.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/securitycenter/v2/folder_pb' + + +descriptor_data = "\n-google/cloud/securitycenter/v2/resource.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a+google/cloud/securitycenter/v2/folder.proto\"\xf7\x03\n\x08Resource\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x0c\n\x04type\x18\x03 \x01(\t\x12\x45\n\x0e\x63loud_provider\x18\x04 \x01(\x0e\x32-.google.cloud.securitycenter.v2.CloudProvider\x12\x0f\n\x07service\x18\x05 \x01(\t\x12\x10\n\x08location\x18\x06 \x01(\t\x12\x43\n\x0cgcp_metadata\x18\x07 \x01(\x0b\x32+.google.cloud.securitycenter.v2.GcpMetadataH\x00\x12\x43\n\x0c\x61ws_metadata\x18\x08 \x01(\x0b\x32+.google.cloud.securitycenter.v2.AwsMetadataH\x00\x12G\n\x0e\x61zure_metadata\x18\t \x01(\x0b\x32-.google.cloud.securitycenter.v2.AzureMetadataH\x00\x12\x43\n\rresource_path\x18\n \x01(\x0b\x32,.google.cloud.securitycenter.v2.ResourcePath\x12\x1c\n\x14resource_path_string\x18\x0b \x01(\tB\x19\n\x17\x63loud_provider_metadata\"\xbd\x01\n\x0bGcpMetadata\x12\x0f\n\x07project\x18\x01 \x01(\t\x12\x1c\n\x14project_display_name\x18\x02 \x01(\t\x12\x0e\n\x06parent\x18\x03 \x01(\t\x12\x1b\n\x13parent_display_name\x18\x04 \x01(\t\x12<\n\x07\x66olders\x18\x05 \x03(\x0b\x32&.google.cloud.securitycenter.v2.FolderB\x03\xe0\x41\x03\x12\x14\n\x0corganization\x18\x06 \x01(\t\"\x84\x03\n\x0b\x41wsMetadata\x12Q\n\x0corganization\x18\x01 \x01(\x0b\x32;.google.cloud.securitycenter.v2.AwsMetadata.AwsOrganization\x12_\n\x14organizational_units\x18\x02 \x03(\x0b\x32\x41.google.cloud.securitycenter.v2.AwsMetadata.AwsOrganizationalUnit\x12G\n\x07\x61\x63\x63ount\x18\x03 \x01(\x0b\x32\x36.google.cloud.securitycenter.v2.AwsMetadata.AwsAccount\x1a\x1d\n\x0f\x41wsOrganization\x12\n\n\x02id\x18\x01 \x01(\t\x1a\x31\n\x15\x41wsOrganizationalUnit\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x1a&\n\nAwsAccount\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\"\xbc\x04\n\rAzureMetadata\x12]\n\x11management_groups\x18\x01 \x03(\x0b\x32\x42.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup\x12U\n\x0csubscription\x18\x02 \x01(\x0b\x32?.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription\x12X\n\x0eresource_group\x18\x03 \x01(\x0b\x32@.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup\x12I\n\x06tenant\x18\x07 \x01(\x0b\x32\x39.google.cloud.securitycenter.v2.AzureMetadata.AzureTenant\x1a\x38\n\x14\x41zureManagementGroup\x12\n\n\x02id\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x1a\x35\n\x11\x41zureSubscription\x12\n\n\x02id\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x1a.\n\x12\x41zureResourceGroup\x12\n\n\x02id\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x01 \x01(\t\x1a/\n\x0b\x41zureTenant\x12\n\n\x02id\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\"\xf4\x03\n\x0cResourcePath\x12L\n\x05nodes\x18\x01 \x03(\x0b\x32=.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode\x1a\x8a\x01\n\x10ResourcePathNode\x12T\n\tnode_type\x18\x01 \x01(\x0e\x32\x41.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNodeType\x12\n\n\x02id\x18\x02 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\"\x88\x02\n\x14ResourcePathNodeType\x12\'\n#RESOURCE_PATH_NODE_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10GCP_ORGANIZATION\x10\x01\x12\x0e\n\nGCP_FOLDER\x10\x02\x12\x0f\n\x0bGCP_PROJECT\x10\x03\x12\x14\n\x10\x41WS_ORGANIZATION\x10\x04\x12\x1b\n\x17\x41WS_ORGANIZATIONAL_UNIT\x10\x05\x12\x0f\n\x0b\x41WS_ACCOUNT\x10\x06\x12\x1a\n\x16\x41ZURE_MANAGEMENT_GROUP\x10\x07\x12\x16\n\x12\x41ZURE_SUBSCRIPTION\x10\x08\x12\x18\n\x14\x41ZURE_RESOURCE_GROUP\x10\t*x\n\rCloudProvider\x12\x1e\n\x1a\x43LOUD_PROVIDER_UNSPECIFIED\x10\x00\x12\x19\n\x15GOOGLE_CLOUD_PLATFORM\x10\x01\x12\x17\n\x13\x41MAZON_WEB_SERVICES\x10\x02\x12\x13\n\x0fMICROSOFT_AZURE\x10\x03\x42\xe7\x01\n\"com.google.cloud.securitycenter.v2B\rResourceProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + Resource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Resource").msgclass + GcpMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.GcpMetadata").msgclass + AwsMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AwsMetadata").msgclass + AwsMetadata::AwsOrganization = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AwsMetadata.AwsOrganization").msgclass + AwsMetadata::AwsOrganizationalUnit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AwsMetadata.AwsOrganizationalUnit").msgclass + AwsMetadata::AwsAccount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AwsMetadata.AwsAccount").msgclass + AzureMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AzureMetadata").msgclass + AzureMetadata::AzureManagementGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup").msgclass + AzureMetadata::AzureSubscription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription").msgclass + AzureMetadata::AzureResourceGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup").msgclass + AzureMetadata::AzureTenant = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AzureMetadata.AzureTenant").msgclass + ResourcePath = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ResourcePath").msgclass + ResourcePath::ResourcePathNode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode").msgclass + ResourcePath::ResourcePathNodeType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ResourcePath.ResourcePathNodeType").enummodule + CloudProvider = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.CloudProvider").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/resource_value_config_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/resource_value_config_pb.rb new file mode 100644 index 000000000000..a620481d431c --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/resource_value_config_pb.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/resource_value_config.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/securitycenter/v2/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n:google/cloud/securitycenter/v2/resource_value_config.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a-google/cloud/securitycenter/v2/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xf9\x08\n\x13ResourceValueConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x45\n\x0eresource_value\x18\x02 \x01(\x0e\x32-.google.cloud.securitycenter.v2.ResourceValue\x12\x12\n\ntag_values\x18\x03 \x03(\t\x12\x15\n\rresource_type\x18\x04 \x01(\t\x12\r\n\x05scope\x18\x05 \x01(\t\x12q\n\x18resource_labels_selector\x18\x06 \x03(\x0b\x32O.google.cloud.securitycenter.v2.ResourceValueConfig.ResourceLabelsSelectorEntry\x12\x13\n\x0b\x64\x65scription\x18\x07 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x45\n\x0e\x63loud_provider\x18\n \x01(\x0e\x32-.google.cloud.securitycenter.v2.CloudProvider\x12}\n!sensitive_data_protection_mapping\x18\x0b \x01(\x0b\x32R.google.cloud.securitycenter.v2.ResourceValueConfig.SensitiveDataProtectionMapping\x1a\xc4\x01\n\x1eSensitiveDataProtectionMapping\x12O\n\x18high_sensitivity_mapping\x18\x01 \x01(\x0e\x32-.google.cloud.securitycenter.v2.ResourceValue\x12Q\n\x1amedium_sensitivity_mapping\x18\x02 \x01(\x0e\x32-.google.cloud.securitycenter.v2.ResourceValue\x1a=\n\x1bResourceLabelsSelectorEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x8d\x02\xea\x41\x89\x02\n1securitycenter.googleapis.com/ResourceValueConfig\x12Iorganizations/{organization}/resourceValueConfigs/{resource_value_config}\x12^organizations/{organization}/locations/{location}/resourceValueConfigs/{resource_value_config}*\x14resourceValueConfigs2\x13resourceValueConfig*X\n\rResourceValue\x12\x1e\n\x1aRESOURCE_VALUE_UNSPECIFIED\x10\x00\x12\x08\n\x04HIGH\x10\x01\x12\n\n\x06MEDIUM\x10\x02\x12\x07\n\x03LOW\x10\x03\x12\x08\n\x04NONE\x10\x04\x42\xf2\x01\n\"com.google.cloud.securitycenter.v2B\x18ResourceValueConfigProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + ResourceValueConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ResourceValueConfig").msgclass + ResourceValueConfig::SensitiveDataProtectionMapping = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ResourceValueConfig.SensitiveDataProtectionMapping").msgclass + ResourceValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ResourceValue").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/security_marks_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/security_marks_pb.rb new file mode 100644 index 000000000000..8f9fb7fdc255 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/security_marks_pb.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/security_marks.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' + + +descriptor_data = "\n3google/cloud/securitycenter/v2/security_marks.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x19google/api/resource.proto\"\xee\x06\n\rSecurityMarks\x12\x0c\n\x04name\x18\x01 \x01(\t\x12G\n\x05marks\x18\x02 \x03(\x0b\x32\x38.google.cloud.securitycenter.v2.SecurityMarks.MarksEntry\x12\x16\n\x0e\x63\x61nonical_name\x18\x03 \x01(\t\x1a,\n\nMarksEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xbf\x05\xea\x41\xbb\x05\n+securitycenter.googleapis.com/SecurityMarks\x12\x39organizations/{organization}/assets/{asset}/securityMarks\x12Norganizations/{organization}/sources/{source}/findings/{finding}/securityMarks\x12\x63organizations/{organization}/sources/{source}/locations/{location}/findings/{finding}/securityMarks\x12-folders/{folder}/assets/{asset}/securityMarks\x12\x42\x66olders/{folder}/sources/{source}/findings/{finding}/securityMarks\x12Wfolders/{folder}/sources/{source}/locations/{location}/findings/{finding}/securityMarks\x12/projects/{project}/assets/{asset}/securityMarks\x12\x44projects/{project}/sources/{source}/findings/{finding}/securityMarks\x12Yprojects/{project}/sources/{source}/locations/{location}/findings/{finding}/securityMarksB\xec\x01\n\"com.google.cloud.securitycenter.v2B\x12SecurityMarksProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + SecurityMarks = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.SecurityMarks").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/security_posture_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/security_posture_pb.rb new file mode 100644 index 000000000000..0f13af8fe998 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/security_posture_pb.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/security_posture.proto + +require 'google/protobuf' + + +descriptor_data = "\n5google/cloud/securitycenter/v2/security_posture.proto\x12\x1egoogle.cloud.securitycenter.v2\"\xe8\x02\n\x0fSecurityPosture\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0brevision_id\x18\x02 \x01(\t\x12#\n\x1bposture_deployment_resource\x18\x03 \x01(\t\x12\x1a\n\x12posture_deployment\x18\x04 \x01(\t\x12\x16\n\x0e\x63hanged_policy\x18\x05 \x01(\t\x12\x12\n\npolicy_set\x18\x06 \x01(\t\x12\x0e\n\x06policy\x18\x07 \x01(\t\x12`\n\x14policy_drift_details\x18\x08 \x03(\x0b\x32\x42.google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails\x1aS\n\x12PolicyDriftDetails\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x16\n\x0e\x65xpected_value\x18\x02 \x01(\t\x12\x16\n\x0e\x64\x65tected_value\x18\x03 \x01(\tB\xee\x01\n\"com.google.cloud.securitycenter.v2B\x14SecurityPostureProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + SecurityPosture = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.SecurityPosture").msgclass + SecurityPosture::PolicyDriftDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/securitycenter_service_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/securitycenter_service_pb.rb new file mode 100644 index 000000000000..438d7aa19da5 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/securitycenter_service_pb.rb @@ -0,0 +1,101 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/securitycenter_service.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/api/routing_pb' +require 'google/cloud/securitycenter/v2/attack_path_pb' +require 'google/cloud/securitycenter/v2/bigquery_export_pb' +require 'google/cloud/securitycenter/v2/external_system_pb' +require 'google/cloud/securitycenter/v2/finding_pb' +require 'google/cloud/securitycenter/v2/mute_config_pb' +require 'google/cloud/securitycenter/v2/notification_config_pb' +require 'google/cloud/securitycenter/v2/resource_pb' +require 'google/cloud/securitycenter/v2/resource_value_config_pb' +require 'google/cloud/securitycenter/v2/security_marks_pb' +require 'google/cloud/securitycenter/v2/simulation_pb' +require 'google/cloud/securitycenter/v2/source_pb' +require 'google/cloud/securitycenter/v2/valued_resource_pb' +require 'google/iam/v1/iam_policy_pb' +require 'google/iam/v1/policy_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/struct_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n;google/cloud/securitycenter/v2/securitycenter_service.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x18google/api/routing.proto\x1a\x30google/cloud/securitycenter/v2/attack_path.proto\x1a\x34google/cloud/securitycenter/v2/bigquery_export.proto\x1a\x34google/cloud/securitycenter/v2/external_system.proto\x1a,google/cloud/securitycenter/v2/finding.proto\x1a\x30google/cloud/securitycenter/v2/mute_config.proto\x1a\x38google/cloud/securitycenter/v2/notification_config.proto\x1a-google/cloud/securitycenter/v2/resource.proto\x1a:google/cloud/securitycenter/v2/resource_value_config.proto\x1a\x33google/cloud/securitycenter/v2/security_marks.proto\x1a/google/cloud/securitycenter/v2/simulation.proto\x1a+google/cloud/securitycenter/v2/source.proto\x1a\x34google/cloud/securitycenter/v2/valued_resource.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xcc\x01\n&BatchCreateResourceValueConfigsRequest\x12I\n\x06parent\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\x12\x31securitycenter.googleapis.com/ResourceValueConfig\x12W\n\x08requests\x18\x02 \x03(\x0b\x32@.google.cloud.securitycenter.v2.CreateResourceValueConfigRequestB\x03\xe0\x41\x02\"~\n\'BatchCreateResourceValueConfigsResponse\x12S\n\x16resource_value_configs\x18\x01 \x03(\x0b\x32\x33.google.cloud.securitycenter.v2.ResourceValueConfig\"\xe3\x01\n\x17\x42ulkMuteFindingsRequest\x12\x19\n\x06parent\x18\x01 \x01(\tB\t\xe0\x41\x02\xfa\x41\x03\n\x01*\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12Z\n\nmute_state\x18\x03 \x01(\x0e\x32\x41.google.cloud.securitycenter.v2.BulkMuteFindingsRequest.MuteStateB\x03\xe0\x41\x01\"A\n\tMuteState\x12\x1a\n\x16MUTE_STATE_UNSPECIFIED\x10\x00\x12\t\n\x05MUTED\x10\x01\x12\r\n\tUNDEFINED\x10\x02\"\x1a\n\x18\x42ulkMuteFindingsResponse\"\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.v2.BigQueryExportB\x03\xe0\x41\x02\x12 \n\x13\x62ig_query_export_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\xac\x01\n\x14\x43reateFindingRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$securitycenter.googleapis.com/Source\x12\x17\n\nfinding_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12=\n\x07\x66inding\x18\x03 \x01(\x0b\x32\'.google.cloud.securitycenter.v2.FindingB\x03\xe0\x41\x02\"\xbe\x01\n\x17\x43reateMuteConfigRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(securitycenter.googleapis.com/MuteConfig\x12\x44\n\x0bmute_config\x18\x02 \x01(\x0b\x32*.google.cloud.securitycenter.v2.MuteConfigB\x03\xe0\x41\x02\x12\x1b\n\x0emute_config_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\xd9\x01\n\x1f\x43reateNotificationConfigRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\x12\x30securitycenter.googleapis.com/NotificationConfig\x12\x16\n\tconfig_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12T\n\x13notification_config\x18\x03 \x01(\x0b\x32\x32.google.cloud.securitycenter.v2.NotificationConfigB\x03\xe0\x41\x02\"\xc6\x01\n CreateResourceValueConfigRequest\x12I\n\x06parent\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\x12\x31securitycenter.googleapis.com/ResourceValueConfig\x12W\n\x15resource_value_config\x18\x02 \x01(\x0b\x32\x33.google.cloud.securitycenter.v2.ResourceValueConfigB\x03\xe0\x41\x02\"\x9c\x01\n\x13\x43reateSourceRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0cloudresourcemanager.googleapis.com/Organization\x12;\n\x06source\x18\x02 \x01(\x0b\x32&.google.cloud.securitycenter.v2.SourceB\x03\xe0\x41\x02\"a\n\x1b\x44\x65leteBigQueryExportRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,securitycenter.googleapis.com/BigQueryExport\"Y\n\x17\x44\x65leteMuteConfigRequest\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\"k\n DeleteResourceValueConfigRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1securitycenter.googleapis.com/ResourceValueConfig\"+\n\x13\x42igQueryDestination\x12\x14\n\x07\x64\x61taset\x18\x01 \x01(\tB\x03\xe0\x41\x02\"\xbe\x01\n\x16\x45xportFindingsMetadata\x12:\n\x11\x65xport_start_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12Y\n\x15\x62ig_query_destination\x18\x02 \x01(\x0b\x32\x33.google.cloud.securitycenter.v2.BigQueryDestinationB\x03\xe0\x41\x02H\x00\x42\r\n\x0b\x64\x65stination\"\x18\n\x16\x45xportFindingsResponse\"^\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\"h\n\x1dGetResourceValueConfigRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1securitycenter.googleapis.com/ResourceValueConfig\"N\n\x10GetSourceRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$securitycenter.googleapis.com/Source\"\xa2\x01\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\x12\n\npage_token\x18\x07 \x01(\t\x12\x11\n\tpage_size\x18\x08 \x01(\x05\"\x8b\x01\n\x15GroupFindingsResponse\x12\x45\n\x10group_by_results\x18\x01 \x03(\x0b\x32+.google.cloud.securitycenter.v2.GroupResult\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.v2.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\"\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.v2.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\"\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.v2.BigQueryExport\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xcc\x01\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\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\"\xdf\x06\n\x14ListFindingsResponse\x12\x66\n\x15list_findings_results\x18\x01 \x03(\x0b\x32G.google.cloud.securitycenter.v2.ListFindingsResponse.ListFindingsResult\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\x12\x12\n\ntotal_size\x18\x04 \x01(\x05\x1a\xb1\x05\n\x12ListFindingsResult\x12\x38\n\x07\x66inding\x18\x01 \x01(\x0b\x32\'.google.cloud.securitycenter.v2.Finding\x12g\n\x08resource\x18\x03 \x01(\x0b\x32P.google.cloud.securitycenter.v2.ListFindingsResponse.ListFindingsResult.ResourceB\x03\xe0\x41\x03\x1a\xf7\x03\n\x08Resource\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x0c\n\x04type\x18\x03 \x01(\t\x12\x45\n\x0e\x63loud_provider\x18\x04 \x01(\x0e\x32-.google.cloud.securitycenter.v2.CloudProvider\x12\x0f\n\x07service\x18\x05 \x01(\t\x12\x10\n\x08location\x18\x06 \x01(\t\x12\x43\n\x0cgcp_metadata\x18\x07 \x01(\x0b\x32+.google.cloud.securitycenter.v2.GcpMetadataH\x00\x12\x43\n\x0c\x61ws_metadata\x18\x08 \x01(\x0b\x32+.google.cloud.securitycenter.v2.AwsMetadataH\x00\x12G\n\x0e\x61zure_metadata\x18\t \x01(\x0b\x32-.google.cloud.securitycenter.v2.AzureMetadataH\x00\x12\x43\n\rresource_path\x18\n \x01(\x0b\x32,.google.cloud.securitycenter.v2.ResourcePath\x12\x1c\n\x14resource_path_string\x18\x0b \x01(\tB\x19\n\x17\x63loud_provider_metadata\"\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.v2.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.v2.NotificationConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x93\x01\n\x1fListResourceValueConfigsRequest\x12I\n\x06parent\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\x12\x31securitycenter.googleapis.com/ResourceValueConfig\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x90\x01\n ListResourceValueConfigsResponse\x12S\n\x16resource_value_configs\x18\x01 \x03(\x0b\x32\x33.google.cloud.securitycenter.v2.ResourceValueConfig\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.v2.Source\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.v2.ValuedResource\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\"\x98\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.v2.Finding.StateB\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.v2.Finding.MuteB\x03\xe0\x41\x02\"\x9d\x01\n\x1bUpdateBigQueryExportRequest\x12M\n\x10\x62ig_query_export\x18\x01 \x01(\x0b\x32..google.cloud.securitycenter.v2.BigQueryExportB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x9c\x01\n\x1bUpdateExternalSystemRequest\x12L\n\x0f\x65xternal_system\x18\x01 \x01(\x0b\x32..google.cloud.securitycenter.v2.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.v2.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.v2.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.v2.NotificationConfigB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xac\x01\n UpdateResourceValueConfigRequest\x12W\n\x15resource_value_config\x18\x01 \x01(\x0b\x32\x33.google.cloud.securitycenter.v2.ResourceValueConfigB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x99\x01\n\x1aUpdateSecurityMarksRequest\x12J\n\x0esecurity_marks\x18\x01 \x01(\x0b\x32-.google.cloud.securitycenter.v2.SecurityMarksB\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.v2.SourceB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask2\xe2\x81\x01\n\x0eSecurityCenter\x12\xe0\x02\n\x1f\x42\x61tchCreateResourceValueConfigs\x12\x46.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest\x1aG.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsResponse\"\xab\x01\xda\x41\x0fparent,requests\x82\xd3\xe4\x93\x02\x92\x01\"=/v2/{parent=organizations/*}/resourceValueConfigs:batchCreate:\x01*ZN\"I/v2/{parent=organizations/*/locations/*}/resourceValueConfigs:batchCreate:\x01*\x12\x9a\x04\n\x10\x42ulkMuteFindings\x12\x37.google.cloud.securitycenter.v2.BulkMuteFindingsRequest\x1a\x1d.google.longrunning.Operation\"\xad\x03\xca\x41P\n7google.cloud.securitycenter.v2.BulkMuteFindingsResponse\x12\x15google.protobuf.Empty\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xca\x02\"./v2/{parent=organizations/*}/findings:bulkMute:\x01*Z?\":/v2/{parent=organizations/*/locations/*}/findings:bulkMute:\x01*Z-\"(/v2/{parent=folders/*}/findings:bulkMute:\x01*Z9\"4/v2/{parent=folders/*/locations/*}/findings:bulkMute:\x01*Z.\")/v2/{parent=projects/*}/findings:bulkMute:\x01*Z:\"5/v2/{parent=projects/*/locations/*}/findings:bulkMute:\x01*\x12\x98\x03\n\x14\x43reateBigQueryExport\x12;.google.cloud.securitycenter.v2.CreateBigQueryExportRequest\x1a..google.cloud.securitycenter.v2.BigQueryExport\"\x92\x02\xda\x41+parent,big_query_export,big_query_export_id\x82\xd3\xe4\x93\x02\xdd\x01\"8/v2/{parent=organizations/*/locations/*}/bigQueryExports:\x10\x62ig_query_exportZF\"2/v2/{parent=folders/*/locations/*}/bigQueryExports:\x10\x62ig_query_exportZG\"3/v2/{parent=projects/*/locations/*}/bigQueryExports:\x10\x62ig_query_export\x12\x96\x02\n\rCreateFinding\x12\x34.google.cloud.securitycenter.v2.CreateFindingRequest\x1a\'.google.cloud.securitycenter.v2.Finding\"\xa5\x01\xda\x41\x19parent,finding,finding_id\x82\xd3\xe4\x93\x02\x82\x01\";/v2/{parent=organizations/*/sources/*/locations/*}/findings:\x07\x66indingZ:\"//v2/{parent=organizations/*/sources/*}/findings:\x07\x66inding\x12\x99\x05\n\x10\x43reateMuteConfig\x12\x37.google.cloud.securitycenter.v2.CreateMuteConfigRequest\x1a*.google.cloud.securitycenter.v2.MuteConfig\"\x9f\x04\xda\x41!parent,mute_config,mute_config_id\x82\xd3\xe4\x93\x02\xe2\x02\"4/v2/{parent=organizations/*/locations/*}/muteConfigs:\x0bmute_configZ=\"./v2/{parent=folders/*/locations/*}/muteConfigs:\x0bmute_configZ>\"//v2/{parent=projects/*/locations/*}/muteConfigs:\x0bmute_configZ7\"(/v2/{parent=organizations/*}/muteConfigs:\x0bmute_configZ1\"\"/v2/{parent=folders/*}/muteConfigs:\x0bmute_configZ2\"#/v2/{parent=projects/*}/muteConfigs:\x0bmute_config\x8a\xd3\xe4\x93\x02\x8b\x01\x12+\n\x06parent\x12!projects/*/locations/{location=*}\x12\x30\n\x06parent\x12&organizations/*/locations/{location=*}\x12*\n\x06parent\x12 folders/*/locations/{location=*}\x12\xb2\x03\n\x18\x43reateNotificationConfig\x12?.google.cloud.securitycenter.v2.CreateNotificationConfigRequest\x1a\x32.google.cloud.securitycenter.v2.NotificationConfig\"\xa0\x02\xda\x41$parent,notification_config,config_id\x82\xd3\xe4\x93\x02\xf2\x01\".google.cloud.securitycenter.v2.ListNotificationConfigsRequest\x1a?.google.cloud.securitycenter.v2.ListNotificationConfigsResponse\"\xc3\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xb3\x01\x12/v2/{name=folders/*/sources/*/locations/*/findings/*}:setState:\x01*Z8\"3/v2/{name=projects/*/sources/*/findings/*}:setState:\x01*ZD\"?/v2/{name=projects/*/sources/*/locations/*/findings/*}:setState:\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/v2/{resource=organizations/*/sources/*}:setIamPolicy:\x01*\x12\xf8\x03\n\x07SetMute\x12..google.cloud.securitycenter.v2.SetMuteRequest\x1a\'.google.cloud.securitycenter.v2.Finding\"\x93\x03\xda\x41\tname,mute\x82\xd3\xe4\x93\x02\x80\x03\"7/v2/{name=organizations/*/sources/*/findings/*}:setMute:\x01*ZH\"C/v2/{name=organizations/*/sources/*/locations/*/findings/*}:setMute:\x01*Z6\"1/v2/{name=folders/*/sources/*/findings/*}:setMute:\x01*ZB\"=/v2/{name=folders/*/sources/*/locations/*/findings/*}:setMute:\x01*Z7\"2/v2/{name=projects/*/sources/*/findings/*}:setMute:\x01*ZC\">/v2/{name=projects/*/sources/*/locations/*/findings/*}:setMute:\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@\";/v2/{resource=organizations/*/sources/*}:testIamPermissions:\x01*\x12\xbc\x03\n\x14UpdateBigQueryExport\x12;.google.cloud.securitycenter.v2.UpdateBigQueryExportRequest\x1a..google.cloud.securitycenter.v2.BigQueryExport\"\xb6\x02\xda\x41\x1c\x62ig_query_export,update_mask\x82\xd3\xe4\x93\x02\x90\x02\x32I/v2/{big_query_export.name=organizations/*/locations/*/bigQueryExports/*}:\x10\x62ig_query_exportZW2C/v2/{big_query_export.name=folders/*/locations/*/bigQueryExports/*}:\x10\x62ig_query_exportZX2D/v2/{big_query_export.name=projects/*/locations/*/bigQueryExports/*}:\x10\x62ig_query_export\x12\x9b\x06\n\x14UpdateExternalSystem\x12;.google.cloud.securitycenter.v2.UpdateExternalSystemRequest\x1a..google.cloud.securitycenter.v2.ExternalSystem\"\x95\x05\xda\x41\x1b\x65xternal_system,update_mask\x82\xd3\xe4\x93\x02\xf0\x04\x32Q/v2/{external_system.name=organizations/*/sources/*/findings/*/externalSystems/*}:\x0f\x65xternal_systemZp2]/v2/{external_system.name=organizations/*/sources/*/locations/*/findings/*/externalSystems/*}:\x0f\x65xternal_systemZ^2K/v2/{external_system.name=folders/*/sources/*/findings/*/externalSystems/*}:\x0f\x65xternal_systemZj2W/v2/{external_system.name=folders/*/sources/*/locations/*/findings/*/externalSystems/*}:\x0f\x65xternal_systemZ_2L/v2/{external_system.name=projects/*/sources/*/findings/*/externalSystems/*}:\x0f\x65xternal_systemZk2X/v2/{external_system.name=projects/*/sources/*/locations/*/findings/*/externalSystems/*}:\x0f\x65xternal_system\x12\xb2\x04\n\rUpdateFinding\x12\x34.google.cloud.securitycenter.v2.UpdateFindingRequest\x1a\'.google.cloud.securitycenter.v2.Finding\"\xc1\x03\xda\x41\x13\x66inding,update_mask\x82\xd3\xe4\x93\x02\xa4\x03\x32\x37/v2/{finding.name=organizations/*/sources/*/findings/*}:\x07\x66indingZN2C/v2/{finding.name=organizations/*/sources/*/locations/*/findings/*}:\x07\x66indingZ<21/v2/{finding.name=folders/*/sources/*/findings/*}:\x07\x66indingZH2=/v2/{finding.name=folders/*/sources/*/locations/*/findings/*}:\x07\x66indingZ=22/v2/{finding.name=projects/*/sources/*/findings/*}:\x07\x66indingZI2>/v2/{finding.name=projects/*/sources/*/locations/*/findings/*}:\x07\x66inding\x12\x9f\x06\n\x10UpdateMuteConfig\x12\x37.google.cloud.securitycenter.v2.UpdateMuteConfigRequest\x1a*.google.cloud.securitycenter.v2.MuteConfig\"\xa5\x05\xda\x41\x17mute_config,update_mask\x82\xd3\xe4\x93\x02\xaa\x03\x32\x34/v2/{mute_config.name=organizations/*/muteConfigs/*}:\x0bmute_configZO2@/v2/{mute_config.name=organizations/*/locations/*/muteConfigs/*}:\x0bmute_configZ=2./v2/{mute_config.name=folders/*/muteConfigs/*}:\x0bmute_configZI2:/v2/{mute_config.name=folders/*/locations/*/muteConfigs/*}:\x0bmute_configZ>2//v2/{mute_config.name=projects/*/muteConfigs/*}:\x0bmute_configZJ2;/v2/{mute_config.name=projects/*/locations/*/muteConfigs/*}:\x0bmute_config\x8a\xd3\xe4\x93\x02\xd3\x01\x12\x43\n\x10mute_config.name\x12/projects/*/locations/{location=*}/muteConfigs/*\x12H\n\x10mute_config.name\x12\x34organizations/*/locations/{location=*}/muteConfigs/*\x12\x42\n\x10mute_config.name\x12.folders/*/locations/{location=*}/muteConfigs/*\x12\xe9\x03\n\x18UpdateNotificationConfig\x12?.google.cloud.securitycenter.v2.UpdateNotificationConfigRequest\x1a\x32.google.cloud.securitycenter.v2.NotificationConfig\"\xd7\x02\xda\x41\x1fnotification_config,update_mask\x82\xd3\xe4\x93\x02\xae\x02\x32P/v2/{notification_config.name=organizations/*/locations/*/notificationConfigs/*}:\x13notification_configZa2J/v2/{notification_config.name=folders/*/locations/*/notificationConfigs/*}:\x13notification_configZb2K/v2/{notification_config.name=projects/*/locations/*/notificationConfigs/*}:\x13notification_config\x12\x8e\x03\n\x19UpdateResourceValueConfig\x12@.google.cloud.securitycenter.v2.UpdateResourceValueConfigRequest\x1a\x33.google.cloud.securitycenter.v2.ResourceValueConfig\"\xf9\x01\xda\x41!resource_value_config,update_mask\x82\xd3\xe4\x93\x02\xce\x01\x32G/v2/{resource_value_config.name=organizations/*/resourceValueConfigs/*}:\x15resource_value_configZl2S/v2/{resource_value_config.name=organizations/*/locations/*/resourceValueConfigs/*}:\x15resource_value_config\x12\xe4\x07\n\x13UpdateSecurityMarks\x12:.google.cloud.securitycenter.v2.UpdateSecurityMarksRequest\x1a-.google.cloud.securitycenter.v2.SecurityMarks\"\xe1\x06\xda\x41\x1asecurity_marks,update_mask\x82\xd3\xe4\x93\x02\xbd\x06\x32L/v2/{security_marks.name=organizations/*/sources/*/findings/*/securityMarks}:\x0esecurity_marksZR2@/v2/{security_marks.name=organizations/*/assets/*/securityMarks}:\x0esecurity_marksZj2X/v2/{security_marks.name=organizations/*/sources/*/locations/*/findings/*/securityMarks}:\x0esecurity_marksZX2F/v2/{security_marks.name=folders/*/sources/*/findings/*/securityMarks}:\x0esecurity_marksZL2:/v2/{security_marks.name=folders/*/assets/*/securityMarks}:\x0esecurity_marksZd2R/v2/{security_marks.name=folders/*/sources/*/locations/*/findings/*/securityMarks}:\x0esecurity_marksZY2G/v2/{security_marks.name=projects/*/sources/*/findings/*/securityMarks}:\x0esecurity_marksZM2;/v2/{security_marks.name=projects/*/assets/*/securityMarks}:\x0esecurity_marksZe2S/v2/{security_marks.name=projects/*/sources/*/locations/*/findings/*/securityMarks}:\x0esecurity_marks\x12\xbd\x01\n\x0cUpdateSource\x12\x33.google.cloud.securitycenter.v2.UpdateSourceRequest\x1a&.google.cloud.securitycenter.v2.Source\"P\xda\x41\x12source,update_mask\x82\xd3\xe4\x93\x02\x35\x32+/v2/{source.name=organizations/*/sources/*}:\x06source\x1aQ\xca\x41\x1dsecuritycenter.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xe2\x04\n\"com.google.cloud.securitycenter.v2B\x1aSecuritycenterServiceProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2\xea\x41g\n2securitycenter.googleapis.com/OrganizationLocation\x12\x31organizations/{organization}/locations/{location}\xea\x41U\n,securitycenter.googleapis.com/FolderLocation\x12%folders/{folder}/locations/{location}\xea\x41\xa8\x01\n8securitycenter.googleapis.com/OrganizationValuedResource\x12lorganizations/{organization}/locations/{location}/simulations/{simulation}/valuedResources/{valued_resource}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + BatchCreateResourceValueConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest").msgclass + BatchCreateResourceValueConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsResponse").msgclass + BulkMuteFindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.BulkMuteFindingsRequest").msgclass + BulkMuteFindingsRequest::MuteState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.BulkMuteFindingsRequest.MuteState").enummodule + BulkMuteFindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.BulkMuteFindingsResponse").msgclass + CreateBigQueryExportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.CreateBigQueryExportRequest").msgclass + CreateFindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.CreateFindingRequest").msgclass + CreateMuteConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.CreateMuteConfigRequest").msgclass + CreateNotificationConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.CreateNotificationConfigRequest").msgclass + CreateResourceValueConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.CreateResourceValueConfigRequest").msgclass + CreateSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.CreateSourceRequest").msgclass + DeleteBigQueryExportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.DeleteBigQueryExportRequest").msgclass + DeleteMuteConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.DeleteMuteConfigRequest").msgclass + DeleteNotificationConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.DeleteNotificationConfigRequest").msgclass + DeleteResourceValueConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.DeleteResourceValueConfigRequest").msgclass + BigQueryDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.BigQueryDestination").msgclass + ExportFindingsMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ExportFindingsMetadata").msgclass + ExportFindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ExportFindingsResponse").msgclass + GetBigQueryExportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.GetBigQueryExportRequest").msgclass + GetMuteConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.GetMuteConfigRequest").msgclass + GetNotificationConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.GetNotificationConfigRequest").msgclass + GetResourceValueConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.GetResourceValueConfigRequest").msgclass + GetSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.GetSourceRequest").msgclass + GroupFindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.GroupFindingsRequest").msgclass + GroupFindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.GroupFindingsResponse").msgclass + GroupResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.GroupResult").msgclass + ListAttackPathsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListAttackPathsRequest").msgclass + ListAttackPathsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListAttackPathsResponse").msgclass + GetSimulationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.GetSimulationRequest").msgclass + GetValuedResourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.GetValuedResourceRequest").msgclass + ListBigQueryExportsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListBigQueryExportsRequest").msgclass + ListBigQueryExportsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListBigQueryExportsResponse").msgclass + ListFindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListFindingsRequest").msgclass + ListFindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListFindingsResponse").msgclass + ListFindingsResponse::ListFindingsResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListFindingsResponse.ListFindingsResult").msgclass + ListFindingsResponse::ListFindingsResult::Resource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListFindingsResponse.ListFindingsResult.Resource").msgclass + ListMuteConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListMuteConfigsRequest").msgclass + ListMuteConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListMuteConfigsResponse").msgclass + ListNotificationConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListNotificationConfigsRequest").msgclass + ListNotificationConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListNotificationConfigsResponse").msgclass + ListResourceValueConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListResourceValueConfigsRequest").msgclass + ListResourceValueConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListResourceValueConfigsResponse").msgclass + ListSourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListSourcesRequest").msgclass + ListSourcesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListSourcesResponse").msgclass + ListValuedResourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListValuedResourcesRequest").msgclass + ListValuedResourcesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListValuedResourcesResponse").msgclass + SetFindingStateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.SetFindingStateRequest").msgclass + SetMuteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.SetMuteRequest").msgclass + UpdateBigQueryExportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.UpdateBigQueryExportRequest").msgclass + UpdateExternalSystemRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.UpdateExternalSystemRequest").msgclass + UpdateFindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.UpdateFindingRequest").msgclass + UpdateMuteConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.UpdateMuteConfigRequest").msgclass + UpdateNotificationConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.UpdateNotificationConfigRequest").msgclass + UpdateResourceValueConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.UpdateResourceValueConfigRequest").msgclass + UpdateSecurityMarksRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.UpdateSecurityMarksRequest").msgclass + UpdateSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.UpdateSourceRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/securitycenter_service_services_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/securitycenter_service_services_pb.rb new file mode 100644 index 000000000000..36c3f5bae249 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/securitycenter_service_services_pb.rb @@ -0,0 +1,167 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/securitycenter/v2/securitycenter_service.proto for package 'Google.Cloud.SecurityCenter.V2' +# 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/v2/securitycenter_service_pb' + +module Google + module Cloud + module SecurityCenter + module V2 + module SecurityCenter + # V2 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.v2.SecurityCenter' + + # 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::V2::BatchCreateResourceValueConfigsRequest, ::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsResponse + # Kicks off an LRO to bulk mute findings for a parent based on a filter. If + # no location is specified, findings are muted in global. 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::V2::BulkMuteFindingsRequest, ::Google::Longrunning::Operation + # Creates a BigQuery export. + rpc :CreateBigQueryExport, ::Google::Cloud::SecurityCenter::V2::CreateBigQueryExportRequest, ::Google::Cloud::SecurityCenter::V2::BigQueryExport + # Creates a finding in a location. The corresponding source must exist for + # finding creation to succeed. + rpc :CreateFinding, ::Google::Cloud::SecurityCenter::V2::CreateFindingRequest, ::Google::Cloud::SecurityCenter::V2::Finding + # Creates a mute config. + rpc :CreateMuteConfig, ::Google::Cloud::SecurityCenter::V2::CreateMuteConfigRequest, ::Google::Cloud::SecurityCenter::V2::MuteConfig + # Creates a notification config. + rpc :CreateNotificationConfig, ::Google::Cloud::SecurityCenter::V2::CreateNotificationConfigRequest, ::Google::Cloud::SecurityCenter::V2::NotificationConfig + # Creates a source. + rpc :CreateSource, ::Google::Cloud::SecurityCenter::V2::CreateSourceRequest, ::Google::Cloud::SecurityCenter::V2::Source + # Deletes an existing BigQuery export. + rpc :DeleteBigQueryExport, ::Google::Cloud::SecurityCenter::V2::DeleteBigQueryExportRequest, ::Google::Protobuf::Empty + # Deletes an existing mute config. If no location is specified, default is + # global. + rpc :DeleteMuteConfig, ::Google::Cloud::SecurityCenter::V2::DeleteMuteConfigRequest, ::Google::Protobuf::Empty + # Deletes a notification config. + rpc :DeleteNotificationConfig, ::Google::Cloud::SecurityCenter::V2::DeleteNotificationConfigRequest, ::Google::Protobuf::Empty + # Deletes a ResourceValueConfig. + rpc :DeleteResourceValueConfig, ::Google::Cloud::SecurityCenter::V2::DeleteResourceValueConfigRequest, ::Google::Protobuf::Empty + # Gets a BigQuery export. + rpc :GetBigQueryExport, ::Google::Cloud::SecurityCenter::V2::GetBigQueryExportRequest, ::Google::Cloud::SecurityCenter::V2::BigQueryExport + # Get the simulation by name or the latest simulation for the given + # organization. + rpc :GetSimulation, ::Google::Cloud::SecurityCenter::V2::GetSimulationRequest, ::Google::Cloud::SecurityCenter::V2::Simulation + # Get the valued resource by name + rpc :GetValuedResource, ::Google::Cloud::SecurityCenter::V2::GetValuedResourceRequest, ::Google::Cloud::SecurityCenter::V2::ValuedResource + # Gets the access control policy on the specified Source. + rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy + # Gets a mute config. If no location is specified, default is + # global. + rpc :GetMuteConfig, ::Google::Cloud::SecurityCenter::V2::GetMuteConfigRequest, ::Google::Cloud::SecurityCenter::V2::MuteConfig + # Gets a notification config. + rpc :GetNotificationConfig, ::Google::Cloud::SecurityCenter::V2::GetNotificationConfigRequest, ::Google::Cloud::SecurityCenter::V2::NotificationConfig + # Gets a ResourceValueConfig. + rpc :GetResourceValueConfig, ::Google::Cloud::SecurityCenter::V2::GetResourceValueConfigRequest, ::Google::Cloud::SecurityCenter::V2::ResourceValueConfig + # Gets a source. + rpc :GetSource, ::Google::Cloud::SecurityCenter::V2::GetSourceRequest, ::Google::Cloud::SecurityCenter::V2::Source + # Filters an organization or source's findings and groups them by their + # specified properties in a location. If no location is specified, findings + # are assumed to be in global + # + # To group across all sources provide a `-` as the source id. + # The following list shows some examples: + # + # + `/v2/organizations/{organization_id}/sources/-/findings` + # + + # `/v2/organizations/{organization_id}/sources/-/locations/{location_id}/findings` + # + `/v2/folders/{folder_id}/sources/-/findings` + # + `/v2/folders/{folder_id}/sources/-/locations/{location_id}/findings` + # + `/v2/projects/{project_id}/sources/-/findings` + # + `/v2/projects/{project_id}/sources/-/locations/{location_id}/findings` + rpc :GroupFindings, ::Google::Cloud::SecurityCenter::V2::GroupFindingsRequest, ::Google::Cloud::SecurityCenter::V2::GroupFindingsResponse + # Lists the attack paths for a set of simulation results or valued resources + # and filter. + rpc :ListAttackPaths, ::Google::Cloud::SecurityCenter::V2::ListAttackPathsRequest, ::Google::Cloud::SecurityCenter::V2::ListAttackPathsResponse + # 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::V2::ListBigQueryExportsRequest, ::Google::Cloud::SecurityCenter::V2::ListBigQueryExportsResponse + # Lists an organization or source's findings. + # + # To list across all sources for a given location provide a `-` as the source + # id. If no location is specified, finding are assumed to be in global. + # The following list shows some examples: + # + # + `/v2/organizations/{organization_id}/sources/-/findings` + # + + # `/v2/organizations/{organization_id}/sources/-/locations/{location_id}/findings` + rpc :ListFindings, ::Google::Cloud::SecurityCenter::V2::ListFindingsRequest, ::Google::Cloud::SecurityCenter::V2::ListFindingsResponse + # Lists mute configs. If no location is specified, default is + # global. + rpc :ListMuteConfigs, ::Google::Cloud::SecurityCenter::V2::ListMuteConfigsRequest, ::Google::Cloud::SecurityCenter::V2::ListMuteConfigsResponse + # Lists notification configs. + rpc :ListNotificationConfigs, ::Google::Cloud::SecurityCenter::V2::ListNotificationConfigsRequest, ::Google::Cloud::SecurityCenter::V2::ListNotificationConfigsResponse + # Lists all ResourceValueConfigs. + rpc :ListResourceValueConfigs, ::Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsRequest, ::Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsResponse + # Lists all sources belonging to an organization. + rpc :ListSources, ::Google::Cloud::SecurityCenter::V2::ListSourcesRequest, ::Google::Cloud::SecurityCenter::V2::ListSourcesResponse + # Lists the valued resources for a set of simulation results and filter. + rpc :ListValuedResources, ::Google::Cloud::SecurityCenter::V2::ListValuedResourcesRequest, ::Google::Cloud::SecurityCenter::V2::ListValuedResourcesResponse + # Updates the state of a finding. If no location is specified, finding is + # assumed to be in global + rpc :SetFindingState, ::Google::Cloud::SecurityCenter::V2::SetFindingStateRequest, ::Google::Cloud::SecurityCenter::V2::Finding + # Sets the access control policy on the specified Source. + rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy + # Updates the mute state of a finding. If no location is specified, finding + # is assumed to be in global + rpc :SetMute, ::Google::Cloud::SecurityCenter::V2::SetMuteRequest, ::Google::Cloud::SecurityCenter::V2::Finding + # Returns the permissions that a caller has on the specified source. + rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse + # Updates a BigQuery export. + rpc :UpdateBigQueryExport, ::Google::Cloud::SecurityCenter::V2::UpdateBigQueryExportRequest, ::Google::Cloud::SecurityCenter::V2::BigQueryExport + # Updates external system. This is for a given finding. If no location is + # specified, finding is assumed to be in global + rpc :UpdateExternalSystem, ::Google::Cloud::SecurityCenter::V2::UpdateExternalSystemRequest, ::Google::Cloud::SecurityCenter::V2::ExternalSystem + # Creates or updates a finding. If no location is specified, finding is + # assumed to be in global. The corresponding source must exist for a finding + # creation to succeed. + rpc :UpdateFinding, ::Google::Cloud::SecurityCenter::V2::UpdateFindingRequest, ::Google::Cloud::SecurityCenter::V2::Finding + # Updates a mute config. If no location is specified, default is + # global. + rpc :UpdateMuteConfig, ::Google::Cloud::SecurityCenter::V2::UpdateMuteConfigRequest, ::Google::Cloud::SecurityCenter::V2::MuteConfig + # Updates a notification config. The following update + # fields are allowed: description, pubsub_topic, streaming_config.filter + rpc :UpdateNotificationConfig, ::Google::Cloud::SecurityCenter::V2::UpdateNotificationConfigRequest, ::Google::Cloud::SecurityCenter::V2::NotificationConfig + # Updates an existing ResourceValueConfigs with new rules. + rpc :UpdateResourceValueConfig, ::Google::Cloud::SecurityCenter::V2::UpdateResourceValueConfigRequest, ::Google::Cloud::SecurityCenter::V2::ResourceValueConfig + # Updates security marks. For Finding Security marks, if no location is + # specified, finding is assumed to be in global. Assets Security Marks can + # only be accessed through global endpoint. + rpc :UpdateSecurityMarks, ::Google::Cloud::SecurityCenter::V2::UpdateSecurityMarksRequest, ::Google::Cloud::SecurityCenter::V2::SecurityMarks + # Updates a source. + rpc :UpdateSource, ::Google::Cloud::SecurityCenter::V2::UpdateSourceRequest, ::Google::Cloud::SecurityCenter::V2::Source + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/simulation_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/simulation_pb.rb new file mode 100644 index 000000000000..7ffa40f95f0a --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/simulation_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/simulation.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/securitycenter/v2/resource_pb' +require 'google/cloud/securitycenter/v2/valued_resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n/google/cloud/securitycenter/v2/simulation.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a-google/cloud/securitycenter/v2/resource.proto\x1a\x34google/cloud/securitycenter/v2/valued_resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xca\x03\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.v2.ResourceValueConfigMetadata\x12\x45\n\x0e\x63loud_provider\x18\x04 \x01(\x0e\x32-.google.cloud.securitycenter.v2.CloudProvider:\xca\x01\xea\x41\xc6\x01\n(securitycenter.googleapis.com/Simulation\x12\x35organizations/{organization}/simulations/{simulation}\x12Jorganizations/{organization}/locations/{location}/simulations/{simluation}*\x0bsimulations2\nsimulationB\xe9\x01\n\"com.google.cloud.securitycenter.v2B\x0fSimulationProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + Simulation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Simulation").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/source_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/source_pb.rb new file mode 100644 index 000000000000..073204318455 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/source_pb.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/source.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' + + +descriptor_data = "\n+google/cloud/securitycenter/v2/source.proto\x12\x1egoogle.cloud.securitycenter.v2\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\x04 \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\xe5\x01\n\"com.google.cloud.securitycenter.v2B\x0bSourceProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + Source = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Source").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/toxic_combination_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/toxic_combination_pb.rb new file mode 100644 index 000000000000..7096e7b98ac2 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/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/v2/toxic_combination.proto + +require 'google/protobuf' + + +descriptor_data = "\n6google/cloud/securitycenter/v2/toxic_combination.proto\x12\x1egoogle.cloud.securitycenter.v2\"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.v2B\x15ToxicCombinationProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + ToxicCombination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ToxicCombination").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/valued_resource_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/valued_resource_pb.rb new file mode 100644 index 000000000000..b7df23211efc --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/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/v2/valued_resource.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' + + +descriptor_data = "\n4google/cloud/securitycenter/v2/valued_resource.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x19google/api/resource.proto\"\xc6\x05\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.v2.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.v2.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:\x9a\x02\xea\x41\x96\x02\n,securitycenter.googleapis.com/ValuedResource\x12Worganizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}\x12lorganizations/{organization}/locations/{location}/simulations/{simluation}/valuedResources/{valued_resource}*\x0fvaluedResources2\x0evaluedResource\"+\n\x1bResourceValueConfigMetadata\x12\x0c\n\x04name\x18\x01 \x01(\tB\xed\x01\n\"com.google.cloud.securitycenter.v2B\x13ValuedResourceProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + ValuedResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ValuedResource").msgclass + ValuedResource::ResourceValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ValuedResource.ResourceValue").enummodule + ResourceValueConfigMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ResourceValueConfigMetadata").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/vertex_ai_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/vertex_ai_pb.rb new file mode 100644 index 000000000000..00ccbb3b5a21 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/vertex_ai_pb.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/vertex_ai.proto + +require 'google/protobuf' + + +descriptor_data = "\n.google/cloud/securitycenter/v2/vertex_ai.proto\x12\x1egoogle.cloud.securitycenter.v2\"\x83\x02\n\x08VertexAi\x12\x42\n\x08\x64\x61tasets\x18\x01 \x03(\x0b\x32\x30.google.cloud.securitycenter.v2.VertexAi.Dataset\x12\x44\n\tpipelines\x18\x02 \x03(\x0b\x32\x31.google.cloud.securitycenter.v2.VertexAi.Pipeline\x1a=\n\x07\x44\x61taset\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x0e\n\x06source\x18\x03 \x01(\t\x1a.\n\x08Pipeline\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\tB\xe7\x01\n\"com.google.cloud.securitycenter.v2B\rVertexAiProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + VertexAi = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.VertexAi").msgclass + VertexAi::Dataset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.VertexAi.Dataset").msgclass + VertexAi::Pipeline = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.VertexAi.Pipeline").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/vulnerability_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/vulnerability_pb.rb new file mode 100644 index 000000000000..deb4b635f6df --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/vulnerability_pb.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/securitycenter/v2/vulnerability.proto + +require 'google/protobuf' + +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n2google/cloud/securitycenter/v2/vulnerability.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/protobuf/timestamp.proto\"\xf5\x02\n\rVulnerability\x12\x30\n\x03\x63ve\x18\x01 \x01(\x0b\x32#.google.cloud.securitycenter.v2.Cve\x12\x42\n\x11offending_package\x18\x02 \x01(\x0b\x32\'.google.cloud.securitycenter.v2.Package\x12>\n\rfixed_package\x18\x03 \x01(\x0b\x32\'.google.cloud.securitycenter.v2.Package\x12K\n\x11security_bulletin\x18\x04 \x01(\x0b\x32\x30.google.cloud.securitycenter.v2.SecurityBulletin\x12\x1b\n\x13provider_risk_score\x18\x05 \x01(\x03\x12\x11\n\treachable\x18\x06 \x01(\x08\x12\x31\n\x04\x63wes\x18\x07 \x03(\x0b\x32#.google.cloud.securitycenter.v2.Cwe\"\xc7\x05\n\x03\x43ve\x12\n\n\x02id\x18\x01 \x01(\t\x12=\n\nreferences\x18\x02 \x03(\x0b\x32).google.cloud.securitycenter.v2.Reference\x12\x36\n\x06\x63vssv3\x18\x03 \x01(\x0b\x32&.google.cloud.securitycenter.v2.Cvssv3\x12\x1e\n\x16upstream_fix_available\x18\x04 \x01(\x08\x12>\n\x06impact\x18\x05 \x01(\x0e\x32..google.cloud.securitycenter.v2.Cve.RiskRating\x12W\n\x15\x65xploitation_activity\x18\x06 \x01(\x0e\x32\x38.google.cloud.securitycenter.v2.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\x12;\n\x17\x66irst_exploitation_date\x18\n \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\x02 \x01(\x0e\x32\x33.google.cloud.securitycenter.v2.Cvssv3.AttackVector\x12R\n\x11\x61ttack_complexity\x18\x03 \x01(\x0e\x32\x37.google.cloud.securitycenter.v2.Cvssv3.AttackComplexity\x12V\n\x13privileges_required\x18\x04 \x01(\x0e\x32\x39.google.cloud.securitycenter.v2.Cvssv3.PrivilegesRequired\x12P\n\x10user_interaction\x18\x05 \x01(\x0e\x32\x36.google.cloud.securitycenter.v2.Cvssv3.UserInteraction\x12;\n\x05scope\x18\x06 \x01(\x0e\x32,.google.cloud.securitycenter.v2.Cvssv3.Scope\x12M\n\x16\x63onfidentiality_impact\x18\x07 \x01(\x0e\x32-.google.cloud.securitycenter.v2.Cvssv3.Impact\x12G\n\x10integrity_impact\x18\x08 \x01(\x0e\x32-.google.cloud.securitycenter.v2.Cvssv3.Impact\x12J\n\x13\x61vailability_impact\x18\t \x01(\x0e\x32-.google.cloud.securitycenter.v2.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(\t\"P\n\x03\x43we\x12\n\n\x02id\x18\x01 \x01(\t\x12=\n\nreferences\x18\x02 \x03(\x0b\x32).google.cloud.securitycenter.v2.ReferenceB\xec\x01\n\"com.google.cloud.securitycenter.v2B\x12VulnerabilityProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module SecurityCenter + module V2 + Vulnerability = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Vulnerability").msgclass + Cve = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Cve").msgclass + Cve::RiskRating = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Cve.RiskRating").enummodule + Cve::ExploitationActivity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Cve.ExploitationActivity").enummodule + Reference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Reference").msgclass + Cvssv3 = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Cvssv3").msgclass + Cvssv3::AttackVector = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Cvssv3.AttackVector").enummodule + Cvssv3::AttackComplexity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Cvssv3.AttackComplexity").enummodule + Cvssv3::PrivilegesRequired = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Cvssv3.PrivilegesRequired").enummodule + Cvssv3::UserInteraction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Cvssv3.UserInteraction").enummodule + Cvssv3::Scope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Cvssv3.Scope").enummodule + Cvssv3::Impact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Cvssv3.Impact").enummodule + Package = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Package").msgclass + SecurityBulletin = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.SecurityBulletin").msgclass + Cwe = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Cwe").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/README.md b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/README.md new file mode 100644 index 000000000000..c8ec50fdacaa --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/README.md @@ -0,0 +1,4 @@ +# Security Command Center V2 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-v2/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/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-v2/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/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-v2/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/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-v2/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/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-v2/proto_docs/google/api/routing.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/api/routing.rb new file mode 100644 index 000000000000..6d71a9430253 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/api/routing.rb @@ -0,0 +1,463 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 + # Specifies the routing information that should be sent along with the request + # in the form of routing header. + # **NOTE:** All service configuration rules follow the "last one wins" order. + # + # The examples below will apply to an RPC which has the following request type: + # + # Message Definition: + # + # message Request { + # // The name of the Table + # // Values can be of the following formats: + # // - `projects//tables/` + # // - `projects//instances//tables/
` + # // - `region//zones//tables/
` + # string table_name = 1; + # + # // This value specifies routing for replication. + # // It can be in the following formats: + # // - `profiles/` + # // - a legacy `profile_id` that can be any string + # string app_profile_id = 2; + # } + # + # Example message: + # + # { + # table_name: projects/proj_foo/instances/instance_bar/table/table_baz, + # app_profile_id: profiles/prof_qux + # } + # + # The routing header consists of one or multiple key-value pairs. The order of + # the key-value pairs is undefined, the order of the `routing_parameters` in + # the `RoutingRule` only matters for the evaluation order of the path + # templates when `field` is the same. See the examples below for more details. + # + # Every key and value in the routing header must be percent-encoded, + # and joined together in the following format: `key1=value1&key2=value2`. + # The examples below skip the percent-encoding for readability. + # + # Example 1 + # + # Extracting a field from the request to put into the routing header + # unchanged, with the key equal to the field name. + # + # annotation: + # + # option (google.api.routing) = { + # // Take the `app_profile_id`. + # routing_parameters { + # field: "app_profile_id" + # } + # }; + # + # result: + # + # x-goog-request-params: app_profile_id=profiles/prof_qux + # + # Example 2 + # + # Extracting a field from the request to put into the routing header + # unchanged, with the key different from the field name. + # + # annotation: + # + # option (google.api.routing) = { + # // Take the `app_profile_id`, but name it `routing_id` in the header. + # routing_parameters { + # field: "app_profile_id" + # path_template: "{routing_id=**}" + # } + # }; + # + # result: + # + # x-goog-request-params: routing_id=profiles/prof_qux + # + # Example 3 + # + # Extracting a field from the request to put into the routing + # header, while matching a path template syntax on the field's value. + # + # NB: it is more useful to send nothing than to send garbage for the purpose + # of dynamic routing, since garbage pollutes cache. Thus the matching. + # + # Sub-example 3a + # + # The field matches the template. + # + # annotation: + # + # option (google.api.routing) = { + # // Take the `table_name`, if it's well-formed (with project-based + # // syntax). + # routing_parameters { + # field: "table_name" + # path_template: "{table_name=projects/*/instances/*/**}" + # } + # }; + # + # result: + # + # x-goog-request-params: + # table_name=projects/proj_foo/instances/instance_bar/table/table_baz + # + # Sub-example 3b + # + # The field does not match the template. + # + # annotation: + # + # option (google.api.routing) = { + # // Take the `table_name`, if it's well-formed (with region-based + # // syntax). + # routing_parameters { + # field: "table_name" + # path_template: "{table_name=regions/*/zones/*/**}" + # } + # }; + # + # result: + # + # + # + # Sub-example 3c + # + # Multiple alternative conflictingly named path templates are + # specified. The one that matches is used to construct the header. + # + # annotation: + # + # option (google.api.routing) = { + # // Take the `table_name`, if it's well-formed, whether + # // using the region- or projects-based syntax. + # + # routing_parameters { + # field: "table_name" + # path_template: "{table_name=regions/*/zones/*/**}" + # } + # routing_parameters { + # field: "table_name" + # path_template: "{table_name=projects/*/instances/*/**}" + # } + # }; + # + # result: + # + # x-goog-request-params: + # table_name=projects/proj_foo/instances/instance_bar/table/table_baz + # + # Example 4 + # + # Extracting a single routing header key-value pair by matching a + # template syntax on (a part of) a single request field. + # + # annotation: + # + # option (google.api.routing) = { + # // Take just the project id from the `table_name` field. + # routing_parameters { + # field: "table_name" + # path_template: "{routing_id=projects/*}/**" + # } + # }; + # + # result: + # + # x-goog-request-params: routing_id=projects/proj_foo + # + # Example 5 + # + # Extracting a single routing header key-value pair by matching + # several conflictingly named path templates on (parts of) a single request + # field. The last template to match "wins" the conflict. + # + # annotation: + # + # option (google.api.routing) = { + # // If the `table_name` does not have instances information, + # // take just the project id for routing. + # // Otherwise take project + instance. + # + # routing_parameters { + # field: "table_name" + # path_template: "{routing_id=projects/*}/**" + # } + # routing_parameters { + # field: "table_name" + # path_template: "{routing_id=projects/*/instances/*}/**" + # } + # }; + # + # result: + # + # x-goog-request-params: + # routing_id=projects/proj_foo/instances/instance_bar + # + # Example 6 + # + # Extracting multiple routing header key-value pairs by matching + # several non-conflicting path templates on (parts of) a single request field. + # + # Sub-example 6a + # + # Make the templates strict, so that if the `table_name` does not + # have an instance information, nothing is sent. + # + # annotation: + # + # option (google.api.routing) = { + # // The routing code needs two keys instead of one composite + # // but works only for the tables with the "project-instance" name + # // syntax. + # + # routing_parameters { + # field: "table_name" + # path_template: "{project_id=projects/*}/instances/*/**" + # } + # routing_parameters { + # field: "table_name" + # path_template: "projects/*/{instance_id=instances/*}/**" + # } + # }; + # + # result: + # + # x-goog-request-params: + # project_id=projects/proj_foo&instance_id=instances/instance_bar + # + # Sub-example 6b + # + # Make the templates loose, so that if the `table_name` does not + # have an instance information, just the project id part is sent. + # + # annotation: + # + # option (google.api.routing) = { + # // The routing code wants two keys instead of one composite + # // but will work with just the `project_id` for tables without + # // an instance in the `table_name`. + # + # routing_parameters { + # field: "table_name" + # path_template: "{project_id=projects/*}/**" + # } + # routing_parameters { + # field: "table_name" + # path_template: "projects/*/{instance_id=instances/*}/**" + # } + # }; + # + # result (is the same as 6a for our example message because it has the instance + # information): + # + # x-goog-request-params: + # project_id=projects/proj_foo&instance_id=instances/instance_bar + # + # Example 7 + # + # Extracting multiple routing header key-value pairs by matching + # several path templates on multiple request fields. + # + # NB: note that here there is no way to specify sending nothing if one of the + # fields does not match its template. E.g. if the `table_name` is in the wrong + # format, the `project_id` will not be sent, but the `routing_id` will be. + # The backend routing code has to be aware of that and be prepared to not + # receive a full complement of keys if it expects multiple. + # + # annotation: + # + # option (google.api.routing) = { + # // The routing needs both `project_id` and `routing_id` + # // (from the `app_profile_id` field) for routing. + # + # routing_parameters { + # field: "table_name" + # path_template: "{project_id=projects/*}/**" + # } + # routing_parameters { + # field: "app_profile_id" + # path_template: "{routing_id=**}" + # } + # }; + # + # result: + # + # x-goog-request-params: + # project_id=projects/proj_foo&routing_id=profiles/prof_qux + # + # Example 8 + # + # Extracting a single routing header key-value pair by matching + # several conflictingly named path templates on several request fields. The + # last template to match "wins" the conflict. + # + # annotation: + # + # option (google.api.routing) = { + # // The `routing_id` can be a project id or a region id depending on + # // the table name format, but only if the `app_profile_id` is not set. + # // If `app_profile_id` is set it should be used instead. + # + # routing_parameters { + # field: "table_name" + # path_template: "{routing_id=projects/*}/**" + # } + # routing_parameters { + # field: "table_name" + # path_template: "{routing_id=regions/*}/**" + # } + # routing_parameters { + # field: "app_profile_id" + # path_template: "{routing_id=**}" + # } + # }; + # + # result: + # + # x-goog-request-params: routing_id=profiles/prof_qux + # + # Example 9 + # + # Bringing it all together. + # + # annotation: + # + # option (google.api.routing) = { + # // For routing both `table_location` and a `routing_id` are needed. + # // + # // table_location can be either an instance id or a region+zone id. + # // + # // For `routing_id`, take the value of `app_profile_id` + # // - If it's in the format `profiles/`, send + # // just the `` part. + # // - If it's any other literal, send it as is. + # // If the `app_profile_id` is empty, and the `table_name` starts with + # // the project_id, send that instead. + # + # routing_parameters { + # field: "table_name" + # path_template: "projects/*/{table_location=instances/*}/tables/*" + # } + # routing_parameters { + # field: "table_name" + # path_template: "{table_location=regions/*/zones/*}/tables/*" + # } + # routing_parameters { + # field: "table_name" + # path_template: "{routing_id=projects/*}/**" + # } + # routing_parameters { + # field: "app_profile_id" + # path_template: "{routing_id=**}" + # } + # routing_parameters { + # field: "app_profile_id" + # path_template: "profiles/{routing_id=*}" + # } + # }; + # + # result: + # + # x-goog-request-params: + # table_location=instances/instance_bar&routing_id=prof_qux + # @!attribute [rw] routing_parameters + # @return [::Array<::Google::Api::RoutingParameter>] + # A collection of Routing Parameter specifications. + # **NOTE:** If multiple Routing Parameters describe the same key + # (via the `path_template` field or via the `field` field when + # `path_template` is not provided), "last one wins" rule + # determines which Parameter gets used. + # See the examples for more details. + class RoutingRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A projection from an input message to the GRPC or REST header. + # @!attribute [rw] field + # @return [::String] + # A request field to extract the header key-value pair from. + # @!attribute [rw] path_template + # @return [::String] + # A pattern matching the key-value field. Optional. + # If not specified, the whole field specified in the `field` field will be + # taken as value, and its name used as key. If specified, it MUST contain + # exactly one named segment (along with any number of unnamed segments) The + # pattern will be matched over the field specified in the `field` field, then + # if the match is successful: + # - the name of the single named segment will be used as a header name, + # - the match value of the segment will be used as a header value; + # if the match is NOT successful, nothing will be sent. + # + # Example: + # + # -- This is a field in the request message + # | that the header value will be extracted from. + # | + # | -- This is the key name in the + # | | routing header. + # V | + # field: "table_name" v + # path_template: "projects/*/{table_location=instances/*}/tables/*" + # ^ ^ + # | | + # In the {} brackets is the pattern that -- | + # specifies what to extract from the | + # field as a value to be sent. | + # | + # The string in the field must match the whole pattern -- + # before brackets, inside brackets, after brackets. + # + # When looking at this specific example, we can see that: + # - A key-value pair with the key `table_location` + # and the value matching `instances/*` should be added + # to the x-goog-request-params routing header. + # - The value is extracted from the request message's `table_name` field + # if it matches the full pattern specified: + # `projects/*/instances/*/tables/*`. + # + # **NB:** If the `path_template` field is not provided, the key name is + # equal to the field name, and the whole field should be sent as a value. + # This makes the pattern for the field and the value functionally equivalent + # to `**`, and the configuration + # + # { + # field: "table_name" + # } + # + # is a functionally equivalent shorthand to: + # + # { + # field: "table_name" + # path_template: "{table_name=**}" + # } + # + # See Example 1 for more details. + class RoutingParameter + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/access.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/access.rb new file mode 100644 index 000000000000..4b452fd07cb2 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/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 V2 + # 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::V2::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::V2::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-v2/proto_docs/google/cloud/securitycenter/v2/affected_resources.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/affected_resources.rb new file mode 100644 index 000000000000..22a4e9fe9934 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/affected_resources.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 V2 + # Details about resources affected by this finding. + # @!attribute [rw] count + # @return [::Integer] + # The count of resources affected by the finding. + class AffectedResources + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/agent.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/agent.rb new file mode 100644 index 000000000000..1f73c0cb72dd --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/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 V2 + # 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-v2/proto_docs/google/cloud/securitycenter/v2/agent_anomaly.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/agent_anomaly.rb new file mode 100644 index 000000000000..04b633fa8589 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/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 V2 + # 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::V2::DetectorReference>] + # The list of references to specific detectors that identified anomalies + # within this session. + # @!attribute [rw] invocation_references + # @return [::Array<::Google::Cloud::SecurityCenter::V2::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::V2::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-v2/proto_docs/google/cloud/securitycenter/v2/agent_session.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/agent_session.rb new file mode 100644 index 000000000000..ec46f99686e4 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/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 V2 + # 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-v2/proto_docs/google/cloud/securitycenter/v2/ai_model.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/ai_model.rb new file mode 100644 index 000000000000..fe0106b68b6d --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/ai_model.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 V2 + # Contains information about the AI model associated with the finding. + # @!attribute [rw] name + # @return [::String] + # The name of the AI model, for example, "gemini:1.0.0". + # @!attribute [rw] domain + # @return [::String] + # The domain of the model, for example, “image-classification”. + # @!attribute [rw] library + # @return [::String] + # The name of the model library, for example, “transformers”. + # @!attribute [rw] location + # @return [::String] + # The region in which the model is used, for example, “us-central1”. + # @!attribute [rw] publisher + # @return [::String] + # The publisher of the model, for example, “google” or “nvidia”. + # @!attribute [rw] deployment_platform + # @return [::Google::Cloud::SecurityCenter::V2::AiModel::DeploymentPlatform] + # The platform on which the model is deployed. + # @!attribute [rw] display_name + # @return [::String] + # The user defined display name of model. Ex. baseline-classification-model + class AiModel + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The platform on which the model is deployed. + module DeploymentPlatform + # Unspecified deployment platform. + DEPLOYMENT_PLATFORM_UNSPECIFIED = 0 + + # Vertex AI. + VERTEX_AI = 1 + + # Google Kubernetes Engine. + GKE = 2 + + # Google Compute Engine. + GCE = 3 + + # Fine tuned model. + FINE_TUNED_MODEL = 4 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/application.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/application.rb new file mode 100644 index 000000000000..4c1fa3fef09b --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/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 V2 + # 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 could 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-v2/proto_docs/google/cloud/securitycenter/v2/attack_exposure.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/attack_exposure.rb new file mode 100644 index 000000000000..d3543aea2fa0 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/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 V2 + # 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 [r] state + # @return [::Google::Cloud::SecurityCenter::V2::AttackExposure::State] + # Output only. 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-v2/proto_docs/google/cloud/securitycenter/v2/attack_path.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/attack_path.rb new file mode 100644 index 000000000000..395034b6cbf5 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/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 V2 + # 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/simulations/34/valuedResources/56/attackPaths/78` + # @!attribute [rw] path_nodes + # @return [::Array<::Google::Cloud::SecurityCenter::V2::AttackPath::AttackPathNode>] + # A list of nodes that exist in this attack path. + # @!attribute [rw] edges + # @return [::Array<::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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-v2/proto_docs/google/cloud/securitycenter/v2/backup_disaster_recovery.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/backup_disaster_recovery.rb new file mode 100644 index 000000000000..b49d6ad06453 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/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 V2 + # 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-v2/proto_docs/google/cloud/securitycenter/v2/bigquery_export.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/bigquery_export.rb new file mode 100644 index 000000000000..09155c2a96e1 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/bigquery_export.rb @@ -0,0 +1,96 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 V2 + # Configures how to deliver Findings to BigQuery Instance. + # @!attribute [rw] name + # @return [::String] + # Identifier. The relative resource name of this export. See: + # https://cloud.google.com/apis/design/resource_names#relative_resource_name. + # The following list shows some examples: + # + # + + # `organizations/{organization_id}/locations/{location_id}/bigQueryExports/{export_id}` + # + `folders/{folder_id}/locations/{location_id}/bigQueryExports/{export_id}` + # + + # `projects/{project_id}/locations/{location_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-v2/proto_docs/google/cloud/securitycenter/v2/chokepoint.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/chokepoint.rb new file mode 100644 index 000000000000..4ac87a98cfbd --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/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 V2 + # 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-v2/proto_docs/google/cloud/securitycenter/v2/cloud_armor.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/cloud_armor.rb new file mode 100644 index 000000000000..de5568f900ac --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/cloud_armor.rb @@ -0,0 +1,138 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 V2 + # Fields related to Google Cloud Armor findings. + # @!attribute [rw] security_policy + # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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_long + # @return [::Integer] + # Total PPS (packets per second) volume of attack. + # @!attribute [rw] volume_bps_long + # @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'. + # @!attribute [rw] volume_pps + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Integer] + # Total PPS (packets per second) volume of attack. Deprecated - refer to + # volume_pps_long instead. + # @!attribute [rw] volume_bps + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Integer] + # Total BPS (bytes per second) volume of attack. Deprecated - refer to + # volume_bps_long instead. + 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-v2/proto_docs/google/cloud/securitycenter/v2/cloud_dlp_data_profile.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/cloud_dlp_data_profile.rb new file mode 100644 index 000000000000..346e66b5e35d --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/cloud_dlp_data_profile.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 V2 + # 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::V2::CloudDlpDataProfile::ParentType] + # The resource hierarchy level at which the data profile was generated. + 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 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/cloud_dlp_inspection.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/cloud_dlp_inspection.rb new file mode 100644 index 000000000000..123bea548585 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/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 V2 + # 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-v2/proto_docs/google/cloud/securitycenter/v2/compliance.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/compliance.rb new file mode 100644 index 000000000000..01a4fe458c2d --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/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 V2 + # 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-v2/proto_docs/google/cloud/securitycenter/v2/connection.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/connection.rb new file mode 100644 index 000000000000..6e6ae87bd5c1 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/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 V2 + # 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::V2::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-v2/proto_docs/google/cloud/securitycenter/v2/contact_details.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/contact_details.rb new file mode 100644 index 000000000000..70a23d045d97 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/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 V2 + # Details about specific contacts + # @!attribute [rw] contacts + # @return [::Array<::Google::Cloud::SecurityCenter::V2::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-v2/proto_docs/google/cloud/securitycenter/v2/container.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/container.rb new file mode 100644 index 000000000000..5fd4972d8657 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/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 V2 + # 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::V2::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-v2/proto_docs/google/cloud/securitycenter/v2/data_access_event.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/data_access_event.rb new file mode 100644 index 000000000000..35c543064430 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/data_access_event.rb @@ -0,0 +1,61 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 V2 + # Details about a data access attempt made by a principal not authorized under + # applicable data security policy. + # @!attribute [rw] event_id + # @return [::String] + # Unique identifier for data access event. + # @!attribute [rw] principal_email + # @return [::String] + # The email address of the principal that accessed the data. The principal + # could be a user account, service account, Google group, or other. + # @!attribute [rw] operation + # @return [::Google::Cloud::SecurityCenter::V2::DataAccessEvent::Operation] + # The operation performed by the principal to access the data. + # @!attribute [rw] event_time + # @return [::Google::Protobuf::Timestamp] + # Timestamp of data access event. + class DataAccessEvent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The operation of a data access event. + module Operation + # The operation is unspecified. + OPERATION_UNSPECIFIED = 0 + + # Represents a read operation. + READ = 1 + + # Represents a move operation. + MOVE = 2 + + # Represents a copy operation. + COPY = 3 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/data_flow_event.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/data_flow_event.rb new file mode 100644 index 000000000000..ae25f8a2cff3 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/data_flow_event.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 V2 + # Details about a data flow event, in which either the data is moved to or is + # accessed from a non-compliant geo-location, as defined in the applicable data + # security policy. + # @!attribute [rw] event_id + # @return [::String] + # Unique identifier for data flow event. + # @!attribute [rw] principal_email + # @return [::String] + # The email address of the principal that initiated the data flow event. The + # principal could be a user account, service account, Google group, or other. + # @!attribute [rw] operation + # @return [::Google::Cloud::SecurityCenter::V2::DataFlowEvent::Operation] + # The operation performed by the principal for the data flow event. + # @!attribute [rw] violated_location + # @return [::String] + # Non-compliant location of the principal or the data destination. + # @!attribute [rw] event_time + # @return [::Google::Protobuf::Timestamp] + # Timestamp of data flow event. + class DataFlowEvent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The operation of a data flow event. + module Operation + # The operation is unspecified. + OPERATION_UNSPECIFIED = 0 + + # Represents a read operation. + READ = 1 + + # Represents a move operation. + MOVE = 2 + + # Represents a copy operation. + COPY = 3 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/data_retention_deletion_event.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/data_retention_deletion_event.rb new file mode 100644 index 000000000000..978743068cc9 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/data_retention_deletion_event.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 V2 + # Details about data retention deletion violations, in which the data is + # non-compliant based on their retention or deletion time, as defined in the + # applicable data security policy. The Data Retention Deletion (DRD) control is + # a control of the DSPM (Data Security Posture Management) suite that enables + # organizations to manage data retention and deletion policies in compliance + # with regulations, such as GDPR and CRPA. DRD supports two primary policy + # types: maximum storage length (max TTL) and minimum storage length (min TTL). + # Both are aimed at helping organizations meet regulatory and data management + # commitments. + # @!attribute [rw] event_detection_time + # @return [::Google::Protobuf::Timestamp] + # Timestamp indicating when the event was detected. + # @!attribute [rw] data_object_count + # @return [::Integer] + # Number of objects that violated the policy for this resource. If the number + # is less than 1,000, then the value of this field is the exact number. If + # the number of objects that violated the policy is greater than or equal to + # 1,000, then the value of this field is 1000. + # @!attribute [rw] max_retention_allowed + # @return [::Google::Protobuf::Duration] + # Maximum duration of retention allowed from the DRD control. This comes + # from the DRD control where users set a max TTL for their data. For example, + # suppose that a user sets the max TTL for a Cloud Storage bucket to 90 days. + # However, an object in that bucket is 100 days old. In this case, a + # DataRetentionDeletionEvent will be generated for that Cloud Storage bucket, + # and the max_retention_allowed is 90 days. + # @!attribute [rw] event_type + # @return [::Google::Cloud::SecurityCenter::V2::DataRetentionDeletionEvent::EventType] + # Type of the DRD event. + class DataRetentionDeletionEvent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Type of the DRD event. + module EventType + # Unspecified event type. + EVENT_TYPE_UNSPECIFIED = 0 + + # The maximum retention time has been exceeded. + EVENT_TYPE_MAX_TTL_EXCEEDED = 1 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/database.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/database.rb new file mode 100644 index 000000000000..39782b12e5ae --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/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 V2 + # 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-v2/proto_docs/google/cloud/securitycenter/v2/disk.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/disk.rb new file mode 100644 index 000000000000..0f63d09304ea --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/disk.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 V2 + # Contains information about the disk associated with the finding. + # @!attribute [rw] name + # @return [::String] + # The name of the disk, for example, + # "https://www.googleapis.com/compute/v1/projects/\\{project-id}/zones/\\{zone-id}/disks/\\{disk-id}". + class Disk + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/exfiltration.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/exfiltration.rb new file mode 100644 index 000000000000..e982b02dfc10 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/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 V2 + # 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::V2::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::V2::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-v2/proto_docs/google/cloud/securitycenter/v2/external_system.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/external_system.rb new file mode 100644 index 000000000000..d13da6e40e27 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/external_system.rb @@ -0,0 +1,106 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 V2 + # Representation of third party SIEM/SOAR fields within SCC. + # @!attribute [rw] name + # @return [::String] + # Full resource name of the external system. The following list + # shows some examples: + # + # + `organizations/1234/sources/5678/findings/123456/externalSystems/jira` + # + + # `organizations/1234/sources/5678/locations/us/findings/123456/externalSystems/jira` + # + `folders/1234/sources/5678/findings/123456/externalSystems/jira` + # + + # `folders/1234/sources/5678/locations/us/findings/123456/externalSystems/jira` + # + `projects/1234/sources/5678/findings/123456/externalSystems/jira` + # + + # `projects/1234/sources/5678/locations/us/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::V2::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-v2/proto_docs/google/cloud/securitycenter/v2/file.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/file.rb new file mode 100644 index 000000000000..fcea377226df --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/file.rb @@ -0,0 +1,105 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 V2 + # 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::V2::File::DiskPath] + # Path of the file in terms of underlying disk/partition identifiers. + # @!attribute [rw] operations + # @return [::Array<::Google::Cloud::SecurityCenter::V2::File::FileOperation>] + # Operation(s) performed on a file. + 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 + + # Operation(s) performed on a file. + # @!attribute [rw] type + # @return [::Google::Cloud::SecurityCenter::V2::File::FileOperation::OperationType] + # The type of the operation + class FileOperation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of the operation + module OperationType + # The operation is unspecified. + OPERATION_TYPE_UNSPECIFIED = 0 + + # Represents an open operation. + OPEN = 1 + + # Represents a read operation. + READ = 2 + + # Represents a rename operation. + RENAME = 3 + + # Represents a write operation. + WRITE = 4 + + # Represents an execute operation. + EXECUTE = 5 + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/finding.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/finding.rb new file mode 100644 index 000000000000..80e00cbf53ed --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/finding.rb @@ -0,0 +1,533 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 V2 + # 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] + # Identifier. The [relative resource + # name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) + # of the finding. The following list shows some examples: + # + # + + # `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}` + # + + # `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + # + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}` + # + + # `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + # + `projects/{project_id}/sources/{source_id}/findings/{finding_id}` + # + + # `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + # @!attribute [r] canonical_name + # @return [::String] + # Output only. The canonical name of the finding. The following list shows + # some examples: + # + # + + # `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}` + # + + # `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + # + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}` + # + + # `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + # + `projects/{project_id}/sources/{source_id}/findings/{finding_id}` + # + + # `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + # + # The prefix is the closest CRM ancestor of the resource associated with the + # finding. + # @!attribute [rw] parent + # @return [::String] + # The relative resource name of the source and location the finding belongs + # to. See: + # https://cloud.google.com/apis/design/resource_names#relative_resource_name + # This field is immutable after creation time. The following list shows some + # examples: + # + # + `organizations/{organization_id}/sources/{source_id}` + # + `folders/{folders_id}/sources/{source_id}` + # + `projects/{projects_id}/sources/{source_id}` + # + + # `organizations/{organization_id}/sources/{source_id}/locations/{location_id}` + # + `folders/{folders_id}/sources/{source_id}/locations/{location_id}` + # + `projects/{projects_id}/sources/{source_id}/locations/{location_id}` + # @!attribute [rw] resource_name + # @return [::String] + # Immutable. 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. + # @!attribute [r] state + # @return [::Google::Cloud::SecurityCenter::V2::Finding::State] + # Output only. The state of the finding. + # @!attribute [rw] category + # @return [::String] + # Immutable. The additional taxonomy group within findings from a given + # source. 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::V2::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 [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which the finding was created in Security Command + # Center. + # @!attribute [rw] severity + # @return [::Google::Cloud::SecurityCenter::V2::Finding::Severity] + # The severity of the finding. This field is managed by the source that + # writes the finding. + # @!attribute [rw] mute + # @return [::Google::Cloud::SecurityCenter::V2::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 [r] mute_info + # @return [::Google::Cloud::SecurityCenter::V2::Finding::MuteInfo] + # Output only. The mute information regarding this finding. + # @!attribute [rw] finding_class + # @return [::Google::Cloud::SecurityCenter::V2::Finding::FindingClass] + # The class of the finding. + # @!attribute [rw] indicator + # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::MitreAttack] + # MITRE ATT&CK tactics and techniques related to this finding. + # See: https://attack.mitre.org + # @!attribute [rw] access + # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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](https://cloud.google.com/security-command-center/docs/how-to-mute-findings) + # that muted the finding and the user who muted the finding. + # @!attribute [rw] processes + # @return [::Array<::Google::Cloud::SecurityCenter::V2::Process>] + # Represents operating system processes associated with the Finding. + # @!attribute [r] contacts + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::Exfiltration] + # Represents exfiltrations associated with the finding. + # @!attribute [rw] iam_bindings + # @return [::Array<::Google::Cloud::SecurityCenter::V2::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::V2::Container>] + # Containers associated with the finding. This field provides information for + # both Kubernetes and non-Kubernetes containers. + # @!attribute [rw] kubernetes + # @return [::Google::Cloud::SecurityCenter::V2::Kubernetes] + # Kubernetes resources associated with the finding. + # @!attribute [rw] database + # @return [::Google::Cloud::SecurityCenter::V2::Database] + # Database associated with the finding. + # @!attribute [rw] attack_exposure + # @return [::Google::Cloud::SecurityCenter::V2::AttackExposure] + # The results of an attack path simulation relevant to this finding. + # @!attribute [rw] files + # @return [::Array<::Google::Cloud::SecurityCenter::V2::File>] + # File associated with the finding. + # @!attribute [rw] cloud_dlp_inspection + # @return [::Google::Cloud::SecurityCenter::V2::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::V2::CloudDlpDataProfile] + # Cloud DLP data profile that is associated with the finding. + # @!attribute [rw] kernel_rootkit + # @return [::Google::Cloud::SecurityCenter::V2::KernelRootkit] + # Signature of the kernel rootkit. + # @!attribute [rw] org_policies + # @return [::Array<::Google::Cloud::SecurityCenter::V2::OrgPolicy>] + # Contains information about the org policies associated with the finding. + # @!attribute [rw] job + # @return [::Google::Cloud::SecurityCenter::V2::Job] + # Job associated with the finding. + # @!attribute [rw] application + # @return [::Google::Cloud::SecurityCenter::V2::Application] + # Represents an application associated with the finding. + # @!attribute [rw] ip_rules + # @return [::Google::Cloud::SecurityCenter::V2::IpRules] + # IP rules associated with the finding. + # @!attribute [rw] backup_disaster_recovery + # @return [::Google::Cloud::SecurityCenter::V2::BackupDisasterRecovery] + # Fields related to Backup and DR findings. + # @!attribute [rw] security_posture + # @return [::Google::Cloud::SecurityCenter::V2::SecurityPosture] + # The security posture associated with the finding. + # @!attribute [rw] log_entries + # @return [::Array<::Google::Cloud::SecurityCenter::V2::LogEntry>] + # Log entries that are relevant to the finding. + # @!attribute [rw] load_balancers + # @return [::Array<::Google::Cloud::SecurityCenter::V2::LoadBalancer>] + # The load balancers associated with the finding. + # @!attribute [rw] cloud_armor + # @return [::Google::Cloud::SecurityCenter::V2::CloudArmor] + # Fields related to Cloud Armor findings. + # @!attribute [rw] notebook + # @return [::Google::Cloud::SecurityCenter::V2::Notebook] + # Notebook associated with the finding. + # @!attribute [rw] toxic_combination + # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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] disk + # @return [::Google::Cloud::SecurityCenter::V2::Disk] + # Disk associated with the finding. + # @!attribute [rw] data_access_events + # @return [::Array<::Google::Cloud::SecurityCenter::V2::DataAccessEvent>] + # Data access events associated with the finding. + # @!attribute [rw] data_flow_events + # @return [::Array<::Google::Cloud::SecurityCenter::V2::DataFlowEvent>] + # Data flow events associated with the finding. + # @!attribute [rw] networks + # @return [::Array<::Google::Cloud::SecurityCenter::V2::Network>] + # Represents the VPC networks that the resource is attached to. + # @!attribute [rw] data_retention_deletion_events + # @return [::Array<::Google::Cloud::SecurityCenter::V2::DataRetentionDeletionEvent>] + # Data retention deletion events associated with the finding. + # @!attribute [rw] affected_resources + # @return [::Google::Cloud::SecurityCenter::V2::AffectedResources] + # AffectedResources associated with the finding. + # @!attribute [rw] ai_model + # @return [::Google::Cloud::SecurityCenter::V2::AiModel] + # The AI model associated with the finding. + # @!attribute [rw] chokepoint + # @return [::Google::Cloud::SecurityCenter::V2::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] vertex_ai + # @return [::Google::Cloud::SecurityCenter::V2::VertexAi] + # VertexAi associated with the finding. + # @!attribute [rw] agent + # @return [::Google::Cloud::SecurityCenter::V2::Agent] + # Primary Agent that the specified finding was flagged for + # @!attribute [rw] agent_sessions + # @return [::Array<::Google::Cloud::SecurityCenter::V2::AgentSession>] + # Conversational session(s) where the finding occurred. + # @!attribute [rw] agent_anomaly + # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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 = 3 + 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 combination of security issues that represent a more severe + # security problem when taken together. + 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 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/folder.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/folder.rb new file mode 100644 index 000000000000..a56cbebc0318 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/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 V2 + # 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-v2/proto_docs/google/cloud/securitycenter/v2/group_membership.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/group_membership.rb new file mode 100644 index 000000000000..4b2f90a8e17c --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/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 V2 + # 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::V2::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-v2/proto_docs/google/cloud/securitycenter/v2/iam_binding.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/iam_binding.rb new file mode 100644 index 000000000000..879809624b27 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/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 V2 + # Represents a particular IAM binding, which captures a member's role addition, + # removal, or state. + # @!attribute [rw] action + # @return [::Google::Cloud::SecurityCenter::V2::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-v2/proto_docs/google/cloud/securitycenter/v2/indicator.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/indicator.rb new file mode 100644 index 000000000000..85acfa00a4c5 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/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 V2 + # 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::V2::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::V2::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::V2::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::V2::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::V2::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-v2/proto_docs/google/cloud/securitycenter/v2/ip_rules.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/ip_rules.rb new file mode 100644 index 000000000000..ce71b3883188 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/ip_rules.rb @@ -0,0 +1,122 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 V2 + # IP rules associated with the finding. + # @!attribute [rw] direction + # @return [::Google::Cloud::SecurityCenter::V2::IpRules::Direction] + # The direction that the rule is applicable to, one of ingress or egress. + # @!attribute [rw] allowed + # @return [::Google::Cloud::SecurityCenter::V2::Allowed] + # Tuple with allowed rules. + # + # Note: The following fields are mutually exclusive: `allowed`, `denied`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] denied + # @return [::Google::Cloud::SecurityCenter::V2::Denied] + # Tuple with denied rules. + # + # Note: The following fields are mutually exclusive: `denied`, `allowed`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] source_ip_ranges + # @return [::Array<::String>] + # If source IP ranges are specified, the firewall rule applies only to + # traffic that has a source IP address in these ranges. These ranges must be + # expressed in CIDR format. Only supports IPv4. + # @!attribute [rw] destination_ip_ranges + # @return [::Array<::String>] + # If destination IP ranges are specified, the firewall rule applies only to + # traffic that has a destination IP address in these ranges. These ranges + # must be expressed in CIDR format. Only supports IPv4. + # @!attribute [rw] exposed_services + # @return [::Array<::String>] + # Name of the network protocol service, such as FTP, that is exposed by the + # open port. Follows the naming convention available at: + # https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml. + class IpRules + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of direction that the rule is applicable to, one of ingress or + # egress. Not applicable to OPEN_X_PORT findings. + module Direction + # Unspecified direction value. + DIRECTION_UNSPECIFIED = 0 + + # Ingress direction value. + INGRESS = 1 + + # Egress direction value. + EGRESS = 2 + end + end + + # IP rule information. + # @!attribute [rw] protocol + # @return [::String] + # The IP protocol this rule applies to. This value can either be one of the + # following well known protocol strings (TCP, UDP, ICMP, ESP, AH, IPIP, + # SCTP) or a string representation of the integer value. + # @!attribute [rw] port_ranges + # @return [::Array<::Google::Cloud::SecurityCenter::V2::IpRule::PortRange>] + # Optional. An optional list of ports to which this rule applies. This field + # is only applicable for the UDP or (S)TCP protocols. Each entry must be + # either an integer or a range including a min and max port number. + class IpRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A port range which is inclusive of the min and max values. + # Values are between 0 and 2^16-1. The max can be equal / must be not smaller + # than the min value. If min and max are equal this indicates that it is a + # single port. + # @!attribute [rw] min + # @return [::Integer] + # Minimum port value. + # @!attribute [rw] max + # @return [::Integer] + # Maximum port value. + class PortRange + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Allowed IP rule. + # @!attribute [rw] ip_rules + # @return [::Array<::Google::Cloud::SecurityCenter::V2::IpRule>] + # Optional. Optional list of allowed IP rules. + class Allowed + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Denied IP rule. + # @!attribute [rw] ip_rules + # @return [::Array<::Google::Cloud::SecurityCenter::V2::IpRule>] + # Optional. Optional list of denied IP rules. + class Denied + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/job.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/job.rb new file mode 100644 index 000000000000..e8f38e48dc1b --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/job.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 V2 + # Describes a job + # @!attribute [rw] name + # @return [::String] + # The fully-qualified name for a job. + # e.g. `projects//jobs/` + # @!attribute [r] state + # @return [::Google::Cloud::SecurityCenter::V2::JobState] + # Output only. State of the job, such as `RUNNING` or `PENDING`. + # @!attribute [rw] error_code + # @return [::Integer] + # Optional. If the job did not complete successfully, this field describes + # why. + # @!attribute [rw] location + # @return [::String] + # Optional. Gives the location where the job ran, such as `US` or + # `europe-west1` + class Job + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # JobState represents the state of the job. + module JobState + # Unspecified represents an unknown state and should not be used. + JOB_STATE_UNSPECIFIED = 0 + + # Job is scheduled and pending for run + PENDING = 1 + + # Job in progress + RUNNING = 2 + + # Job has completed with success + SUCCEEDED = 3 + + # Job has completed but with failure + FAILED = 4 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/kernel_rootkit.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/kernel_rootkit.rb new file mode 100644 index 000000000000..0e324f832355 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/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 V2 + # 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-v2/proto_docs/google/cloud/securitycenter/v2/kubernetes.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/kubernetes.rb new file mode 100644 index 000000000000..444ecd5eec70 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/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 V2 + # Kubernetes-related attributes. + # @!attribute [rw] pods + # @return [::Array<::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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::V2::Kubernetes::AccessReview>] + # Provides information on any Kubernetes access reviews (privilege checks) + # relevant to the finding. + # @!attribute [rw] objects + # @return [::Array<::Google::Cloud::SecurityCenter::V2::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::V2::Label>] + # Pod labels. For Kubernetes containers, these are applied to the + # container. + # @!attribute [rw] containers + # @return [::Array<::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::Kubernetes::Role] + # The Role or ClusterRole referenced by the binding. + # @!attribute [rw] subjects + # @return [::Array<::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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-v2/proto_docs/google/cloud/securitycenter/v2/label.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/label.rb new file mode 100644 index 000000000000..609c1859cbe1 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/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 V2 + # 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-v2/proto_docs/google/cloud/securitycenter/v2/load_balancer.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/load_balancer.rb new file mode 100644 index 000000000000..a9d466c92655 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/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 V2 + # 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-v2/proto_docs/google/cloud/securitycenter/v2/log_entry.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/log_entry.rb new file mode 100644 index 000000000000..f3ea1bf4b29d --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/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 V2 + # An individual entry in a log. + # @!attribute [rw] cloud_logging_entry + # @return [::Google::Cloud::SecurityCenter::V2::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 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-v2/proto_docs/google/cloud/securitycenter/v2/mitre_attack.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/mitre_attack.rb new file mode 100644 index 000000000000..a1f6f5b169c8 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/mitre_attack.rb @@ -0,0 +1,521 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 V2 + # MITRE ATT&CK tactics and techniques related to this finding. + # See: https://attack.mitre.org + # @!attribute [rw] primary_tactic + # @return [::Google::Cloud::SecurityCenter::V2::MitreAttack::Tactic] + # The MITRE ATT&CK tactic most closely represented by this finding, if any. + # @!attribute [rw] primary_techniques + # @return [::Array<::Google::Cloud::SecurityCenter::V2::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::V2::MitreAttack::Tactic>] + # Additional MITRE ATT&CK tactics related to this finding, if any. + # @!attribute [rw] additional_techniques + # @return [::Array<::Google::Cloud::SecurityCenter::V2::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 Security Command Center + # findings. See: https://attack.mitre.org/techniques/enterprise/ + module Technique + # Unspecified value. + TECHNIQUE_UNSPECIFIED = 0 + + # T1001 + DATA_OBFUSCATION = 70 + + # T1001.002 + DATA_OBFUSCATION_STEGANOGRAPHY = 71 + + # T1003 + OS_CREDENTIAL_DUMPING = 114 + + # T1003.007 + OS_CREDENTIAL_DUMPING_PROC_FILESYSTEM = 115 + + # T1003.008 + OS_CREDENTIAL_DUMPING_ETC_PASSWORD_AND_ETC_SHADOW = 122 + + # T1005 + DATA_FROM_LOCAL_SYSTEM = 117 + + # T1020 + AUTOMATED_EXFILTRATION = 68 + + # T1027 + OBFUSCATED_FILES_OR_INFO = 72 + + # T1027.003 + STEGANOGRAPHY = 73 + + # T1027.004 + COMPILE_AFTER_DELIVERY = 74 + + # T1027.010 + COMMAND_OBFUSCATION = 75 + + # T1029 + SCHEDULED_TRANSFER = 120 + + # T1033 + SYSTEM_OWNER_USER_DISCOVERY = 118 + + # 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 + + # T1053 + SCHEDULED_TASK_JOB = 89 + + # T1053.003 + SCHEDULED_TASK_JOB_CRON = 119 + + # T1053.007 + CONTAINER_ORCHESTRATION_JOB = 90 + + # T1055 + PROCESS_INJECTION = 93 + + # T1056 + INPUT_CAPTURE = 103 + + # T1056.001 + INPUT_CAPTURE_KEYLOGGING = 104 + + # 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 + INDICATOR_REMOVAL = 123 + + # T1070.002 + INDICATOR_REMOVAL_CLEAR_LINUX_OR_MAC_SYSTEM_LOGS = 124 + + # T1070.003 + INDICATOR_REMOVAL_CLEAR_COMMAND_HISTORY = 125 + + # T1070.004 + INDICATOR_REMOVAL_FILE_DELETION = 64 + + # T1070.006 + INDICATOR_REMOVAL_TIMESTOMP = 128 + + # T1070.008 + INDICATOR_REMOVAL_CLEAR_MAILBOX_DATA = 126 + + # 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 + + # T1083 + FILE_AND_DIRECTORY_DISCOVERY = 121 + + # T1087.001 + ACCOUNT_DISCOVERY_LOCAL_ACCOUNT = 116 + + # 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.003 + ADDITIONAL_CLOUD_ROLES = 67 + + # T1098.004 + SSH_AUTHORIZED_KEYS = 23 + + # T1098.006 + ADDITIONAL_CONTAINER_CLUSTER_ROLES = 58 + + # T1104 + MULTI_STAGE_CHANNELS = 76 + + # T1105 + INGRESS_TOOL_TRANSFER = 3 + + # T1106 + NATIVE_API = 4 + + # T1110 + BRUTE_FORCE = 44 + + # T1119 + AUTOMATED_COLLECTION = 94 + + # T1129 + SHARED_MODULES = 5 + + # T1132 + DATA_ENCODING = 77 + + # T1132.001 + STANDARD_ENCODING = 78 + + # T1134 + ACCESS_TOKEN_MANIPULATION = 33 + + # T1134.001 + TOKEN_IMPERSONATION_OR_THEFT = 39 + + # T1136 + CREATE_ACCOUNT = 79 + + # T1136.001 + LOCAL_ACCOUNT = 80 + + # T1140 + DEOBFUSCATE_DECODE_FILES_OR_INFO = 95 + + # T1190 + EXPLOIT_PUBLIC_FACING_APPLICATION = 27 + + # T1195 + SUPPLY_CHAIN_COMPROMISE = 129 + + # T1195.001 + COMPROMISE_SOFTWARE_DEPENDENCIES_AND_DEVELOPMENT_TOOLS = 130 + + # T1203 + EXPLOITATION_FOR_CLIENT_EXECUTION = 134 + + # T1204 + USER_EXECUTION = 69 + + # T1222.002 + LINUX_AND_MAC_FILE_AND_DIRECTORY_PERMISSIONS_MODIFICATION = 135 + + # T1484 + DOMAIN_POLICY_MODIFICATION = 30 + + # T1485 + DATA_DESTRUCTION = 29 + + # T1486 + DATA_ENCRYPTED_FOR_IMPACT = 132 + + # T1489 + SERVICE_STOP = 52 + + # T1490 + INHIBIT_SYSTEM_RECOVERY = 36 + + # T1495 + FIRMWARE_CORRUPTION = 81 + + # 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 + + # T1537 + TRANSFER_DATA_TO_CLOUD_ACCOUNT = 91 + + # T1539 + STEAL_WEB_SESSION_COOKIE = 25 + + # T1543 + CREATE_OR_MODIFY_SYSTEM_PROCESS = 24 + + # T1546 + EVENT_TRIGGERED_EXECUTION = 65 + + # T1547 + BOOT_OR_LOGON_AUTOSTART_EXECUTION = 82 + + # T1547.006 + KERNEL_MODULES_AND_EXTENSIONS = 83 + + # T1547.009 + SHORTCUT_MODIFICATION = 127 + + # T1548 + ABUSE_ELEVATION_CONTROL_MECHANISM = 34 + + # T1548.001 + ABUSE_ELEVATION_CONTROL_MECHANISM_SETUID_AND_SETGID = 136 + + # T1548.003 + ABUSE_ELEVATION_CONTROL_MECHANISM_SUDO_AND_SUDO_CACHING = 109 + + # T1552 + UNSECURED_CREDENTIALS = 13 + + # T1552.001 + CREDENTIALS_IN_FILES = 105 + + # T1552.003 + BASH_HISTORY = 96 + + # T1552.004 + PRIVATE_KEYS = 97 + + # T1553 + SUBVERT_TRUST_CONTROL = 106 + + # T1553.004 + INSTALL_ROOT_CERTIFICATE = 107 + + # T1554 + COMPROMISE_HOST_SOFTWARE_BINARY = 84 + + # T1555 + CREDENTIALS_FROM_PASSWORD_STORES = 98 + + # T1556 + MODIFY_AUTHENTICATION_PROCESS = 28 + + # T1556.003 + PLUGGABLE_AUTHENTICATION_MODULES = 108 + + # T1556.006 + MULTI_FACTOR_AUTHENTICATION = 137 + + # T1562 + IMPAIR_DEFENSES = 31 + + # T1562.001 + DISABLE_OR_MODIFY_TOOLS = 55 + + # T1562.006 + INDICATOR_BLOCKING = 110 + + # T1562.012 + DISABLE_OR_MODIFY_LINUX_AUDIT_SYSTEM = 111 + + # T1564 + HIDE_ARTIFACTS = 85 + + # T1564.001 + HIDDEN_FILES_AND_DIRECTORIES = 86 + + # T1564.002 + HIDDEN_USERS = 87 + + # T1567 + EXFILTRATION_OVER_WEB_SERVICE = 20 + + # T1567.002 + EXFILTRATION_TO_CLOUD_STORAGE = 21 + + # T1568 + DYNAMIC_RESOLUTION = 12 + + # T1570 + LATERAL_TOOL_TRANSFER = 41 + + # T1574 + HIJACK_EXECUTION_FLOW = 112 + + # T1574.006 + HIJACK_EXECUTION_FLOW_DYNAMIC_LINKER_HIJACKING = 113 + + # T1578 + MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE = 26 + + # T1578.001 + CREATE_SNAPSHOT = 54 + + # T1580 + CLOUD_INFRASTRUCTURE_DISCOVERY = 53 + + # T1587 + DEVELOP_CAPABILITIES = 99 + + # T1587.001 + DEVELOP_CAPABILITIES_MALWARE = 100 + + # T1588 + OBTAIN_CAPABILITIES = 43 + + # T1588.001 + OBTAIN_CAPABILITIES_MALWARE = 101 + + # T1588.006 + OBTAIN_CAPABILITIES_VULNERABILITIES = 133 + + # T1595 + ACTIVE_SCANNING = 1 + + # T1595.001 + SCANNING_IP_BLOCKS = 2 + + # T1608 + STAGE_CAPABILITIES = 88 + + # T1608.001 + UPLOAD_MALWARE = 102 + + # T1609 + CONTAINER_ADMINISTRATION_COMMAND = 60 + + # T1610 + DEPLOY_CONTAINER = 66 + + # T1611 + ESCAPE_TO_HOST = 61 + + # T1613 + CONTAINER_AND_RESOURCE_DISCOVERY = 57 + + # T1620 + REFLECTIVE_CODE_LOADING = 92 + + # T1649 + STEAL_OR_FORGE_AUTHENTICATION_CERTIFICATES = 62 + + # T1657 + FINANCIAL_THEFT = 131 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/mute_config.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/mute_config.rb new file mode 100644 index 000000000000..db9977d397e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/mute_config.rb @@ -0,0 +1,113 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 V2 + # A mute config is a Cloud SCC resource that contains the configuration + # to mute create/update events of findings. + # @!attribute [rw] name + # @return [::String] + # Identifier. This field will be ignored if provided on config creation. The + # following list shows some examples of the format: + # + # + `organizations/{organization}/muteConfigs/{mute_config}` + # + + # `organizations/{organization}locations/{location}//muteConfigs/{mute_config}` + # + `folders/{folder}/muteConfigs/{mute_config}` + # + `folders/{folder}/locations/{location}/muteConfigs/{mute_config}` + # + `projects/{project}/muteConfigs/{mute_config}` + # + `projects/{project}/locations/{location}/muteConfigs/{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::V2::MuteConfig::MuteConfigType] + # Required. The type of the mute config, which determines what type of mute + # state the config affects. Immutable after 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-v2/proto_docs/google/cloud/securitycenter/v2/network.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/network.rb new file mode 100644 index 000000000000..7fb133f55dc2 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/network.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 V2 + # Contains information about a VPC network associated with the finding. + # @!attribute [rw] name + # @return [::String] + # The name of the VPC network resource, for example, + # `//compute.googleapis.com/projects/my-project/global/networks/my-network`. + class Network + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/notebook.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/notebook.rb new file mode 100644 index 000000000000..0d1e37a099ef --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/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 V2 + # 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-v2/proto_docs/google/cloud/securitycenter/v2/notification_config.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/notification_config.rb new file mode 100644 index 000000000000..b5de722177ff --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/notification_config.rb @@ -0,0 +1,94 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 V2 + # 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] + # Identifier. The relative resource name of this notification config. See: + # https://cloud.google.com/apis/design/resource_names#relative_resource_name + # The following list shows some examples: + # + + # `organizations/{organization_id}/locations/{location_id}/notificationConfigs/notify_public_bucket` + # + + # `folders/{folder_id}/locations/{location_id}/notificationConfigs/notify_public_bucket` + # + + # `projects/{project_id}/locations/{location_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::V2::NotificationConfig::StreamingConfig] + # The config for triggering streaming-based notifications. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp of when the notification config was last + # updated. + 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-v2/proto_docs/google/cloud/securitycenter/v2/notification_message.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/notification_message.rb new file mode 100644 index 000000000000..bd3046afd7de --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/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 V2 + # 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::V2::Finding] + # If it's a Finding based notification config, this field will be + # populated. + # @!attribute [rw] resource + # @return [::Google::Cloud::SecurityCenter::V2::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-v2/proto_docs/google/cloud/securitycenter/v2/org_policy.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/org_policy.rb new file mode 100644 index 000000000000..b90cb7b8d034 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/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 V2 + # Contains information about the org policies associated with the finding. + # @!attribute [rw] name + # @return [::String] + # Identifier. 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-v2/proto_docs/google/cloud/securitycenter/v2/process.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/process.rb new file mode 100644 index 000000000000..e127710a40a5 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/process.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 V2 + # 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::V2::File] + # File information for the process executable. + # @!attribute [rw] libraries + # @return [::Array<::Google::Cloud::SecurityCenter::V2::File>] + # File information for libraries loaded by the process. + # @!attribute [rw] script + # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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. + # @!attribute [rw] user_id + # @return [::Integer] + # The ID of the user that executed the process. E.g. If this is the root user + # this will always be 0. + 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-v2/proto_docs/google/cloud/securitycenter/v2/resource.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/resource.rb new file mode 100644 index 000000000000..aaa75073c739 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/resource.rb @@ -0,0 +1,314 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 V2 + # 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] cloud_provider + # @return [::Google::Cloud::SecurityCenter::V2::CloudProvider] + # Indicates which cloud provider the finding is from. + # @!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] gcp_metadata + # @return [::Google::Cloud::SecurityCenter::V2::GcpMetadata] + # The GCP metadata associated with the finding. + # + # Note: The following fields are mutually exclusive: `gcp_metadata`, `aws_metadata`, `azure_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] aws_metadata + # @return [::Google::Cloud::SecurityCenter::V2::AwsMetadata] + # The AWS metadata associated with the finding. + # + # Note: The following fields are mutually exclusive: `aws_metadata`, `gcp_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::V2::AzureMetadata] + # The Azure metadata associated with the finding. + # + # Note: The following fields are mutually exclusive: `azure_metadata`, `gcp_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::V2::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 + + # Google Cloud metadata associated with the resource. Only applicable if the + # finding's cloud provider is Google Cloud. + # @!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::V2::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] organization + # @return [::String] + # The name of the organization that the resource belongs to. + class GcpMetadata + 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::V2::AwsMetadata::AwsOrganization] + # The AWS organization associated with the resource. + # @!attribute [rw] organizational_units + # @return [::Array<::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::AzureMetadata::AzureSubscription] + # The Azure subscription associated with the resource. + # @!attribute [rw] resource_group + # @return [::Google::Cloud::SecurityCenter::V2::AzureMetadata::AzureResourceGroup] + # The Azure resource group associated with the resource. + # @!attribute [rw] tenant + # @return [::Google::Cloud::SecurityCenter::V2::AzureMetadata::AzureTenant] + # The Azure Entra tenant 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] id + # @return [::String] + # The ID of the 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 + + # Represents a Microsoft Entra tenant. + # @!attribute [rw] id + # @return [::String] + # The ID of the Microsoft Entra tenant, for example, + # "a11aaa11-aa11-1aa1-11aa-1aaa11a". + # @!attribute [rw] display_name + # @return [::String] + # The display name of the Azure tenant. + class AzureTenant + 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::V2::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::V2::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 + + # The cloud provider the finding pertains to. + module CloudProvider + # The cloud provider is unspecified. + CLOUD_PROVIDER_UNSPECIFIED = 0 + + # The cloud provider is Google Cloud. + 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-v2/proto_docs/google/cloud/securitycenter/v2/resource_value_config.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/resource_value_config.rb new file mode 100644 index 000000000000..450e83f704b5 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/resource_value_config.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 Cloud + module SecurityCenter + module V2 + # 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] + # Identifier. Name for the resource value configuration + # @!attribute [rw] resource_value + # @return [::Google::Cloud::SecurityCenter::V2::ResourceValue] + # Resource value level this expression represents + # Only required when there is no Sensitive Data Protection mapping in the + # request + # @!attribute [rw] tag_values + # @return [::Array<::String>] + # Tag values combined with `AND` to check against. + # For Google Cloud resources, they are tag value IDs in the form of + # "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 and 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::V2::CloudProvider] + # Cloud provider this configuration applies to + # @!attribute [rw] sensitive_data_protection_mapping + # @return [::Google::Cloud::SecurityCenter::V2::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::V2::ResourceValue] + # Resource value mapping for high-sensitivity Sensitive Data Protection + # findings + # @!attribute [rw] medium_sensitivity_mapping + # @return [::Google::Cloud::SecurityCenter::V2::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-v2/proto_docs/google/cloud/securitycenter/v2/security_marks.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/security_marks.rb new file mode 100644 index 000000000000..1e3bcc93a58a --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/security_marks.rb @@ -0,0 +1,84 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 V2 + # 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 + # The following list shows some examples: + # + # + `organizations/{organization_id}/assets/{asset_id}/securityMarks` + # + + # `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks` + # + + # `organizations/{organization_id}/sources/{source_id}/locations/{location}/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. The following list shows some examples: + # + # + `organizations/{organization_id}/assets/{asset_id}/securityMarks` + # + + # `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks` + # + + # `organizations/{organization_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks` + # + `folders/{folder_id}/assets/{asset_id}/securityMarks` + # + + # `folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks` + # + + # `folders/{folder_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks` + # + `projects/{project_number}/assets/{asset_id}/securityMarks` + # + + # `projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks` + # + + # `projects/{project_number}/sources/{source_id}/locations/{location}/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-v2/proto_docs/google/cloud/securitycenter/v2/security_posture.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/security_posture.rb new file mode 100644 index 000000000000..3c2c9899fac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/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 V2 + # 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 policy set, 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::V2::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-v2/proto_docs/google/cloud/securitycenter/v2/securitycenter_service.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/securitycenter_service.rb new file mode 100644 index 000000000000..5aa1b2607e39 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/securitycenter_service.rb @@ -0,0 +1,1216 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 V2 + # 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::V2::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::V2::ResourceValueConfig>] + # The resource value configs created + class BatchCreateResourceValueConfigsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # 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. If no + # location is specified, findings are updated in global. The following list + # shows some examples: + # + # + `organizations/[organization_id]` + # + `organizations/[organization_id]/locations/[location_id]` + # + `folders/[folder_id]` + # + `folders/[folder_id]/locations/[location_id]` + # + `projects/[project_id]` + # + `projects/[project_id]/locations/[location_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_state + # @return [::Google::Cloud::SecurityCenter::V2::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 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]/locations/[location_id]`, + # `folders/[folder_id]/locations/[location_id]`, or + # `projects/[project_id]/locations/[location_id]`. + # @!attribute [rw] big_query_export + # @return [::Google::Cloud::SecurityCenter::V2::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 creating a finding. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name of the new finding's parent. The following list + # shows some examples of the format: + # + + # `organizations/[organization_id]/sources/[source_id]` + # + + # `organizations/[organization_id]/sources/[source_id]/locations/[location_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::V2::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]/locations/[location_id]`, + # `folders/[folder_id]/locations/[location_id]`, or + # `projects/[project_id]/locations/[location_id]`. + # @!attribute [rw] mute_config + # @return [::Google::Cloud::SecurityCenter::V2::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 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]/locations/[location_id]`, + # `folders/[folder_id]/locations/[location_id]`, or + # `projects/[project_id]/locations/[location_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::V2::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 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::V2::ResourceValueConfig] + # Required. The resource value config being created. + class CreateResourceValueConfigRequest + 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::V2::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 BigQuery export. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the BigQuery export to delete. The following list + # shows some examples of the format: + # + # + + # `organizations/{organization}/locations/{location}/bigQueryExports/{export_id}` + # + `folders/{folder}/locations/{location}/bigQueryExports/{export_id}` + # + `projects/{project}/locations/{location}/bigQueryExports/{export_id}` + class DeleteBigQueryExportRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for deleting a mute config. If no location is specified, + # default is global. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the mute config to delete. The following list shows some + # examples of the format: + # + # + `organizations/{organization}/muteConfigs/{config_id}` + # + + # `organizations/{organization}/locations/{location}/muteConfigs/{config_id}` + # + `folders/{folder}/muteConfigs/{config_id}` + # + `folders/{folder}/locations/{location}/muteConfigs/{config_id}` + # + `projects/{project}/muteConfigs/{config_id}` + # + `projects/{project}/locations/{location}/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. The following list + # shows some examples of the format: + # + # + + # `organizations/[organization_id]/locations/[location_id]/notificationConfigs/[config_id]` + # + + # `folders/[folder_id]/locations/[location_id]notificationConfigs/[config_id]` + # + + # `projects/[project_id]/locations/[location_id]notificationConfigs/[config_id]` + class DeleteNotificationConfigRequest + 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 + + # The destination big query dataset to export findings to. + # @!attribute [rw] dataset + # @return [::String] + # Required. The relative resource name of the destination dataset, in the + # form projects/\\{projectId}/datasets/\\{datasetId}. + class BigQueryDestination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The LRO metadata for a ExportFindings request. + # @!attribute [rw] export_start_time + # @return [::Google::Protobuf::Timestamp] + # Optional. Timestamp at which export was started + # @!attribute [rw] big_query_destination + # @return [::Google::Cloud::SecurityCenter::V2::BigQueryDestination] + # Required. The destination big query dataset to export findings to. + class ExportFindingsMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response to a ExportFindings request. Contains the LRO information. + class ExportFindingsResponse + 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. The following list shows + # some examples of the format: + # + # + + # `organizations/{organization}/locations/{location}/bigQueryExports/{export_id}` + # + `folders/{folder}/locations/{location}/bigQueryExports/{export_id}` + # + `projects/{project}locations/{location}//bigQueryExports/{export_id}` + class GetBigQueryExportRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for retrieving a mute config. If no location is specified, + # default is global. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the mute config to retrieve. The following list shows + # some examples of the format: + # + # + `organizations/{organization}/muteConfigs/{config_id}` + # + + # `organizations/{organization}/locations/{location}/muteConfigs/{config_id}` + # + `folders/{folder}/muteConfigs/{config_id}` + # + `folders/{folder}/locations/{location}/muteConfigs/{config_id}` + # + `projects/{project}/muteConfigs/{config_id}` + # + `projects/{project}/locations/{location}/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. The following list shows + # some examples of the format: + # + # + + # `organizations/[organization_id]/locations/[location_id]/notificationConfigs/[config_id]` + # + + # `folders/[folder_id]/locations/[location_id]/notificationConfigs/[config_id]` + # + + # `projects/[project_id]/locations/[location_id]/notificationConfigs/[config_id]` + class GetNotificationConfigRequest + 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 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 findings. + # @!attribute [rw] parent + # @return [::String] + # Required. Name of the source to groupBy. If no location is specified, + # finding is assumed to be in global. + # The following list shows some examples: + # + # + `organizations/[organization_id]/sources/[source_id]` + # + + # `organizations/[organization_id]/sources/[source_id]/locations/[location_id]` + # + `folders/[folder_id]/sources/[source_id]` + # + `folders/[folder_id]/sources/[source_id]/locations/[location_id]` + # + `projects/[project_id]/sources/[source_id]` + # + `projects/[project_id]/sources/[source_id]/locations/[location_id]` + # + # To groupBy across all sources provide a source_id of `-`. The following + # list shows some examples: + # + # + `organizations/{organization_id}/sources/-` + # + `organizations/{organization_id}/sources/-/locations/[location_id]` + # + `folders/{folder_id}/sources/-` + # + `folders/{folder_id}/sources/-/locations/[location_id]` + # + `projects/{project_id}/sources/-` + # + `projects/{project_id}/sources/-/locations/[location_id]` + # @!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 + # * 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: `=`, `:` + # * security_marks.marks: `=`, `:` + # * 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. + # The string value should follow SQL syntax: comma separated list of fields. + # For example: "parent,resource_name". + # @!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::V2::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] 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 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::V2::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 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]/locations/[location_id]`, + # `folders/[folder_id]/locations/[location_id]`, or + # `projects/[project_id]/locations/[location_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::V2::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 listing findings. + # @!attribute [rw] parent + # @return [::String] + # Required. Name of the source the findings belong to. If no location is + # specified, the default is global. The following list shows some examples: + # + # + `organizations/[organization_id]/sources/[source_id]` + # + + # `organizations/[organization_id]/sources/[source_id]/locations/[location_id]` + # + `folders/[folder_id]/sources/[source_id]` + # + `folders/[folder_id]/sources/[source_id]/locations/[location_id]` + # + `projects/[project_id]/sources/[source_id]` + # + `projects/[project_id]/sources/[source_id]/locations/[location_id]` + # + # To list across all sources provide a source_id of `-`. The following + # list shows some examples: + # + # + `organizations/{organization_id}/sources/-` + # + `organizations/{organization_id}/sources/-/locations/{location_id}` + # + `folders/{folder_id}/sources/-` + # + `folders/{folder_id}/sources/-locations/{location_id}` + # + `projects/{projects_id}/sources/-` + # + `projects/{projects_id}/sources/-/locations/{location_id}` + # @!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 + # * 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: `=`, `:` + # * security_marks.marks: `=`, `:` + # * 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,parent". 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,parent". Redundant space characters in the + # syntax are insignificant. "name desc,parent" and " + # name desc , parent " are equivalent. + # + # The following fields are supported: + # name + # parent + # state + # category + # resource_name + # event_time + # security_marks.marks + # @!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::V2::ListFindingsResponse::ListFindingsResult>] + # Findings matching 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. + # @!attribute [rw] finding + # @return [::Google::Cloud::SecurityCenter::V2::Finding] + # Finding matching the search request. + # @!attribute [r] resource + # @return [::Google::Cloud::SecurityCenter::V2::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] cloud_provider + # @return [::Google::Cloud::SecurityCenter::V2::CloudProvider] + # Indicates which cloud provider the finding is from. + # @!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] gcp_metadata + # @return [::Google::Cloud::SecurityCenter::V2::GcpMetadata] + # The GCP metadata associated with the finding. + # + # Note: The following fields are mutually exclusive: `gcp_metadata`, `aws_metadata`, `azure_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] aws_metadata + # @return [::Google::Cloud::SecurityCenter::V2::AwsMetadata] + # The AWS metadata associated with the finding. + # + # Note: The following fields are mutually exclusive: `aws_metadata`, `gcp_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::V2::AzureMetadata] + # The Azure metadata associated with the finding. + # + # Note: The following fields are mutually exclusive: `azure_metadata`, `gcp_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::V2::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 + end + end + + # Request message for listing mute configs at a given scope e.g. organization, + # folder or project. If no location is specified, default is + # global. + # @!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]`, + # `organizations/[organization_id]/locations/[location_id]`, + # `folders/[folder_id]/locations/[location_id]`, + # `projects/[project_id]/locations/[location_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::V2::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]/locations/[location_id]", + # "folders/[folder_id]/locations/[location_id]", or + # "projects/[project_id]/locations/[location_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::V2::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 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 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 `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::V2::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 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::V2::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 the valued resources for a given simulation. + # @!attribute [rw] parent + # @return [::String] + # Required. Name of parent to list exposed 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` + # + # 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::V2::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 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. If no location is specified, finding is assumed to be in + # global. The following list shows some examples: + # + # + + # `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}` + # + + # `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + # + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}` + # + + # `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + # + `projects/{project_id}/sources/{source_id}/findings/{finding_id}` + # + + # `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + # @!attribute [rw] state + # @return [::Google::Cloud::SecurityCenter::V2::Finding::State] + # Required. The desired State of the finding. + 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. If no location is specified, finding is assumed to be in + # global. The following list shows some examples: + # + # + + # `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}` + # + + # `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + # + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}` + # + + # `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + # + `projects/{project_id}/sources/{source_id}/findings/{finding_id}` + # + + # `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + # @!attribute [rw] mute + # @return [::Google::Cloud::SecurityCenter::V2::Finding::Mute] + # Required. The desired state of the Mute. + class SetMuteRequest + 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::V2::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 updating a ExternalSystem resource. + # @!attribute [rw] external_system + # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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 to update resource value config + # @!attribute [rw] resource_value_config + # @return [::Google::Cloud::SecurityCenter::V2::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. + # + # To update nested fields, include the top level field in the mask + # For example, to update gcp_metadata.resource_type, include the + # "gcp_metadata" field mask + class UpdateResourceValueConfigRequest + 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::V2::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.". + class UpdateSecurityMarksRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for updating a source. + # @!attribute [rw] source + # @return [::Google::Cloud::SecurityCenter::V2::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 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/simulation.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/simulation.rb new file mode 100644 index 000000000000..05bb5af8f001 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/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 V2 + # 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::V2::ResourceValueConfigMetadata>] + # Resource value configurations' metadata used in this simulation. Maximum of + # 100. + # @!attribute [rw] cloud_provider + # @return [::Google::Cloud::SecurityCenter::V2::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-v2/proto_docs/google/cloud/securitycenter/v2/source.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/source.rb new file mode 100644 index 000000000000..27dd5626b0cf --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/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 V2 + # 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-v2/proto_docs/google/cloud/securitycenter/v2/toxic_combination.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/toxic_combination.rb new file mode 100644 index 000000000000..dff76d98c704 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/toxic_combination.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 V2 + # 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-v2/proto_docs/google/cloud/securitycenter/v2/valued_resource.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/valued_resource.rb new file mode 100644 index 000000000000..e97a21960308 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/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 V2 + # 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::V2::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::V2::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-v2/proto_docs/google/cloud/securitycenter/v2/vertex_ai.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/vertex_ai.rb new file mode 100644 index 000000000000..f11b0348de0a --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/vertex_ai.rb @@ -0,0 +1,68 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 V2 + # Vertex AI-related information associated with the finding. + # @!attribute [rw] datasets + # @return [::Array<::Google::Cloud::SecurityCenter::V2::VertexAi::Dataset>] + # Datasets associated with the finding. + # @!attribute [rw] pipelines + # @return [::Array<::Google::Cloud::SecurityCenter::V2::VertexAi::Pipeline>] + # Pipelines associated with the finding. + class VertexAi + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Vertex AI dataset associated with the finding. + # @!attribute [rw] name + # @return [::String] + # Resource name of the dataset, e.g. + # projects/\\{project}/locations/\\{location}/datasets/2094040236064505856 + # @!attribute [rw] display_name + # @return [::String] + # The user defined display name of dataset, e.g. plants-dataset + # @!attribute [rw] source + # @return [::String] + # Data source, such as a BigQuery source URI, e.g. + # bq://scc-nexus-test.AIPPtest.gsod + class Dataset + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Vertex AI training pipeline associated with the finding. + # @!attribute [rw] name + # @return [::String] + # Resource name of the pipeline, e.g. + # projects/\\{project}/locations/\\{location}/trainingPipelines/5253428229225578496 + # @!attribute [rw] display_name + # @return [::String] + # The user-defined display name of pipeline, e.g. plants-classification + class Pipeline + 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-v2/proto_docs/google/cloud/securitycenter/v2/vulnerability.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/vulnerability.rb new file mode 100644 index 000000000000..41c3a3589f1d --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/vulnerability.rb @@ -0,0 +1,365 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 V2 + # Refers to common vulnerability fields e.g. cve, cvss, cwe etc. + # @!attribute [rw] cve + # @return [::Google::Cloud::SecurityCenter::V2::Cve] + # CVE stands for Common Vulnerabilities and Exposures + # (https://cve.mitre.org/about/) + # @!attribute [rw] offending_package + # @return [::Google::Cloud::SecurityCenter::V2::Package] + # The offending package is relevant to the finding. + # @!attribute [rw] fixed_package + # @return [::Google::Cloud::SecurityCenter::V2::Package] + # The fixed package is relevant to the finding. + # @!attribute [rw] security_bulletin + # @return [::Google::Cloud::SecurityCenter::V2::SecurityBulletin] + # The security bulletin is relevant to this finding. + # @!attribute [rw] provider_risk_score + # @return [::Integer] + # Provider provided risk_score based on multiple factors. The higher the risk + # score, the more risky the vulnerability is. + # @!attribute [rw] reachable + # @return [::Boolean] + # Represents whether the vulnerability is reachable (detected via static + # analysis) + # @!attribute [rw] cwes + # @return [::Array<::Google::Cloud::SecurityCenter::V2::Cwe>] + # Represents one or more Common Weakness Enumeration (CWE) information on + # this vulnerability. + 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::V2::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::V2::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::V2::Cve::RiskRating] + # The potential impact of the vulnerability if it was to be exploited. + # @!attribute [rw] exploitation_activity + # @return [::Google::Cloud::SecurityCenter::V2::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. + # @!attribute [rw] first_exploitation_date + # @return [::Google::Protobuf::Timestamp] + # Date of the earliest known exploitation. + 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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::Cvssv3::Impact] + # This metric measures the impact to integrity of a successfully exploited + # vulnerability. + # @!attribute [rw] availability_impact + # @return [::Google::Cloud::SecurityCenter::V2::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 + + # CWE stands for Common Weakness Enumeration. Information about this weakness, + # as described by [CWE](https://cwe.mitre.org/). + # @!attribute [rw] id + # @return [::String] + # The CWE identifier, e.g. CWE-94 + # @!attribute [rw] references + # @return [::Array<::Google::Cloud::SecurityCenter::V2::Reference>] + # Any reference to the details on the CWE, for example, + # https://cwe.mitre.org/data/definitions/94.html + class Cwe + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-cloud-security_center-v2/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-v2/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-v2/proto_docs/google/iam/v1/options.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/iam/v1/options.rb new file mode 100644 index 000000000000..60713d995b86 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/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-v2/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/iam/v1/policy.rb new file mode 100644 index 000000000000..999575b797df --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/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-v2/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/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-v2/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/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-v2/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/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-v2/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/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-v2/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/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-v2/proto_docs/google/protobuf/struct.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/struct.rb new file mode 100644 index 000000000000..39e1aca868d2 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/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-v2/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/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-v2/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/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-v2/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/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-v2/snippets/Gemfile b/owl-bot-staging/google-cloud-security_center-v2/snippets/Gemfile new file mode 100644 index 000000000000..99432c66bb92 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/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-v2", path: "../" +else + gem "google-cloud-security_center-v2" +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-v2/snippets/security_center/batch_create_resource_value_configs.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/batch_create_resource_value_configs.rb new file mode 100644 index 000000000000..35868ebf184f --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_BatchCreateResourceValueConfigs_sync] +require "google/cloud/security_center/v2" + +## +# 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::V2::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::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::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::V2::BatchCreateResourceValueConfigsResponse. + p result +end +# [END securitycenter_v2_generated_SecurityCenter_BatchCreateResourceValueConfigs_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/bulk_mute_findings.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/bulk_mute_findings.rb new file mode 100644 index 000000000000..937f173f1687 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_BulkMuteFindings_sync] +require "google/cloud/security_center/v2" + +## +# 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::V2::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::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::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_v2_generated_SecurityCenter_BulkMuteFindings_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_big_query_export.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_big_query_export.rb new file mode 100644 index 000000000000..34909f562782 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_CreateBigQueryExport_sync] +require "google/cloud/security_center/v2" + +## +# 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::V2::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::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::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::V2::BigQueryExport. + p result +end +# [END securitycenter_v2_generated_SecurityCenter_CreateBigQueryExport_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_finding.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_finding.rb new file mode 100644 index 000000000000..b2dbeb349717 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_CreateFinding_sync] +require "google/cloud/security_center/v2" + +## +# 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::V2::SecurityCenter::Client#create_finding. +# +def create_finding + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::CreateFindingRequest.new + + # Call the create_finding method. + result = client.create_finding request + + # The returned object is of type Google::Cloud::SecurityCenter::V2::Finding. + p result +end +# [END securitycenter_v2_generated_SecurityCenter_CreateFinding_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_mute_config.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_mute_config.rb new file mode 100644 index 000000000000..5ac853e23ca6 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_CreateMuteConfig_sync] +require "google/cloud/security_center/v2" + +## +# 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::V2::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::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::CreateMuteConfigRequest.new + + # Call the create_mute_config method. + result = client.create_mute_config request + + # The returned object is of type Google::Cloud::SecurityCenter::V2::MuteConfig. + p result +end +# [END securitycenter_v2_generated_SecurityCenter_CreateMuteConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_notification_config.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_notification_config.rb new file mode 100644 index 000000000000..8d63ccdb2cc6 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_CreateNotificationConfig_sync] +require "google/cloud/security_center/v2" + +## +# 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::V2::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::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::CreateNotificationConfigRequest.new + + # Call the create_notification_config method. + result = client.create_notification_config request + + # The returned object is of type Google::Cloud::SecurityCenter::V2::NotificationConfig. + p result +end +# [END securitycenter_v2_generated_SecurityCenter_CreateNotificationConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_source.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_source.rb new file mode 100644 index 000000000000..042a0de0ff05 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_CreateSource_sync] +require "google/cloud/security_center/v2" + +## +# 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::V2::SecurityCenter::Client#create_source. +# +def create_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::CreateSourceRequest.new + + # Call the create_source method. + result = client.create_source request + + # The returned object is of type Google::Cloud::SecurityCenter::V2::Source. + p result +end +# [END securitycenter_v2_generated_SecurityCenter_CreateSource_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/delete_big_query_export.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/delete_big_query_export.rb new file mode 100644 index 000000000000..c5b9ec740f3f --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_DeleteBigQueryExport_sync] +require "google/cloud/security_center/v2" + +## +# 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::V2::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::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::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_v2_generated_SecurityCenter_DeleteBigQueryExport_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/delete_mute_config.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/delete_mute_config.rb new file mode 100644 index 000000000000..f6d9fe6232b5 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_DeleteMuteConfig_sync] +require "google/cloud/security_center/v2" + +## +# 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::V2::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::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::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_v2_generated_SecurityCenter_DeleteMuteConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/delete_notification_config.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/delete_notification_config.rb new file mode 100644 index 000000000000..e7084636df2d --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_DeleteNotificationConfig_sync] +require "google/cloud/security_center/v2" + +## +# 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::V2::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::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::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_v2_generated_SecurityCenter_DeleteNotificationConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/delete_resource_value_config.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/delete_resource_value_config.rb new file mode 100644 index 000000000000..f369d1ca9754 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_DeleteResourceValueConfig_sync] +require "google/cloud/security_center/v2" + +## +# 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::V2::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::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::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_v2_generated_SecurityCenter_DeleteResourceValueConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_big_query_export.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_big_query_export.rb new file mode 100644 index 000000000000..167844fa3f97 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_GetBigQueryExport_sync] +require "google/cloud/security_center/v2" + +## +# 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::V2::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::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::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::V2::BigQueryExport. + p result +end +# [END securitycenter_v2_generated_SecurityCenter_GetBigQueryExport_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_iam_policy.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_iam_policy.rb new file mode 100644 index 000000000000..e260df274f67 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_GetIamPolicy_sync] +require "google/cloud/security_center/v2" + +## +# 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::V2::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::V2::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_v2_generated_SecurityCenter_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_mute_config.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_mute_config.rb new file mode 100644 index 000000000000..737f0b9b778a --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_GetMuteConfig_sync] +require "google/cloud/security_center/v2" + +## +# 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::V2::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::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::GetMuteConfigRequest.new + + # Call the get_mute_config method. + result = client.get_mute_config request + + # The returned object is of type Google::Cloud::SecurityCenter::V2::MuteConfig. + p result +end +# [END securitycenter_v2_generated_SecurityCenter_GetMuteConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_notification_config.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_notification_config.rb new file mode 100644 index 000000000000..a6e6fe0bf43d --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_GetNotificationConfig_sync] +require "google/cloud/security_center/v2" + +## +# 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::V2::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::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::GetNotificationConfigRequest.new + + # Call the get_notification_config method. + result = client.get_notification_config request + + # The returned object is of type Google::Cloud::SecurityCenter::V2::NotificationConfig. + p result +end +# [END securitycenter_v2_generated_SecurityCenter_GetNotificationConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_resource_value_config.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_resource_value_config.rb new file mode 100644 index 000000000000..dca8397631b9 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_GetResourceValueConfig_sync] +require "google/cloud/security_center/v2" + +## +# 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::V2::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::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::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::V2::ResourceValueConfig. + p result +end +# [END securitycenter_v2_generated_SecurityCenter_GetResourceValueConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_simulation.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_simulation.rb new file mode 100644 index 000000000000..97887b9c87b5 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_GetSimulation_sync] +require "google/cloud/security_center/v2" + +## +# 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::V2::SecurityCenter::Client#get_simulation. +# +def get_simulation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::GetSimulationRequest.new + + # Call the get_simulation method. + result = client.get_simulation request + + # The returned object is of type Google::Cloud::SecurityCenter::V2::Simulation. + p result +end +# [END securitycenter_v2_generated_SecurityCenter_GetSimulation_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_source.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_source.rb new file mode 100644 index 000000000000..9e23b772526e --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_GetSource_sync] +require "google/cloud/security_center/v2" + +## +# 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::V2::SecurityCenter::Client#get_source. +# +def get_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::GetSourceRequest.new + + # Call the get_source method. + result = client.get_source request + + # The returned object is of type Google::Cloud::SecurityCenter::V2::Source. + p result +end +# [END securitycenter_v2_generated_SecurityCenter_GetSource_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_valued_resource.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_valued_resource.rb new file mode 100644 index 000000000000..1d27e0e2a2bd --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_GetValuedResource_sync] +require "google/cloud/security_center/v2" + +## +# 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::V2::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::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::GetValuedResourceRequest.new + + # Call the get_valued_resource method. + result = client.get_valued_resource request + + # The returned object is of type Google::Cloud::SecurityCenter::V2::ValuedResource. + p result +end +# [END securitycenter_v2_generated_SecurityCenter_GetValuedResource_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/group_findings.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/group_findings.rb new file mode 100644 index 000000000000..1c83d2e734fb --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_GroupFindings_sync] +require "google/cloud/security_center/v2" + +## +# 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::V2::SecurityCenter::Client#group_findings. +# +def group_findings + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::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::V2::GroupResult. + p item + end +end +# [END securitycenter_v2_generated_SecurityCenter_GroupFindings_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_attack_paths.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_attack_paths.rb new file mode 100644 index 000000000000..efd9cc9a111e --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_ListAttackPaths_sync] +require "google/cloud/security_center/v2" + +## +# 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::V2::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::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::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::V2::AttackPath. + p item + end +end +# [END securitycenter_v2_generated_SecurityCenter_ListAttackPaths_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_big_query_exports.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_big_query_exports.rb new file mode 100644 index 000000000000..b499ded4d8b6 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_ListBigQueryExports_sync] +require "google/cloud/security_center/v2" + +## +# 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::V2::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::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::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::V2::BigQueryExport. + p item + end +end +# [END securitycenter_v2_generated_SecurityCenter_ListBigQueryExports_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_findings.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_findings.rb new file mode 100644 index 000000000000..f8f726312d73 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_ListFindings_sync] +require "google/cloud/security_center/v2" + +## +# 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::V2::SecurityCenter::Client#list_findings. +# +def list_findings + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::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::V2::ListFindingsResponse::ListFindingsResult. + p item + end +end +# [END securitycenter_v2_generated_SecurityCenter_ListFindings_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_mute_configs.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_mute_configs.rb new file mode 100644 index 000000000000..aa028407968b --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_ListMuteConfigs_sync] +require "google/cloud/security_center/v2" + +## +# 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::V2::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::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::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::V2::MuteConfig. + p item + end +end +# [END securitycenter_v2_generated_SecurityCenter_ListMuteConfigs_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_notification_configs.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_notification_configs.rb new file mode 100644 index 000000000000..421f44da22ce --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_ListNotificationConfigs_sync] +require "google/cloud/security_center/v2" + +## +# 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::V2::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::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::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::V2::NotificationConfig. + p item + end +end +# [END securitycenter_v2_generated_SecurityCenter_ListNotificationConfigs_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_resource_value_configs.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_resource_value_configs.rb new file mode 100644 index 000000000000..ebd23f97037d --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_ListResourceValueConfigs_sync] +require "google/cloud/security_center/v2" + +## +# 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::V2::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::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::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::V2::ResourceValueConfig. + p item + end +end +# [END securitycenter_v2_generated_SecurityCenter_ListResourceValueConfigs_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_sources.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_sources.rb new file mode 100644 index 000000000000..0d014e61ce97 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_ListSources_sync] +require "google/cloud/security_center/v2" + +## +# 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::V2::SecurityCenter::Client#list_sources. +# +def list_sources + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::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::V2::Source. + p item + end +end +# [END securitycenter_v2_generated_SecurityCenter_ListSources_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_valued_resources.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_valued_resources.rb new file mode 100644 index 000000000000..ff34383c5836 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_ListValuedResources_sync] +require "google/cloud/security_center/v2" + +## +# 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::V2::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::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::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::V2::ValuedResource. + p item + end +end +# [END securitycenter_v2_generated_SecurityCenter_ListValuedResources_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/set_finding_state.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/set_finding_state.rb new file mode 100644 index 000000000000..948f27b578d9 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_SetFindingState_sync] +require "google/cloud/security_center/v2" + +## +# 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::V2::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::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::SetFindingStateRequest.new + + # Call the set_finding_state method. + result = client.set_finding_state request + + # The returned object is of type Google::Cloud::SecurityCenter::V2::Finding. + p result +end +# [END securitycenter_v2_generated_SecurityCenter_SetFindingState_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/set_iam_policy.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/set_iam_policy.rb new file mode 100644 index 000000000000..357443d72dfc --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_SetIamPolicy_sync] +require "google/cloud/security_center/v2" + +## +# 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::V2::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::V2::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_v2_generated_SecurityCenter_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/set_mute.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/set_mute.rb new file mode 100644 index 000000000000..7928a7e3a85b --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_SetMute_sync] +require "google/cloud/security_center/v2" + +## +# 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::V2::SecurityCenter::Client#set_mute. +# +def set_mute + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::SetMuteRequest.new + + # Call the set_mute method. + result = client.set_mute request + + # The returned object is of type Google::Cloud::SecurityCenter::V2::Finding. + p result +end +# [END securitycenter_v2_generated_SecurityCenter_SetMute_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/test_iam_permissions.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/test_iam_permissions.rb new file mode 100644 index 000000000000..7a22e129a409 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_TestIamPermissions_sync] +require "google/cloud/security_center/v2" + +## +# 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::V2::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::V2::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_v2_generated_SecurityCenter_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_big_query_export.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_big_query_export.rb new file mode 100644 index 000000000000..c3357e841268 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_UpdateBigQueryExport_sync] +require "google/cloud/security_center/v2" + +## +# 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::V2::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::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::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::V2::BigQueryExport. + p result +end +# [END securitycenter_v2_generated_SecurityCenter_UpdateBigQueryExport_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_external_system.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_external_system.rb new file mode 100644 index 000000000000..58bb7f1196d7 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_UpdateExternalSystem_sync] +require "google/cloud/security_center/v2" + +## +# 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::V2::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::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::UpdateExternalSystemRequest.new + + # Call the update_external_system method. + result = client.update_external_system request + + # The returned object is of type Google::Cloud::SecurityCenter::V2::ExternalSystem. + p result +end +# [END securitycenter_v2_generated_SecurityCenter_UpdateExternalSystem_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_finding.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_finding.rb new file mode 100644 index 000000000000..3d8d7bc0e599 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_UpdateFinding_sync] +require "google/cloud/security_center/v2" + +## +# 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::V2::SecurityCenter::Client#update_finding. +# +def update_finding + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::UpdateFindingRequest.new + + # Call the update_finding method. + result = client.update_finding request + + # The returned object is of type Google::Cloud::SecurityCenter::V2::Finding. + p result +end +# [END securitycenter_v2_generated_SecurityCenter_UpdateFinding_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_mute_config.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_mute_config.rb new file mode 100644 index 000000000000..efa2c28e01be --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_UpdateMuteConfig_sync] +require "google/cloud/security_center/v2" + +## +# 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::V2::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::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::UpdateMuteConfigRequest.new + + # Call the update_mute_config method. + result = client.update_mute_config request + + # The returned object is of type Google::Cloud::SecurityCenter::V2::MuteConfig. + p result +end +# [END securitycenter_v2_generated_SecurityCenter_UpdateMuteConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_notification_config.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_notification_config.rb new file mode 100644 index 000000000000..50e827404937 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_UpdateNotificationConfig_sync] +require "google/cloud/security_center/v2" + +## +# 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::V2::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::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::UpdateNotificationConfigRequest.new + + # Call the update_notification_config method. + result = client.update_notification_config request + + # The returned object is of type Google::Cloud::SecurityCenter::V2::NotificationConfig. + p result +end +# [END securitycenter_v2_generated_SecurityCenter_UpdateNotificationConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_resource_value_config.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_resource_value_config.rb new file mode 100644 index 000000000000..fb28fc12506d --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_UpdateResourceValueConfig_sync] +require "google/cloud/security_center/v2" + +## +# 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::V2::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::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::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::V2::ResourceValueConfig. + p result +end +# [END securitycenter_v2_generated_SecurityCenter_UpdateResourceValueConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_security_marks.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_security_marks.rb new file mode 100644 index 000000000000..828f608dee92 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_UpdateSecurityMarks_sync] +require "google/cloud/security_center/v2" + +## +# 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::V2::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::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::UpdateSecurityMarksRequest.new + + # Call the update_security_marks method. + result = client.update_security_marks request + + # The returned object is of type Google::Cloud::SecurityCenter::V2::SecurityMarks. + p result +end +# [END securitycenter_v2_generated_SecurityCenter_UpdateSecurityMarks_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_source.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_source.rb new file mode 100644 index 000000000000..7dad0281409d --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_UpdateSource_sync] +require "google/cloud/security_center/v2" + +## +# 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::V2::SecurityCenter::Client#update_source. +# +def update_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::SecurityCenter::V2::UpdateSourceRequest.new + + # Call the update_source method. + result = client.update_source request + + # The returned object is of type Google::Cloud::SecurityCenter::V2::Source. + p result +end +# [END securitycenter_v2_generated_SecurityCenter_UpdateSource_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/snippet_metadata_google.cloud.securitycenter.v2.json b/owl-bot-staging/google-cloud-security_center-v2/snippets/snippet_metadata_google.cloud.securitycenter.v2.json new file mode 100644 index 000000000000..8b78714ab7d9 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/snippets/snippet_metadata_google.cloud.securitycenter.v2.json @@ -0,0 +1,1615 @@ +{ + "client_library": { + "name": "google-cloud-security_center-v2", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.securitycenter.v2", + "version": "v2" + } + ] + }, + "snippets": [ + { + "region_tag": "securitycenter_v2_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::V2::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::V2::SecurityCenter::Client#batch_create_resource_value_configs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "BatchCreateResourceValueConfigs", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.BatchCreateResourceValueConfigs", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_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::V2::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::V2::SecurityCenter::Client#bulk_mute_findings", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::BulkMuteFindingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "BulkMuteFindings", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.BulkMuteFindings", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_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::V2::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::V2::SecurityCenter::Client#create_big_query_export", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::CreateBigQueryExportRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V2::BigQueryExport", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "CreateBigQueryExport", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.CreateBigQueryExport", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_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::V2::SecurityCenter::Client#create_finding.", + "file": "security_center/create_finding.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_finding", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#create_finding", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::CreateFindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V2::Finding", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "CreateFinding", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.CreateFinding", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_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::V2::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::V2::SecurityCenter::Client#create_mute_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::CreateMuteConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V2::MuteConfig", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "CreateMuteConfig", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.CreateMuteConfig", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_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::V2::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::V2::SecurityCenter::Client#create_notification_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::CreateNotificationConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V2::NotificationConfig", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "CreateNotificationConfig", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.CreateNotificationConfig", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_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::V2::SecurityCenter::Client#create_source.", + "file": "security_center/create_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_source", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#create_source", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::CreateSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V2::Source", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "CreateSource", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.CreateSource", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_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::V2::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::V2::SecurityCenter::Client#delete_big_query_export", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::DeleteBigQueryExportRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "DeleteBigQueryExport", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.DeleteBigQueryExport", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_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::V2::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::V2::SecurityCenter::Client#delete_mute_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::DeleteMuteConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "DeleteMuteConfig", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.DeleteMuteConfig", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_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::V2::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::V2::SecurityCenter::Client#delete_notification_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::DeleteNotificationConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "DeleteNotificationConfig", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.DeleteNotificationConfig", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_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::V2::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::V2::SecurityCenter::Client#delete_resource_value_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::DeleteResourceValueConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "DeleteResourceValueConfig", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.DeleteResourceValueConfig", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_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::V2::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::V2::SecurityCenter::Client#get_big_query_export", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::GetBigQueryExportRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V2::BigQueryExport", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "GetBigQueryExport", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.GetBigQueryExport", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_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::V2::SecurityCenter::Client#get_simulation.", + "file": "security_center/get_simulation.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_simulation", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#get_simulation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::GetSimulationRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V2::Simulation", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "GetSimulation", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.GetSimulation", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_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::V2::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::V2::SecurityCenter::Client#get_valued_resource", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::GetValuedResourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V2::ValuedResource", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "GetValuedResource", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.GetValuedResource", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_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::V2::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::V2::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::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "GetIamPolicy", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.GetIamPolicy", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_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::V2::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::V2::SecurityCenter::Client#get_mute_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::GetMuteConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V2::MuteConfig", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "GetMuteConfig", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.GetMuteConfig", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_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::V2::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::V2::SecurityCenter::Client#get_notification_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::GetNotificationConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V2::NotificationConfig", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "GetNotificationConfig", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.GetNotificationConfig", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_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::V2::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::V2::SecurityCenter::Client#get_resource_value_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::GetResourceValueConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V2::ResourceValueConfig", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "GetResourceValueConfig", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.GetResourceValueConfig", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_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::V2::SecurityCenter::Client#get_source.", + "file": "security_center/get_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_source", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#get_source", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::GetSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V2::Source", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "GetSource", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.GetSource", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_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::V2::SecurityCenter::Client#group_findings.", + "file": "security_center/group_findings.rb", + "language": "RUBY", + "client_method": { + "short_name": "group_findings", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#group_findings", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::GroupFindingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V2::GroupFindingsResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "GroupFindings", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.GroupFindings", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_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::V2::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::V2::SecurityCenter::Client#list_attack_paths", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::ListAttackPathsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V2::ListAttackPathsResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "ListAttackPaths", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.ListAttackPaths", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_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::V2::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::V2::SecurityCenter::Client#list_big_query_exports", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::ListBigQueryExportsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V2::ListBigQueryExportsResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "ListBigQueryExports", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.ListBigQueryExports", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_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::V2::SecurityCenter::Client#list_findings.", + "file": "security_center/list_findings.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_findings", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#list_findings", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::ListFindingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V2::ListFindingsResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "ListFindings", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.ListFindings", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_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::V2::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::V2::SecurityCenter::Client#list_mute_configs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::ListMuteConfigsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V2::ListMuteConfigsResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "ListMuteConfigs", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.ListMuteConfigs", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_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::V2::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::V2::SecurityCenter::Client#list_notification_configs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::ListNotificationConfigsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V2::ListNotificationConfigsResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "ListNotificationConfigs", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.ListNotificationConfigs", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_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::V2::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::V2::SecurityCenter::Client#list_resource_value_configs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "ListResourceValueConfigs", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.ListResourceValueConfigs", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_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::V2::SecurityCenter::Client#list_sources.", + "file": "security_center/list_sources.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_sources", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#list_sources", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::ListSourcesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V2::ListSourcesResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "ListSources", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.ListSources", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_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::V2::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::V2::SecurityCenter::Client#list_valued_resources", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::ListValuedResourcesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V2::ListValuedResourcesResponse", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "ListValuedResources", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.ListValuedResources", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_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::V2::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::V2::SecurityCenter::Client#set_finding_state", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::SetFindingStateRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V2::Finding", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "SetFindingState", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.SetFindingState", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_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::V2::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::V2::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::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "SetIamPolicy", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.SetIamPolicy", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_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::V2::SecurityCenter::Client#set_mute.", + "file": "security_center/set_mute.rb", + "language": "RUBY", + "client_method": { + "short_name": "set_mute", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#set_mute", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::SetMuteRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V2::Finding", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "SetMute", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.SetMute", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_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::V2::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::V2::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::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "TestIamPermissions", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.TestIamPermissions", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_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::V2::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::V2::SecurityCenter::Client#update_big_query_export", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::UpdateBigQueryExportRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V2::BigQueryExport", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "UpdateBigQueryExport", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.UpdateBigQueryExport", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_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::V2::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::V2::SecurityCenter::Client#update_external_system", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::UpdateExternalSystemRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V2::ExternalSystem", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "UpdateExternalSystem", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.UpdateExternalSystem", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_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::V2::SecurityCenter::Client#update_finding.", + "file": "security_center/update_finding.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_finding", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#update_finding", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::UpdateFindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V2::Finding", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "UpdateFinding", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.UpdateFinding", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_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::V2::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::V2::SecurityCenter::Client#update_mute_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::UpdateMuteConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V2::MuteConfig", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "UpdateMuteConfig", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.UpdateMuteConfig", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_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::V2::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::V2::SecurityCenter::Client#update_notification_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::UpdateNotificationConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V2::NotificationConfig", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "UpdateNotificationConfig", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.UpdateNotificationConfig", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_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::V2::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::V2::SecurityCenter::Client#update_resource_value_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::UpdateResourceValueConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V2::ResourceValueConfig", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "UpdateResourceValueConfig", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.UpdateResourceValueConfig", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_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::V2::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::V2::SecurityCenter::Client#update_security_marks", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::UpdateSecurityMarksRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V2::SecurityMarks", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "UpdateSecurityMarks", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.UpdateSecurityMarks", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "securitycenter_v2_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::V2::SecurityCenter::Client#update_source.", + "file": "security_center/update_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_source", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#update_source", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::SecurityCenter::V2::UpdateSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::SecurityCenter::V2::Source", + "client": { + "short_name": "SecurityCenter::Client", + "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" + }, + "method": { + "short_name": "UpdateSource", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter.UpdateSource", + "service": { + "short_name": "SecurityCenter", + "full_name": "google.cloud.securitycenter.v2.SecurityCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_operations_test.rb b/owl-bot-staging/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_operations_test.rb new file mode 100644 index 000000000000..f30feef48b99 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/test/google/cloud/security_center/v2/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/v2/securitycenter_service_pb" +require "google/cloud/securitycenter/v2/securitycenter_service_services_pb" +require "google/cloud/security_center/v2/security_center" + +class ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::SecurityCenter::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_paths_test.rb b/owl-bot-staging/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_paths_test.rb new file mode 100644 index 000000000000..88ac82de925a --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_paths_test.rb @@ -0,0 +1,403 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/v2/security_center" + +class ::Google::Cloud::SecurityCenter::V2::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::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.big_query_export_path organization: "value0", location: "value1", export: "value2" + assert_equal "organizations/value0/locations/value1/bigQueryExports/value2", path + + path = client.big_query_export_path folder: "value0", location: "value1", export: "value2" + assert_equal "folders/value0/locations/value1/bigQueryExports/value2", path + + path = client.big_query_export_path project: "value0", location: "value1", export: "value2" + assert_equal "projects/value0/locations/value1/bigQueryExports/value2", 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::V2::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_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::V2::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 organization: "value0", source: "value1", location: "value2", finding: "value3", externalsystem: "value4" + assert_equal "organizations/value0/sources/value1/locations/value2/findings/value3/externalSystems/value4", 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 folder: "value0", source: "value1", location: "value2", finding: "value3", externalsystem: "value4" + assert_equal "folders/value0/sources/value1/locations/value2/findings/value3/externalSystems/value4", 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 + + path = client.external_system_path project: "value0", source: "value1", location: "value2", finding: "value3", externalsystem: "value4" + assert_equal "projects/value0/sources/value1/locations/value2/findings/value3/externalSystems/value4", 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::V2::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 organization: "value0", source: "value1", location: "value2", finding: "value3" + assert_equal "organizations/value0/sources/value1/locations/value2/findings/value3", path + + path = client.finding_path folder: "value0", source: "value1", finding: "value2" + assert_equal "folders/value0/sources/value1/findings/value2", path + + path = client.finding_path folder: "value0", source: "value1", location: "value2", finding: "value3" + assert_equal "folders/value0/sources/value1/locations/value2/findings/value3", path + + path = client.finding_path project: "value0", source: "value1", finding: "value2" + assert_equal "projects/value0/sources/value1/findings/value2", path + + path = client.finding_path project: "value0", source: "value1", location: "value2", finding: "value3" + assert_equal "projects/value0/sources/value1/locations/value2/findings/value3", 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::V2::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::V2::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::V2::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::V2::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 organization: "value0", location: "value1", mute_config: "value2" + assert_equal "organizations/value0/locations/value1/muteConfigs/value2", path + + path = client.mute_config_path folder: "value0", mute_config: "value1" + assert_equal "folders/value0/muteConfigs/value1", 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", mute_config: "value1" + assert_equal "projects/value0/muteConfigs/value1", 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::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.notification_config_path organization: "value0", location: "value1", notification_config: "value2" + assert_equal "organizations/value0/locations/value1/notificationConfigs/value2", path + + path = client.notification_config_path folder: "value0", location: "value1", notification_config: "value2" + assert_equal "folders/value0/locations/value1/notificationConfigs/value2", path + + path = client.notification_config_path project: "value0", location: "value1", notification_config: "value2" + assert_equal "projects/value0/locations/value1/notificationConfigs/value2", 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::V2::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::V2::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_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::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.organization_valued_resource_path organization: "value0", location: "value1", simulation: "value2", valued_resource: "value3" + assert_equal "organizations/value0/locations/value1/simulations/value2/valuedResources/value3", 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::V2::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::V2::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::V2::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 + + path = client.resource_value_config_path organization: "value0", location: "value1", resource_value_config: "value2" + assert_equal "organizations/value0/locations/value1/resourceValueConfigs/value2", 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::V2::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 organization: "value0", source: "value1", location: "value2", finding: "value3" + assert_equal "organizations/value0/sources/value1/locations/value2/findings/value3/securityMarks", path + + path = client.security_marks_path folder: "value0", asset: "value1" + assert_equal "folders/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 folder: "value0", source: "value1", location: "value2", finding: "value3" + assert_equal "folders/value0/sources/value1/locations/value2/findings/value3/securityMarks", path + + path = client.security_marks_path project: "value0", asset: "value1" + assert_equal "projects/value0/assets/value1/securityMarks", path + + path = client.security_marks_path project: "value0", source: "value1", finding: "value2" + assert_equal "projects/value0/sources/value1/findings/value2/securityMarks", path + + path = client.security_marks_path project: "value0", source: "value1", location: "value2", finding: "value3" + assert_equal "projects/value0/sources/value1/locations/value2/findings/value3/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::V2::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 + + path = client.simulation_path organization: "value0", location: "value1", simluation: "value2" + assert_equal "organizations/value0/locations/value1/simulations/value2", 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::V2::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::V2::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::V2::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::V2::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 + + path = client.valued_resource_path organization: "value0", location: "value1", simluation: "value2", valued_resource: "value3" + assert_equal "organizations/value0/locations/value1/simulations/value2/valuedResources/value3", path + end + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_rest_test.rb b/owl-bot-staging/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_rest_test.rb new file mode 100644 index 000000000000..f48ffed9375a --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_rest_test.rb @@ -0,0 +1,2311 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/v2/securitycenter_service_pb" +require "google/cloud/security_center/v2/security_center/rest" + + +class ::Google::Cloud::SecurityCenter::V2::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_batch_create_resource_value_configs + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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_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_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::V2::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::V2::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.bulk_mute_findings({ parent: parent, filter: filter, 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_state: mute_state do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.bulk_mute_findings ::Google::Cloud::SecurityCenter::V2::BulkMuteFindingsRequest.new(parent: parent, filter: filter, 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_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::V2::BulkMuteFindingsRequest.new(parent: parent, filter: filter, 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_big_query_export + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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_create_finding + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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_create_source + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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_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::V2::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::V2::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::V2::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::V2::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_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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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_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::V2::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::V2::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::V2::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::V2::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_big_query_export + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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_simulation + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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_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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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_resource_value_config + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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_get_source + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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_findings + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V2::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" + 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::V2::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::V2::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, 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, 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::V2::GroupFindingsRequest.new(parent: parent, filter: filter, group_by: group_by, 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, 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::V2::GroupFindingsRequest.new(parent: parent, filter: filter, group_by: group_by, 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_attack_paths + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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_list_big_query_exports + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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_list_findings + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V2::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" + 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::V2::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::V2::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, 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, 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::V2::ListFindingsRequest.new(parent: parent, filter: filter, order_by: order_by, 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, 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::V2::ListFindingsRequest.new(parent: parent, filter: filter, order_by: order_by, 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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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_resource_value_configs + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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_list_sources + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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_list_valued_resources + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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_set_finding_state + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V2::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 + + 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::V2::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::V2::SecurityCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.set_finding_state({ name: name, state: state }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.set_finding_state name: name, state: state do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.set_finding_state ::Google::Cloud::SecurityCenter::V2::SetFindingStateRequest.new(name: name, state: state) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.set_finding_state({ name: name, state: state }, 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::V2::SetFindingStateRequest.new(name: name, state: state), 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_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::V2::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::V2::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_set_mute + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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_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::V2::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::V2::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_update_big_query_export + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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_update_external_system + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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_resource_value_config + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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_update_security_marks + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V2::SecurityMarks.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + security_marks = {} + update_mask = {} + + 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::V2::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::V2::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 }) 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 do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_security_marks ::Google::Cloud::SecurityCenter::V2::UpdateSecurityMarksRequest.new(security_marks: security_marks, update_mask: update_mask) 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 }, 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::V2::UpdateSecurityMarksRequest.new(security_marks: security_marks, 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_marks_client_stub.call_count + end + end + end + + def test_update_source + # Create test objects. + client_result = ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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_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::V2::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::V2::SecurityCenter::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_test.rb b/owl-bot-staging/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_test.rb new file mode 100644 index 000000000000..b3295b2bd5b5 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_test.rb @@ -0,0 +1,2592 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/v2/securitycenter_service_pb" +require "google/cloud/security_center/v2/security_center" + +class ::Google::Cloud::SecurityCenter::V2::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_batch_create_resource_value_configs + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V2::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::V2::BatchCreateResourceValueConfigsRequest, request + assert_equal "hello world", request["parent"] + assert_kind_of ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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_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_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::V2::BulkMuteFindingsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["filter"] + 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::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.bulk_mute_findings({ parent: parent, filter: filter, 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_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::V2::BulkMuteFindingsRequest.new(parent: parent, filter: filter, 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_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::V2::BulkMuteFindingsRequest.new(parent: parent, filter: filter, 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_big_query_export + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V2::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::V2::CreateBigQueryExportRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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_create_finding + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V2::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::V2::CreateFindingRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["finding_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V2::Finding), request["finding"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_finding_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::CreateMuteConfigRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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::V2::CreateNotificationConfigRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["config_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V2::NotificationConfig), request["notification_config"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_notification_config_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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_create_source + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V2::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::V2::CreateSourceRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V2::Source), request["source"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_source_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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_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::V2::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::V2::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::V2::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::V2::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_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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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_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::V2::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::V2::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::V2::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::V2::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_big_query_export + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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_simulation + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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_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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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_resource_value_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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_get_source + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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_findings + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V2::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" + 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::V2::GroupFindingsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["group_by"] + 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::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.group_findings({ parent: parent, filter: filter, group_by: group_by, 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, 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::V2::GroupFindingsRequest.new(parent: parent, filter: filter, group_by: group_by, 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, 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::V2::GroupFindingsRequest.new(parent: parent, filter: filter, group_by: group_by, 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_attack_paths + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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_list_big_query_exports + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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_list_findings + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V2::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" + 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::V2::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::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::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_findings({ parent: parent, filter: filter, order_by: order_by, 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, 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::V2::ListFindingsRequest.new(parent: parent, filter: filter, order_by: order_by, 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, 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::V2::ListFindingsRequest.new(parent: parent, filter: filter, order_by: order_by, 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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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_resource_value_configs + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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_list_sources + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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_list_valued_resources + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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_set_finding_state + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V2::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 + + 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::V2::SetFindingStateRequest, request + assert_equal "hello world", request["name"] + assert_equal :STATE_UNSPECIFIED, request["state"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, set_finding_state_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.set_finding_state({ name: name, state: state }) 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 do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.set_finding_state ::Google::Cloud::SecurityCenter::V2::SetFindingStateRequest.new(name: name, state: state) 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 }, 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::V2::SetFindingStateRequest.new(name: name, state: state), 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_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::V2::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_set_mute + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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_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::V2::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_update_big_query_export + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V2::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::V2::UpdateBigQueryExportRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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_update_external_system + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V2::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::V2::UpdateExternalSystemRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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::V2::UpdateFindingRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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::V2::UpdateMuteConfigRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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::V2::UpdateNotificationConfigRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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_resource_value_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V2::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::V2::UpdateResourceValueConfigRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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_update_security_marks + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V2::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 = {} + + 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::V2::UpdateSecurityMarksRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V2::SecurityMarks), request["security_marks"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_security_marks_client_stub do + # Create client + c = ::Google::Cloud::SecurityCenter::V2::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 }) 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 do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_security_marks ::Google::Cloud::SecurityCenter::V2::UpdateSecurityMarksRequest.new(security_marks: security_marks, 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_marks({ security_marks: security_marks, 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_marks(::Google::Cloud::SecurityCenter::V2::UpdateSecurityMarksRequest.new(security_marks: security_marks, 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_marks_client_stub.call_rpc_count + end + end + + def test_update_source + # Create GRPC objects. + grpc_response = ::Google::Cloud::SecurityCenter::V2::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::V2::UpdateSourceRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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_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::V2::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::V2::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::V2::SecurityCenter::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::SecurityCenter::V2::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::V2::SecurityCenter::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-security_center-v2/test/helper.rb b/owl-bot-staging/google-cloud-security_center-v2/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-security_center-v2/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 660a39c2842d1aecbc861d211b9e9a4816d7bd53 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Mon, 13 Jul 2026 23:02:55 +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/v2/agent_anomaly_pb.rb | 0 .../cloud/securitycenter/v2/agent_pb.rb | 0 .../securitycenter/v2/agent_session_pb.rb | 0 .../cloud/securitycenter/v2/finding_pb.rb | 5 +- .../google/cloud/securitycenter/v2/agent.rb | 0 .../cloud/securitycenter/v2/agent_anomaly.rb | 0 .../cloud/securitycenter/v2/agent_session.rb | 0 .../google/cloud/securitycenter/v2/finding.rb | 9 + .../.gitignore | 22 - .../.repo-metadata.json | 18 - .../.rubocop.yml | 33 - .../google-cloud-security_center-v2/.toys.rb | 28 - .../google-cloud-security_center-v2/.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../google-cloud-security_center-v2/Gemfile | 14 - .../LICENSE.md | 201 - .../google-cloud-security_center-v2/README.md | 154 - .../google-cloud-security_center-v2/Rakefile | 169 - .../gapic_metadata.json | 218 - .../google-cloud-security_center-v2.gemspec | 29 - .../lib/google-cloud-security_center-v2.rb | 21 - .../lib/google/cloud/security_center/v2.rb | 45 - .../google/cloud/security_center/v2/rest.rb | 37 - .../security_center/v2/security_center.rb | 56 - .../v2/security_center/client.rb | 4793 ----------------- .../v2/security_center/credentials.rb | 51 - .../v2/security_center/operations.rb | 843 --- .../v2/security_center/paths.rb | 1068 ---- .../v2/security_center/rest.rb | 53 - .../v2/security_center/rest/client.rb | 4395 --------------- .../v2/security_center/rest/operations.rb | 926 ---- .../v2/security_center/rest/service_stub.rb | 3336 ------------ .../cloud/security_center/v2/version.rb | 28 - .../cloud/securitycenter/v2/access_pb.rb | 23 - .../v2/affected_resources_pb.rb | 21 - .../cloud/securitycenter/v2/ai_model_pb.rb | 22 - .../cloud/securitycenter/v2/application_pb.rb | 21 - .../securitycenter/v2/attack_exposure_pb.rb | 25 - .../cloud/securitycenter/v2/attack_path_pb.rb | 28 - .../v2/backup_disaster_recovery_pb.rb | 23 - .../securitycenter/v2/bigquery_export_pb.rb | 25 - .../cloud/securitycenter/v2/chokepoint_pb.rb | 21 - .../cloud/securitycenter/v2/cloud_armor_pb.rb | 27 - .../v2/cloud_dlp_data_profile_pb.rb | 24 - .../v2/cloud_dlp_inspection_pb.rb | 23 - .../cloud/securitycenter/v2/compliance_pb.rb | 21 - .../cloud/securitycenter/v2/connection_pb.rb | 22 - .../securitycenter/v2/contact_details_pb.rb | 22 - .../cloud/securitycenter/v2/container_pb.rb | 24 - .../securitycenter/v2/data_access_event_pb.rb | 24 - .../securitycenter/v2/data_flow_event_pb.rb | 24 - .../v2/data_retention_deletion_event_pb.rb | 25 - .../cloud/securitycenter/v2/database_pb.rb | 21 - .../google/cloud/securitycenter/v2/disk_pb.rb | 21 - .../securitycenter/v2/exfiltration_pb.rb | 22 - .../securitycenter/v2/external_system_pb.rb | 25 - .../google/cloud/securitycenter/v2/file_pb.rb | 24 - .../cloud/securitycenter/v2/finding_pb.rb | 77 - .../cloud/securitycenter/v2/folder_pb.rb | 21 - .../securitycenter/v2/group_membership_pb.rb | 22 - .../cloud/securitycenter/v2/iam_binding_pb.rb | 22 - .../cloud/securitycenter/v2/indicator_pb.rb | 26 - .../cloud/securitycenter/v2/ip_rules_pb.rb | 28 - .../google/cloud/securitycenter/v2/job_pb.rb | 24 - .../securitycenter/v2/kernel_rootkit_pb.rb | 21 - .../cloud/securitycenter/v2/kubernetes_pb.rb | 34 - .../cloud/securitycenter/v2/label_pb.rb | 21 - .../securitycenter/v2/load_balancer_pb.rb | 21 - .../cloud/securitycenter/v2/log_entry_pb.rb | 24 - .../securitycenter/v2/mitre_attack_pb.rb | 23 - .../cloud/securitycenter/v2/mute_config_pb.rb | 26 - .../cloud/securitycenter/v2/network_pb.rb | 21 - .../cloud/securitycenter/v2/notebook_pb.rb | 23 - .../v2/notification_config_pb.rb | 26 - .../v2/notification_message_pb.rb | 24 - .../cloud/securitycenter/v2/org_policy_pb.rb | 24 - .../cloud/securitycenter/v2/process_pb.rb | 24 - .../cloud/securitycenter/v2/resource_pb.rb | 39 - .../v2/resource_value_config_pb.rb | 28 - .../securitycenter/v2/security_marks_pb.rb | 23 - .../securitycenter/v2/security_posture_pb.rb | 22 - .../v2/securitycenter_service_pb.rb | 101 - .../v2/securitycenter_service_services_pb.rb | 167 - .../cloud/securitycenter/v2/simulation_pb.rb | 27 - .../cloud/securitycenter/v2/source_pb.rb | 23 - .../securitycenter/v2/toxic_combination_pb.rb | 21 - .../securitycenter/v2/valued_resource_pb.rb | 25 - .../cloud/securitycenter/v2/vertex_ai_pb.rb | 23 - .../securitycenter/v2/vulnerability_pb.rb | 37 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 -- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../proto_docs/google/api/routing.rb | 463 -- .../google/cloud/securitycenter/v2/access.rb | 120 - .../securitycenter/v2/affected_resources.rb | 35 - .../cloud/securitycenter/v2/ai_model.rb | 71 - .../cloud/securitycenter/v2/application.rb | 40 - .../securitycenter/v2/attack_exposure.rb | 73 - .../cloud/securitycenter/v2/attack_path.rb | 147 - .../v2/backup_disaster_recovery.rb | 90 - .../securitycenter/v2/bigquery_export.rb | 96 - .../cloud/securitycenter/v2/chokepoint.rb | 39 - .../cloud/securitycenter/v2/cloud_armor.rb | 138 - .../v2/cloud_dlp_data_profile.rb | 52 - .../securitycenter/v2/cloud_dlp_inspection.rb | 50 - .../cloud/securitycenter/v2/compliance.rb | 43 - .../cloud/securitycenter/v2/connection.rb | 70 - .../securitycenter/v2/contact_details.rb | 44 - .../cloud/securitycenter/v2/container.rb | 49 - .../securitycenter/v2/data_access_event.rb | 61 - .../securitycenter/v2/data_flow_event.rb | 65 - .../v2/data_retention_deletion_event.rb | 69 - .../cloud/securitycenter/v2/database.rb | 67 - .../google/cloud/securitycenter/v2/disk.rb | 36 - .../cloud/securitycenter/v2/exfiltration.rb | 64 - .../securitycenter/v2/external_system.rb | 106 - .../google/cloud/securitycenter/v2/file.rb | 105 - .../google/cloud/securitycenter/v2/finding.rb | 533 -- .../google/cloud/securitycenter/v2/folder.rb | 40 - .../securitycenter/v2/group_membership.rb | 51 - .../cloud/securitycenter/v2/iam_binding.rb | 56 - .../cloud/securitycenter/v2/indicator.rb | 116 - .../cloud/securitycenter/v2/ip_rules.rb | 122 - .../google/cloud/securitycenter/v2/job.rb | 65 - .../cloud/securitycenter/v2/kernel_rootkit.rb | 66 - .../cloud/securitycenter/v2/kubernetes.rb | 241 - .../google/cloud/securitycenter/v2/label.rb | 41 - .../cloud/securitycenter/v2/load_balancer.rb | 36 - .../cloud/securitycenter/v2/log_entry.rb | 58 - .../cloud/securitycenter/v2/mitre_attack.rb | 521 -- .../cloud/securitycenter/v2/mute_config.rb | 113 - .../google/cloud/securitycenter/v2/network.rb | 36 - .../cloud/securitycenter/v2/notebook.rb | 46 - .../securitycenter/v2/notification_config.rb | 94 - .../securitycenter/v2/notification_message.rb | 42 - .../cloud/securitycenter/v2/org_policy.rb | 37 - .../google/cloud/securitycenter/v2/process.rb | 83 - .../cloud/securitycenter/v2/resource.rb | 314 -- .../v2/resource_value_config.rb | 127 - .../cloud/securitycenter/v2/security_marks.rb | 84 - .../securitycenter/v2/security_posture.rb | 83 - .../v2/securitycenter_service.rb | 1216 ----- .../cloud/securitycenter/v2/simulation.rb | 46 - .../google/cloud/securitycenter/v2/source.rb | 65 - .../securitycenter/v2/toxic_combination.rb | 46 - .../securitycenter/v2/valued_resource.rb | 86 - .../cloud/securitycenter/v2/vertex_ai.rb | 68 - .../cloud/securitycenter/v2/vulnerability.rb | 365 -- .../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 - .../security_center/create_finding.rb | 47 - .../security_center/create_mute_config.rb | 47 - .../create_notification_config.rb | 47 - .../snippets/security_center/create_source.rb | 47 - .../delete_big_query_export.rb | 47 - .../security_center/delete_mute_config.rb | 47 - .../delete_notification_config.rb | 47 - .../delete_resource_value_config.rb | 47 - .../security_center/get_big_query_export.rb | 47 - .../security_center/get_iam_policy.rb | 47 - .../security_center/get_mute_config.rb | 47 - .../get_notification_config.rb | 47 - .../get_resource_value_config.rb | 47 - .../security_center/get_simulation.rb | 47 - .../snippets/security_center/get_source.rb | 47 - .../security_center/get_valued_resource.rb | 47 - .../security_center/group_findings.rb | 51 - .../security_center/list_attack_paths.rb | 51 - .../security_center/list_big_query_exports.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 - .../snippets/security_center/list_sources.rb | 51 - .../security_center/list_valued_resources.rb | 51 - .../security_center/set_finding_state.rb | 47 - .../security_center/set_iam_policy.rb | 47 - .../snippets/security_center/set_mute.rb | 47 - .../security_center/test_iam_permissions.rb | 47 - .../update_big_query_export.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_resource_value_config.rb | 47 - .../security_center/update_security_marks.rb | 47 - .../snippets/security_center/update_source.rb | 47 - ...tadata_google.cloud.securitycenter.v2.json | 1615 ------ .../v2/security_center_operations_test.rb | 400 -- .../v2/security_center_paths_test.rb | 403 -- .../v2/security_center_rest_test.rb | 2311 -------- .../v2/security_center_test.rb | 2592 --------- .../test/helper.rb | 26 - 211 files changed, 19 insertions(+), 37291 deletions(-) rename {owl-bot-staging/google-cloud-security_center-v2 => google-cloud-security_center-v2}/lib/google/cloud/securitycenter/v2/agent_anomaly_pb.rb (100%) rename {owl-bot-staging/google-cloud-security_center-v2 => google-cloud-security_center-v2}/lib/google/cloud/securitycenter/v2/agent_pb.rb (100%) rename {owl-bot-staging/google-cloud-security_center-v2 => google-cloud-security_center-v2}/lib/google/cloud/securitycenter/v2/agent_session_pb.rb (100%) rename {owl-bot-staging/google-cloud-security_center-v2 => google-cloud-security_center-v2}/proto_docs/google/cloud/securitycenter/v2/agent.rb (100%) rename {owl-bot-staging/google-cloud-security_center-v2 => google-cloud-security_center-v2}/proto_docs/google/cloud/securitycenter/v2/agent_anomaly.rb (100%) rename {owl-bot-staging/google-cloud-security_center-v2 => google-cloud-security_center-v2}/proto_docs/google/cloud/securitycenter/v2/agent_session.rb (100%) delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/.gitignore delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/.yardopts delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/Gemfile delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/README.md delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/Rakefile delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/google-cloud-security_center-v2.gemspec delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google-cloud-security_center-v2.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/rest.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/client.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/operations.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/paths.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/version.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/access_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/affected_resources_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/ai_model_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/application_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/attack_exposure_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/attack_path_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/backup_disaster_recovery_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/bigquery_export_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/chokepoint_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/cloud_armor_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/cloud_dlp_data_profile_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/cloud_dlp_inspection_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/compliance_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/connection_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/contact_details_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/container_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/data_access_event_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/data_flow_event_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/data_retention_deletion_event_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/database_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/disk_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/exfiltration_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/external_system_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/file_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/finding_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/folder_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/group_membership_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/iam_binding_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/indicator_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/ip_rules_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/job_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/kernel_rootkit_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/kubernetes_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/label_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/load_balancer_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/log_entry_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/mitre_attack_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/mute_config_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/network_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/notebook_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/notification_config_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/notification_message_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/org_policy_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/process_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/resource_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/resource_value_config_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/security_marks_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/security_posture_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/securitycenter_service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/securitycenter_service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/simulation_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/source_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/toxic_combination_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/valued_resource_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/vertex_ai_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/vulnerability_pb.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/api/routing.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/access.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/affected_resources.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/ai_model.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/application.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/attack_exposure.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/attack_path.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/backup_disaster_recovery.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/bigquery_export.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/chokepoint.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/cloud_armor.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/cloud_dlp_data_profile.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/cloud_dlp_inspection.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/compliance.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/connection.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/contact_details.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/container.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/data_access_event.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/data_flow_event.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/data_retention_deletion_event.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/database.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/disk.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/exfiltration.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/external_system.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/file.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/finding.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/folder.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/group_membership.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/iam_binding.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/indicator.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/ip_rules.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/job.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/kernel_rootkit.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/kubernetes.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/label.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/load_balancer.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/log_entry.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/mitre_attack.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/mute_config.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/network.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/notebook.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/notification_config.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/notification_message.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/org_policy.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/process.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/resource.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/resource_value_config.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/security_marks.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/security_posture.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/securitycenter_service.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/simulation.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/source.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/toxic_combination.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/valued_resource.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/vertex_ai.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/vulnerability.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/iam/v1/iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/iam/v1/options.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/iam/v1/policy.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/struct.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/batch_create_resource_value_configs.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/bulk_mute_findings.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_big_query_export.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_finding.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_mute_config.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_notification_config.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_source.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/delete_big_query_export.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/delete_mute_config.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/delete_notification_config.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/delete_resource_value_config.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_big_query_export.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_mute_config.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_notification_config.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_resource_value_config.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_simulation.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_source.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_valued_resource.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/group_findings.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_attack_paths.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_big_query_exports.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_findings.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_mute_configs.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_notification_configs.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_resource_value_configs.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_sources.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_valued_resources.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/set_finding_state.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/set_iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/set_mute.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/test_iam_permissions.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_big_query_export.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_external_system.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_finding.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_mute_config.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_notification_config.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_resource_value_config.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_security_marks.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_source.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/snippets/snippet_metadata_google.cloud.securitycenter.v2.json delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_test.rb delete mode 100644 owl-bot-staging/google-cloud-security_center-v2/test/helper.rb diff --git a/google-cloud-security_center-v2/.owlbot-manifest.json b/google-cloud-security_center-v2/.owlbot-manifest.json index 4cd89888ced3..15840199575b 100644 --- a/google-cloud-security_center-v2/.owlbot-manifest.json +++ b/google-cloud-security_center-v2/.owlbot-manifest.json @@ -28,6 +28,9 @@ "lib/google/cloud/security_center/v2/version.rb", "lib/google/cloud/securitycenter/v2/access_pb.rb", "lib/google/cloud/securitycenter/v2/affected_resources_pb.rb", + "lib/google/cloud/securitycenter/v2/agent_anomaly_pb.rb", + "lib/google/cloud/securitycenter/v2/agent_pb.rb", + "lib/google/cloud/securitycenter/v2/agent_session_pb.rb", "lib/google/cloud/securitycenter/v2/ai_model_pb.rb", "lib/google/cloud/securitycenter/v2/application_pb.rb", "lib/google/cloud/securitycenter/v2/attack_exposure_pb.rb", @@ -90,6 +93,9 @@ "proto_docs/google/api/routing.rb", "proto_docs/google/cloud/securitycenter/v2/access.rb", "proto_docs/google/cloud/securitycenter/v2/affected_resources.rb", + "proto_docs/google/cloud/securitycenter/v2/agent.rb", + "proto_docs/google/cloud/securitycenter/v2/agent_anomaly.rb", + "proto_docs/google/cloud/securitycenter/v2/agent_session.rb", "proto_docs/google/cloud/securitycenter/v2/ai_model.rb", "proto_docs/google/cloud/securitycenter/v2/application.rb", "proto_docs/google/cloud/securitycenter/v2/attack_exposure.rb", diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/agent_anomaly_pb.rb b/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/agent_anomaly_pb.rb similarity index 100% rename from owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/agent_anomaly_pb.rb rename to google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/agent_anomaly_pb.rb diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/agent_pb.rb b/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/agent_pb.rb similarity index 100% rename from owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/agent_pb.rb rename to google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/agent_pb.rb diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/agent_session_pb.rb b/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/agent_session_pb.rb similarity index 100% rename from owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/agent_session_pb.rb rename to google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/agent_session_pb.rb diff --git a/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/finding_pb.rb b/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/finding_pb.rb index 5f7b5a2bbdb2..8dc9f5c367d6 100644 --- a/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/finding_pb.rb +++ b/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/finding_pb.rb @@ -8,6 +8,9 @@ require 'google/api/resource_pb' require 'google/cloud/securitycenter/v2/access_pb' require 'google/cloud/securitycenter/v2/affected_resources_pb' +require 'google/cloud/securitycenter/v2/agent_pb' +require 'google/cloud/securitycenter/v2/agent_anomaly_pb' +require 'google/cloud/securitycenter/v2/agent_session_pb' require 'google/cloud/securitycenter/v2/ai_model_pb' require 'google/cloud/securitycenter/v2/application_pb' require 'google/cloud/securitycenter/v2/attack_exposure_pb' @@ -51,7 +54,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n,google/cloud/securitycenter/v2/finding.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a+google/cloud/securitycenter/v2/access.proto\x1a\x37google/cloud/securitycenter/v2/affected_resources.proto\x1a-google/cloud/securitycenter/v2/ai_model.proto\x1a\x30google/cloud/securitycenter/v2/application.proto\x1a\x34google/cloud/securitycenter/v2/attack_exposure.proto\x1a=google/cloud/securitycenter/v2/backup_disaster_recovery.proto\x1a/google/cloud/securitycenter/v2/chokepoint.proto\x1a\x30google/cloud/securitycenter/v2/cloud_armor.proto\x1a;google/cloud/securitycenter/v2/cloud_dlp_data_profile.proto\x1a\x39google/cloud/securitycenter/v2/cloud_dlp_inspection.proto\x1a/google/cloud/securitycenter/v2/compliance.proto\x1a/google/cloud/securitycenter/v2/connection.proto\x1a\x34google/cloud/securitycenter/v2/contact_details.proto\x1a.google/cloud/securitycenter/v2/container.proto\x1a\x36google/cloud/securitycenter/v2/data_access_event.proto\x1a\x34google/cloud/securitycenter/v2/data_flow_event.proto\x1a\x42google/cloud/securitycenter/v2/data_retention_deletion_event.proto\x1a-google/cloud/securitycenter/v2/database.proto\x1a)google/cloud/securitycenter/v2/disk.proto\x1a\x31google/cloud/securitycenter/v2/exfiltration.proto\x1a\x34google/cloud/securitycenter/v2/external_system.proto\x1a)google/cloud/securitycenter/v2/file.proto\x1a\x35google/cloud/securitycenter/v2/group_membership.proto\x1a\x30google/cloud/securitycenter/v2/iam_binding.proto\x1a.google/cloud/securitycenter/v2/indicator.proto\x1a-google/cloud/securitycenter/v2/ip_rules.proto\x1a(google/cloud/securitycenter/v2/job.proto\x1a\x33google/cloud/securitycenter/v2/kernel_rootkit.proto\x1a/google/cloud/securitycenter/v2/kubernetes.proto\x1a\x32google/cloud/securitycenter/v2/load_balancer.proto\x1a.google/cloud/securitycenter/v2/log_entry.proto\x1a\x31google/cloud/securitycenter/v2/mitre_attack.proto\x1a,google/cloud/securitycenter/v2/network.proto\x1a-google/cloud/securitycenter/v2/notebook.proto\x1a/google/cloud/securitycenter/v2/org_policy.proto\x1a,google/cloud/securitycenter/v2/process.proto\x1a\x33google/cloud/securitycenter/v2/security_marks.proto\x1a\x35google/cloud/securitycenter/v2/security_posture.proto\x1a\x36google/cloud/securitycenter/v2/toxic_combination.proto\x1a.google/cloud/securitycenter/v2/vertex_ai.proto\x1a\x32google/cloud/securitycenter/v2/vulnerability.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9e)\n\x07\x46inding\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1b\n\x0e\x63\x61nonical_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x0e\n\x06parent\x18\x03 \x01(\t\x12\x1a\n\rresource_name\x18\x04 \x01(\tB\x03\xe0\x41\x05\x12\x41\n\x05state\x18\x06 \x01(\x0e\x32-.google.cloud.securitycenter.v2.Finding.StateB\x03\xe0\x41\x03\x12\x15\n\x08\x63\x61tegory\x18\x07 \x01(\tB\x03\xe0\x41\x05\x12\x14\n\x0c\x65xternal_uri\x18\x08 \x01(\t\x12X\n\x11source_properties\x18\t \x03(\x0b\x32=.google.cloud.securitycenter.v2.Finding.SourcePropertiesEntry\x12J\n\x0esecurity_marks\x18\n \x01(\x0b\x32-.google.cloud.securitycenter.v2.SecurityMarksB\x03\xe0\x41\x03\x12.\n\nevent_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x0b\x63reate_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x42\n\x08severity\x18\x0e \x01(\x0e\x32\x30.google.cloud.securitycenter.v2.Finding.Severity\x12:\n\x04mute\x18\x0f \x01(\x0e\x32,.google.cloud.securitycenter.v2.Finding.Mute\x12H\n\tmute_info\x18\x35 \x01(\x0b\x32\x30.google.cloud.securitycenter.v2.Finding.MuteInfoB\x03\xe0\x41\x03\x12K\n\rfinding_class\x18\x10 \x01(\x0e\x32\x34.google.cloud.securitycenter.v2.Finding.FindingClass\x12<\n\tindicator\x18\x11 \x01(\x0b\x32).google.cloud.securitycenter.v2.Indicator\x12\x44\n\rvulnerability\x18\x12 \x01(\x0b\x32-.google.cloud.securitycenter.v2.Vulnerability\x12\x39\n\x10mute_update_time\x18\x13 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12[\n\x10\x65xternal_systems\x18\x14 \x03(\x0b\x32<.google.cloud.securitycenter.v2.Finding.ExternalSystemsEntryB\x03\xe0\x41\x03\x12\x41\n\x0cmitre_attack\x18\x15 \x01(\x0b\x32+.google.cloud.securitycenter.v2.MitreAttack\x12\x36\n\x06\x61\x63\x63\x65ss\x18\x16 \x01(\x0b\x32&.google.cloud.securitycenter.v2.Access\x12?\n\x0b\x63onnections\x18\x17 \x03(\x0b\x32*.google.cloud.securitycenter.v2.Connection\x12\x16\n\x0emute_initiator\x18\x18 \x01(\t\x12:\n\tprocesses\x18\x19 \x03(\x0b\x32\'.google.cloud.securitycenter.v2.Process\x12L\n\x08\x63ontacts\x18\x1a \x03(\x0b\x32\x35.google.cloud.securitycenter.v2.Finding.ContactsEntryB\x03\xe0\x41\x03\x12?\n\x0b\x63ompliances\x18\x1b \x03(\x0b\x32*.google.cloud.securitycenter.v2.Compliance\x12 \n\x13parent_display_name\x18\x1d \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x0b\x64\x65scription\x18\x1e \x01(\t\x12\x42\n\x0c\x65xfiltration\x18\x1f \x01(\x0b\x32,.google.cloud.securitycenter.v2.Exfiltration\x12@\n\x0ciam_bindings\x18 \x03(\x0b\x32*.google.cloud.securitycenter.v2.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.v2.Container\x12>\n\nkubernetes\x18$ \x01(\x0b\x32*.google.cloud.securitycenter.v2.Kubernetes\x12:\n\x08\x64\x61tabase\x18% \x01(\x0b\x32(.google.cloud.securitycenter.v2.Database\x12G\n\x0f\x61ttack_exposure\x18& \x01(\x0b\x32..google.cloud.securitycenter.v2.AttackExposure\x12\x33\n\x05\x66iles\x18\' \x03(\x0b\x32$.google.cloud.securitycenter.v2.File\x12P\n\x14\x63loud_dlp_inspection\x18( \x01(\x0b\x32\x32.google.cloud.securitycenter.v2.CloudDlpInspection\x12S\n\x16\x63loud_dlp_data_profile\x18) \x01(\x0b\x32\x33.google.cloud.securitycenter.v2.CloudDlpDataProfile\x12\x45\n\x0ekernel_rootkit\x18* \x01(\x0b\x32-.google.cloud.securitycenter.v2.KernelRootkit\x12?\n\x0corg_policies\x18+ \x03(\x0b\x32).google.cloud.securitycenter.v2.OrgPolicy\x12\x30\n\x03job\x18, \x01(\x0b\x32#.google.cloud.securitycenter.v2.Job\x12@\n\x0b\x61pplication\x18- \x01(\x0b\x32+.google.cloud.securitycenter.v2.Application\x12\x39\n\x08ip_rules\x18. \x01(\x0b\x32\'.google.cloud.securitycenter.v2.IpRules\x12X\n\x18\x62\x61\x63kup_disaster_recovery\x18/ \x01(\x0b\x32\x36.google.cloud.securitycenter.v2.BackupDisasterRecovery\x12I\n\x10security_posture\x18\x30 \x01(\x0b\x32/.google.cloud.securitycenter.v2.SecurityPosture\x12=\n\x0blog_entries\x18\x31 \x03(\x0b\x32(.google.cloud.securitycenter.v2.LogEntry\x12\x44\n\x0eload_balancers\x18\x32 \x03(\x0b\x32,.google.cloud.securitycenter.v2.LoadBalancer\x12?\n\x0b\x63loud_armor\x18\x33 \x01(\x0b\x32*.google.cloud.securitycenter.v2.CloudArmor\x12:\n\x08notebook\x18\x37 \x01(\x0b\x32(.google.cloud.securitycenter.v2.Notebook\x12K\n\x11toxic_combination\x18\x38 \x01(\x0b\x32\x30.google.cloud.securitycenter.v2.ToxicCombination\x12J\n\x11group_memberships\x18\x39 \x03(\x0b\x32/.google.cloud.securitycenter.v2.GroupMembership\x12\x32\n\x04\x64isk\x18: \x01(\x0b\x32$.google.cloud.securitycenter.v2.Disk\x12K\n\x12\x64\x61ta_access_events\x18= \x03(\x0b\x32/.google.cloud.securitycenter.v2.DataAccessEvent\x12G\n\x10\x64\x61ta_flow_events\x18> \x03(\x0b\x32-.google.cloud.securitycenter.v2.DataFlowEvent\x12\x39\n\x08networks\x18? \x03(\x0b\x32\'.google.cloud.securitycenter.v2.Network\x12\x62\n\x1e\x64\x61ta_retention_deletion_events\x18@ \x03(\x0b\x32:.google.cloud.securitycenter.v2.DataRetentionDeletionEvent\x12M\n\x12\x61\x66\x66\x65\x63ted_resources\x18\x41 \x01(\x0b\x32\x31.google.cloud.securitycenter.v2.AffectedResources\x12\x39\n\x08\x61i_model\x18\x42 \x01(\x0b\x32\'.google.cloud.securitycenter.v2.AiModel\x12>\n\nchokepoint\x18\x45 \x01(\x0b\x32*.google.cloud.securitycenter.v2.Chokepoint\x12;\n\tvertex_ai\x18H \x01(\x0b\x32(.google.cloud.securitycenter.v2.VertexAi\x1a\x93\x03\n\x08MuteInfo\x12P\n\x0bstatic_mute\x18\x01 \x01(\x0b\x32;.google.cloud.securitycenter.v2.Finding.MuteInfo.StaticMute\x12`\n\x14\x64ynamic_mute_records\x18\x02 \x03(\x0b\x32\x42.google.cloud.securitycenter.v2.Finding.MuteInfo.DynamicMuteRecord\x1ay\n\nStaticMute\x12;\n\x05state\x18\x01 \x01(\x0e\x32,.google.cloud.securitycenter.v2.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.v2.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.v2.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\x03\"\xd9\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:\xdd\x03\xea\x41\xd9\x03\n%securitycenter.googleapis.com/Finding\x12@organizations/{organization}/sources/{source}/findings/{finding}\x12Uorganizations/{organization}/sources/{source}/locations/{location}/findings/{finding}\x12\x34\x66olders/{folder}/sources/{source}/findings/{finding}\x12Ifolders/{folder}/sources/{source}/locations/{location}/findings/{finding}\x12\x36projects/{project}/sources/{source}/findings/{finding}\x12Kprojects/{project}/sources/{source}/locations/{location}/findings/{finding}*\x08\x66indings2\x07\x66indingB\xe6\x01\n\"com.google.cloud.securitycenter.v2B\x0c\x46indingProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" +descriptor_data = "\n,google/cloud/securitycenter/v2/finding.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a+google/cloud/securitycenter/v2/access.proto\x1a\x37google/cloud/securitycenter/v2/affected_resources.proto\x1a*google/cloud/securitycenter/v2/agent.proto\x1a\x32google/cloud/securitycenter/v2/agent_anomaly.proto\x1a\x32google/cloud/securitycenter/v2/agent_session.proto\x1a-google/cloud/securitycenter/v2/ai_model.proto\x1a\x30google/cloud/securitycenter/v2/application.proto\x1a\x34google/cloud/securitycenter/v2/attack_exposure.proto\x1a=google/cloud/securitycenter/v2/backup_disaster_recovery.proto\x1a/google/cloud/securitycenter/v2/chokepoint.proto\x1a\x30google/cloud/securitycenter/v2/cloud_armor.proto\x1a;google/cloud/securitycenter/v2/cloud_dlp_data_profile.proto\x1a\x39google/cloud/securitycenter/v2/cloud_dlp_inspection.proto\x1a/google/cloud/securitycenter/v2/compliance.proto\x1a/google/cloud/securitycenter/v2/connection.proto\x1a\x34google/cloud/securitycenter/v2/contact_details.proto\x1a.google/cloud/securitycenter/v2/container.proto\x1a\x36google/cloud/securitycenter/v2/data_access_event.proto\x1a\x34google/cloud/securitycenter/v2/data_flow_event.proto\x1a\x42google/cloud/securitycenter/v2/data_retention_deletion_event.proto\x1a-google/cloud/securitycenter/v2/database.proto\x1a)google/cloud/securitycenter/v2/disk.proto\x1a\x31google/cloud/securitycenter/v2/exfiltration.proto\x1a\x34google/cloud/securitycenter/v2/external_system.proto\x1a)google/cloud/securitycenter/v2/file.proto\x1a\x35google/cloud/securitycenter/v2/group_membership.proto\x1a\x30google/cloud/securitycenter/v2/iam_binding.proto\x1a.google/cloud/securitycenter/v2/indicator.proto\x1a-google/cloud/securitycenter/v2/ip_rules.proto\x1a(google/cloud/securitycenter/v2/job.proto\x1a\x33google/cloud/securitycenter/v2/kernel_rootkit.proto\x1a/google/cloud/securitycenter/v2/kubernetes.proto\x1a\x32google/cloud/securitycenter/v2/load_balancer.proto\x1a.google/cloud/securitycenter/v2/log_entry.proto\x1a\x31google/cloud/securitycenter/v2/mitre_attack.proto\x1a,google/cloud/securitycenter/v2/network.proto\x1a-google/cloud/securitycenter/v2/notebook.proto\x1a/google/cloud/securitycenter/v2/org_policy.proto\x1a,google/cloud/securitycenter/v2/process.proto\x1a\x33google/cloud/securitycenter/v2/security_marks.proto\x1a\x35google/cloud/securitycenter/v2/security_posture.proto\x1a\x36google/cloud/securitycenter/v2/toxic_combination.proto\x1a.google/cloud/securitycenter/v2/vertex_ai.proto\x1a\x32google/cloud/securitycenter/v2/vulnerability.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xdf*\n\x07\x46inding\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1b\n\x0e\x63\x61nonical_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x0e\n\x06parent\x18\x03 \x01(\t\x12\x1a\n\rresource_name\x18\x04 \x01(\tB\x03\xe0\x41\x05\x12\x41\n\x05state\x18\x06 \x01(\x0e\x32-.google.cloud.securitycenter.v2.Finding.StateB\x03\xe0\x41\x03\x12\x15\n\x08\x63\x61tegory\x18\x07 \x01(\tB\x03\xe0\x41\x05\x12\x14\n\x0c\x65xternal_uri\x18\x08 \x01(\t\x12X\n\x11source_properties\x18\t \x03(\x0b\x32=.google.cloud.securitycenter.v2.Finding.SourcePropertiesEntry\x12J\n\x0esecurity_marks\x18\n \x01(\x0b\x32-.google.cloud.securitycenter.v2.SecurityMarksB\x03\xe0\x41\x03\x12.\n\nevent_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x0b\x63reate_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x42\n\x08severity\x18\x0e \x01(\x0e\x32\x30.google.cloud.securitycenter.v2.Finding.Severity\x12:\n\x04mute\x18\x0f \x01(\x0e\x32,.google.cloud.securitycenter.v2.Finding.Mute\x12H\n\tmute_info\x18\x35 \x01(\x0b\x32\x30.google.cloud.securitycenter.v2.Finding.MuteInfoB\x03\xe0\x41\x03\x12K\n\rfinding_class\x18\x10 \x01(\x0e\x32\x34.google.cloud.securitycenter.v2.Finding.FindingClass\x12<\n\tindicator\x18\x11 \x01(\x0b\x32).google.cloud.securitycenter.v2.Indicator\x12\x44\n\rvulnerability\x18\x12 \x01(\x0b\x32-.google.cloud.securitycenter.v2.Vulnerability\x12\x39\n\x10mute_update_time\x18\x13 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12[\n\x10\x65xternal_systems\x18\x14 \x03(\x0b\x32<.google.cloud.securitycenter.v2.Finding.ExternalSystemsEntryB\x03\xe0\x41\x03\x12\x41\n\x0cmitre_attack\x18\x15 \x01(\x0b\x32+.google.cloud.securitycenter.v2.MitreAttack\x12\x36\n\x06\x61\x63\x63\x65ss\x18\x16 \x01(\x0b\x32&.google.cloud.securitycenter.v2.Access\x12?\n\x0b\x63onnections\x18\x17 \x03(\x0b\x32*.google.cloud.securitycenter.v2.Connection\x12\x16\n\x0emute_initiator\x18\x18 \x01(\t\x12:\n\tprocesses\x18\x19 \x03(\x0b\x32\'.google.cloud.securitycenter.v2.Process\x12L\n\x08\x63ontacts\x18\x1a \x03(\x0b\x32\x35.google.cloud.securitycenter.v2.Finding.ContactsEntryB\x03\xe0\x41\x03\x12?\n\x0b\x63ompliances\x18\x1b \x03(\x0b\x32*.google.cloud.securitycenter.v2.Compliance\x12 \n\x13parent_display_name\x18\x1d \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x0b\x64\x65scription\x18\x1e \x01(\t\x12\x42\n\x0c\x65xfiltration\x18\x1f \x01(\x0b\x32,.google.cloud.securitycenter.v2.Exfiltration\x12@\n\x0ciam_bindings\x18 \x03(\x0b\x32*.google.cloud.securitycenter.v2.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.v2.Container\x12>\n\nkubernetes\x18$ \x01(\x0b\x32*.google.cloud.securitycenter.v2.Kubernetes\x12:\n\x08\x64\x61tabase\x18% \x01(\x0b\x32(.google.cloud.securitycenter.v2.Database\x12G\n\x0f\x61ttack_exposure\x18& \x01(\x0b\x32..google.cloud.securitycenter.v2.AttackExposure\x12\x33\n\x05\x66iles\x18\' \x03(\x0b\x32$.google.cloud.securitycenter.v2.File\x12P\n\x14\x63loud_dlp_inspection\x18( \x01(\x0b\x32\x32.google.cloud.securitycenter.v2.CloudDlpInspection\x12S\n\x16\x63loud_dlp_data_profile\x18) \x01(\x0b\x32\x33.google.cloud.securitycenter.v2.CloudDlpDataProfile\x12\x45\n\x0ekernel_rootkit\x18* \x01(\x0b\x32-.google.cloud.securitycenter.v2.KernelRootkit\x12?\n\x0corg_policies\x18+ \x03(\x0b\x32).google.cloud.securitycenter.v2.OrgPolicy\x12\x30\n\x03job\x18, \x01(\x0b\x32#.google.cloud.securitycenter.v2.Job\x12@\n\x0b\x61pplication\x18- \x01(\x0b\x32+.google.cloud.securitycenter.v2.Application\x12\x39\n\x08ip_rules\x18. \x01(\x0b\x32\'.google.cloud.securitycenter.v2.IpRules\x12X\n\x18\x62\x61\x63kup_disaster_recovery\x18/ \x01(\x0b\x32\x36.google.cloud.securitycenter.v2.BackupDisasterRecovery\x12I\n\x10security_posture\x18\x30 \x01(\x0b\x32/.google.cloud.securitycenter.v2.SecurityPosture\x12=\n\x0blog_entries\x18\x31 \x03(\x0b\x32(.google.cloud.securitycenter.v2.LogEntry\x12\x44\n\x0eload_balancers\x18\x32 \x03(\x0b\x32,.google.cloud.securitycenter.v2.LoadBalancer\x12?\n\x0b\x63loud_armor\x18\x33 \x01(\x0b\x32*.google.cloud.securitycenter.v2.CloudArmor\x12:\n\x08notebook\x18\x37 \x01(\x0b\x32(.google.cloud.securitycenter.v2.Notebook\x12K\n\x11toxic_combination\x18\x38 \x01(\x0b\x32\x30.google.cloud.securitycenter.v2.ToxicCombination\x12J\n\x11group_memberships\x18\x39 \x03(\x0b\x32/.google.cloud.securitycenter.v2.GroupMembership\x12\x32\n\x04\x64isk\x18: \x01(\x0b\x32$.google.cloud.securitycenter.v2.Disk\x12K\n\x12\x64\x61ta_access_events\x18= \x03(\x0b\x32/.google.cloud.securitycenter.v2.DataAccessEvent\x12G\n\x10\x64\x61ta_flow_events\x18> \x03(\x0b\x32-.google.cloud.securitycenter.v2.DataFlowEvent\x12\x39\n\x08networks\x18? \x03(\x0b\x32\'.google.cloud.securitycenter.v2.Network\x12\x62\n\x1e\x64\x61ta_retention_deletion_events\x18@ \x03(\x0b\x32:.google.cloud.securitycenter.v2.DataRetentionDeletionEvent\x12M\n\x12\x61\x66\x66\x65\x63ted_resources\x18\x41 \x01(\x0b\x32\x31.google.cloud.securitycenter.v2.AffectedResources\x12\x39\n\x08\x61i_model\x18\x42 \x01(\x0b\x32\'.google.cloud.securitycenter.v2.AiModel\x12>\n\nchokepoint\x18\x45 \x01(\x0b\x32*.google.cloud.securitycenter.v2.Chokepoint\x12;\n\tvertex_ai\x18H \x01(\x0b\x32(.google.cloud.securitycenter.v2.VertexAi\x12\x34\n\x05\x61gent\x18Q \x01(\x0b\x32%.google.cloud.securitycenter.v2.Agent\x12\x44\n\x0e\x61gent_sessions\x18R \x03(\x0b\x32,.google.cloud.securitycenter.v2.AgentSession\x12\x43\n\ragent_anomaly\x18S \x01(\x0b\x32,.google.cloud.securitycenter.v2.AgentAnomaly\x1a\x93\x03\n\x08MuteInfo\x12P\n\x0bstatic_mute\x18\x01 \x01(\x0b\x32;.google.cloud.securitycenter.v2.Finding.MuteInfo.StaticMute\x12`\n\x14\x64ynamic_mute_records\x18\x02 \x03(\x0b\x32\x42.google.cloud.securitycenter.v2.Finding.MuteInfo.DynamicMuteRecord\x1ay\n\nStaticMute\x12;\n\x05state\x18\x01 \x01(\x0e\x32,.google.cloud.securitycenter.v2.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.v2.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.v2.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\x03\"\xd9\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:\xdd\x03\xea\x41\xd9\x03\n%securitycenter.googleapis.com/Finding\x12@organizations/{organization}/sources/{source}/findings/{finding}\x12Uorganizations/{organization}/sources/{source}/locations/{location}/findings/{finding}\x12\x34\x66olders/{folder}/sources/{source}/findings/{finding}\x12Ifolders/{folder}/sources/{source}/locations/{location}/findings/{finding}\x12\x36projects/{project}/sources/{source}/findings/{finding}\x12Kprojects/{project}/sources/{source}/locations/{location}/findings/{finding}*\x08\x66indings2\x07\x66indingB\xe6\x01\n\"com.google.cloud.securitycenter.v2B\x0c\x46indingProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" pool = ::Google::Protobuf::DescriptorPool.generated_pool pool.add_serialized_file(descriptor_data) diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/agent.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/agent.rb similarity index 100% rename from owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/agent.rb rename to google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/agent.rb diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/agent_anomaly.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/agent_anomaly.rb similarity index 100% rename from owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/agent_anomaly.rb rename to google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/agent_anomaly.rb diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/agent_session.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/agent_session.rb similarity index 100% rename from owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/agent_session.rb rename to google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/agent_session.rb diff --git a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/finding.rb b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/finding.rb index 6aa3e15d8e7b..809bb2a2dace 100644 --- a/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/finding.rb +++ b/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/finding.rb @@ -316,6 +316,15 @@ module V2 # @!attribute [rw] vertex_ai # @return [::Google::Cloud::SecurityCenter::V2::VertexAi] # VertexAi associated with the finding. + # @!attribute [rw] agent + # @return [::Google::Cloud::SecurityCenter::V2::Agent] + # Primary Agent that the specified finding was flagged for + # @!attribute [rw] agent_sessions + # @return [::Array<::Google::Cloud::SecurityCenter::V2::AgentSession>] + # Conversational session(s) where the finding occurred. + # @!attribute [rw] agent_anomaly + # @return [::Google::Cloud::SecurityCenter::V2::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-v2/.gitignore b/owl-bot-staging/google-cloud-security_center-v2/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/.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-v2/.repo-metadata.json b/owl-bot-staging/google-cloud-security_center-v2/.repo-metadata.json deleted file mode 100644 index 0473cc4ee50a..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/.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-v2/latest", - "distribution_name": "google-cloud-security_center-v2", - "is_cloud": true, - "language": "ruby", - "name": "securitycenter", - "name_pretty": "Security Command Center V2 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-v2 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-v2/.rubocop.yml b/owl-bot-staging/google-cloud-security_center-v2/.rubocop.yml deleted file mode 100644 index ca95d31c752a..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-security_center-v2.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-v2.rb" diff --git a/owl-bot-staging/google-cloud-security_center-v2/.toys.rb b/owl-bot-staging/google-cloud-security_center-v2/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/.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-v2/.yardopts b/owl-bot-staging/google-cloud-security_center-v2/.yardopts deleted file mode 100644 index ce63c0dd16df..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Security Command Center V2 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-v2/AUTHENTICATION.md b/owl-bot-staging/google-cloud-security_center-v2/AUTHENTICATION.md deleted file mode 100644 index f1313afe9378..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-security_center-v2 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-v2 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/v2" - -client = ::Google::Cloud::SecurityCenter::V2::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/v2" - -::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::SecurityCenter::V2::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-v2 -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/v2" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::SecurityCenter::V2::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-v2/CHANGELOG.md b/owl-bot-staging/google-cloud-security_center-v2/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-security_center-v2/Gemfile b/owl-bot-staging/google-cloud-security_center-v2/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/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-v2/LICENSE.md b/owl-bot-staging/google-cloud-security_center-v2/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/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-v2/README.md b/owl-bot-staging/google-cloud-security_center-v2/README.md deleted file mode 100644 index c2224047d696..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Security Command Center V2 API - -Security Command Center API provides access to temporal views of assets and findings within an organization. - -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 Security Command Center V2 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-v2 -``` - -## 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/v2" - -client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new -request = ::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsRequest.new # (request fields as keyword arguments...) -response = client.batch_create_resource_value_configs request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-security_center-v2/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/v2" -require "logger" - -client = ::Google::Cloud::SecurityCenter::V2::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-v2`. -_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-v2`. - -### 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-v2/Rakefile b/owl-bot-staging/google-cloud-security_center-v2/Rakefile deleted file mode 100644 index 3f3dda612226..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/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-v2 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/v2/security_center/credentials" - ::Google::Cloud::SecurityCenter::V2::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-v2 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-v2 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-v2 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-v2 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-security_center-v2" - header "google-cloud-security_center-v2 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-security_center-v2 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-security_center-v2 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-v2 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-v2 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-v2/gapic_metadata.json b/owl-bot-staging/google-cloud-security_center-v2/gapic_metadata.json deleted file mode 100644 index 8859452b344a..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/gapic_metadata.json +++ /dev/null @@ -1,218 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.securitycenter.v2", - "libraryPackage": "::Google::Cloud::SecurityCenter::V2", - "services": { - "SecurityCenter": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client", - "rpcs": { - "BatchCreateResourceValueConfigs": { - "methods": [ - "batch_create_resource_value_configs" - ] - }, - "BulkMuteFindings": { - "methods": [ - "bulk_mute_findings" - ] - }, - "CreateBigQueryExport": { - "methods": [ - "create_big_query_export" - ] - }, - "CreateFinding": { - "methods": [ - "create_finding" - ] - }, - "CreateMuteConfig": { - "methods": [ - "create_mute_config" - ] - }, - "CreateNotificationConfig": { - "methods": [ - "create_notification_config" - ] - }, - "CreateSource": { - "methods": [ - "create_source" - ] - }, - "DeleteBigQueryExport": { - "methods": [ - "delete_big_query_export" - ] - }, - "DeleteMuteConfig": { - "methods": [ - "delete_mute_config" - ] - }, - "DeleteNotificationConfig": { - "methods": [ - "delete_notification_config" - ] - }, - "DeleteResourceValueConfig": { - "methods": [ - "delete_resource_value_config" - ] - }, - "GetBigQueryExport": { - "methods": [ - "get_big_query_export" - ] - }, - "GetSimulation": { - "methods": [ - "get_simulation" - ] - }, - "GetValuedResource": { - "methods": [ - "get_valued_resource" - ] - }, - "GetIamPolicy": { - "methods": [ - "get_iam_policy" - ] - }, - "GetMuteConfig": { - "methods": [ - "get_mute_config" - ] - }, - "GetNotificationConfig": { - "methods": [ - "get_notification_config" - ] - }, - "GetResourceValueConfig": { - "methods": [ - "get_resource_value_config" - ] - }, - "GetSource": { - "methods": [ - "get_source" - ] - }, - "GroupFindings": { - "methods": [ - "group_findings" - ] - }, - "ListAttackPaths": { - "methods": [ - "list_attack_paths" - ] - }, - "ListBigQueryExports": { - "methods": [ - "list_big_query_exports" - ] - }, - "ListFindings": { - "methods": [ - "list_findings" - ] - }, - "ListMuteConfigs": { - "methods": [ - "list_mute_configs" - ] - }, - "ListNotificationConfigs": { - "methods": [ - "list_notification_configs" - ] - }, - "ListResourceValueConfigs": { - "methods": [ - "list_resource_value_configs" - ] - }, - "ListSources": { - "methods": [ - "list_sources" - ] - }, - "ListValuedResources": { - "methods": [ - "list_valued_resources" - ] - }, - "SetFindingState": { - "methods": [ - "set_finding_state" - ] - }, - "SetIamPolicy": { - "methods": [ - "set_iam_policy" - ] - }, - "SetMute": { - "methods": [ - "set_mute" - ] - }, - "TestIamPermissions": { - "methods": [ - "test_iam_permissions" - ] - }, - "UpdateBigQueryExport": { - "methods": [ - "update_big_query_export" - ] - }, - "UpdateExternalSystem": { - "methods": [ - "update_external_system" - ] - }, - "UpdateFinding": { - "methods": [ - "update_finding" - ] - }, - "UpdateMuteConfig": { - "methods": [ - "update_mute_config" - ] - }, - "UpdateNotificationConfig": { - "methods": [ - "update_notification_config" - ] - }, - "UpdateResourceValueConfig": { - "methods": [ - "update_resource_value_config" - ] - }, - "UpdateSecurityMarks": { - "methods": [ - "update_security_marks" - ] - }, - "UpdateSource": { - "methods": [ - "update_source" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-security_center-v2/google-cloud-security_center-v2.gemspec b/owl-bot-staging/google-cloud-security_center-v2/google-cloud-security_center-v2.gemspec deleted file mode 100644 index 8cb5140c90c7..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/google-cloud-security_center-v2.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/security_center/v2/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-security_center-v2" - gem.version = Google::Cloud::SecurityCenter::V2::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-v2 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-v2/lib/google-cloud-security_center-v2.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google-cloud-security_center-v2.rb deleted file mode 100644 index fbfebf50a08d..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google-cloud-security_center-v2.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/v2" diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2.rb deleted file mode 100644 index cb448baa8c34..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2.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/v2/security_center" -require "google/cloud/security_center/v2/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/v2" - # client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/security_center/v2" - # client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - module V2 - end - end - end -end - -helper_path = ::File.join __dir__, "v2", "_helpers.rb" -require "google/cloud/security_center/v2/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/rest.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/rest.rb deleted file mode 100644 index 25ca637b14ef..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/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/v2/security_center/rest" -require "google/cloud/security_center/v2/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/v2/rest" - # client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - module V2 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center.rb deleted file mode 100644 index b2e61e4933b2..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/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/v2/version" - -require "google/cloud/security_center/v2/security_center/credentials" -require "google/cloud/security_center/v2/security_center/paths" -require "google/cloud/security_center/v2/security_center/operations" -require "google/cloud/security_center/v2/security_center/client" -require "google/cloud/security_center/v2/security_center/rest" - -module Google - module Cloud - module SecurityCenter - module V2 - ## - # V2 APIs for Security Center service. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/security_center/v2/security_center" - # client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/security_center/v2/security_center/rest" - # client = ::Google::Cloud::SecurityCenter::V2::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/v2/security_center/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/client.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/client.rb deleted file mode 100644 index e1de0b6ba7ae..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/client.rb +++ /dev/null @@ -1,4793 +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/v2/securitycenter_service_pb" - -module Google - module Cloud - module SecurityCenter - module V2 - module SecurityCenter - ## - # Client for the SecurityCenter service. - # - # V2 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::V2::SecurityCenter::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all SecurityCenter clients - # ::Google::Cloud::SecurityCenter::V2::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", "V2"] - 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 - 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::V2::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::V2::SecurityCenter::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::SecurityCenter::V2::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/v2/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::V2::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::V2::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 - - ## - # 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::V2::BatchCreateResourceValueConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::BatchCreateResourceValueConfigsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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 - - ## - # Kicks off an LRO to bulk mute findings for a parent based on a filter. If - # no location is specified, findings are muted in global. 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::V2::BulkMuteFindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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_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. If no - # location is specified, findings are updated in global. The following list - # shows some examples: - # - # + `organizations/[organization_id]` - # + `organizations/[organization_id]/locations/[location_id]` - # + `folders/[folder_id]` - # + `folders/[folder_id]/locations/[location_id]` - # + `projects/[project_id]` - # + `projects/[project_id]/locations/[location_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_state [::Google::Cloud::SecurityCenter::V2::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/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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 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::V2::CreateBigQueryExportRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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]/locations/[location_id]`, - # `folders/[folder_id]/locations/[location_id]`, or - # `projects/[project_id]/locations/[location_id]`. - # @param big_query_export [::Google::Cloud::SecurityCenter::V2::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::V2::BigQueryExport] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V2::BigQueryExport] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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 - - ## - # Creates a finding in a location. 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::V2::CreateFindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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. The following list - # shows some examples of the format: - # + - # `organizations/[organization_id]/sources/[source_id]` - # + - # `organizations/[organization_id]/sources/[source_id]/locations/[location_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::V2::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::V2::Finding] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V2::Finding] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::CreateFindingRequest.new - # - # # Call the create_finding method. - # result = client.create_finding request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::CreateMuteConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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]/locations/[location_id]`, - # `folders/[folder_id]/locations/[location_id]`, or - # `projects/[project_id]/locations/[location_id]`. - # @param mute_config [::Google::Cloud::SecurityCenter::V2::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::V2::MuteConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V2::MuteConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::CreateMuteConfigRequest.new - # - # # Call the create_mute_config method. - # result = client.create_mute_config request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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 - regex_match = %r{^projects/[^/]+/locations/(?[^/]+)/?$}.match request.parent - if regex_match - header_params["location"] = regex_match["location".to_s] - end - end - if request.parent - regex_match = %r{^organizations/[^/]+/locations/(?[^/]+)/?$}.match request.parent - if regex_match - header_params["location"] = regex_match["location".to_s] - end - end - if request.parent - regex_match = %r{^folders/[^/]+/locations/(?[^/]+)/?$}.match request.parent - if regex_match - header_params["location"] = regex_match["location".to_s] - end - end - - request_params_header = URI.encode_www_form header_params - 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::V2::CreateNotificationConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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]/locations/[location_id]`, - # `folders/[folder_id]/locations/[location_id]`, or - # `projects/[project_id]/locations/[location_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::V2::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::V2::NotificationConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V2::NotificationConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::CreateNotificationConfigRequest.new - # - # # Call the create_notification_config method. - # result = client.create_notification_config request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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 - - ## - # Creates a source. - # - # @overload create_source(request, options = nil) - # Pass arguments to `create_source` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::CreateSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::Source] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V2::Source] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::CreateSourceRequest.new - # - # # Call the create_source method. - # result = client.create_source request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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 - - ## - # 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::V2::DeleteBigQueryExportRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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. The following list - # shows some examples of the format: - # - # + - # `organizations/{organization}/locations/{location}/bigQueryExports/{export_id}` - # + `folders/{folder}/locations/{location}/bigQueryExports/{export_id}` - # + `projects/{project}/locations/{location}/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/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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 - - ## - # Deletes an existing mute config. If no location is specified, default is - # global. - # - # @overload delete_mute_config(request, options = nil) - # Pass arguments to `delete_mute_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::DeleteMuteConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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. The following list shows some - # examples of the format: - # - # + `organizations/{organization}/muteConfigs/{config_id}` - # + - # `organizations/{organization}/locations/{location}/muteConfigs/{config_id}` - # + `folders/{folder}/muteConfigs/{config_id}` - # + `folders/{folder}/locations/{location}/muteConfigs/{config_id}` - # + `projects/{project}/muteConfigs/{config_id}` - # + `projects/{project}/locations/{location}/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/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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 - regex_match = %r{^projects/[^/]+/locations/(?[^/]+)/muteConfigs/[^/]+/?$}.match request.name - if regex_match - header_params["location"] = regex_match["location".to_s] - end - end - if request.name - regex_match = %r{^organizations/[^/]+/locations/(?[^/]+)/muteConfigs/[^/]+/?$}.match request.name - if regex_match - header_params["location"] = regex_match["location".to_s] - end - end - if request.name - regex_match = %r{^folders/[^/]+/locations/(?[^/]+)/muteConfigs/[^/]+/?$}.match request.name - if regex_match - header_params["location"] = regex_match["location".to_s] - end - end - - request_params_header = URI.encode_www_form header_params - 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::V2::DeleteNotificationConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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. The following list - # shows some examples of the format: - # - # + - # `organizations/[organization_id]/locations/[location_id]/notificationConfigs/[config_id]` - # + - # `folders/[folder_id]/locations/[location_id]notificationConfigs/[config_id]` - # + - # `projects/[project_id]/locations/[location_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/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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 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::V2::DeleteResourceValueConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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 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::V2::GetBigQueryExportRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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. The following list shows - # some examples of the format: - # - # + - # `organizations/{organization}/locations/{location}/bigQueryExports/{export_id}` - # + `folders/{folder}/locations/{location}/bigQueryExports/{export_id}` - # + `projects/{project}locations/{location}//bigQueryExports/{export_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V2::BigQueryExport] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V2::BigQueryExport] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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 - - ## - # 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::V2::GetSimulationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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::V2::Simulation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V2::Simulation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::GetSimulationRequest.new - # - # # Call the get_simulation method. - # result = client.get_simulation request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::GetValuedResourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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::V2::ValuedResource] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V2::ValuedResource] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::GetValuedResourceRequest.new - # - # # Call the get_valued_resource method. - # result = client.get_valued_resource request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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 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/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::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::V2::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. If no location is specified, default is - # global. - # - # @overload get_mute_config(request, options = nil) - # Pass arguments to `get_mute_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::GetMuteConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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. The following list shows - # some examples of the format: - # - # + `organizations/{organization}/muteConfigs/{config_id}` - # + - # `organizations/{organization}/locations/{location}/muteConfigs/{config_id}` - # + `folders/{folder}/muteConfigs/{config_id}` - # + `folders/{folder}/locations/{location}/muteConfigs/{config_id}` - # + `projects/{project}/muteConfigs/{config_id}` - # + `projects/{project}/locations/{location}/muteConfigs/{config_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V2::MuteConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V2::MuteConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::GetMuteConfigRequest.new - # - # # Call the get_mute_config method. - # result = client.get_mute_config request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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 - regex_match = %r{^projects/[^/]+/locations/(?[^/]+)/muteConfigs/[^/]+/?$}.match request.name - if regex_match - header_params["location"] = regex_match["location".to_s] - end - end - if request.name - regex_match = %r{^organizations/[^/]+/locations/(?[^/]+)/muteConfigs/[^/]+/?$}.match request.name - if regex_match - header_params["location"] = regex_match["location".to_s] - end - end - if request.name - regex_match = %r{^folders/[^/]+/locations/(?[^/]+)/muteConfigs/[^/]+/?$}.match request.name - if regex_match - header_params["location"] = regex_match["location".to_s] - end - end - - request_params_header = URI.encode_www_form header_params - 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::V2::GetNotificationConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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. The following list shows - # some examples of the format: - # - # + - # `organizations/[organization_id]/locations/[location_id]/notificationConfigs/[config_id]` - # + - # `folders/[folder_id]/locations/[location_id]/notificationConfigs/[config_id]` - # + - # `projects/[project_id]/locations/[location_id]/notificationConfigs/[config_id]` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V2::NotificationConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V2::NotificationConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::GetNotificationConfigRequest.new - # - # # Call the get_notification_config method. - # result = client.get_notification_config request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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 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::V2::GetResourceValueConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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::V2::ResourceValueConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V2::ResourceValueConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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 - - ## - # Gets a source. - # - # @overload get_source(request, options = nil) - # Pass arguments to `get_source` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::GetSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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::V2::Source] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V2::Source] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::GetSourceRequest.new - # - # # Call the get_source method. - # result = client.get_source request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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 or source's findings and groups them by their - # specified properties in a location. If no location is specified, findings - # are assumed to be in global - # - # To group across all sources provide a `-` as the source id. - # The following list shows some examples: - # - # + `/v2/organizations/{organization_id}/sources/-/findings` - # + - # `/v2/organizations/{organization_id}/sources/-/locations/{location_id}/findings` - # + `/v2/folders/{folder_id}/sources/-/findings` - # + `/v2/folders/{folder_id}/sources/-/locations/{location_id}/findings` - # + `/v2/projects/{project_id}/sources/-/findings` - # + `/v2/projects/{project_id}/sources/-/locations/{location_id}/findings` - # - # @overload group_findings(request, options = nil) - # Pass arguments to `group_findings` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::GroupFindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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, 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. If no location is specified, - # finding is assumed to be in global. - # The following list shows some examples: - # - # + `organizations/[organization_id]/sources/[source_id]` - # + - # `organizations/[organization_id]/sources/[source_id]/locations/[location_id]` - # + `folders/[folder_id]/sources/[source_id]` - # + `folders/[folder_id]/sources/[source_id]/locations/[location_id]` - # + `projects/[project_id]/sources/[source_id]` - # + `projects/[project_id]/sources/[source_id]/locations/[location_id]` - # - # To groupBy across all sources provide a source_id of `-`. The following - # list shows some examples: - # - # + `organizations/{organization_id}/sources/-` - # + `organizations/{organization_id}/sources/-/locations/[location_id]` - # + `folders/{folder_id}/sources/-` - # + `folders/{folder_id}/sources/-/locations/[location_id]` - # + `projects/{project_id}/sources/-` - # + `projects/{project_id}/sources/-/locations/[location_id]` - # @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 - # * 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: `=`, `:` - # * security_marks.marks: `=`, `:` - # * 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. - # The string value should follow SQL syntax: comma separated list of fields. - # For example: "parent,resource_name". - # @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::V2::GroupResult>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::GroupResult>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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 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::V2::ListAttackPathsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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::V2::AttackPath>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::AttackPath>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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 - - ## - # 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::V2::ListBigQueryExportsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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]/locations/[location_id]`, - # `folders/[folder_id]/locations/[location_id]`, or - # `projects/[project_id]/locations/[location_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::V2::BigQueryExport>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::BigQueryExport>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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 - - ## - # Lists an organization or source's findings. - # - # To list across all sources for a given location provide a `-` as the source - # id. If no location is specified, finding are assumed to be in global. - # The following list shows some examples: - # - # + `/v2/organizations/{organization_id}/sources/-/findings` - # + - # `/v2/organizations/{organization_id}/sources/-/locations/{location_id}/findings` - # - # @overload list_findings(request, options = nil) - # Pass arguments to `list_findings` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::ListFindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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, 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. If no location is - # specified, the default is global. The following list shows some examples: - # - # + `organizations/[organization_id]/sources/[source_id]` - # + - # `organizations/[organization_id]/sources/[source_id]/locations/[location_id]` - # + `folders/[folder_id]/sources/[source_id]` - # + `folders/[folder_id]/sources/[source_id]/locations/[location_id]` - # + `projects/[project_id]/sources/[source_id]` - # + `projects/[project_id]/sources/[source_id]/locations/[location_id]` - # - # To list across all sources provide a source_id of `-`. The following - # list shows some examples: - # - # + `organizations/{organization_id}/sources/-` - # + `organizations/{organization_id}/sources/-/locations/{location_id}` - # + `folders/{folder_id}/sources/-` - # + `folders/{folder_id}/sources/-locations/{location_id}` - # + `projects/{projects_id}/sources/-` - # + `projects/{projects_id}/sources/-/locations/{location_id}` - # @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 - # * 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: `=`, `:` - # * security_marks.marks: `=`, `:` - # * 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,parent". 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,parent". Redundant space characters in the - # syntax are insignificant. "name desc,parent" and " - # name desc , parent " are equivalent. - # - # The following fields are supported: - # name - # parent - # state - # category - # resource_name - # event_time - # security_marks.marks - # @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::V2::ListFindingsResponse::ListFindingsResult>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::ListFindingsResponse::ListFindingsResult>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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. If no location is specified, default is - # global. - # - # @overload list_mute_configs(request, options = nil) - # Pass arguments to `list_mute_configs` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::ListMuteConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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]`, - # `organizations/[organization_id]/locations/[location_id]`, - # `folders/[folder_id]/locations/[location_id]`, - # `projects/[project_id]/locations/[location_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::V2::MuteConfig>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::MuteConfig>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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 - regex_match = %r{^projects/[^/]+/locations/(?[^/]+)/muteConfigs/?$}.match request.parent - if regex_match - header_params["location"] = regex_match["location".to_s] - end - end - if request.parent - regex_match = %r{^organizations/[^/]+/locations/(?[^/]+)/muteConfigs/?$}.match request.parent - if regex_match - header_params["location"] = regex_match["location".to_s] - end - end - if request.parent - regex_match = %r{^folders/[^/]+/locations/(?[^/]+)/muteConfigs/?$}.match request.parent - if regex_match - header_params["location"] = regex_match["location".to_s] - end - end - - request_params_header = URI.encode_www_form header_params - 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::V2::ListNotificationConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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]/locations/[location_id]", - # "folders/[folder_id]/locations/[location_id]", or - # "projects/[project_id]/locations/[location_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::V2::NotificationConfig>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::NotificationConfig>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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 - - ## - # 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::V2::ListResourceValueConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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 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 `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::V2::ResourceValueConfig>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::ResourceValueConfig>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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 - - ## - # 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::V2::ListSourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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::V2::Source>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::Source>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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 - - ## - # 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::V2::ListValuedResourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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 exposed 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` - # - # 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::V2::ValuedResource>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::ValuedResource>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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 - - ## - # Updates the state of a finding. If no location is specified, finding is - # assumed to be in global - # - # @overload set_finding_state(request, options = nil) - # Pass arguments to `set_finding_state` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::SetFindingStateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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) - # 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. If no location is specified, finding is assumed to be in - # global. The following list shows some examples: - # - # + - # `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}` - # + - # `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` - # + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}` - # + - # `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` - # + `projects/{project_id}/sources/{source_id}/findings/{finding_id}` - # + - # `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` - # @param state [::Google::Cloud::SecurityCenter::V2::Finding::State] - # Required. The desired State of the finding. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V2::Finding] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V2::Finding] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::SetFindingStateRequest.new - # - # # Call the set_finding_state method. - # result = client.set_finding_state request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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 - - ## - # 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/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::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::V2::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 - - ## - # Updates the mute state of a finding. If no location is specified, finding - # is assumed to be in global - # - # @overload set_mute(request, options = nil) - # Pass arguments to `set_mute` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::SetMuteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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. If no location is specified, finding is assumed to be in - # global. The following list shows some examples: - # - # + - # `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}` - # + - # `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` - # + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}` - # + - # `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` - # + `projects/{project_id}/sources/{source_id}/findings/{finding_id}` - # + - # `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` - # @param mute [::Google::Cloud::SecurityCenter::V2::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::V2::Finding] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V2::Finding] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::SetMuteRequest.new - # - # # Call the set_mute method. - # result = client.set_mute request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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 - - ## - # 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/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::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::V2::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 - - ## - # 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::V2::UpdateBigQueryExportRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::BigQueryExport] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V2::BigQueryExport] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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 - - ## - # Updates external system. This is for a given finding. If no location is - # specified, finding is assumed to be in global - # - # @overload update_external_system(request, options = nil) - # Pass arguments to `update_external_system` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::UpdateExternalSystemRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::ExternalSystem] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V2::ExternalSystem] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::UpdateExternalSystemRequest.new - # - # # Call the update_external_system method. - # result = client.update_external_system request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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. If no location is specified, finding is - # assumed to be in global. 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::V2::UpdateFindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::Finding] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V2::Finding] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::UpdateFindingRequest.new - # - # # Call the update_finding method. - # result = client.update_finding request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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. If no location is specified, default is - # global. - # - # @overload update_mute_config(request, options = nil) - # Pass arguments to `update_mute_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::UpdateMuteConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::MuteConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V2::MuteConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::UpdateMuteConfigRequest.new - # - # # Call the update_mute_config method. - # result = client.update_mute_config request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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 - regex_match = %r{^projects/[^/]+/locations/(?[^/]+)/muteConfigs/[^/]+/?$}.match request.mute_config.name - if regex_match - header_params["location"] = regex_match["location".to_s] - end - end - if request.mute_config&.name - regex_match = %r{^organizations/[^/]+/locations/(?[^/]+)/muteConfigs/[^/]+/?$}.match request.mute_config.name - if regex_match - header_params["location"] = regex_match["location".to_s] - end - end - if request.mute_config&.name - regex_match = %r{^folders/[^/]+/locations/(?[^/]+)/muteConfigs/[^/]+/?$}.match request.mute_config.name - if regex_match - header_params["location"] = regex_match["location".to_s] - end - end - - request_params_header = URI.encode_www_form header_params - 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::V2::UpdateNotificationConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::NotificationConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V2::NotificationConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::UpdateNotificationConfigRequest.new - # - # # Call the update_notification_config method. - # result = client.update_notification_config request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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 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::V2::UpdateResourceValueConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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::V2::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. - # - # To update nested fields, include the top level field in the mask - # For example, to update gcp_metadata.resource_type, include the - # "gcp_metadata" field mask - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V2::ResourceValueConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V2::ResourceValueConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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 - - ## - # Updates security marks. For Finding Security marks, if no location is - # specified, finding is assumed to be in global. Assets Security Marks can - # only be accessed through global endpoint. - # - # @overload update_security_marks(request, options = nil) - # Pass arguments to `update_security_marks` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::UpdateSecurityMarksRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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) - # 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::V2::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.". - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::SecurityCenter::V2::SecurityMarks] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V2::SecurityMarks] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::UpdateSecurityMarksRequest.new - # - # # Call the update_security_marks method. - # result = client.update_security_marks request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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 - - ## - # Updates a source. - # - # @overload update_source(request, options = nil) - # Pass arguments to `update_source` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::UpdateSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::Source] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::SecurityCenter::V2::Source] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::UpdateSourceRequest.new - # - # # Call the update_source method. - # result = client.update_source request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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 - - ## - # 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::V2::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 - # # batch_create_resource_value_configs to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.batch_create_resource_value_configs.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.batch_create_resource_value_configs.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::V2::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 `batch_create_resource_value_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_create_resource_value_configs - ## - # RPC-specific configuration for `bulk_mute_findings` - # @return [::Gapic::Config::Method] - # - attr_reader :bulk_mute_findings - ## - # RPC-specific configuration for `create_big_query_export` - # @return [::Gapic::Config::Method] - # - attr_reader :create_big_query_export - ## - # 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 `create_source` - # @return [::Gapic::Config::Method] - # - attr_reader :create_source - ## - # RPC-specific configuration for `delete_big_query_export` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_big_query_export - ## - # 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_resource_value_config` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_resource_value_config - ## - # RPC-specific configuration for `get_big_query_export` - # @return [::Gapic::Config::Method] - # - attr_reader :get_big_query_export - ## - # 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_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_resource_value_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_resource_value_config - ## - # RPC-specific configuration for `get_source` - # @return [::Gapic::Config::Method] - # - attr_reader :get_source - ## - # RPC-specific configuration for `group_findings` - # @return [::Gapic::Config::Method] - # - attr_reader :group_findings - ## - # RPC-specific configuration for `list_attack_paths` - # @return [::Gapic::Config::Method] - # - attr_reader :list_attack_paths - ## - # RPC-specific configuration for `list_big_query_exports` - # @return [::Gapic::Config::Method] - # - attr_reader :list_big_query_exports - ## - # 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_resource_value_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_resource_value_configs - ## - # RPC-specific configuration for `list_sources` - # @return [::Gapic::Config::Method] - # - attr_reader :list_sources - ## - # RPC-specific configuration for `list_valued_resources` - # @return [::Gapic::Config::Method] - # - attr_reader :list_valued_resources - ## - # RPC-specific configuration for `set_finding_state` - # @return [::Gapic::Config::Method] - # - attr_reader :set_finding_state - ## - # RPC-specific configuration for `set_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :set_iam_policy - ## - # RPC-specific configuration for `set_mute` - # @return [::Gapic::Config::Method] - # - attr_reader :set_mute - ## - # RPC-specific configuration for `test_iam_permissions` - # @return [::Gapic::Config::Method] - # - attr_reader :test_iam_permissions - ## - # RPC-specific configuration for `update_big_query_export` - # @return [::Gapic::Config::Method] - # - attr_reader :update_big_query_export - ## - # 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_resource_value_config` - # @return [::Gapic::Config::Method] - # - attr_reader :update_resource_value_config - ## - # RPC-specific configuration for `update_security_marks` - # @return [::Gapic::Config::Method] - # - attr_reader :update_security_marks - ## - # RPC-specific configuration for `update_source` - # @return [::Gapic::Config::Method] - # - attr_reader :update_source - - # @private - def initialize parent_rpcs = nil - 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 - 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_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 - 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 - create_source_config = parent_rpcs.create_source if parent_rpcs.respond_to? :create_source - @create_source = ::Gapic::Config::Method.new create_source_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 - 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_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_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_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_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_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 - get_source_config = parent_rpcs.get_source if parent_rpcs.respond_to? :get_source - @get_source = ::Gapic::Config::Method.new get_source_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_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 - 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 - 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_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 - list_sources_config = parent_rpcs.list_sources if parent_rpcs.respond_to? :list_sources - @list_sources = ::Gapic::Config::Method.new list_sources_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 - 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_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 - set_mute_config = parent_rpcs.set_mute if parent_rpcs.respond_to? :set_mute - @set_mute = ::Gapic::Config::Method.new set_mute_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 - 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 - 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_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 - 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 - update_source_config = parent_rpcs.update_source if parent_rpcs.respond_to? :update_source - @update_source = ::Gapic::Config::Method.new update_source_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-v2/lib/google/cloud/security_center/v2/security_center/credentials.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/credentials.rb deleted file mode 100644 index a53a263683eb..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/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 V2 - 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-v2/lib/google/cloud/security_center/v2/security_center/operations.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/operations.rb deleted file mode 100644 index 2b55ca838dc8..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/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 V2 - 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::V2::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::V2::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::V2::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::V2::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::V2::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-v2/lib/google/cloud/security_center/v2/security_center/paths.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/paths.rb deleted file mode 100644 index 680b1675791d..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/paths.rb +++ /dev/null @@ -1,1068 +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 V2 - module SecurityCenter - # Path helper methods for the SecurityCenter API. - module Paths - ## - # Create a fully-qualified BigQueryExport resource string. - # - # @overload big_query_export_path(organization:, location:, export:) - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/bigQueryExports/{export}` - # - # @param organization [String] - # @param location [String] - # @param export [String] - # - # @overload big_query_export_path(folder:, location:, export:) - # The resource will be in the following format: - # - # `folders/{folder}/locations/{location}/bigQueryExports/{export}` - # - # @param folder [String] - # @param location [String] - # @param export [String] - # - # @overload big_query_export_path(project:, location:, export:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/bigQueryExports/{export}` - # - # @param project [String] - # @param location [String] - # @param export [String] - # - # @return [::String] - def big_query_export_path **args - resources = { - "export:location:organization" => (proc do |organization:, location:, export:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/bigQueryExports/#{export}" - end), - "export:folder:location" => (proc do |folder:, location:, export:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "folders/#{folder}/locations/#{location}/bigQueryExports/#{export}" - end), - "export:location:project" => (proc do |project:, location:, export:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/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 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(organization:, source:, location:, finding:, externalsystem:) - # The resource will be in the following format: - # - # `organizations/{organization}/sources/{source}/locations/{location}/findings/{finding}/externalSystems/{externalsystem}` - # - # @param organization [String] - # @param source [String] - # @param location [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(folder:, source:, location:, finding:, externalsystem:) - # The resource will be in the following format: - # - # `folders/{folder}/sources/{source}/locations/{location}/findings/{finding}/externalSystems/{externalsystem}` - # - # @param folder [String] - # @param source [String] - # @param location [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] - # - # @overload external_system_path(project:, source:, location:, finding:, externalsystem:) - # The resource will be in the following format: - # - # `projects/{project}/sources/{source}/locations/{location}/findings/{finding}/externalSystems/{externalsystem}` - # - # @param project [String] - # @param source [String] - # @param location [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:location:organization:source" => (proc do |organization:, source:, location:, finding:, externalsystem:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "finding cannot contain /" if finding.to_s.include? "/" - - "organizations/#{organization}/sources/#{source}/locations/#{location}/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:folder:location:source" => (proc do |folder:, source:, location:, finding:, externalsystem:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "finding cannot contain /" if finding.to_s.include? "/" - - "folders/#{folder}/sources/#{source}/locations/#{location}/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), - "externalsystem:finding:location:project:source" => (proc do |project:, source:, location:, finding:, externalsystem:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "finding cannot contain /" if finding.to_s.include? "/" - - "projects/#{project}/sources/#{source}/locations/#{location}/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(organization:, source:, location:, finding:) - # The resource will be in the following format: - # - # `organizations/{organization}/sources/{source}/locations/{location}/findings/{finding}` - # - # @param organization [String] - # @param source [String] - # @param location [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(folder:, source:, location:, finding:) - # The resource will be in the following format: - # - # `folders/{folder}/sources/{source}/locations/{location}/findings/{finding}` - # - # @param folder [String] - # @param source [String] - # @param location [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] - # - # @overload finding_path(project:, source:, location:, finding:) - # The resource will be in the following format: - # - # `projects/{project}/sources/{source}/locations/{location}/findings/{finding}` - # - # @param project [String] - # @param source [String] - # @param location [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:location:organization:source" => (proc do |organization:, source:, location:, finding:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "organizations/#{organization}/sources/#{source}/locations/#{location}/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:folder:location:source" => (proc do |folder:, source:, location:, finding:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "folders/#{folder}/sources/#{source}/locations/#{location}/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), - "finding:location:project:source" => (proc do |project:, source:, location:, finding:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/sources/#{source}/locations/#{location}/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(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:, 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(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:, 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(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), - "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:mute_config" => (proc do |folder:, mute_config:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - - "folders/#{folder}/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), - "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: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:, location:, notification_config:) - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/notificationConfigs/{notification_config}` - # - # @param organization [String] - # @param location [String] - # @param notification_config [String] - # - # @overload notification_config_path(folder:, location:, notification_config:) - # The resource will be in the following format: - # - # `folders/{folder}/locations/{location}/notificationConfigs/{notification_config}` - # - # @param folder [String] - # @param location [String] - # @param notification_config [String] - # - # @overload notification_config_path(project:, location:, notification_config:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/notificationConfigs/{notification_config}` - # - # @param project [String] - # @param location [String] - # @param notification_config [String] - # - # @return [::String] - def notification_config_path **args - resources = { - "location:notification_config:organization" => (proc do |organization:, location:, notification_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}/notificationConfigs/#{notification_config}" - end), - "folder:location:notification_config" => (proc do |folder:, location:, notification_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}/notificationConfigs/#{notification_config}" - end), - "location:notification_config:project" => (proc do |project:, location:, notification_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}/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 OrganizationValuedResource resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/simulations/{simulation}/valuedResources/{valued_resource}` - # - # @param organization [String] - # @param location [String] - # @param simulation [String] - # @param valued_resource [String] - # - # @return [::String] - def organization_valued_resource_path organization:, location:, simulation:, valued_resource: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "simulation cannot contain /" if simulation.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/simulations/#{simulation}/valuedResources/#{valued_resource}" - 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. - # - # @overload resource_value_config_path(organization:, resource_value_config:) - # The resource will be in the following format: - # - # `organizations/{organization}/resourceValueConfigs/{resource_value_config}` - # - # @param organization [String] - # @param resource_value_config [String] - # - # @overload resource_value_config_path(organization:, location:, resource_value_config:) - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/resourceValueConfigs/{resource_value_config}` - # - # @param organization [String] - # @param location [String] - # @param resource_value_config [String] - # - # @return [::String] - def resource_value_config_path **args - resources = { - "organization:resource_value_config" => (proc do |organization:, resource_value_config:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/resourceValueConfigs/#{resource_value_config}" - end), - "location:organization:resource_value_config" => (proc do |organization:, location:, resource_value_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}/resourceValueConfigs/#{resource_value_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 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(organization:, source:, location:, finding:) - # The resource will be in the following format: - # - # `organizations/{organization}/sources/{source}/locations/{location}/findings/{finding}/securityMarks` - # - # @param organization [String] - # @param source [String] - # @param location [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(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(folder:, source:, location:, finding:) - # The resource will be in the following format: - # - # `folders/{folder}/sources/{source}/locations/{location}/findings/{finding}/securityMarks` - # - # @param folder [String] - # @param source [String] - # @param location [String] - # @param finding [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(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] - # - # @overload security_marks_path(project:, source:, location:, finding:) - # The resource will be in the following format: - # - # `projects/{project}/sources/{source}/locations/{location}/findings/{finding}/securityMarks` - # - # @param project [String] - # @param source [String] - # @param location [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), - "finding:location:organization:source" => (proc do |organization:, source:, location:, finding:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "organizations/#{organization}/sources/#{source}/locations/#{location}/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), - "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:folder:location:source" => (proc do |folder:, source:, location:, finding:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "folders/#{folder}/sources/#{source}/locations/#{location}/findings/#{finding}/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: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), - "finding:location:project:source" => (proc do |project:, source:, location:, finding:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/sources/#{source}/locations/#{location}/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. - # - # @overload simulation_path(organization:, simulation:) - # The resource will be in the following format: - # - # `organizations/{organization}/simulations/{simulation}` - # - # @param organization [String] - # @param simulation [String] - # - # @overload simulation_path(organization:, location:, simluation:) - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/simulations/{simluation}` - # - # @param organization [String] - # @param location [String] - # @param simluation [String] - # - # @return [::String] - def simulation_path **args - resources = { - "organization:simulation" => (proc do |organization:, simulation:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/simulations/#{simulation}" - end), - "location:organization:simluation" => (proc do |organization:, location:, simluation:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/simulations/#{simluation}" - 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 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. - # - # @overload valued_resource_path(organization:, simulation:, valued_resource:) - # 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] - # - # @overload valued_resource_path(organization:, location:, simluation:, valued_resource:) - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/simulations/{simluation}/valuedResources/{valued_resource}` - # - # @param organization [String] - # @param location [String] - # @param simluation [String] - # @param valued_resource [String] - # - # @return [::String] - def valued_resource_path **args - resources = { - "organization:simulation:valued_resource" => (proc do |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), - "location:organization:simluation:valued_resource" => (proc do |organization:, location:, simluation:, valued_resource:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "simluation cannot contain /" if simluation.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/simulations/#{simluation}/valuedResources/#{valued_resource}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest.rb deleted file mode 100644 index f11c34c53b84..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/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/v2/version" - -require "google/cloud/security_center/v2/security_center/credentials" -require "google/cloud/security_center/v2/security_center/paths" -require "google/cloud/security_center/v2/security_center/rest/operations" -require "google/cloud/security_center/v2/security_center/rest/client" - -module Google - module Cloud - module SecurityCenter - module V2 - ## - # V2 APIs for Security Center service. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/security_center/v2/security_center/rest" - # client = ::Google::Cloud::SecurityCenter::V2::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/v2/security_center/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest/client.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest/client.rb deleted file mode 100644 index 6109ce4de572..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest/client.rb +++ /dev/null @@ -1,4395 +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/v2/securitycenter_service_pb" -require "google/cloud/security_center/v2/security_center/rest/service_stub" - -module Google - module Cloud - module SecurityCenter - module V2 - module SecurityCenter - module Rest - ## - # REST client for the SecurityCenter service. - # - # V2 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::V2::SecurityCenter::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all SecurityCenter clients - # ::Google::Cloud::SecurityCenter::V2::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", "V2"] - 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 - 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::V2::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::V2::SecurityCenter::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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 - - ## - # 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::V2::BatchCreateResourceValueConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::BatchCreateResourceValueConfigsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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 - - ## - # Kicks off an LRO to bulk mute findings for a parent based on a filter. If - # no location is specified, findings are muted in global. 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::V2::BulkMuteFindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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_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. If no - # location is specified, findings are updated in global. The following list - # shows some examples: - # - # + `organizations/[organization_id]` - # + `organizations/[organization_id]/locations/[location_id]` - # + `folders/[folder_id]` - # + `folders/[folder_id]/locations/[location_id]` - # + `projects/[project_id]` - # + `projects/[project_id]/locations/[location_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_state [::Google::Cloud::SecurityCenter::V2::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/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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 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::V2::CreateBigQueryExportRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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]/locations/[location_id]`, - # `folders/[folder_id]/locations/[location_id]`, or - # `projects/[project_id]/locations/[location_id]`. - # @param big_query_export [::Google::Cloud::SecurityCenter::V2::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::V2::BigQueryExport] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::BigQueryExport] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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 - - ## - # Creates a finding in a location. 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::V2::CreateFindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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. The following list - # shows some examples of the format: - # + - # `organizations/[organization_id]/sources/[source_id]` - # + - # `organizations/[organization_id]/sources/[source_id]/locations/[location_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::V2::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::V2::Finding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::Finding] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::CreateFindingRequest.new - # - # # Call the create_finding method. - # result = client.create_finding request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::CreateMuteConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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]/locations/[location_id]`, - # `folders/[folder_id]/locations/[location_id]`, or - # `projects/[project_id]/locations/[location_id]`. - # @param mute_config [::Google::Cloud::SecurityCenter::V2::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::V2::MuteConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::MuteConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::CreateMuteConfigRequest.new - # - # # Call the create_mute_config method. - # result = client.create_mute_config request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::CreateNotificationConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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]/locations/[location_id]`, - # `folders/[folder_id]/locations/[location_id]`, or - # `projects/[project_id]/locations/[location_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::V2::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::V2::NotificationConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::NotificationConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::CreateNotificationConfigRequest.new - # - # # Call the create_notification_config method. - # result = client.create_notification_config request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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 - - ## - # Creates a source. - # - # @overload create_source(request, options = nil) - # Pass arguments to `create_source` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::CreateSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::Source] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::Source] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::CreateSourceRequest.new - # - # # Call the create_source method. - # result = client.create_source request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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 - - ## - # 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::V2::DeleteBigQueryExportRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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. The following list - # shows some examples of the format: - # - # + - # `organizations/{organization}/locations/{location}/bigQueryExports/{export_id}` - # + `folders/{folder}/locations/{location}/bigQueryExports/{export_id}` - # + `projects/{project}/locations/{location}/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/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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 - - ## - # Deletes an existing mute config. If no location is specified, default is - # global. - # - # @overload delete_mute_config(request, options = nil) - # Pass arguments to `delete_mute_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::DeleteMuteConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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. The following list shows some - # examples of the format: - # - # + `organizations/{organization}/muteConfigs/{config_id}` - # + - # `organizations/{organization}/locations/{location}/muteConfigs/{config_id}` - # + `folders/{folder}/muteConfigs/{config_id}` - # + `folders/{folder}/locations/{location}/muteConfigs/{config_id}` - # + `projects/{project}/muteConfigs/{config_id}` - # + `projects/{project}/locations/{location}/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/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::DeleteNotificationConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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. The following list - # shows some examples of the format: - # - # + - # `organizations/[organization_id]/locations/[location_id]/notificationConfigs/[config_id]` - # + - # `folders/[folder_id]/locations/[location_id]notificationConfigs/[config_id]` - # + - # `projects/[project_id]/locations/[location_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/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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 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::V2::DeleteResourceValueConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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 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::V2::GetBigQueryExportRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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. The following list shows - # some examples of the format: - # - # + - # `organizations/{organization}/locations/{location}/bigQueryExports/{export_id}` - # + `folders/{folder}/locations/{location}/bigQueryExports/{export_id}` - # + `projects/{project}locations/{location}//bigQueryExports/{export_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V2::BigQueryExport] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::BigQueryExport] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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 - - ## - # 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::V2::GetSimulationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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::V2::Simulation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::Simulation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::GetSimulationRequest.new - # - # # Call the get_simulation method. - # result = client.get_simulation request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::GetValuedResourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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::V2::ValuedResource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::ValuedResource] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::GetValuedResourceRequest.new - # - # # Call the get_valued_resource method. - # result = client.get_valued_resource request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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 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/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::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::V2::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. If no location is specified, default is - # global. - # - # @overload get_mute_config(request, options = nil) - # Pass arguments to `get_mute_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::GetMuteConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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. The following list shows - # some examples of the format: - # - # + `organizations/{organization}/muteConfigs/{config_id}` - # + - # `organizations/{organization}/locations/{location}/muteConfigs/{config_id}` - # + `folders/{folder}/muteConfigs/{config_id}` - # + `folders/{folder}/locations/{location}/muteConfigs/{config_id}` - # + `projects/{project}/muteConfigs/{config_id}` - # + `projects/{project}/locations/{location}/muteConfigs/{config_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V2::MuteConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::MuteConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::GetMuteConfigRequest.new - # - # # Call the get_mute_config method. - # result = client.get_mute_config request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::GetNotificationConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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. The following list shows - # some examples of the format: - # - # + - # `organizations/[organization_id]/locations/[location_id]/notificationConfigs/[config_id]` - # + - # `folders/[folder_id]/locations/[location_id]/notificationConfigs/[config_id]` - # + - # `projects/[project_id]/locations/[location_id]/notificationConfigs/[config_id]` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V2::NotificationConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::NotificationConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::GetNotificationConfigRequest.new - # - # # Call the get_notification_config method. - # result = client.get_notification_config request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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 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::V2::GetResourceValueConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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::V2::ResourceValueConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::ResourceValueConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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 - - ## - # Gets a source. - # - # @overload get_source(request, options = nil) - # Pass arguments to `get_source` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::GetSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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::V2::Source] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::Source] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::GetSourceRequest.new - # - # # Call the get_source method. - # result = client.get_source request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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 or source's findings and groups them by their - # specified properties in a location. If no location is specified, findings - # are assumed to be in global - # - # To group across all sources provide a `-` as the source id. - # The following list shows some examples: - # - # + `/v2/organizations/{organization_id}/sources/-/findings` - # + - # `/v2/organizations/{organization_id}/sources/-/locations/{location_id}/findings` - # + `/v2/folders/{folder_id}/sources/-/findings` - # + `/v2/folders/{folder_id}/sources/-/locations/{location_id}/findings` - # + `/v2/projects/{project_id}/sources/-/findings` - # + `/v2/projects/{project_id}/sources/-/locations/{location_id}/findings` - # - # @overload group_findings(request, options = nil) - # Pass arguments to `group_findings` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::GroupFindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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, 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. If no location is specified, - # finding is assumed to be in global. - # The following list shows some examples: - # - # + `organizations/[organization_id]/sources/[source_id]` - # + - # `organizations/[organization_id]/sources/[source_id]/locations/[location_id]` - # + `folders/[folder_id]/sources/[source_id]` - # + `folders/[folder_id]/sources/[source_id]/locations/[location_id]` - # + `projects/[project_id]/sources/[source_id]` - # + `projects/[project_id]/sources/[source_id]/locations/[location_id]` - # - # To groupBy across all sources provide a source_id of `-`. The following - # list shows some examples: - # - # + `organizations/{organization_id}/sources/-` - # + `organizations/{organization_id}/sources/-/locations/[location_id]` - # + `folders/{folder_id}/sources/-` - # + `folders/{folder_id}/sources/-/locations/[location_id]` - # + `projects/{project_id}/sources/-` - # + `projects/{project_id}/sources/-/locations/[location_id]` - # @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 - # * 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: `=`, `:` - # * security_marks.marks: `=`, `:` - # * 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. - # The string value should follow SQL syntax: comma separated list of fields. - # For example: "parent,resource_name". - # @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::V2::GroupResult>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::GroupResult>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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 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::V2::ListAttackPathsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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::V2::AttackPath>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::AttackPath>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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 - - ## - # 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::V2::ListBigQueryExportsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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]/locations/[location_id]`, - # `folders/[folder_id]/locations/[location_id]`, or - # `projects/[project_id]/locations/[location_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::V2::BigQueryExport>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::BigQueryExport>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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 - - ## - # Lists an organization or source's findings. - # - # To list across all sources for a given location provide a `-` as the source - # id. If no location is specified, finding are assumed to be in global. - # The following list shows some examples: - # - # + `/v2/organizations/{organization_id}/sources/-/findings` - # + - # `/v2/organizations/{organization_id}/sources/-/locations/{location_id}/findings` - # - # @overload list_findings(request, options = nil) - # Pass arguments to `list_findings` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::ListFindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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, 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. If no location is - # specified, the default is global. The following list shows some examples: - # - # + `organizations/[organization_id]/sources/[source_id]` - # + - # `organizations/[organization_id]/sources/[source_id]/locations/[location_id]` - # + `folders/[folder_id]/sources/[source_id]` - # + `folders/[folder_id]/sources/[source_id]/locations/[location_id]` - # + `projects/[project_id]/sources/[source_id]` - # + `projects/[project_id]/sources/[source_id]/locations/[location_id]` - # - # To list across all sources provide a source_id of `-`. The following - # list shows some examples: - # - # + `organizations/{organization_id}/sources/-` - # + `organizations/{organization_id}/sources/-/locations/{location_id}` - # + `folders/{folder_id}/sources/-` - # + `folders/{folder_id}/sources/-locations/{location_id}` - # + `projects/{projects_id}/sources/-` - # + `projects/{projects_id}/sources/-/locations/{location_id}` - # @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 - # * 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: `=`, `:` - # * security_marks.marks: `=`, `:` - # * 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,parent". 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,parent". Redundant space characters in the - # syntax are insignificant. "name desc,parent" and " - # name desc , parent " are equivalent. - # - # The following fields are supported: - # name - # parent - # state - # category - # resource_name - # event_time - # security_marks.marks - # @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::V2::ListFindingsResponse::ListFindingsResult>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::ListFindingsResponse::ListFindingsResult>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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. If no location is specified, default is - # global. - # - # @overload list_mute_configs(request, options = nil) - # Pass arguments to `list_mute_configs` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::ListMuteConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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]`, - # `organizations/[organization_id]/locations/[location_id]`, - # `folders/[folder_id]/locations/[location_id]`, - # `projects/[project_id]/locations/[location_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::V2::MuteConfig>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::MuteConfig>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::ListNotificationConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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]/locations/[location_id]", - # "folders/[folder_id]/locations/[location_id]", or - # "projects/[project_id]/locations/[location_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::V2::NotificationConfig>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::NotificationConfig>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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 - - ## - # 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::V2::ListResourceValueConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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 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 `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::V2::ResourceValueConfig>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::ResourceValueConfig>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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 - - ## - # 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::V2::ListSourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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::V2::Source>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::Source>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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 - - ## - # 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::V2::ListValuedResourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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 exposed 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` - # - # 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::V2::ValuedResource>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::ValuedResource>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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 - - ## - # Updates the state of a finding. If no location is specified, finding is - # assumed to be in global - # - # @overload set_finding_state(request, options = nil) - # Pass arguments to `set_finding_state` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::SetFindingStateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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) - # 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. If no location is specified, finding is assumed to be in - # global. The following list shows some examples: - # - # + - # `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}` - # + - # `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` - # + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}` - # + - # `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` - # + `projects/{project_id}/sources/{source_id}/findings/{finding_id}` - # + - # `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` - # @param state [::Google::Cloud::SecurityCenter::V2::Finding::State] - # Required. The desired State of the finding. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V2::Finding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::Finding] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::SetFindingStateRequest.new - # - # # Call the set_finding_state method. - # result = client.set_finding_state request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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 - - ## - # 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/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::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::V2::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 - - ## - # Updates the mute state of a finding. If no location is specified, finding - # is assumed to be in global - # - # @overload set_mute(request, options = nil) - # Pass arguments to `set_mute` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::SetMuteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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. If no location is specified, finding is assumed to be in - # global. The following list shows some examples: - # - # + - # `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}` - # + - # `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` - # + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}` - # + - # `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` - # + `projects/{project_id}/sources/{source_id}/findings/{finding_id}` - # + - # `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` - # @param mute [::Google::Cloud::SecurityCenter::V2::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::V2::Finding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::Finding] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::SetMuteRequest.new - # - # # Call the set_mute method. - # result = client.set_mute request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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 - - ## - # 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/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::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::V2::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 - - ## - # 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::V2::UpdateBigQueryExportRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::BigQueryExport] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::BigQueryExport] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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 - - ## - # Updates external system. This is for a given finding. If no location is - # specified, finding is assumed to be in global - # - # @overload update_external_system(request, options = nil) - # Pass arguments to `update_external_system` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::UpdateExternalSystemRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::ExternalSystem] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::ExternalSystem] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::UpdateExternalSystemRequest.new - # - # # Call the update_external_system method. - # result = client.update_external_system request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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. If no location is specified, finding is - # assumed to be in global. 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::V2::UpdateFindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::Finding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::Finding] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::UpdateFindingRequest.new - # - # # Call the update_finding method. - # result = client.update_finding request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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. If no location is specified, default is - # global. - # - # @overload update_mute_config(request, options = nil) - # Pass arguments to `update_mute_config` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::UpdateMuteConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::MuteConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::MuteConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::UpdateMuteConfigRequest.new - # - # # Call the update_mute_config method. - # result = client.update_mute_config request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::UpdateNotificationConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::NotificationConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::NotificationConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::UpdateNotificationConfigRequest.new - # - # # Call the update_notification_config method. - # result = client.update_notification_config request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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 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::V2::UpdateResourceValueConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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::V2::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. - # - # To update nested fields, include the top level field in the mask - # For example, to update gcp_metadata.resource_type, include the - # "gcp_metadata" field mask - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V2::ResourceValueConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::ResourceValueConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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 - - ## - # Updates security marks. For Finding Security marks, if no location is - # specified, finding is assumed to be in global. Assets Security Marks can - # only be accessed through global endpoint. - # - # @overload update_security_marks(request, options = nil) - # Pass arguments to `update_security_marks` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::UpdateSecurityMarksRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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) - # 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::V2::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.". - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::SecurityCenter::V2::SecurityMarks] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::SecurityMarks] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::UpdateSecurityMarksRequest.new - # - # # Call the update_security_marks method. - # result = client.update_security_marks request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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 - - ## - # Updates a source. - # - # @overload update_source(request, options = nil) - # Pass arguments to `update_source` via a request object, either of type - # {::Google::Cloud::SecurityCenter::V2::UpdateSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::Source] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::Source] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/security_center/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::SecurityCenter::V2::UpdateSourceRequest.new - # - # # Call the update_source method. - # result = client.update_source request - # - # # The returned object is of type Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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 - - ## - # 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::V2::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 - # # batch_create_resource_value_configs to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.batch_create_resource_value_configs.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.batch_create_resource_value_configs.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 `batch_create_resource_value_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_create_resource_value_configs - ## - # RPC-specific configuration for `bulk_mute_findings` - # @return [::Gapic::Config::Method] - # - attr_reader :bulk_mute_findings - ## - # RPC-specific configuration for `create_big_query_export` - # @return [::Gapic::Config::Method] - # - attr_reader :create_big_query_export - ## - # 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 `create_source` - # @return [::Gapic::Config::Method] - # - attr_reader :create_source - ## - # RPC-specific configuration for `delete_big_query_export` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_big_query_export - ## - # 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_resource_value_config` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_resource_value_config - ## - # RPC-specific configuration for `get_big_query_export` - # @return [::Gapic::Config::Method] - # - attr_reader :get_big_query_export - ## - # 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_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_resource_value_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_resource_value_config - ## - # RPC-specific configuration for `get_source` - # @return [::Gapic::Config::Method] - # - attr_reader :get_source - ## - # RPC-specific configuration for `group_findings` - # @return [::Gapic::Config::Method] - # - attr_reader :group_findings - ## - # RPC-specific configuration for `list_attack_paths` - # @return [::Gapic::Config::Method] - # - attr_reader :list_attack_paths - ## - # RPC-specific configuration for `list_big_query_exports` - # @return [::Gapic::Config::Method] - # - attr_reader :list_big_query_exports - ## - # 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_resource_value_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_resource_value_configs - ## - # RPC-specific configuration for `list_sources` - # @return [::Gapic::Config::Method] - # - attr_reader :list_sources - ## - # RPC-specific configuration for `list_valued_resources` - # @return [::Gapic::Config::Method] - # - attr_reader :list_valued_resources - ## - # RPC-specific configuration for `set_finding_state` - # @return [::Gapic::Config::Method] - # - attr_reader :set_finding_state - ## - # RPC-specific configuration for `set_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :set_iam_policy - ## - # RPC-specific configuration for `set_mute` - # @return [::Gapic::Config::Method] - # - attr_reader :set_mute - ## - # RPC-specific configuration for `test_iam_permissions` - # @return [::Gapic::Config::Method] - # - attr_reader :test_iam_permissions - ## - # RPC-specific configuration for `update_big_query_export` - # @return [::Gapic::Config::Method] - # - attr_reader :update_big_query_export - ## - # 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_resource_value_config` - # @return [::Gapic::Config::Method] - # - attr_reader :update_resource_value_config - ## - # RPC-specific configuration for `update_security_marks` - # @return [::Gapic::Config::Method] - # - attr_reader :update_security_marks - ## - # RPC-specific configuration for `update_source` - # @return [::Gapic::Config::Method] - # - attr_reader :update_source - - # @private - def initialize parent_rpcs = nil - 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 - 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_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 - 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 - create_source_config = parent_rpcs.create_source if parent_rpcs.respond_to? :create_source - @create_source = ::Gapic::Config::Method.new create_source_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 - 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_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_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_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_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_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 - get_source_config = parent_rpcs.get_source if parent_rpcs.respond_to? :get_source - @get_source = ::Gapic::Config::Method.new get_source_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_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 - 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 - 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_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 - list_sources_config = parent_rpcs.list_sources if parent_rpcs.respond_to? :list_sources - @list_sources = ::Gapic::Config::Method.new list_sources_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 - 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_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 - set_mute_config = parent_rpcs.set_mute if parent_rpcs.respond_to? :set_mute - @set_mute = ::Gapic::Config::Method.new set_mute_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 - 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 - 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_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 - 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 - update_source_config = parent_rpcs.update_source if parent_rpcs.respond_to? :update_source - @update_source = ::Gapic::Config::Method.new update_source_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-v2/lib/google/cloud/security_center/v2/security_center/rest/operations.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest/operations.rb deleted file mode 100644 index 76b36a0a23ac..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/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 V2 - 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::V2::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::V2::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::V2::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::V2::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: "/v2/{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: "/v2/{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: "/v2/{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: "/v2/{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-v2/lib/google/cloud/security_center/v2/security_center/rest/service_stub.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest/service_stub.rb deleted file mode 100644 index 49be184914d1..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/security_center/rest/service_stub.rb +++ /dev/null @@ -1,3336 +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/v2/securitycenter_service_pb" - -module Google - module Cloud - module SecurityCenter - module V2 - 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 batch_create_resource_value_configs REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::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::V2::BatchCreateResourceValueConfigsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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 bulk_mute_findings REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::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_big_query_export REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::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::V2::BigQueryExport] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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 create_finding REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::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::V2::Finding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::MuteConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::NotificationConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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 create_source REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::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::V2::Source] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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 delete_big_query_export REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::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 delete_mute_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::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::V2::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_resource_value_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::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_big_query_export REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::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::V2::BigQueryExport] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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_simulation REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::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::V2::Simulation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::ValuedResource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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_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::V2::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::V2::MuteConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::NotificationConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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_resource_value_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::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::V2::ResourceValueConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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 get_source REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::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::V2::Source] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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_findings REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::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::V2::GroupFindingsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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_attack_paths REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::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::V2::ListAttackPathsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::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::V2::ListAttackPathsResponse.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::V2::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::V2::ListBigQueryExportsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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 list_findings REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::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::V2::ListFindingsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::ListMuteConfigsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::ListNotificationConfigsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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_resource_value_configs REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::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::V2::ListResourceValueConfigsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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 list_sources REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::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::V2::ListSourcesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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 list_valued_resources REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::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::V2::ListValuedResourcesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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 set_finding_state REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::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::V2::Finding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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 set_mute REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::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::V2::Finding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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 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 update_big_query_export REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::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::V2::BigQueryExport] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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 update_external_system REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::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::V2::ExternalSystem] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::Finding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::MuteConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::NotificationConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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_resource_value_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::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::V2::ResourceValueConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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 update_security_marks REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::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::V2::SecurityMarks] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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 update_source REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::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::V2::Source] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::SecurityCenter::V2::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::V2::Source.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 batch_create_resource_value_configs REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::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: "/v2/{parent}/resourceValueConfigs:batchCreate", - body: "*", - matches: [ - ["parent", %r{^organizations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/resourceValueConfigs:batchCreate", - body: "*", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the bulk_mute_findings REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::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: "/v2/{parent}/findings:bulkMute", - body: "*", - matches: [ - ["parent", %r{^organizations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/findings:bulkMute", - body: "*", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/findings:bulkMute", - body: "*", - matches: [ - ["parent", %r{^folders/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/findings:bulkMute", - body: "*", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/findings:bulkMute", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/findings:bulkMute", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, 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::V2::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: "/v2/{parent}/bigQueryExports", - body: "big_query_export", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/bigQueryExports", - body: "big_query_export", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/bigQueryExports", - body: "big_query_export", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_finding REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::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: "/v2/{parent}/findings", - body: "finding", - matches: [ - ["parent", %r{^organizations/[^/]+/sources/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{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::V2::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: "/v2/{parent}/muteConfigs", - body: "mute_config", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/muteConfigs", - body: "mute_config", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/muteConfigs", - body: "mute_config", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/muteConfigs", - body: "mute_config", - matches: [ - ["parent", %r{^organizations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/muteConfigs", - body: "mute_config", - matches: [ - ["parent", %r{^folders/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/muteConfigs", - body: "mute_config", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_notification_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::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: "/v2/{parent}/notificationConfigs", - body: "notification_config", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/notificationConfigs", - body: "notification_config", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/notificationConfigs", - body: "notification_config", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_source REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::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: "/v2/{parent}/sources", - body: "source", - matches: [ - ["parent", %r{^organizations/[^/]+/?$}, 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::V2::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: "/v2/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/bigQueryExports/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/bigQueryExports/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/bigQueryExports/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_mute_config REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::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: "/v2/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^folders/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v2/{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::V2::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: "/v2/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/notificationConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/notificationConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/notificationConfigs/[^/]+/?$}, 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::V2::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: "/v2/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/resourceValueConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/resourceValueConfigs/[^/]+/?$}, 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::V2::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: "/v2/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/bigQueryExports/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/bigQueryExports/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/bigQueryExports/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_simulation REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::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: "/v2/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/simulations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/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::V2::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: "/v2/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/simulations/[^/]+/valuedResources/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/simulations/[^/]+/valuedResources/[^/]+/?$}, 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: "/v2/{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::V2::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: "/v2/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^folders/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{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::V2::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: "/v2/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/notificationConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/notificationConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/notificationConfigs/[^/]+/?$}, 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::V2::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: "/v2/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/resourceValueConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/resourceValueConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_source REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::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: "/v2/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the group_findings REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::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: "/v2/{parent}/findings:group", - body: "*", - matches: [ - ["parent", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/findings:group", - body: "*", - matches: [ - ["parent", %r{^organizations/[^/]+/sources/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/findings:group", - body: "*", - matches: [ - ["parent", %r{^folders/[^/]+/sources/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/findings:group", - body: "*", - matches: [ - ["parent", %r{^folders/[^/]+/sources/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/findings:group", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/sources/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/findings:group", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/sources/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_attack_paths REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::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: "/v2/{parent}/attackPaths", - matches: [ - ["parent", %r{^organizations/[^/]+/simulations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/attackPaths", - matches: [ - ["parent", %r{^organizations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/attackPaths", - matches: [ - ["parent", %r{^organizations/[^/]+/simulations/[^/]+/valuedResources/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/attackPaths", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/simulations/[^/]+/valuedResources/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/attackPaths", - matches: [ - ["parent", %r{^organizations/[^/]+/simulations/[^/]+/attackExposureResults/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/attackPaths", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/simulations/[^/]+/attackExposureResults/[^/]+/?$}, 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::V2::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: "/v2/{parent}/bigQueryExports", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/bigQueryExports", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/bigQueryExports", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_findings REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::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: "/v2/{parent}/findings", - matches: [ - ["parent", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/findings", - matches: [ - ["parent", %r{^organizations/[^/]+/sources/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/findings", - matches: [ - ["parent", %r{^folders/[^/]+/sources/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/findings", - matches: [ - ["parent", %r{^folders/[^/]+/sources/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/findings", - matches: [ - ["parent", %r{^projects/[^/]+/sources/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/findings", - matches: [ - ["parent", %r{^projects/[^/]+/sources/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_mute_configs REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::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: "/v2/{parent}/muteConfigs", - matches: [ - ["parent", %r{^organizations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/muteConfigs", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/muteConfigs", - matches: [ - ["parent", %r{^folders/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/muteConfigs", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/muteConfigs", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/muteConfigs", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_notification_configs REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::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: "/v2/{parent}/notificationConfigs", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/notificationConfigs", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/notificationConfigs", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, 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::V2::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: "/v2/{parent}/resourceValueConfigs", - matches: [ - ["parent", %r{^organizations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/resourceValueConfigs", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_sources REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::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: "/v2/{parent}/sources", - matches: [ - ["parent", %r{^organizations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/sources", - matches: [ - ["parent", %r{^folders/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/sources", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_valued_resources REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::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: "/v2/{parent}/valuedResources", - matches: [ - ["parent", %r{^organizations/[^/]+/simulations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/valuedResources", - matches: [ - ["parent", %r{^organizations/[^/]+/simulations/[^/]+/attackExposureResults/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/valuedResources", - 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::V2::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: "/v2/{name}:setState", - body: "*", - matches: [ - ["name", %r{^organizations/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{name}:setState", - body: "*", - matches: [ - ["name", %r{^organizations/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{name}:setState", - body: "*", - matches: [ - ["name", %r{^folders/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{name}:setState", - body: "*", - matches: [ - ["name", %r{^folders/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{name}:setState", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{name}:setState", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/sources/[^/]+/locations/[^/]+/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: "/v2/{resource}:setIamPolicy", - body: "*", - matches: [ - ["resource", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the set_mute REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::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: "/v2/{name}:setMute", - body: "*", - matches: [ - ["name", %r{^organizations/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{name}:setMute", - body: "*", - matches: [ - ["name", %r{^organizations/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{name}:setMute", - body: "*", - matches: [ - ["name", %r{^folders/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{name}:setMute", - body: "*", - matches: [ - ["name", %r{^folders/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{name}:setMute", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v2/{name}:setMute", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/?$}, 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: "/v2/{resource}:testIamPermissions", - body: "*", - matches: [ - ["resource", %r{^organizations/[^/]+/sources/[^/]+/?$}, 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::V2::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: "/v2/{big_query_export.name}", - body: "big_query_export", - matches: [ - ["big_query_export.name", %r{^organizations/[^/]+/locations/[^/]+/bigQueryExports/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{big_query_export.name}", - body: "big_query_export", - matches: [ - ["big_query_export.name", %r{^folders/[^/]+/locations/[^/]+/bigQueryExports/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{big_query_export.name}", - body: "big_query_export", - matches: [ - ["big_query_export.name", %r{^projects/[^/]+/locations/[^/]+/bigQueryExports/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_external_system REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::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: "/v2/{external_system.name}", - body: "external_system", - matches: [ - ["external_system.name", %r{^organizations/[^/]+/sources/[^/]+/findings/[^/]+/externalSystems/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{external_system.name}", - body: "external_system", - matches: [ - ["external_system.name", %r{^organizations/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/externalSystems/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{external_system.name}", - body: "external_system", - matches: [ - ["external_system.name", %r{^folders/[^/]+/sources/[^/]+/findings/[^/]+/externalSystems/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{external_system.name}", - body: "external_system", - matches: [ - ["external_system.name", %r{^folders/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/externalSystems/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{external_system.name}", - body: "external_system", - matches: [ - ["external_system.name", %r{^projects/[^/]+/sources/[^/]+/findings/[^/]+/externalSystems/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{external_system.name}", - body: "external_system", - matches: [ - ["external_system.name", %r{^projects/[^/]+/sources/[^/]+/locations/[^/]+/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::V2::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: "/v2/{finding.name}", - body: "finding", - matches: [ - ["finding.name", %r{^organizations/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{finding.name}", - body: "finding", - matches: [ - ["finding.name", %r{^organizations/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{finding.name}", - body: "finding", - matches: [ - ["finding.name", %r{^folders/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{finding.name}", - body: "finding", - matches: [ - ["finding.name", %r{^folders/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{finding.name}", - body: "finding", - matches: [ - ["finding.name", %r{^projects/[^/]+/sources/[^/]+/findings/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{finding.name}", - body: "finding", - matches: [ - ["finding.name", %r{^projects/[^/]+/sources/[^/]+/locations/[^/]+/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::V2::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: "/v2/{mute_config.name}", - body: "mute_config", - matches: [ - ["mute_config.name", %r{^organizations/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{mute_config.name}", - body: "mute_config", - matches: [ - ["mute_config.name", %r{^organizations/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{mute_config.name}", - body: "mute_config", - matches: [ - ["mute_config.name", %r{^folders/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{mute_config.name}", - body: "mute_config", - matches: [ - ["mute_config.name", %r{^folders/[^/]+/locations/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{mute_config.name}", - body: "mute_config", - matches: [ - ["mute_config.name", %r{^projects/[^/]+/muteConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{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::V2::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: "/v2/{notification_config.name}", - body: "notification_config", - matches: [ - ["notification_config.name", %r{^organizations/[^/]+/locations/[^/]+/notificationConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{notification_config.name}", - body: "notification_config", - matches: [ - ["notification_config.name", %r{^folders/[^/]+/locations/[^/]+/notificationConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{notification_config.name}", - body: "notification_config", - matches: [ - ["notification_config.name", %r{^projects/[^/]+/locations/[^/]+/notificationConfigs/[^/]+/?$}, 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::V2::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: "/v2/{resource_value_config.name}", - body: "resource_value_config", - matches: [ - ["resource_value_config.name", %r{^organizations/[^/]+/resourceValueConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{resource_value_config.name}", - body: "resource_value_config", - matches: [ - ["resource_value_config.name", %r{^organizations/[^/]+/locations/[^/]+/resourceValueConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_security_marks REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::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: "/v2/{security_marks.name}", - body: "security_marks", - matches: [ - ["security_marks.name", %r{^organizations/[^/]+/sources/[^/]+/findings/[^/]+/securityMarks/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{security_marks.name}", - body: "security_marks", - matches: [ - ["security_marks.name", %r{^organizations/[^/]+/assets/[^/]+/securityMarks/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{security_marks.name}", - body: "security_marks", - matches: [ - ["security_marks.name", %r{^organizations/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/securityMarks/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{security_marks.name}", - body: "security_marks", - matches: [ - ["security_marks.name", %r{^folders/[^/]+/sources/[^/]+/findings/[^/]+/securityMarks/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{security_marks.name}", - body: "security_marks", - matches: [ - ["security_marks.name", %r{^folders/[^/]+/assets/[^/]+/securityMarks/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{security_marks.name}", - body: "security_marks", - matches: [ - ["security_marks.name", %r{^folders/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/securityMarks/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{security_marks.name}", - body: "security_marks", - matches: [ - ["security_marks.name", %r{^projects/[^/]+/sources/[^/]+/findings/[^/]+/securityMarks/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{security_marks.name}", - body: "security_marks", - matches: [ - ["security_marks.name", %r{^projects/[^/]+/assets/[^/]+/securityMarks/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{security_marks.name}", - body: "security_marks", - matches: [ - ["security_marks.name", %r{^projects/[^/]+/sources/[^/]+/locations/[^/]+/findings/[^/]+/securityMarks/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_source REST call - # - # @param request_pb [::Google::Cloud::SecurityCenter::V2::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: "/v2/{source.name}", - body: "source", - matches: [ - ["source.name", %r{^organizations/[^/]+/sources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/version.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/version.rb deleted file mode 100644 index 543e0946f0de..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/security_center/v2/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 V2 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/access_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/access_pb.rb deleted file mode 100644 index 626f8a57d25d..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/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/v2/access.proto - -require 'google/protobuf' - - -descriptor_data = "\n+google/cloud/securitycenter/v2/access.proto\x12\x1egoogle.cloud.securitycenter.v2\"\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.v2.Geolocation\x12\x19\n\x11user_agent_family\x18\x04 \x01(\t\x12\x12\n\nuser_agent\x18\x05 \x01(\t\x12\x14\n\x0cservice_name\x18\x06 \x01(\t\x12\x13\n\x0bmethod_name\x18\x07 \x01(\t\x12\x19\n\x11principal_subject\x18\x08 \x01(\t\x12 \n\x18service_account_key_name\x18\t \x01(\t\x12\x65\n\x1fservice_account_delegation_info\x18\n \x03(\x0b\x32<.google.cloud.securitycenter.v2.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.v2B\x0b\x41\x63\x63\x65ssProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - Access = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Access").msgclass - ServiceAccountDelegationInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ServiceAccountDelegationInfo").msgclass - Geolocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Geolocation").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/affected_resources_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/affected_resources_pb.rb deleted file mode 100644 index b2ded5cca4eb..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/affected_resources_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/v2/affected_resources.proto - -require 'google/protobuf' - - -descriptor_data = "\n7google/cloud/securitycenter/v2/affected_resources.proto\x12\x1egoogle.cloud.securitycenter.v2\"\"\n\x11\x41\x66\x66\x65\x63tedResources\x12\r\n\x05\x63ount\x18\x01 \x01(\x03\x42\xf0\x01\n\"com.google.cloud.securitycenter.v2B\x16\x41\x66\x66\x65\x63tedResourcesProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - AffectedResources = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AffectedResources").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/ai_model_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/ai_model_pb.rb deleted file mode 100644 index e0d357ddd795..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/ai_model_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/v2/ai_model.proto - -require 'google/protobuf' - - -descriptor_data = "\n-google/cloud/securitycenter/v2/ai_model.proto\x12\x1egoogle.cloud.securitycenter.v2\"\xbe\x02\n\x07\x41iModel\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0e\n\x06\x64omain\x18\x02 \x01(\t\x12\x0f\n\x07library\x18\x03 \x01(\t\x12\x10\n\x08location\x18\x04 \x01(\t\x12\x11\n\tpublisher\x18\x05 \x01(\t\x12W\n\x13\x64\x65ployment_platform\x18\x06 \x01(\x0e\x32:.google.cloud.securitycenter.v2.AiModel.DeploymentPlatform\x12\x14\n\x0c\x64isplay_name\x18\x07 \x01(\t\"p\n\x12\x44\x65ploymentPlatform\x12#\n\x1f\x44\x45PLOYMENT_PLATFORM_UNSPECIFIED\x10\x00\x12\r\n\tVERTEX_AI\x10\x01\x12\x07\n\x03GKE\x10\x02\x12\x07\n\x03GCE\x10\x03\x12\x14\n\x10\x46INE_TUNED_MODEL\x10\x04\x42\xe6\x01\n\"com.google.cloud.securitycenter.v2B\x0c\x41iModelProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - AiModel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AiModel").msgclass - AiModel::DeploymentPlatform = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AiModel.DeploymentPlatform").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/application_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/application_pb.rb deleted file mode 100644 index 3adcac6a59b9..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/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/v2/application.proto - -require 'google/protobuf' - - -descriptor_data = "\n0google/cloud/securitycenter/v2/application.proto\x12\x1egoogle.cloud.securitycenter.v2\"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.v2B\x10\x41pplicationProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - Application = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Application").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/attack_exposure_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/attack_exposure_pb.rb deleted file mode 100644 index 2455e60ba1f7..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/attack_exposure_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/v2/attack_exposure.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n4google/cloud/securitycenter/v2/attack_exposure.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x8f\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\x12H\n\x05state\x18\x04 \x01(\x0e\x32\x34.google.cloud.securitycenter.v2.AttackExposure.StateB\x03\xe0\x41\x03\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.v2B\x13\x41ttackExposureProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - AttackExposure = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AttackExposure").msgclass - AttackExposure::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AttackExposure.State").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/attack_path_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/attack_path_pb.rb deleted file mode 100644 index 29d28dc5bf3c..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/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/v2/attack_path.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' - - -descriptor_data = "\n0google/cloud/securitycenter/v2/attack_path.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x19google/api/resource.proto\"\xf0\n\n\nAttackPath\x12\x0c\n\x04name\x18\x01 \x01(\t\x12M\n\npath_nodes\x18\x02 \x03(\x0b\x32\x39.google.cloud.securitycenter.v2.AttackPath.AttackPathNode\x12H\n\x05\x65\x64ges\x18\x03 \x03(\x0b\x32\x39.google.cloud.securitycenter.v2.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.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding\x12\x0c\n\x04uuid\x18\x05 \x01(\t\x12^\n\x0c\x61ttack_steps\x18\x06 \x03(\x0b\x32H.google.cloud.securitycenter.v2.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.v2.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.v2.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:\xc3\x02\xea\x41\xbf\x02\n(securitycenter.googleapis.com/AttackPath\x12qorganizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}/attackPaths/{attack_path}\x12\x86\x01organizations/{organization}/locations/{location}/simulations/{simulation}/valuedResources/{valued_resource}/attackPaths/{attack_path}*\x0b\x61ttackPaths2\nattackPathB\xe9\x01\n\"com.google.cloud.securitycenter.v2B\x0f\x41ttackPathProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - AttackPath = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AttackPath").msgclass - AttackPath::AttackPathNode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AttackPath.AttackPathNode").msgclass - AttackPath::AttackPathNode::PathNodeAssociatedFinding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AttackPath.AttackPathNode.PathNodeAssociatedFinding").msgclass - AttackPath::AttackPathNode::AttackStepNode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AttackPath.AttackPathNode.AttackStepNode").msgclass - AttackPath::AttackPathNode::NodeType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AttackPath.AttackPathNode.NodeType").enummodule - AttackPath::AttackPathEdge = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AttackPath.AttackPathEdge").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/backup_disaster_recovery_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/backup_disaster_recovery_pb.rb deleted file mode 100644 index 1d0185074970..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/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/v2/backup_disaster_recovery.proto - -require 'google/protobuf' - -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n=google/cloud/securitycenter/v2/backup_disaster_recovery.proto\x12\x1egoogle.cloud.securitycenter.v2\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.v2B\x1b\x42\x61\x63kupDisasterRecoveryProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - BackupDisasterRecovery = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.BackupDisasterRecovery").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/bigquery_export_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/bigquery_export_pb.rb deleted file mode 100644 index c0ea27ff0b00..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/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/v2/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/v2/bigquery_export.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa2\x04\n\x0e\x42igQueryExport\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\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:\xa1\x02\xea\x41\x9d\x02\n,securitycenter.googleapis.com/BigQueryExport\x12Jorganizations/{organization}/locations/{location}/bigQueryExports/{export}\x12>folders/{folder}/locations/{location}/bigQueryExports/{export}\x12@projects/{project}/locations/{location}/bigQueryExports/{export}*\x0f\x62igQueryExports2\x0e\x62igQueryExportB\xed\x01\n\"com.google.cloud.securitycenter.v2B\x13\x42igQueryExportProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - BigQueryExport = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.BigQueryExport").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/chokepoint_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/chokepoint_pb.rb deleted file mode 100644 index 077e14997c90..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/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/v2/chokepoint.proto - -require 'google/protobuf' - - -descriptor_data = "\n/google/cloud/securitycenter/v2/chokepoint.proto\x12\x1egoogle.cloud.securitycenter.v2\"&\n\nChokepoint\x12\x18\n\x10related_findings\x18\x01 \x03(\tB\xe9\x01\n\"com.google.cloud.securitycenter.v2B\x0f\x43hokepointProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - Chokepoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Chokepoint").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/cloud_armor_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/cloud_armor_pb.rb deleted file mode 100644 index 6cd7e16d09a3..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/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/v2/cloud_armor.proto - -require 'google/protobuf' - -require 'google/protobuf/duration_pb' - - -descriptor_data = "\n0google/cloud/securitycenter/v2/cloud_armor.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1egoogle/protobuf/duration.proto\"\xde\x02\n\nCloudArmor\x12G\n\x0fsecurity_policy\x18\x01 \x01(\x0b\x32..google.cloud.securitycenter.v2.SecurityPolicy\x12:\n\x08requests\x18\x02 \x01(\x0b\x32(.google.cloud.securitycenter.v2.Requests\x12O\n\x13\x61\x64\x61ptive_protection\x18\x03 \x01(\x0b\x32\x32.google.cloud.securitycenter.v2.AdaptiveProtection\x12\x36\n\x06\x61ttack\x18\x04 \x01(\x0b\x32&.google.cloud.securitycenter.v2.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\"\x82\x01\n\x06\x41ttack\x12\x17\n\x0fvolume_pps_long\x18\x04 \x01(\x03\x12\x17\n\x0fvolume_bps_long\x18\x05 \x01(\x03\x12\x16\n\x0e\x63lassification\x18\x03 \x01(\t\x12\x16\n\nvolume_pps\x18\x01 \x01(\x05\x42\x02\x18\x01\x12\x16\n\nvolume_bps\x18\x02 \x01(\x05\x42\x02\x18\x01\x42\xe9\x01\n\"com.google.cloud.securitycenter.v2B\x0f\x43loudArmorProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - CloudArmor = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.CloudArmor").msgclass - SecurityPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.SecurityPolicy").msgclass - Requests = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Requests").msgclass - AdaptiveProtection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AdaptiveProtection").msgclass - Attack = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Attack").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/cloud_dlp_data_profile_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/cloud_dlp_data_profile_pb.rb deleted file mode 100644 index 388023feb3f9..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/cloud_dlp_data_profile_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/v2/cloud_dlp_data_profile.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' - - -descriptor_data = "\n;google/cloud/securitycenter/v2/cloud_dlp_data_profile.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x19google/api/resource.proto\"\xf4\x01\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.v2.CloudDlpDataProfile.ParentType\"H\n\nParentType\x12\x1b\n\x17PARENT_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0cORGANIZATION\x10\x01\x12\x0b\n\x07PROJECT\x10\x02\x42\x94\x03\n\"com.google.cloud.securitycenter.v2B\x18\x43loudDlpDataProfileProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2\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 V2 - CloudDlpDataProfile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.CloudDlpDataProfile").msgclass - CloudDlpDataProfile::ParentType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.CloudDlpDataProfile.ParentType").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/cloud_dlp_inspection_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/cloud_dlp_inspection_pb.rb deleted file mode 100644 index 98b7cb9b4a86..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/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/v2/cloud_dlp_inspection.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' - - -descriptor_data = "\n9google/cloud/securitycenter/v2/cloud_dlp_inspection.proto\x12\x1egoogle.cloud.securitycenter.v2\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.v2B\x17\x43loudDlpInspectionProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2\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 V2 - CloudDlpInspection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.CloudDlpInspection").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/compliance_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/compliance_pb.rb deleted file mode 100644 index 547a8fe23d36..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/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/v2/compliance.proto - -require 'google/protobuf' - - -descriptor_data = "\n/google/cloud/securitycenter/v2/compliance.proto\x12\x1egoogle.cloud.securitycenter.v2\"<\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.v2B\x0f\x43omplianceProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - Compliance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Compliance").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/connection_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/connection_pb.rb deleted file mode 100644 index b0144d4d939a..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/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/v2/connection.proto - -require 'google/protobuf' - - -descriptor_data = "\n/google/cloud/securitycenter/v2/connection.proto\x12\x1egoogle.cloud.securitycenter.v2\"\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.v2.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.v2B\x0f\x43onnectionProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - Connection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Connection").msgclass - Connection::Protocol = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Connection.Protocol").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/contact_details_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/contact_details_pb.rb deleted file mode 100644 index 06a5286cc3de..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/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/v2/contact_details.proto - -require 'google/protobuf' - - -descriptor_data = "\n4google/cloud/securitycenter/v2/contact_details.proto\x12\x1egoogle.cloud.securitycenter.v2\"K\n\x0e\x43ontactDetails\x12\x39\n\x08\x63ontacts\x18\x01 \x03(\x0b\x32\'.google.cloud.securitycenter.v2.Contact\"\x18\n\x07\x43ontact\x12\r\n\x05\x65mail\x18\x01 \x01(\tB\xed\x01\n\"com.google.cloud.securitycenter.v2B\x13\x43ontactDetailsProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - ContactDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ContactDetails").msgclass - Contact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Contact").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/container_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/container_pb.rb deleted file mode 100644 index 14bc2a2bab9f..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/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/v2/container.proto - -require 'google/protobuf' - -require 'google/cloud/securitycenter/v2/label_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n.google/cloud/securitycenter/v2/container.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a*google/cloud/securitycenter/v2/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.v2.Label\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\xe8\x01\n\"com.google.cloud.securitycenter.v2B\x0e\x43ontainerProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - Container = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Container").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/data_access_event_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/data_access_event_pb.rb deleted file mode 100644 index 77d3859aa987..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/data_access_event_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/v2/data_access_event.proto - -require 'google/protobuf' - -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n6google/cloud/securitycenter/v2/data_access_event.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/protobuf/timestamp.proto\"\x80\x02\n\x0f\x44\x61taAccessEvent\x12\x10\n\x08\x65vent_id\x18\x01 \x01(\t\x12\x17\n\x0fprincipal_email\x18\x02 \x01(\t\x12L\n\toperation\x18\x03 \x01(\x0e\x32\x39.google.cloud.securitycenter.v2.DataAccessEvent.Operation\x12.\n\nevent_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"D\n\tOperation\x12\x19\n\x15OPERATION_UNSPECIFIED\x10\x00\x12\x08\n\x04READ\x10\x01\x12\x08\n\x04MOVE\x10\x02\x12\x08\n\x04\x43OPY\x10\x03\x42\xee\x01\n\"com.google.cloud.securitycenter.v2B\x14\x44\x61taAccessEventProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - DataAccessEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.DataAccessEvent").msgclass - DataAccessEvent::Operation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.DataAccessEvent.Operation").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/data_flow_event_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/data_flow_event_pb.rb deleted file mode 100644 index 418d09d93c4a..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/data_flow_event_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/v2/data_flow_event.proto - -require 'google/protobuf' - -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n4google/cloud/securitycenter/v2/data_flow_event.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/protobuf/timestamp.proto\"\x97\x02\n\rDataFlowEvent\x12\x10\n\x08\x65vent_id\x18\x01 \x01(\t\x12\x17\n\x0fprincipal_email\x18\x02 \x01(\t\x12J\n\toperation\x18\x03 \x01(\x0e\x32\x37.google.cloud.securitycenter.v2.DataFlowEvent.Operation\x12\x19\n\x11violated_location\x18\x04 \x01(\t\x12.\n\nevent_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"D\n\tOperation\x12\x19\n\x15OPERATION_UNSPECIFIED\x10\x00\x12\x08\n\x04READ\x10\x01\x12\x08\n\x04MOVE\x10\x02\x12\x08\n\x04\x43OPY\x10\x03\x42\xec\x01\n\"com.google.cloud.securitycenter.v2B\x12\x44\x61taFlowEventProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - DataFlowEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.DataFlowEvent").msgclass - DataFlowEvent::Operation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.DataFlowEvent.Operation").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/data_retention_deletion_event_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/data_retention_deletion_event_pb.rb deleted file mode 100644 index 17693433fba7..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/data_retention_deletion_event_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/v2/data_retention_deletion_event.proto - -require 'google/protobuf' - -require 'google/protobuf/duration_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\nBgoogle/cloud/securitycenter/v2/data_retention_deletion_event.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xcf\x02\n\x1a\x44\x61taRetentionDeletionEvent\x12\x38\n\x14\x65vent_detection_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x19\n\x11\x64\x61ta_object_count\x18\x03 \x01(\x03\x12\x38\n\x15max_retention_allowed\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12X\n\nevent_type\x18\x05 \x01(\x0e\x32\x44.google.cloud.securitycenter.v2.DataRetentionDeletionEvent.EventType\"H\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\x1f\n\x1b\x45VENT_TYPE_MAX_TTL_EXCEEDED\x10\x01\x42\xf9\x01\n\"com.google.cloud.securitycenter.v2B\x1f\x44\x61taRetentionDeletionEventProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - DataRetentionDeletionEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.DataRetentionDeletionEvent").msgclass - DataRetentionDeletionEvent::EventType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.DataRetentionDeletionEvent.EventType").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/database_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/database_pb.rb deleted file mode 100644 index 32310070d4bc..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/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/v2/database.proto - -require 'google/protobuf' - - -descriptor_data = "\n-google/cloud/securitycenter/v2/database.proto\x12\x1egoogle.cloud.securitycenter.v2\"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.v2B\rDatabaseProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - Database = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Database").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/disk_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/disk_pb.rb deleted file mode 100644 index a62acf2da0c4..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/disk_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/v2/disk.proto - -require 'google/protobuf' - - -descriptor_data = "\n)google/cloud/securitycenter/v2/disk.proto\x12\x1egoogle.cloud.securitycenter.v2\"\x14\n\x04\x44isk\x12\x0c\n\x04name\x18\x01 \x01(\tB\xe3\x01\n\"com.google.cloud.securitycenter.v2B\tDiskProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - Disk = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Disk").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/exfiltration_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/exfiltration_pb.rb deleted file mode 100644 index 4e217d9041f6..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/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/v2/exfiltration.proto - -require 'google/protobuf' - - -descriptor_data = "\n1google/cloud/securitycenter/v2/exfiltration.proto\x12\x1egoogle.cloud.securitycenter.v2\"\xaf\x01\n\x0c\x45xfiltration\x12>\n\x07sources\x18\x01 \x03(\x0b\x32-.google.cloud.securitycenter.v2.ExfilResource\x12>\n\x07targets\x18\x02 \x03(\x0b\x32-.google.cloud.securitycenter.v2.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.v2B\x11\x45xfiltrationProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - Exfiltration = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Exfiltration").msgclass - ExfilResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ExfilResource").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/external_system_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/external_system_pb.rb deleted file mode 100644 index 684f53455eeb..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/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/v2/external_system.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n4google/cloud/securitycenter/v2/external_system.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd4\t\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.v2.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:\x97\x05\xea\x41\x93\x05\n,securitycenter.googleapis.com/ExternalSystem\x12\x61organizations/{organization}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}\x12vorganizations/{organization}/sources/{source}/locations/{location}/findings/{finding}/externalSystems/{externalsystem}\x12Ufolders/{folder}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}\x12jfolders/{folder}/sources/{source}/locations/{location}/findings/{finding}/externalSystems/{externalsystem}\x12Wprojects/{project}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}\x12lprojects/{project}/sources/{source}/locations/{location}/findings/{finding}/externalSystems/{externalsystem}B\xed\x01\n\"com.google.cloud.securitycenter.v2B\x13\x45xternalSystemProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - ExternalSystem = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ExternalSystem").msgclass - ExternalSystem::TicketInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ExternalSystem.TicketInfo").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/file_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/file_pb.rb deleted file mode 100644 index 3004389fa02c..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/file_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/v2/file.proto - -require 'google/protobuf' - - -descriptor_data = "\n)google/cloud/securitycenter/v2/file.proto\x12\x1egoogle.cloud.securitycenter.v2\"\x83\x04\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.v2.File.DiskPath\x12\x46\n\noperations\x18\x08 \x03(\x0b\x32\x32.google.cloud.securitycenter.v2.File.FileOperation\x1a\x39\n\x08\x44iskPath\x12\x16\n\x0epartition_uuid\x18\x01 \x01(\t\x12\x15\n\rrelative_path\x18\x02 \x01(\t\x1a\xc8\x01\n\rFileOperation\x12N\n\x04type\x18\x01 \x01(\x0e\x32@.google.cloud.securitycenter.v2.File.FileOperation.OperationType\"g\n\rOperationType\x12\x1e\n\x1aOPERATION_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04OPEN\x10\x01\x12\x08\n\x04READ\x10\x02\x12\n\n\x06RENAME\x10\x03\x12\t\n\x05WRITE\x10\x04\x12\x0b\n\x07\x45XECUTE\x10\x05\x42\xe3\x01\n\"com.google.cloud.securitycenter.v2B\tFileProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - File = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.File").msgclass - File::DiskPath = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.File.DiskPath").msgclass - File::FileOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.File.FileOperation").msgclass - File::FileOperation::OperationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.File.FileOperation.OperationType").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/finding_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/finding_pb.rb deleted file mode 100644 index 8dc9f5c367d6..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/finding_pb.rb +++ /dev/null @@ -1,77 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v2/finding.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/securitycenter/v2/access_pb' -require 'google/cloud/securitycenter/v2/affected_resources_pb' -require 'google/cloud/securitycenter/v2/agent_pb' -require 'google/cloud/securitycenter/v2/agent_anomaly_pb' -require 'google/cloud/securitycenter/v2/agent_session_pb' -require 'google/cloud/securitycenter/v2/ai_model_pb' -require 'google/cloud/securitycenter/v2/application_pb' -require 'google/cloud/securitycenter/v2/attack_exposure_pb' -require 'google/cloud/securitycenter/v2/backup_disaster_recovery_pb' -require 'google/cloud/securitycenter/v2/chokepoint_pb' -require 'google/cloud/securitycenter/v2/cloud_armor_pb' -require 'google/cloud/securitycenter/v2/cloud_dlp_data_profile_pb' -require 'google/cloud/securitycenter/v2/cloud_dlp_inspection_pb' -require 'google/cloud/securitycenter/v2/compliance_pb' -require 'google/cloud/securitycenter/v2/connection_pb' -require 'google/cloud/securitycenter/v2/contact_details_pb' -require 'google/cloud/securitycenter/v2/container_pb' -require 'google/cloud/securitycenter/v2/data_access_event_pb' -require 'google/cloud/securitycenter/v2/data_flow_event_pb' -require 'google/cloud/securitycenter/v2/data_retention_deletion_event_pb' -require 'google/cloud/securitycenter/v2/database_pb' -require 'google/cloud/securitycenter/v2/disk_pb' -require 'google/cloud/securitycenter/v2/exfiltration_pb' -require 'google/cloud/securitycenter/v2/external_system_pb' -require 'google/cloud/securitycenter/v2/file_pb' -require 'google/cloud/securitycenter/v2/group_membership_pb' -require 'google/cloud/securitycenter/v2/iam_binding_pb' -require 'google/cloud/securitycenter/v2/indicator_pb' -require 'google/cloud/securitycenter/v2/ip_rules_pb' -require 'google/cloud/securitycenter/v2/job_pb' -require 'google/cloud/securitycenter/v2/kernel_rootkit_pb' -require 'google/cloud/securitycenter/v2/kubernetes_pb' -require 'google/cloud/securitycenter/v2/load_balancer_pb' -require 'google/cloud/securitycenter/v2/log_entry_pb' -require 'google/cloud/securitycenter/v2/mitre_attack_pb' -require 'google/cloud/securitycenter/v2/network_pb' -require 'google/cloud/securitycenter/v2/notebook_pb' -require 'google/cloud/securitycenter/v2/org_policy_pb' -require 'google/cloud/securitycenter/v2/process_pb' -require 'google/cloud/securitycenter/v2/security_marks_pb' -require 'google/cloud/securitycenter/v2/security_posture_pb' -require 'google/cloud/securitycenter/v2/toxic_combination_pb' -require 'google/cloud/securitycenter/v2/vertex_ai_pb' -require 'google/cloud/securitycenter/v2/vulnerability_pb' -require 'google/protobuf/struct_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n,google/cloud/securitycenter/v2/finding.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a+google/cloud/securitycenter/v2/access.proto\x1a\x37google/cloud/securitycenter/v2/affected_resources.proto\x1a*google/cloud/securitycenter/v2/agent.proto\x1a\x32google/cloud/securitycenter/v2/agent_anomaly.proto\x1a\x32google/cloud/securitycenter/v2/agent_session.proto\x1a-google/cloud/securitycenter/v2/ai_model.proto\x1a\x30google/cloud/securitycenter/v2/application.proto\x1a\x34google/cloud/securitycenter/v2/attack_exposure.proto\x1a=google/cloud/securitycenter/v2/backup_disaster_recovery.proto\x1a/google/cloud/securitycenter/v2/chokepoint.proto\x1a\x30google/cloud/securitycenter/v2/cloud_armor.proto\x1a;google/cloud/securitycenter/v2/cloud_dlp_data_profile.proto\x1a\x39google/cloud/securitycenter/v2/cloud_dlp_inspection.proto\x1a/google/cloud/securitycenter/v2/compliance.proto\x1a/google/cloud/securitycenter/v2/connection.proto\x1a\x34google/cloud/securitycenter/v2/contact_details.proto\x1a.google/cloud/securitycenter/v2/container.proto\x1a\x36google/cloud/securitycenter/v2/data_access_event.proto\x1a\x34google/cloud/securitycenter/v2/data_flow_event.proto\x1a\x42google/cloud/securitycenter/v2/data_retention_deletion_event.proto\x1a-google/cloud/securitycenter/v2/database.proto\x1a)google/cloud/securitycenter/v2/disk.proto\x1a\x31google/cloud/securitycenter/v2/exfiltration.proto\x1a\x34google/cloud/securitycenter/v2/external_system.proto\x1a)google/cloud/securitycenter/v2/file.proto\x1a\x35google/cloud/securitycenter/v2/group_membership.proto\x1a\x30google/cloud/securitycenter/v2/iam_binding.proto\x1a.google/cloud/securitycenter/v2/indicator.proto\x1a-google/cloud/securitycenter/v2/ip_rules.proto\x1a(google/cloud/securitycenter/v2/job.proto\x1a\x33google/cloud/securitycenter/v2/kernel_rootkit.proto\x1a/google/cloud/securitycenter/v2/kubernetes.proto\x1a\x32google/cloud/securitycenter/v2/load_balancer.proto\x1a.google/cloud/securitycenter/v2/log_entry.proto\x1a\x31google/cloud/securitycenter/v2/mitre_attack.proto\x1a,google/cloud/securitycenter/v2/network.proto\x1a-google/cloud/securitycenter/v2/notebook.proto\x1a/google/cloud/securitycenter/v2/org_policy.proto\x1a,google/cloud/securitycenter/v2/process.proto\x1a\x33google/cloud/securitycenter/v2/security_marks.proto\x1a\x35google/cloud/securitycenter/v2/security_posture.proto\x1a\x36google/cloud/securitycenter/v2/toxic_combination.proto\x1a.google/cloud/securitycenter/v2/vertex_ai.proto\x1a\x32google/cloud/securitycenter/v2/vulnerability.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xdf*\n\x07\x46inding\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1b\n\x0e\x63\x61nonical_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x0e\n\x06parent\x18\x03 \x01(\t\x12\x1a\n\rresource_name\x18\x04 \x01(\tB\x03\xe0\x41\x05\x12\x41\n\x05state\x18\x06 \x01(\x0e\x32-.google.cloud.securitycenter.v2.Finding.StateB\x03\xe0\x41\x03\x12\x15\n\x08\x63\x61tegory\x18\x07 \x01(\tB\x03\xe0\x41\x05\x12\x14\n\x0c\x65xternal_uri\x18\x08 \x01(\t\x12X\n\x11source_properties\x18\t \x03(\x0b\x32=.google.cloud.securitycenter.v2.Finding.SourcePropertiesEntry\x12J\n\x0esecurity_marks\x18\n \x01(\x0b\x32-.google.cloud.securitycenter.v2.SecurityMarksB\x03\xe0\x41\x03\x12.\n\nevent_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x0b\x63reate_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x42\n\x08severity\x18\x0e \x01(\x0e\x32\x30.google.cloud.securitycenter.v2.Finding.Severity\x12:\n\x04mute\x18\x0f \x01(\x0e\x32,.google.cloud.securitycenter.v2.Finding.Mute\x12H\n\tmute_info\x18\x35 \x01(\x0b\x32\x30.google.cloud.securitycenter.v2.Finding.MuteInfoB\x03\xe0\x41\x03\x12K\n\rfinding_class\x18\x10 \x01(\x0e\x32\x34.google.cloud.securitycenter.v2.Finding.FindingClass\x12<\n\tindicator\x18\x11 \x01(\x0b\x32).google.cloud.securitycenter.v2.Indicator\x12\x44\n\rvulnerability\x18\x12 \x01(\x0b\x32-.google.cloud.securitycenter.v2.Vulnerability\x12\x39\n\x10mute_update_time\x18\x13 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12[\n\x10\x65xternal_systems\x18\x14 \x03(\x0b\x32<.google.cloud.securitycenter.v2.Finding.ExternalSystemsEntryB\x03\xe0\x41\x03\x12\x41\n\x0cmitre_attack\x18\x15 \x01(\x0b\x32+.google.cloud.securitycenter.v2.MitreAttack\x12\x36\n\x06\x61\x63\x63\x65ss\x18\x16 \x01(\x0b\x32&.google.cloud.securitycenter.v2.Access\x12?\n\x0b\x63onnections\x18\x17 \x03(\x0b\x32*.google.cloud.securitycenter.v2.Connection\x12\x16\n\x0emute_initiator\x18\x18 \x01(\t\x12:\n\tprocesses\x18\x19 \x03(\x0b\x32\'.google.cloud.securitycenter.v2.Process\x12L\n\x08\x63ontacts\x18\x1a \x03(\x0b\x32\x35.google.cloud.securitycenter.v2.Finding.ContactsEntryB\x03\xe0\x41\x03\x12?\n\x0b\x63ompliances\x18\x1b \x03(\x0b\x32*.google.cloud.securitycenter.v2.Compliance\x12 \n\x13parent_display_name\x18\x1d \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x0b\x64\x65scription\x18\x1e \x01(\t\x12\x42\n\x0c\x65xfiltration\x18\x1f \x01(\x0b\x32,.google.cloud.securitycenter.v2.Exfiltration\x12@\n\x0ciam_bindings\x18 \x03(\x0b\x32*.google.cloud.securitycenter.v2.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.v2.Container\x12>\n\nkubernetes\x18$ \x01(\x0b\x32*.google.cloud.securitycenter.v2.Kubernetes\x12:\n\x08\x64\x61tabase\x18% \x01(\x0b\x32(.google.cloud.securitycenter.v2.Database\x12G\n\x0f\x61ttack_exposure\x18& \x01(\x0b\x32..google.cloud.securitycenter.v2.AttackExposure\x12\x33\n\x05\x66iles\x18\' \x03(\x0b\x32$.google.cloud.securitycenter.v2.File\x12P\n\x14\x63loud_dlp_inspection\x18( \x01(\x0b\x32\x32.google.cloud.securitycenter.v2.CloudDlpInspection\x12S\n\x16\x63loud_dlp_data_profile\x18) \x01(\x0b\x32\x33.google.cloud.securitycenter.v2.CloudDlpDataProfile\x12\x45\n\x0ekernel_rootkit\x18* \x01(\x0b\x32-.google.cloud.securitycenter.v2.KernelRootkit\x12?\n\x0corg_policies\x18+ \x03(\x0b\x32).google.cloud.securitycenter.v2.OrgPolicy\x12\x30\n\x03job\x18, \x01(\x0b\x32#.google.cloud.securitycenter.v2.Job\x12@\n\x0b\x61pplication\x18- \x01(\x0b\x32+.google.cloud.securitycenter.v2.Application\x12\x39\n\x08ip_rules\x18. \x01(\x0b\x32\'.google.cloud.securitycenter.v2.IpRules\x12X\n\x18\x62\x61\x63kup_disaster_recovery\x18/ \x01(\x0b\x32\x36.google.cloud.securitycenter.v2.BackupDisasterRecovery\x12I\n\x10security_posture\x18\x30 \x01(\x0b\x32/.google.cloud.securitycenter.v2.SecurityPosture\x12=\n\x0blog_entries\x18\x31 \x03(\x0b\x32(.google.cloud.securitycenter.v2.LogEntry\x12\x44\n\x0eload_balancers\x18\x32 \x03(\x0b\x32,.google.cloud.securitycenter.v2.LoadBalancer\x12?\n\x0b\x63loud_armor\x18\x33 \x01(\x0b\x32*.google.cloud.securitycenter.v2.CloudArmor\x12:\n\x08notebook\x18\x37 \x01(\x0b\x32(.google.cloud.securitycenter.v2.Notebook\x12K\n\x11toxic_combination\x18\x38 \x01(\x0b\x32\x30.google.cloud.securitycenter.v2.ToxicCombination\x12J\n\x11group_memberships\x18\x39 \x03(\x0b\x32/.google.cloud.securitycenter.v2.GroupMembership\x12\x32\n\x04\x64isk\x18: \x01(\x0b\x32$.google.cloud.securitycenter.v2.Disk\x12K\n\x12\x64\x61ta_access_events\x18= \x03(\x0b\x32/.google.cloud.securitycenter.v2.DataAccessEvent\x12G\n\x10\x64\x61ta_flow_events\x18> \x03(\x0b\x32-.google.cloud.securitycenter.v2.DataFlowEvent\x12\x39\n\x08networks\x18? \x03(\x0b\x32\'.google.cloud.securitycenter.v2.Network\x12\x62\n\x1e\x64\x61ta_retention_deletion_events\x18@ \x03(\x0b\x32:.google.cloud.securitycenter.v2.DataRetentionDeletionEvent\x12M\n\x12\x61\x66\x66\x65\x63ted_resources\x18\x41 \x01(\x0b\x32\x31.google.cloud.securitycenter.v2.AffectedResources\x12\x39\n\x08\x61i_model\x18\x42 \x01(\x0b\x32\'.google.cloud.securitycenter.v2.AiModel\x12>\n\nchokepoint\x18\x45 \x01(\x0b\x32*.google.cloud.securitycenter.v2.Chokepoint\x12;\n\tvertex_ai\x18H \x01(\x0b\x32(.google.cloud.securitycenter.v2.VertexAi\x12\x34\n\x05\x61gent\x18Q \x01(\x0b\x32%.google.cloud.securitycenter.v2.Agent\x12\x44\n\x0e\x61gent_sessions\x18R \x03(\x0b\x32,.google.cloud.securitycenter.v2.AgentSession\x12\x43\n\ragent_anomaly\x18S \x01(\x0b\x32,.google.cloud.securitycenter.v2.AgentAnomaly\x1a\x93\x03\n\x08MuteInfo\x12P\n\x0bstatic_mute\x18\x01 \x01(\x0b\x32;.google.cloud.securitycenter.v2.Finding.MuteInfo.StaticMute\x12`\n\x14\x64ynamic_mute_records\x18\x02 \x03(\x0b\x32\x42.google.cloud.securitycenter.v2.Finding.MuteInfo.DynamicMuteRecord\x1ay\n\nStaticMute\x12;\n\x05state\x18\x01 \x01(\x0e\x32,.google.cloud.securitycenter.v2.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.v2.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.v2.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\x03\"\xd9\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:\xdd\x03\xea\x41\xd9\x03\n%securitycenter.googleapis.com/Finding\x12@organizations/{organization}/sources/{source}/findings/{finding}\x12Uorganizations/{organization}/sources/{source}/locations/{location}/findings/{finding}\x12\x34\x66olders/{folder}/sources/{source}/findings/{finding}\x12Ifolders/{folder}/sources/{source}/locations/{location}/findings/{finding}\x12\x36projects/{project}/sources/{source}/findings/{finding}\x12Kprojects/{project}/sources/{source}/locations/{location}/findings/{finding}*\x08\x66indings2\x07\x66indingB\xe6\x01\n\"com.google.cloud.securitycenter.v2B\x0c\x46indingProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - Finding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Finding").msgclass - Finding::MuteInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Finding.MuteInfo").msgclass - Finding::MuteInfo::StaticMute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Finding.MuteInfo.StaticMute").msgclass - Finding::MuteInfo::DynamicMuteRecord = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Finding.MuteInfo.DynamicMuteRecord").msgclass - Finding::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Finding.State").enummodule - Finding::Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Finding.Severity").enummodule - Finding::Mute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Finding.Mute").enummodule - Finding::FindingClass = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Finding.FindingClass").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/folder_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/folder_pb.rb deleted file mode 100644 index fe84677148ee..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/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/v2/folder.proto - -require 'google/protobuf' - - -descriptor_data = "\n+google/cloud/securitycenter/v2/folder.proto\x12\x1egoogle.cloud.securitycenter.v2\"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.v2B\x0b\x46olderProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - Folder = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Folder").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/group_membership_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/group_membership_pb.rb deleted file mode 100644 index 9f419b9c2065..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/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/v2/group_membership.proto - -require 'google/protobuf' - - -descriptor_data = "\n5google/cloud/securitycenter/v2/group_membership.proto\x12\x1egoogle.cloud.securitycenter.v2\"\xd8\x01\n\x0fGroupMembership\x12M\n\ngroup_type\x18\x01 \x01(\x0e\x32\x39.google.cloud.securitycenter.v2.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.v2B\x14GroupMembershipProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - GroupMembership = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.GroupMembership").msgclass - GroupMembership::GroupType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.GroupMembership.GroupType").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/iam_binding_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/iam_binding_pb.rb deleted file mode 100644 index 16a3bb17f83a..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/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/v2/iam_binding.proto - -require 'google/protobuf' - - -descriptor_data = "\n0google/cloud/securitycenter/v2/iam_binding.proto\x12\x1egoogle.cloud.securitycenter.v2\"\xa4\x01\n\nIamBinding\x12\x41\n\x06\x61\x63tion\x18\x01 \x01(\x0e\x32\x31.google.cloud.securitycenter.v2.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.v2B\x0fIamBindingProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - IamBinding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.IamBinding").msgclass - IamBinding::Action = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.IamBinding.Action").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/indicator_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/indicator_pb.rb deleted file mode 100644 index ed506ac1a11d..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/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/v2/indicator.proto - -require 'google/protobuf' - - -descriptor_data = "\n.google/cloud/securitycenter/v2/indicator.proto\x12\x1egoogle.cloud.securitycenter.v2\"\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.v2.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.v2.Indicator.ProcessSignature.MemoryHashSignatureH\x00\x12k\n\x13yara_rule_signature\x18\x07 \x01(\x0b\x32L.google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignatureH\x00\x12`\n\x0esignature_type\x18\x08 \x01(\x0e\x32H.google.cloud.securitycenter.v2.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.v2.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.v2B\x0eIndicatorProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - Indicator = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Indicator").msgclass - Indicator::ProcessSignature = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Indicator.ProcessSignature").msgclass - Indicator::ProcessSignature::MemoryHashSignature = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature").msgclass - Indicator::ProcessSignature::MemoryHashSignature::Detection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Indicator.ProcessSignature.MemoryHashSignature.Detection").msgclass - Indicator::ProcessSignature::YaraRuleSignature = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Indicator.ProcessSignature.YaraRuleSignature").msgclass - Indicator::ProcessSignature::SignatureType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Indicator.ProcessSignature.SignatureType").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/ip_rules_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/ip_rules_pb.rb deleted file mode 100644 index b6597fce0c8c..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/ip_rules_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/v2/ip_rules.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' - - -descriptor_data = "\n-google/cloud/securitycenter/v2/ip_rules.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/api/field_behavior.proto\"\xe2\x02\n\x07IpRules\x12\x44\n\tdirection\x18\x01 \x01(\x0e\x32\x31.google.cloud.securitycenter.v2.IpRules.Direction\x12:\n\x07\x61llowed\x18\x02 \x01(\x0b\x32\'.google.cloud.securitycenter.v2.AllowedH\x00\x12\x38\n\x06\x64\x65nied\x18\x03 \x01(\x0b\x32&.google.cloud.securitycenter.v2.DeniedH\x00\x12\x18\n\x10source_ip_ranges\x18\x04 \x03(\t\x12\x1d\n\x15\x64\x65stination_ip_ranges\x18\x05 \x03(\t\x12\x18\n\x10\x65xposed_services\x18\x06 \x03(\t\"?\n\tDirection\x12\x19\n\x15\x44IRECTION_UNSPECIFIED\x10\x00\x12\x0b\n\x07INGRESS\x10\x01\x12\n\n\x06\x45GRESS\x10\x02\x42\x07\n\x05rules\"\x8d\x01\n\x06IpRule\x12\x10\n\x08protocol\x18\x01 \x01(\t\x12J\n\x0bport_ranges\x18\x02 \x03(\x0b\x32\x30.google.cloud.securitycenter.v2.IpRule.PortRangeB\x03\xe0\x41\x01\x1a%\n\tPortRange\x12\x0b\n\x03min\x18\x01 \x01(\x03\x12\x0b\n\x03max\x18\x02 \x01(\x03\"H\n\x07\x41llowed\x12=\n\x08ip_rules\x18\x01 \x03(\x0b\x32&.google.cloud.securitycenter.v2.IpRuleB\x03\xe0\x41\x01\"G\n\x06\x44\x65nied\x12=\n\x08ip_rules\x18\x01 \x03(\x0b\x32&.google.cloud.securitycenter.v2.IpRuleB\x03\xe0\x41\x01\x42\xe6\x01\n\"com.google.cloud.securitycenter.v2B\x0cIpRulesProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - IpRules = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.IpRules").msgclass - IpRules::Direction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.IpRules.Direction").enummodule - IpRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.IpRule").msgclass - IpRule::PortRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.IpRule.PortRange").msgclass - Allowed = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Allowed").msgclass - Denied = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Denied").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/job_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/job_pb.rb deleted file mode 100644 index c079059f9826..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/job_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/v2/job.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' - - -descriptor_data = "\n(google/cloud/securitycenter/v2/job.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/api/field_behavior.proto\"w\n\x03Job\x12\x0c\n\x04name\x18\x01 \x01(\t\x12<\n\x05state\x18\x02 \x01(\x0e\x32(.google.cloud.securitycenter.v2.JobStateB\x03\xe0\x41\x03\x12\x12\n\nerror_code\x18\x03 \x01(\x05\x12\x10\n\x08location\x18\x04 \x01(\t*Z\n\x08JobState\x12\x19\n\x15JOB_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\r\n\tSUCCEEDED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\x42\xe2\x01\n\"com.google.cloud.securitycenter.v2B\x08JobProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - Job = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Job").msgclass - JobState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.JobState").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/kernel_rootkit_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/kernel_rootkit_pb.rb deleted file mode 100644 index eba594bf469d..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/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/v2/kernel_rootkit.proto - -require 'google/protobuf' - - -descriptor_data = "\n3google/cloud/securitycenter/v2/kernel_rootkit.proto\x12\x1egoogle.cloud.securitycenter.v2\"\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.v2B\x12KernelRootkitProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - KernelRootkit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.KernelRootkit").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/kubernetes_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/kubernetes_pb.rb deleted file mode 100644 index 2f1bf77bd0f6..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/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/v2/kubernetes.proto - -require 'google/protobuf' - -require 'google/cloud/securitycenter/v2/container_pb' -require 'google/cloud/securitycenter/v2/label_pb' - - -descriptor_data = "\n/google/cloud/securitycenter/v2/kubernetes.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a.google/cloud/securitycenter/v2/container.proto\x1a*google/cloud/securitycenter/v2/label.proto\"\x82\x0c\n\nKubernetes\x12<\n\x04pods\x18\x01 \x03(\x0b\x32..google.cloud.securitycenter.v2.Kubernetes.Pod\x12>\n\x05nodes\x18\x02 \x03(\x0b\x32/.google.cloud.securitycenter.v2.Kubernetes.Node\x12G\n\nnode_pools\x18\x03 \x03(\x0b\x32\x33.google.cloud.securitycenter.v2.Kubernetes.NodePool\x12>\n\x05roles\x18\x04 \x03(\x0b\x32/.google.cloud.securitycenter.v2.Kubernetes.Role\x12\x44\n\x08\x62indings\x18\x05 \x03(\x0b\x32\x32.google.cloud.securitycenter.v2.Kubernetes.Binding\x12O\n\x0e\x61\x63\x63\x65ss_reviews\x18\x06 \x03(\x0b\x32\x37.google.cloud.securitycenter.v2.Kubernetes.AccessReview\x12\x42\n\x07objects\x18\x07 \x03(\x0b\x32\x31.google.cloud.securitycenter.v2.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.v2.Label\x12=\n\ncontainers\x18\x04 \x03(\x0b\x32).google.cloud.securitycenter.v2.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.v2.Kubernetes.Node\x1a\x9e\x01\n\x04Role\x12\x42\n\x04kind\x18\x01 \x01(\x0e\x32\x34.google.cloud.securitycenter.v2.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.v2.Kubernetes.Role\x12\x44\n\x08subjects\x18\x04 \x03(\x0b\x32\x32.google.cloud.securitycenter.v2.Kubernetes.Subject\x1a\xbe\x01\n\x07Subject\x12I\n\x04kind\x18\x01 \x01(\x0e\x32;.google.cloud.securitycenter.v2.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.v2.ContainerB\xe9\x01\n\"com.google.cloud.securitycenter.v2B\x0fKubernetesProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - Kubernetes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Kubernetes").msgclass - Kubernetes::Pod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Kubernetes.Pod").msgclass - Kubernetes::Node = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Kubernetes.Node").msgclass - Kubernetes::NodePool = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Kubernetes.NodePool").msgclass - Kubernetes::Role = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Kubernetes.Role").msgclass - Kubernetes::Role::Kind = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Kubernetes.Role.Kind").enummodule - Kubernetes::Binding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Kubernetes.Binding").msgclass - Kubernetes::Subject = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Kubernetes.Subject").msgclass - Kubernetes::Subject::AuthType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Kubernetes.Subject.AuthType").enummodule - Kubernetes::AccessReview = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Kubernetes.AccessReview").msgclass - Kubernetes::Object = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Kubernetes.Object").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/label_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/label_pb.rb deleted file mode 100644 index 3cdb278899ec..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/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/v2/label.proto - -require 'google/protobuf' - - -descriptor_data = "\n*google/cloud/securitycenter/v2/label.proto\x12\x1egoogle.cloud.securitycenter.v2\"$\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.v2B\nLabelProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - Label = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Label").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/load_balancer_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/load_balancer_pb.rb deleted file mode 100644 index b23d3a4cfd9f..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/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/v2/load_balancer.proto - -require 'google/protobuf' - - -descriptor_data = "\n2google/cloud/securitycenter/v2/load_balancer.proto\x12\x1egoogle.cloud.securitycenter.v2\"\x1c\n\x0cLoadBalancer\x12\x0c\n\x04name\x18\x01 \x01(\tB\xeb\x01\n\"com.google.cloud.securitycenter.v2B\x11LoadBalancerProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - LoadBalancer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.LoadBalancer").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/log_entry_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/log_entry_pb.rb deleted file mode 100644 index b3704ddc1826..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/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/v2/log_entry.proto - -require 'google/protobuf' - -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n.google/cloud/securitycenter/v2/log_entry.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/protobuf/timestamp.proto\"i\n\x08LogEntry\x12P\n\x13\x63loud_logging_entry\x18\x01 \x01(\x0b\x32\x31.google.cloud.securitycenter.v2.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.v2B\rLogEntryProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - LogEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.LogEntry").msgclass - CloudLoggingEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.CloudLoggingEntry").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/mitre_attack_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/mitre_attack_pb.rb deleted file mode 100644 index 08d45bd18d1a..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/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/v2/mitre_attack.proto - -require 'google/protobuf' - - -descriptor_data = "\n1google/cloud/securitycenter/v2/mitre_attack.proto\x12\x1egoogle.cloud.securitycenter.v2\"\xca%\n\x0bMitreAttack\x12J\n\x0eprimary_tactic\x18\x01 \x01(\x0e\x32\x32.google.cloud.securitycenter.v2.MitreAttack.Tactic\x12Q\n\x12primary_techniques\x18\x02 \x03(\x0e\x32\x35.google.cloud.securitycenter.v2.MitreAttack.Technique\x12N\n\x12\x61\x64\x64itional_tactics\x18\x03 \x03(\x0e\x32\x32.google.cloud.securitycenter.v2.MitreAttack.Tactic\x12T\n\x15\x61\x64\x64itional_techniques\x18\x04 \x03(\x0e\x32\x35.google.cloud.securitycenter.v2.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\"\xad \n\tTechnique\x12\x19\n\x15TECHNIQUE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x44\x41TA_OBFUSCATION\x10\x46\x12\"\n\x1e\x44\x41TA_OBFUSCATION_STEGANOGRAPHY\x10G\x12\x19\n\x15OS_CREDENTIAL_DUMPING\x10r\x12)\n%OS_CREDENTIAL_DUMPING_PROC_FILESYSTEM\x10s\x12\x35\n1OS_CREDENTIAL_DUMPING_ETC_PASSWORD_AND_ETC_SHADOW\x10z\x12\x1a\n\x16\x44\x41TA_FROM_LOCAL_SYSTEM\x10u\x12\x1a\n\x16\x41UTOMATED_EXFILTRATION\x10\x44\x12\x1c\n\x18OBFUSCATED_FILES_OR_INFO\x10H\x12\x11\n\rSTEGANOGRAPHY\x10I\x12\x1a\n\x16\x43OMPILE_AFTER_DELIVERY\x10J\x12\x17\n\x13\x43OMMAND_OBFUSCATION\x10K\x12\x16\n\x12SCHEDULED_TRANSFER\x10x\x12\x1f\n\x1bSYSTEM_OWNER_USER_DISCOVERY\x10v\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\x16\n\x12SCHEDULED_TASK_JOB\x10Y\x12\x1b\n\x17SCHEDULED_TASK_JOB_CRON\x10w\x12\x1f\n\x1b\x43ONTAINER_ORCHESTRATION_JOB\x10Z\x12\x15\n\x11PROCESS_INJECTION\x10]\x12\x11\n\rINPUT_CAPTURE\x10g\x12\x1c\n\x18INPUT_CAPTURE_KEYLOGGING\x10h\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\x15\n\x11INDICATOR_REMOVAL\x10{\x12\x34\n0INDICATOR_REMOVAL_CLEAR_LINUX_OR_MAC_SYSTEM_LOGS\x10|\x12+\n\'INDICATOR_REMOVAL_CLEAR_COMMAND_HISTORY\x10}\x12#\n\x1fINDICATOR_REMOVAL_FILE_DELETION\x10@\x12 \n\x1bINDICATOR_REMOVAL_TIMESTOMP\x10\x80\x01\x12(\n$INDICATOR_REMOVAL_CLEAR_MAILBOX_DATA\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 \n\x1c\x46ILE_AND_DIRECTORY_DISCOVERY\x10y\x12#\n\x1f\x41\x43\x43OUNT_DISCOVERY_LOCAL_ACCOUNT\x10t\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\x1a\n\x16\x41\x44\x44ITIONAL_CLOUD_ROLES\x10\x43\x12\x17\n\x13SSH_AUTHORIZED_KEYS\x10\x17\x12&\n\"ADDITIONAL_CONTAINER_CLUSTER_ROLES\x10:\x12\x18\n\x14MULTI_STAGE_CHANNELS\x10L\x12\x19\n\x15INGRESS_TOOL_TRANSFER\x10\x03\x12\x0e\n\nNATIVE_API\x10\x04\x12\x0f\n\x0b\x42RUTE_FORCE\x10,\x12\x18\n\x14\x41UTOMATED_COLLECTION\x10^\x12\x12\n\x0eSHARED_MODULES\x10\x05\x12\x11\n\rDATA_ENCODING\x10M\x12\x15\n\x11STANDARD_ENCODING\x10N\x12\x1d\n\x19\x41\x43\x43\x45SS_TOKEN_MANIPULATION\x10!\x12 \n\x1cTOKEN_IMPERSONATION_OR_THEFT\x10\'\x12\x12\n\x0e\x43REATE_ACCOUNT\x10O\x12\x11\n\rLOCAL_ACCOUNT\x10P\x12$\n DEOBFUSCATE_DECODE_FILES_OR_INFO\x10_\x12%\n!EXPLOIT_PUBLIC_FACING_APPLICATION\x10\x1b\x12\x1c\n\x17SUPPLY_CHAIN_COMPROMISE\x10\x81\x01\x12;\n6COMPROMISE_SOFTWARE_DEPENDENCIES_AND_DEVELOPMENT_TOOLS\x10\x82\x01\x12&\n!EXPLOITATION_FOR_CLIENT_EXECUTION\x10\x86\x01\x12\x12\n\x0eUSER_EXECUTION\x10\x45\x12>\n9LINUX_AND_MAC_FILE_AND_DIRECTORY_PERMISSIONS_MODIFICATION\x10\x87\x01\x12\x1e\n\x1a\x44OMAIN_POLICY_MODIFICATION\x10\x1e\x12\x14\n\x10\x44\x41TA_DESTRUCTION\x10\x1d\x12\x1e\n\x19\x44\x41TA_ENCRYPTED_FOR_IMPACT\x10\x84\x01\x12\x10\n\x0cSERVICE_STOP\x10\x34\x12\x1b\n\x17INHIBIT_SYSTEM_RECOVERY\x10$\x12\x17\n\x13\x46IRMWARE_CORRUPTION\x10Q\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\"\n\x1eTRANSFER_DATA_TO_CLOUD_ACCOUNT\x10[\x12\x1c\n\x18STEAL_WEB_SESSION_COOKIE\x10\x19\x12#\n\x1f\x43REATE_OR_MODIFY_SYSTEM_PROCESS\x10\x18\x12\x1d\n\x19\x45VENT_TRIGGERED_EXECUTION\x10\x41\x12%\n!BOOT_OR_LOGON_AUTOSTART_EXECUTION\x10R\x12!\n\x1dKERNEL_MODULES_AND_EXTENSIONS\x10S\x12\x19\n\x15SHORTCUT_MODIFICATION\x10\x7f\x12%\n!ABUSE_ELEVATION_CONTROL_MECHANISM\x10\"\x12\x38\n3ABUSE_ELEVATION_CONTROL_MECHANISM_SETUID_AND_SETGID\x10\x88\x01\x12;\n7ABUSE_ELEVATION_CONTROL_MECHANISM_SUDO_AND_SUDO_CACHING\x10m\x12\x19\n\x15UNSECURED_CREDENTIALS\x10\r\x12\x18\n\x14\x43REDENTIALS_IN_FILES\x10i\x12\x10\n\x0c\x42\x41SH_HISTORY\x10`\x12\x10\n\x0cPRIVATE_KEYS\x10\x61\x12\x19\n\x15SUBVERT_TRUST_CONTROL\x10j\x12\x1c\n\x18INSTALL_ROOT_CERTIFICATE\x10k\x12#\n\x1f\x43OMPROMISE_HOST_SOFTWARE_BINARY\x10T\x12$\n CREDENTIALS_FROM_PASSWORD_STORES\x10\x62\x12!\n\x1dMODIFY_AUTHENTICATION_PROCESS\x10\x1c\x12$\n PLUGGABLE_AUTHENTICATION_MODULES\x10l\x12 \n\x1bMULTI_FACTOR_AUTHENTICATION\x10\x89\x01\x12\x13\n\x0fIMPAIR_DEFENSES\x10\x1f\x12\x1b\n\x17\x44ISABLE_OR_MODIFY_TOOLS\x10\x37\x12\x16\n\x12INDICATOR_BLOCKING\x10n\x12(\n$DISABLE_OR_MODIFY_LINUX_AUDIT_SYSTEM\x10o\x12\x12\n\x0eHIDE_ARTIFACTS\x10U\x12 \n\x1cHIDDEN_FILES_AND_DIRECTORIES\x10V\x12\x10\n\x0cHIDDEN_USERS\x10W\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\x19\n\x15HIJACK_EXECUTION_FLOW\x10p\x12\x32\n.HIJACK_EXECUTION_FLOW_DYNAMIC_LINKER_HIJACKING\x10q\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\x18\n\x14\x44\x45VELOP_CAPABILITIES\x10\x63\x12 \n\x1c\x44\x45VELOP_CAPABILITIES_MALWARE\x10\x64\x12\x17\n\x13OBTAIN_CAPABILITIES\x10+\x12\x1f\n\x1bOBTAIN_CAPABILITIES_MALWARE\x10\x65\x12(\n#OBTAIN_CAPABILITIES_VULNERABILITIES\x10\x85\x01\x12\x13\n\x0f\x41\x43TIVE_SCANNING\x10\x01\x12\x16\n\x12SCANNING_IP_BLOCKS\x10\x02\x12\x16\n\x12STAGE_CAPABILITIES\x10X\x12\x12\n\x0eUPLOAD_MALWARE\x10\x66\x12$\n CONTAINER_ADMINISTRATION_COMMAND\x10<\x12\x14\n\x10\x44\x45PLOY_CONTAINER\x10\x42\x12\x12\n\x0e\x45SCAPE_TO_HOST\x10=\x12$\n CONTAINER_AND_RESOURCE_DISCOVERY\x10\x39\x12\x1b\n\x17REFLECTIVE_CODE_LOADING\x10\\\x12.\n*STEAL_OR_FORGE_AUTHENTICATION_CERTIFICATES\x10>\x12\x14\n\x0f\x46INANCIAL_THEFT\x10\x83\x01\x42\xea\x01\n\"com.google.cloud.securitycenter.v2B\x10MitreAttackProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - MitreAttack = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.MitreAttack").msgclass - MitreAttack::Tactic = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.MitreAttack.Tactic").enummodule - MitreAttack::Technique = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.MitreAttack.Technique").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/mute_config_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/mute_config_pb.rb deleted file mode 100644 index 1fa427767438..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/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/v2/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/v2/mute_config.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd4\x06\n\nMuteConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x13\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1f\n\x12most_recent_editor\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12L\n\x04type\x18\x08 \x01(\x0e\x32\x39.google.cloud.securitycenter.v2.MuteConfig.MuteConfigTypeB\x03\xe0\x41\x02\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}\x12Korganizations/{organization}/locations/{location}/muteConfigs/{mute_config}\x12*folders/{folder}/muteConfigs/{mute_config}\x12?folders/{folder}/locations/{location}/muteConfigs/{mute_config}\x12,projects/{project}/muteConfigs/{mute_config}\x12\x41projects/{project}/locations/{location}/muteConfigs/{mute_config}*\x0bmuteConfigs2\nmuteConfigB\xe9\x01\n\"com.google.cloud.securitycenter.v2B\x0fMuteConfigProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - MuteConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.MuteConfig").msgclass - MuteConfig::MuteConfigType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.MuteConfig.MuteConfigType").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/network_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/network_pb.rb deleted file mode 100644 index b3adfa3e0d12..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/network_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/v2/network.proto - -require 'google/protobuf' - - -descriptor_data = "\n,google/cloud/securitycenter/v2/network.proto\x12\x1egoogle.cloud.securitycenter.v2\"\x17\n\x07Network\x12\x0c\n\x04name\x18\x01 \x01(\tB\xe6\x01\n\"com.google.cloud.securitycenter.v2B\x0cNetworkProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - Network = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Network").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/notebook_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/notebook_pb.rb deleted file mode 100644 index 648e79e5aff6..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/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/v2/notebook.proto - -require 'google/protobuf' - -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n-google/cloud/securitycenter/v2/notebook.proto\x12\x1egoogle.cloud.securitycenter.v2\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.v2B\rNotebookProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - Notebook = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Notebook").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/notification_config_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/notification_config_pb.rb deleted file mode 100644 index 36db41862bbd..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/notification_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/v2/notification_config.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n8google/cloud/securitycenter/v2/notification_config.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xbf\x05\n\x12NotificationConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\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.v2.NotificationConfig.StreamingConfigH\x00\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1a!\n\x0fStreamingConfig\x12\x0e\n\x06\x66ilter\x18\x01 \x01(\t:\xe0\x02\xea\x41\xdc\x02\n0securitycenter.googleapis.com/NotificationConfig\x12[organizations/{organization}/locations/{location}/notificationConfigs/{notification_config}\x12Ofolders/{folder}/locations/{location}/notificationConfigs/{notification_config}\x12Qprojects/{project}/locations/{location}/notificationConfigs/{notification_config}*\x13notificationConfigs2\x12notificationConfigB\x0f\n\rnotify_configB\xb4\x02\n\"com.google.cloud.securitycenter.v2B\x17NotificationConfigProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2\xea\x41@\n\x1bpubsub.googleapis.com/Topic\x12!projects/{project}/topics/{topic}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - NotificationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.NotificationConfig").msgclass - NotificationConfig::StreamingConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.NotificationConfig.StreamingConfig").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/notification_message_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/notification_message_pb.rb deleted file mode 100644 index 77017de51eeb..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/notification_message_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/v2/notification_message.proto - -require 'google/protobuf' - -require 'google/cloud/securitycenter/v2/finding_pb' -require 'google/cloud/securitycenter/v2/resource_pb' - - -descriptor_data = "\n9google/cloud/securitycenter/v2/notification_message.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a,google/cloud/securitycenter/v2/finding.proto\x1a-google/cloud/securitycenter/v2/resource.proto\"\xb8\x01\n\x13NotificationMessage\x12 \n\x18notification_config_name\x18\x01 \x01(\t\x12:\n\x07\x66inding\x18\x02 \x01(\x0b\x32\'.google.cloud.securitycenter.v2.FindingH\x00\x12:\n\x08resource\x18\x03 \x01(\x0b\x32(.google.cloud.securitycenter.v2.ResourceB\x07\n\x05\x65ventB\xf2\x01\n\"com.google.cloud.securitycenter.v2B\x18NotificationMessageProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - NotificationMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.NotificationMessage").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/org_policy_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/org_policy_pb.rb deleted file mode 100644 index 9668bef4e937..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/org_policy_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/v2/org_policy.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' - - -descriptor_data = "\n/google/cloud/securitycenter/v2/org_policy.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xdb\x01\n\tOrgPolicy\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08:\xba\x01\xea\x41\xb6\x01\n\x1forgpolicy.googleapis.com/Policy\x12\x37organizations/{organization}/policies/{constraint_name}\x12+folders/{folder}/policies/{constraint_name}\x12-projects/{project}/policies/{constraint_name}B\xe8\x01\n\"com.google.cloud.securitycenter.v2B\x0eOrgPolicyProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - OrgPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.OrgPolicy").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/process_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/process_pb.rb deleted file mode 100644 index d7368f3889e2..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/process_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/v2/process.proto - -require 'google/protobuf' - -require 'google/cloud/securitycenter/v2/file_pb' - - -descriptor_data = "\n,google/cloud/securitycenter/v2/process.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a)google/cloud/securitycenter/v2/file.proto\"\x86\x03\n\x07Process\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x34\n\x06\x62inary\x18\x02 \x01(\x0b\x32$.google.cloud.securitycenter.v2.File\x12\x37\n\tlibraries\x18\x03 \x03(\x0b\x32$.google.cloud.securitycenter.v2.File\x12\x34\n\x06script\x18\x04 \x01(\x0b\x32$.google.cloud.securitycenter.v2.File\x12\x0c\n\x04\x61rgs\x18\x05 \x03(\t\x12\x1b\n\x13\x61rguments_truncated\x18\x06 \x01(\x08\x12J\n\renv_variables\x18\x07 \x03(\x0b\x32\x33.google.cloud.securitycenter.v2.EnvironmentVariable\x12\x1f\n\x17\x65nv_variables_truncated\x18\x08 \x01(\x08\x12\x0b\n\x03pid\x18\t \x01(\x03\x12\x12\n\nparent_pid\x18\n \x01(\x03\x12\x0f\n\x07user_id\x18\x0b \x01(\x03\"0\n\x13\x45nvironmentVariable\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0b\n\x03val\x18\x02 \x01(\tB\xe6\x01\n\"com.google.cloud.securitycenter.v2B\x0cProcessProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - Process = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Process").msgclass - EnvironmentVariable = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.EnvironmentVariable").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/resource_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/resource_pb.rb deleted file mode 100644 index 2537d399e0df..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/resource_pb.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v2/resource.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/securitycenter/v2/folder_pb' - - -descriptor_data = "\n-google/cloud/securitycenter/v2/resource.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a+google/cloud/securitycenter/v2/folder.proto\"\xf7\x03\n\x08Resource\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x0c\n\x04type\x18\x03 \x01(\t\x12\x45\n\x0e\x63loud_provider\x18\x04 \x01(\x0e\x32-.google.cloud.securitycenter.v2.CloudProvider\x12\x0f\n\x07service\x18\x05 \x01(\t\x12\x10\n\x08location\x18\x06 \x01(\t\x12\x43\n\x0cgcp_metadata\x18\x07 \x01(\x0b\x32+.google.cloud.securitycenter.v2.GcpMetadataH\x00\x12\x43\n\x0c\x61ws_metadata\x18\x08 \x01(\x0b\x32+.google.cloud.securitycenter.v2.AwsMetadataH\x00\x12G\n\x0e\x61zure_metadata\x18\t \x01(\x0b\x32-.google.cloud.securitycenter.v2.AzureMetadataH\x00\x12\x43\n\rresource_path\x18\n \x01(\x0b\x32,.google.cloud.securitycenter.v2.ResourcePath\x12\x1c\n\x14resource_path_string\x18\x0b \x01(\tB\x19\n\x17\x63loud_provider_metadata\"\xbd\x01\n\x0bGcpMetadata\x12\x0f\n\x07project\x18\x01 \x01(\t\x12\x1c\n\x14project_display_name\x18\x02 \x01(\t\x12\x0e\n\x06parent\x18\x03 \x01(\t\x12\x1b\n\x13parent_display_name\x18\x04 \x01(\t\x12<\n\x07\x66olders\x18\x05 \x03(\x0b\x32&.google.cloud.securitycenter.v2.FolderB\x03\xe0\x41\x03\x12\x14\n\x0corganization\x18\x06 \x01(\t\"\x84\x03\n\x0b\x41wsMetadata\x12Q\n\x0corganization\x18\x01 \x01(\x0b\x32;.google.cloud.securitycenter.v2.AwsMetadata.AwsOrganization\x12_\n\x14organizational_units\x18\x02 \x03(\x0b\x32\x41.google.cloud.securitycenter.v2.AwsMetadata.AwsOrganizationalUnit\x12G\n\x07\x61\x63\x63ount\x18\x03 \x01(\x0b\x32\x36.google.cloud.securitycenter.v2.AwsMetadata.AwsAccount\x1a\x1d\n\x0f\x41wsOrganization\x12\n\n\x02id\x18\x01 \x01(\t\x1a\x31\n\x15\x41wsOrganizationalUnit\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x1a&\n\nAwsAccount\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\"\xbc\x04\n\rAzureMetadata\x12]\n\x11management_groups\x18\x01 \x03(\x0b\x32\x42.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup\x12U\n\x0csubscription\x18\x02 \x01(\x0b\x32?.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription\x12X\n\x0eresource_group\x18\x03 \x01(\x0b\x32@.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup\x12I\n\x06tenant\x18\x07 \x01(\x0b\x32\x39.google.cloud.securitycenter.v2.AzureMetadata.AzureTenant\x1a\x38\n\x14\x41zureManagementGroup\x12\n\n\x02id\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x1a\x35\n\x11\x41zureSubscription\x12\n\n\x02id\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x1a.\n\x12\x41zureResourceGroup\x12\n\n\x02id\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x01 \x01(\t\x1a/\n\x0b\x41zureTenant\x12\n\n\x02id\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\"\xf4\x03\n\x0cResourcePath\x12L\n\x05nodes\x18\x01 \x03(\x0b\x32=.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode\x1a\x8a\x01\n\x10ResourcePathNode\x12T\n\tnode_type\x18\x01 \x01(\x0e\x32\x41.google.cloud.securitycenter.v2.ResourcePath.ResourcePathNodeType\x12\n\n\x02id\x18\x02 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\"\x88\x02\n\x14ResourcePathNodeType\x12\'\n#RESOURCE_PATH_NODE_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10GCP_ORGANIZATION\x10\x01\x12\x0e\n\nGCP_FOLDER\x10\x02\x12\x0f\n\x0bGCP_PROJECT\x10\x03\x12\x14\n\x10\x41WS_ORGANIZATION\x10\x04\x12\x1b\n\x17\x41WS_ORGANIZATIONAL_UNIT\x10\x05\x12\x0f\n\x0b\x41WS_ACCOUNT\x10\x06\x12\x1a\n\x16\x41ZURE_MANAGEMENT_GROUP\x10\x07\x12\x16\n\x12\x41ZURE_SUBSCRIPTION\x10\x08\x12\x18\n\x14\x41ZURE_RESOURCE_GROUP\x10\t*x\n\rCloudProvider\x12\x1e\n\x1a\x43LOUD_PROVIDER_UNSPECIFIED\x10\x00\x12\x19\n\x15GOOGLE_CLOUD_PLATFORM\x10\x01\x12\x17\n\x13\x41MAZON_WEB_SERVICES\x10\x02\x12\x13\n\x0fMICROSOFT_AZURE\x10\x03\x42\xe7\x01\n\"com.google.cloud.securitycenter.v2B\rResourceProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - Resource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Resource").msgclass - GcpMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.GcpMetadata").msgclass - AwsMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AwsMetadata").msgclass - AwsMetadata::AwsOrganization = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AwsMetadata.AwsOrganization").msgclass - AwsMetadata::AwsOrganizationalUnit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AwsMetadata.AwsOrganizationalUnit").msgclass - AwsMetadata::AwsAccount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AwsMetadata.AwsAccount").msgclass - AzureMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AzureMetadata").msgclass - AzureMetadata::AzureManagementGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup").msgclass - AzureMetadata::AzureSubscription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription").msgclass - AzureMetadata::AzureResourceGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup").msgclass - AzureMetadata::AzureTenant = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.AzureMetadata.AzureTenant").msgclass - ResourcePath = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ResourcePath").msgclass - ResourcePath::ResourcePathNode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ResourcePath.ResourcePathNode").msgclass - ResourcePath::ResourcePathNodeType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ResourcePath.ResourcePathNodeType").enummodule - CloudProvider = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.CloudProvider").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/resource_value_config_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/resource_value_config_pb.rb deleted file mode 100644 index a620481d431c..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/resource_value_config_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/v2/resource_value_config.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/securitycenter/v2/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n:google/cloud/securitycenter/v2/resource_value_config.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a-google/cloud/securitycenter/v2/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xf9\x08\n\x13ResourceValueConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x45\n\x0eresource_value\x18\x02 \x01(\x0e\x32-.google.cloud.securitycenter.v2.ResourceValue\x12\x12\n\ntag_values\x18\x03 \x03(\t\x12\x15\n\rresource_type\x18\x04 \x01(\t\x12\r\n\x05scope\x18\x05 \x01(\t\x12q\n\x18resource_labels_selector\x18\x06 \x03(\x0b\x32O.google.cloud.securitycenter.v2.ResourceValueConfig.ResourceLabelsSelectorEntry\x12\x13\n\x0b\x64\x65scription\x18\x07 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x45\n\x0e\x63loud_provider\x18\n \x01(\x0e\x32-.google.cloud.securitycenter.v2.CloudProvider\x12}\n!sensitive_data_protection_mapping\x18\x0b \x01(\x0b\x32R.google.cloud.securitycenter.v2.ResourceValueConfig.SensitiveDataProtectionMapping\x1a\xc4\x01\n\x1eSensitiveDataProtectionMapping\x12O\n\x18high_sensitivity_mapping\x18\x01 \x01(\x0e\x32-.google.cloud.securitycenter.v2.ResourceValue\x12Q\n\x1amedium_sensitivity_mapping\x18\x02 \x01(\x0e\x32-.google.cloud.securitycenter.v2.ResourceValue\x1a=\n\x1bResourceLabelsSelectorEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x8d\x02\xea\x41\x89\x02\n1securitycenter.googleapis.com/ResourceValueConfig\x12Iorganizations/{organization}/resourceValueConfigs/{resource_value_config}\x12^organizations/{organization}/locations/{location}/resourceValueConfigs/{resource_value_config}*\x14resourceValueConfigs2\x13resourceValueConfig*X\n\rResourceValue\x12\x1e\n\x1aRESOURCE_VALUE_UNSPECIFIED\x10\x00\x12\x08\n\x04HIGH\x10\x01\x12\n\n\x06MEDIUM\x10\x02\x12\x07\n\x03LOW\x10\x03\x12\x08\n\x04NONE\x10\x04\x42\xf2\x01\n\"com.google.cloud.securitycenter.v2B\x18ResourceValueConfigProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - ResourceValueConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ResourceValueConfig").msgclass - ResourceValueConfig::SensitiveDataProtectionMapping = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ResourceValueConfig.SensitiveDataProtectionMapping").msgclass - ResourceValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ResourceValue").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/security_marks_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/security_marks_pb.rb deleted file mode 100644 index 8f9fb7fdc255..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/security_marks_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/v2/security_marks.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' - - -descriptor_data = "\n3google/cloud/securitycenter/v2/security_marks.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x19google/api/resource.proto\"\xee\x06\n\rSecurityMarks\x12\x0c\n\x04name\x18\x01 \x01(\t\x12G\n\x05marks\x18\x02 \x03(\x0b\x32\x38.google.cloud.securitycenter.v2.SecurityMarks.MarksEntry\x12\x16\n\x0e\x63\x61nonical_name\x18\x03 \x01(\t\x1a,\n\nMarksEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xbf\x05\xea\x41\xbb\x05\n+securitycenter.googleapis.com/SecurityMarks\x12\x39organizations/{organization}/assets/{asset}/securityMarks\x12Norganizations/{organization}/sources/{source}/findings/{finding}/securityMarks\x12\x63organizations/{organization}/sources/{source}/locations/{location}/findings/{finding}/securityMarks\x12-folders/{folder}/assets/{asset}/securityMarks\x12\x42\x66olders/{folder}/sources/{source}/findings/{finding}/securityMarks\x12Wfolders/{folder}/sources/{source}/locations/{location}/findings/{finding}/securityMarks\x12/projects/{project}/assets/{asset}/securityMarks\x12\x44projects/{project}/sources/{source}/findings/{finding}/securityMarks\x12Yprojects/{project}/sources/{source}/locations/{location}/findings/{finding}/securityMarksB\xec\x01\n\"com.google.cloud.securitycenter.v2B\x12SecurityMarksProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - SecurityMarks = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.SecurityMarks").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/security_posture_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/security_posture_pb.rb deleted file mode 100644 index 0f13af8fe998..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/security_posture_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/v2/security_posture.proto - -require 'google/protobuf' - - -descriptor_data = "\n5google/cloud/securitycenter/v2/security_posture.proto\x12\x1egoogle.cloud.securitycenter.v2\"\xe8\x02\n\x0fSecurityPosture\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0brevision_id\x18\x02 \x01(\t\x12#\n\x1bposture_deployment_resource\x18\x03 \x01(\t\x12\x1a\n\x12posture_deployment\x18\x04 \x01(\t\x12\x16\n\x0e\x63hanged_policy\x18\x05 \x01(\t\x12\x12\n\npolicy_set\x18\x06 \x01(\t\x12\x0e\n\x06policy\x18\x07 \x01(\t\x12`\n\x14policy_drift_details\x18\x08 \x03(\x0b\x32\x42.google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails\x1aS\n\x12PolicyDriftDetails\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x16\n\x0e\x65xpected_value\x18\x02 \x01(\t\x12\x16\n\x0e\x64\x65tected_value\x18\x03 \x01(\tB\xee\x01\n\"com.google.cloud.securitycenter.v2B\x14SecurityPostureProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - SecurityPosture = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.SecurityPosture").msgclass - SecurityPosture::PolicyDriftDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.SecurityPosture.PolicyDriftDetails").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/securitycenter_service_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/securitycenter_service_pb.rb deleted file mode 100644 index 438d7aa19da5..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/securitycenter_service_pb.rb +++ /dev/null @@ -1,101 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v2/securitycenter_service.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/api/routing_pb' -require 'google/cloud/securitycenter/v2/attack_path_pb' -require 'google/cloud/securitycenter/v2/bigquery_export_pb' -require 'google/cloud/securitycenter/v2/external_system_pb' -require 'google/cloud/securitycenter/v2/finding_pb' -require 'google/cloud/securitycenter/v2/mute_config_pb' -require 'google/cloud/securitycenter/v2/notification_config_pb' -require 'google/cloud/securitycenter/v2/resource_pb' -require 'google/cloud/securitycenter/v2/resource_value_config_pb' -require 'google/cloud/securitycenter/v2/security_marks_pb' -require 'google/cloud/securitycenter/v2/simulation_pb' -require 'google/cloud/securitycenter/v2/source_pb' -require 'google/cloud/securitycenter/v2/valued_resource_pb' -require 'google/iam/v1/iam_policy_pb' -require 'google/iam/v1/policy_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/struct_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n;google/cloud/securitycenter/v2/securitycenter_service.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x18google/api/routing.proto\x1a\x30google/cloud/securitycenter/v2/attack_path.proto\x1a\x34google/cloud/securitycenter/v2/bigquery_export.proto\x1a\x34google/cloud/securitycenter/v2/external_system.proto\x1a,google/cloud/securitycenter/v2/finding.proto\x1a\x30google/cloud/securitycenter/v2/mute_config.proto\x1a\x38google/cloud/securitycenter/v2/notification_config.proto\x1a-google/cloud/securitycenter/v2/resource.proto\x1a:google/cloud/securitycenter/v2/resource_value_config.proto\x1a\x33google/cloud/securitycenter/v2/security_marks.proto\x1a/google/cloud/securitycenter/v2/simulation.proto\x1a+google/cloud/securitycenter/v2/source.proto\x1a\x34google/cloud/securitycenter/v2/valued_resource.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xcc\x01\n&BatchCreateResourceValueConfigsRequest\x12I\n\x06parent\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\x12\x31securitycenter.googleapis.com/ResourceValueConfig\x12W\n\x08requests\x18\x02 \x03(\x0b\x32@.google.cloud.securitycenter.v2.CreateResourceValueConfigRequestB\x03\xe0\x41\x02\"~\n\'BatchCreateResourceValueConfigsResponse\x12S\n\x16resource_value_configs\x18\x01 \x03(\x0b\x32\x33.google.cloud.securitycenter.v2.ResourceValueConfig\"\xe3\x01\n\x17\x42ulkMuteFindingsRequest\x12\x19\n\x06parent\x18\x01 \x01(\tB\t\xe0\x41\x02\xfa\x41\x03\n\x01*\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12Z\n\nmute_state\x18\x03 \x01(\x0e\x32\x41.google.cloud.securitycenter.v2.BulkMuteFindingsRequest.MuteStateB\x03\xe0\x41\x01\"A\n\tMuteState\x12\x1a\n\x16MUTE_STATE_UNSPECIFIED\x10\x00\x12\t\n\x05MUTED\x10\x01\x12\r\n\tUNDEFINED\x10\x02\"\x1a\n\x18\x42ulkMuteFindingsResponse\"\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.v2.BigQueryExportB\x03\xe0\x41\x02\x12 \n\x13\x62ig_query_export_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\xac\x01\n\x14\x43reateFindingRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$securitycenter.googleapis.com/Source\x12\x17\n\nfinding_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12=\n\x07\x66inding\x18\x03 \x01(\x0b\x32\'.google.cloud.securitycenter.v2.FindingB\x03\xe0\x41\x02\"\xbe\x01\n\x17\x43reateMuteConfigRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(securitycenter.googleapis.com/MuteConfig\x12\x44\n\x0bmute_config\x18\x02 \x01(\x0b\x32*.google.cloud.securitycenter.v2.MuteConfigB\x03\xe0\x41\x02\x12\x1b\n\x0emute_config_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\xd9\x01\n\x1f\x43reateNotificationConfigRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\x12\x30securitycenter.googleapis.com/NotificationConfig\x12\x16\n\tconfig_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12T\n\x13notification_config\x18\x03 \x01(\x0b\x32\x32.google.cloud.securitycenter.v2.NotificationConfigB\x03\xe0\x41\x02\"\xc6\x01\n CreateResourceValueConfigRequest\x12I\n\x06parent\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\x12\x31securitycenter.googleapis.com/ResourceValueConfig\x12W\n\x15resource_value_config\x18\x02 \x01(\x0b\x32\x33.google.cloud.securitycenter.v2.ResourceValueConfigB\x03\xe0\x41\x02\"\x9c\x01\n\x13\x43reateSourceRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0cloudresourcemanager.googleapis.com/Organization\x12;\n\x06source\x18\x02 \x01(\x0b\x32&.google.cloud.securitycenter.v2.SourceB\x03\xe0\x41\x02\"a\n\x1b\x44\x65leteBigQueryExportRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,securitycenter.googleapis.com/BigQueryExport\"Y\n\x17\x44\x65leteMuteConfigRequest\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\"k\n DeleteResourceValueConfigRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1securitycenter.googleapis.com/ResourceValueConfig\"+\n\x13\x42igQueryDestination\x12\x14\n\x07\x64\x61taset\x18\x01 \x01(\tB\x03\xe0\x41\x02\"\xbe\x01\n\x16\x45xportFindingsMetadata\x12:\n\x11\x65xport_start_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12Y\n\x15\x62ig_query_destination\x18\x02 \x01(\x0b\x32\x33.google.cloud.securitycenter.v2.BigQueryDestinationB\x03\xe0\x41\x02H\x00\x42\r\n\x0b\x64\x65stination\"\x18\n\x16\x45xportFindingsResponse\"^\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\"h\n\x1dGetResourceValueConfigRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1securitycenter.googleapis.com/ResourceValueConfig\"N\n\x10GetSourceRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$securitycenter.googleapis.com/Source\"\xa2\x01\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\x12\n\npage_token\x18\x07 \x01(\t\x12\x11\n\tpage_size\x18\x08 \x01(\x05\"\x8b\x01\n\x15GroupFindingsResponse\x12\x45\n\x10group_by_results\x18\x01 \x03(\x0b\x32+.google.cloud.securitycenter.v2.GroupResult\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.v2.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\"\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.v2.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\"\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.v2.BigQueryExport\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xcc\x01\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\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\"\xdf\x06\n\x14ListFindingsResponse\x12\x66\n\x15list_findings_results\x18\x01 \x03(\x0b\x32G.google.cloud.securitycenter.v2.ListFindingsResponse.ListFindingsResult\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\x12\x12\n\ntotal_size\x18\x04 \x01(\x05\x1a\xb1\x05\n\x12ListFindingsResult\x12\x38\n\x07\x66inding\x18\x01 \x01(\x0b\x32\'.google.cloud.securitycenter.v2.Finding\x12g\n\x08resource\x18\x03 \x01(\x0b\x32P.google.cloud.securitycenter.v2.ListFindingsResponse.ListFindingsResult.ResourceB\x03\xe0\x41\x03\x1a\xf7\x03\n\x08Resource\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x0c\n\x04type\x18\x03 \x01(\t\x12\x45\n\x0e\x63loud_provider\x18\x04 \x01(\x0e\x32-.google.cloud.securitycenter.v2.CloudProvider\x12\x0f\n\x07service\x18\x05 \x01(\t\x12\x10\n\x08location\x18\x06 \x01(\t\x12\x43\n\x0cgcp_metadata\x18\x07 \x01(\x0b\x32+.google.cloud.securitycenter.v2.GcpMetadataH\x00\x12\x43\n\x0c\x61ws_metadata\x18\x08 \x01(\x0b\x32+.google.cloud.securitycenter.v2.AwsMetadataH\x00\x12G\n\x0e\x61zure_metadata\x18\t \x01(\x0b\x32-.google.cloud.securitycenter.v2.AzureMetadataH\x00\x12\x43\n\rresource_path\x18\n \x01(\x0b\x32,.google.cloud.securitycenter.v2.ResourcePath\x12\x1c\n\x14resource_path_string\x18\x0b \x01(\tB\x19\n\x17\x63loud_provider_metadata\"\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.v2.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.v2.NotificationConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x93\x01\n\x1fListResourceValueConfigsRequest\x12I\n\x06parent\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\x12\x31securitycenter.googleapis.com/ResourceValueConfig\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x90\x01\n ListResourceValueConfigsResponse\x12S\n\x16resource_value_configs\x18\x01 \x03(\x0b\x32\x33.google.cloud.securitycenter.v2.ResourceValueConfig\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.v2.Source\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.v2.ValuedResource\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\"\x98\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.v2.Finding.StateB\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.v2.Finding.MuteB\x03\xe0\x41\x02\"\x9d\x01\n\x1bUpdateBigQueryExportRequest\x12M\n\x10\x62ig_query_export\x18\x01 \x01(\x0b\x32..google.cloud.securitycenter.v2.BigQueryExportB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x9c\x01\n\x1bUpdateExternalSystemRequest\x12L\n\x0f\x65xternal_system\x18\x01 \x01(\x0b\x32..google.cloud.securitycenter.v2.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.v2.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.v2.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.v2.NotificationConfigB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xac\x01\n UpdateResourceValueConfigRequest\x12W\n\x15resource_value_config\x18\x01 \x01(\x0b\x32\x33.google.cloud.securitycenter.v2.ResourceValueConfigB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x99\x01\n\x1aUpdateSecurityMarksRequest\x12J\n\x0esecurity_marks\x18\x01 \x01(\x0b\x32-.google.cloud.securitycenter.v2.SecurityMarksB\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.v2.SourceB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask2\xe2\x81\x01\n\x0eSecurityCenter\x12\xe0\x02\n\x1f\x42\x61tchCreateResourceValueConfigs\x12\x46.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest\x1aG.google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsResponse\"\xab\x01\xda\x41\x0fparent,requests\x82\xd3\xe4\x93\x02\x92\x01\"=/v2/{parent=organizations/*}/resourceValueConfigs:batchCreate:\x01*ZN\"I/v2/{parent=organizations/*/locations/*}/resourceValueConfigs:batchCreate:\x01*\x12\x9a\x04\n\x10\x42ulkMuteFindings\x12\x37.google.cloud.securitycenter.v2.BulkMuteFindingsRequest\x1a\x1d.google.longrunning.Operation\"\xad\x03\xca\x41P\n7google.cloud.securitycenter.v2.BulkMuteFindingsResponse\x12\x15google.protobuf.Empty\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xca\x02\"./v2/{parent=organizations/*}/findings:bulkMute:\x01*Z?\":/v2/{parent=organizations/*/locations/*}/findings:bulkMute:\x01*Z-\"(/v2/{parent=folders/*}/findings:bulkMute:\x01*Z9\"4/v2/{parent=folders/*/locations/*}/findings:bulkMute:\x01*Z.\")/v2/{parent=projects/*}/findings:bulkMute:\x01*Z:\"5/v2/{parent=projects/*/locations/*}/findings:bulkMute:\x01*\x12\x98\x03\n\x14\x43reateBigQueryExport\x12;.google.cloud.securitycenter.v2.CreateBigQueryExportRequest\x1a..google.cloud.securitycenter.v2.BigQueryExport\"\x92\x02\xda\x41+parent,big_query_export,big_query_export_id\x82\xd3\xe4\x93\x02\xdd\x01\"8/v2/{parent=organizations/*/locations/*}/bigQueryExports:\x10\x62ig_query_exportZF\"2/v2/{parent=folders/*/locations/*}/bigQueryExports:\x10\x62ig_query_exportZG\"3/v2/{parent=projects/*/locations/*}/bigQueryExports:\x10\x62ig_query_export\x12\x96\x02\n\rCreateFinding\x12\x34.google.cloud.securitycenter.v2.CreateFindingRequest\x1a\'.google.cloud.securitycenter.v2.Finding\"\xa5\x01\xda\x41\x19parent,finding,finding_id\x82\xd3\xe4\x93\x02\x82\x01\";/v2/{parent=organizations/*/sources/*/locations/*}/findings:\x07\x66indingZ:\"//v2/{parent=organizations/*/sources/*}/findings:\x07\x66inding\x12\x99\x05\n\x10\x43reateMuteConfig\x12\x37.google.cloud.securitycenter.v2.CreateMuteConfigRequest\x1a*.google.cloud.securitycenter.v2.MuteConfig\"\x9f\x04\xda\x41!parent,mute_config,mute_config_id\x82\xd3\xe4\x93\x02\xe2\x02\"4/v2/{parent=organizations/*/locations/*}/muteConfigs:\x0bmute_configZ=\"./v2/{parent=folders/*/locations/*}/muteConfigs:\x0bmute_configZ>\"//v2/{parent=projects/*/locations/*}/muteConfigs:\x0bmute_configZ7\"(/v2/{parent=organizations/*}/muteConfigs:\x0bmute_configZ1\"\"/v2/{parent=folders/*}/muteConfigs:\x0bmute_configZ2\"#/v2/{parent=projects/*}/muteConfigs:\x0bmute_config\x8a\xd3\xe4\x93\x02\x8b\x01\x12+\n\x06parent\x12!projects/*/locations/{location=*}\x12\x30\n\x06parent\x12&organizations/*/locations/{location=*}\x12*\n\x06parent\x12 folders/*/locations/{location=*}\x12\xb2\x03\n\x18\x43reateNotificationConfig\x12?.google.cloud.securitycenter.v2.CreateNotificationConfigRequest\x1a\x32.google.cloud.securitycenter.v2.NotificationConfig\"\xa0\x02\xda\x41$parent,notification_config,config_id\x82\xd3\xe4\x93\x02\xf2\x01\".google.cloud.securitycenter.v2.ListNotificationConfigsRequest\x1a?.google.cloud.securitycenter.v2.ListNotificationConfigsResponse\"\xc3\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xb3\x01\x12/v2/{name=folders/*/sources/*/locations/*/findings/*}:setState:\x01*Z8\"3/v2/{name=projects/*/sources/*/findings/*}:setState:\x01*ZD\"?/v2/{name=projects/*/sources/*/locations/*/findings/*}:setState:\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/v2/{resource=organizations/*/sources/*}:setIamPolicy:\x01*\x12\xf8\x03\n\x07SetMute\x12..google.cloud.securitycenter.v2.SetMuteRequest\x1a\'.google.cloud.securitycenter.v2.Finding\"\x93\x03\xda\x41\tname,mute\x82\xd3\xe4\x93\x02\x80\x03\"7/v2/{name=organizations/*/sources/*/findings/*}:setMute:\x01*ZH\"C/v2/{name=organizations/*/sources/*/locations/*/findings/*}:setMute:\x01*Z6\"1/v2/{name=folders/*/sources/*/findings/*}:setMute:\x01*ZB\"=/v2/{name=folders/*/sources/*/locations/*/findings/*}:setMute:\x01*Z7\"2/v2/{name=projects/*/sources/*/findings/*}:setMute:\x01*ZC\">/v2/{name=projects/*/sources/*/locations/*/findings/*}:setMute:\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@\";/v2/{resource=organizations/*/sources/*}:testIamPermissions:\x01*\x12\xbc\x03\n\x14UpdateBigQueryExport\x12;.google.cloud.securitycenter.v2.UpdateBigQueryExportRequest\x1a..google.cloud.securitycenter.v2.BigQueryExport\"\xb6\x02\xda\x41\x1c\x62ig_query_export,update_mask\x82\xd3\xe4\x93\x02\x90\x02\x32I/v2/{big_query_export.name=organizations/*/locations/*/bigQueryExports/*}:\x10\x62ig_query_exportZW2C/v2/{big_query_export.name=folders/*/locations/*/bigQueryExports/*}:\x10\x62ig_query_exportZX2D/v2/{big_query_export.name=projects/*/locations/*/bigQueryExports/*}:\x10\x62ig_query_export\x12\x9b\x06\n\x14UpdateExternalSystem\x12;.google.cloud.securitycenter.v2.UpdateExternalSystemRequest\x1a..google.cloud.securitycenter.v2.ExternalSystem\"\x95\x05\xda\x41\x1b\x65xternal_system,update_mask\x82\xd3\xe4\x93\x02\xf0\x04\x32Q/v2/{external_system.name=organizations/*/sources/*/findings/*/externalSystems/*}:\x0f\x65xternal_systemZp2]/v2/{external_system.name=organizations/*/sources/*/locations/*/findings/*/externalSystems/*}:\x0f\x65xternal_systemZ^2K/v2/{external_system.name=folders/*/sources/*/findings/*/externalSystems/*}:\x0f\x65xternal_systemZj2W/v2/{external_system.name=folders/*/sources/*/locations/*/findings/*/externalSystems/*}:\x0f\x65xternal_systemZ_2L/v2/{external_system.name=projects/*/sources/*/findings/*/externalSystems/*}:\x0f\x65xternal_systemZk2X/v2/{external_system.name=projects/*/sources/*/locations/*/findings/*/externalSystems/*}:\x0f\x65xternal_system\x12\xb2\x04\n\rUpdateFinding\x12\x34.google.cloud.securitycenter.v2.UpdateFindingRequest\x1a\'.google.cloud.securitycenter.v2.Finding\"\xc1\x03\xda\x41\x13\x66inding,update_mask\x82\xd3\xe4\x93\x02\xa4\x03\x32\x37/v2/{finding.name=organizations/*/sources/*/findings/*}:\x07\x66indingZN2C/v2/{finding.name=organizations/*/sources/*/locations/*/findings/*}:\x07\x66indingZ<21/v2/{finding.name=folders/*/sources/*/findings/*}:\x07\x66indingZH2=/v2/{finding.name=folders/*/sources/*/locations/*/findings/*}:\x07\x66indingZ=22/v2/{finding.name=projects/*/sources/*/findings/*}:\x07\x66indingZI2>/v2/{finding.name=projects/*/sources/*/locations/*/findings/*}:\x07\x66inding\x12\x9f\x06\n\x10UpdateMuteConfig\x12\x37.google.cloud.securitycenter.v2.UpdateMuteConfigRequest\x1a*.google.cloud.securitycenter.v2.MuteConfig\"\xa5\x05\xda\x41\x17mute_config,update_mask\x82\xd3\xe4\x93\x02\xaa\x03\x32\x34/v2/{mute_config.name=organizations/*/muteConfigs/*}:\x0bmute_configZO2@/v2/{mute_config.name=organizations/*/locations/*/muteConfigs/*}:\x0bmute_configZ=2./v2/{mute_config.name=folders/*/muteConfigs/*}:\x0bmute_configZI2:/v2/{mute_config.name=folders/*/locations/*/muteConfigs/*}:\x0bmute_configZ>2//v2/{mute_config.name=projects/*/muteConfigs/*}:\x0bmute_configZJ2;/v2/{mute_config.name=projects/*/locations/*/muteConfigs/*}:\x0bmute_config\x8a\xd3\xe4\x93\x02\xd3\x01\x12\x43\n\x10mute_config.name\x12/projects/*/locations/{location=*}/muteConfigs/*\x12H\n\x10mute_config.name\x12\x34organizations/*/locations/{location=*}/muteConfigs/*\x12\x42\n\x10mute_config.name\x12.folders/*/locations/{location=*}/muteConfigs/*\x12\xe9\x03\n\x18UpdateNotificationConfig\x12?.google.cloud.securitycenter.v2.UpdateNotificationConfigRequest\x1a\x32.google.cloud.securitycenter.v2.NotificationConfig\"\xd7\x02\xda\x41\x1fnotification_config,update_mask\x82\xd3\xe4\x93\x02\xae\x02\x32P/v2/{notification_config.name=organizations/*/locations/*/notificationConfigs/*}:\x13notification_configZa2J/v2/{notification_config.name=folders/*/locations/*/notificationConfigs/*}:\x13notification_configZb2K/v2/{notification_config.name=projects/*/locations/*/notificationConfigs/*}:\x13notification_config\x12\x8e\x03\n\x19UpdateResourceValueConfig\x12@.google.cloud.securitycenter.v2.UpdateResourceValueConfigRequest\x1a\x33.google.cloud.securitycenter.v2.ResourceValueConfig\"\xf9\x01\xda\x41!resource_value_config,update_mask\x82\xd3\xe4\x93\x02\xce\x01\x32G/v2/{resource_value_config.name=organizations/*/resourceValueConfigs/*}:\x15resource_value_configZl2S/v2/{resource_value_config.name=organizations/*/locations/*/resourceValueConfigs/*}:\x15resource_value_config\x12\xe4\x07\n\x13UpdateSecurityMarks\x12:.google.cloud.securitycenter.v2.UpdateSecurityMarksRequest\x1a-.google.cloud.securitycenter.v2.SecurityMarks\"\xe1\x06\xda\x41\x1asecurity_marks,update_mask\x82\xd3\xe4\x93\x02\xbd\x06\x32L/v2/{security_marks.name=organizations/*/sources/*/findings/*/securityMarks}:\x0esecurity_marksZR2@/v2/{security_marks.name=organizations/*/assets/*/securityMarks}:\x0esecurity_marksZj2X/v2/{security_marks.name=organizations/*/sources/*/locations/*/findings/*/securityMarks}:\x0esecurity_marksZX2F/v2/{security_marks.name=folders/*/sources/*/findings/*/securityMarks}:\x0esecurity_marksZL2:/v2/{security_marks.name=folders/*/assets/*/securityMarks}:\x0esecurity_marksZd2R/v2/{security_marks.name=folders/*/sources/*/locations/*/findings/*/securityMarks}:\x0esecurity_marksZY2G/v2/{security_marks.name=projects/*/sources/*/findings/*/securityMarks}:\x0esecurity_marksZM2;/v2/{security_marks.name=projects/*/assets/*/securityMarks}:\x0esecurity_marksZe2S/v2/{security_marks.name=projects/*/sources/*/locations/*/findings/*/securityMarks}:\x0esecurity_marks\x12\xbd\x01\n\x0cUpdateSource\x12\x33.google.cloud.securitycenter.v2.UpdateSourceRequest\x1a&.google.cloud.securitycenter.v2.Source\"P\xda\x41\x12source,update_mask\x82\xd3\xe4\x93\x02\x35\x32+/v2/{source.name=organizations/*/sources/*}:\x06source\x1aQ\xca\x41\x1dsecuritycenter.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xe2\x04\n\"com.google.cloud.securitycenter.v2B\x1aSecuritycenterServiceProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2\xea\x41g\n2securitycenter.googleapis.com/OrganizationLocation\x12\x31organizations/{organization}/locations/{location}\xea\x41U\n,securitycenter.googleapis.com/FolderLocation\x12%folders/{folder}/locations/{location}\xea\x41\xa8\x01\n8securitycenter.googleapis.com/OrganizationValuedResource\x12lorganizations/{organization}/locations/{location}/simulations/{simulation}/valuedResources/{valued_resource}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - BatchCreateResourceValueConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsRequest").msgclass - BatchCreateResourceValueConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.BatchCreateResourceValueConfigsResponse").msgclass - BulkMuteFindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.BulkMuteFindingsRequest").msgclass - BulkMuteFindingsRequest::MuteState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.BulkMuteFindingsRequest.MuteState").enummodule - BulkMuteFindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.BulkMuteFindingsResponse").msgclass - CreateBigQueryExportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.CreateBigQueryExportRequest").msgclass - CreateFindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.CreateFindingRequest").msgclass - CreateMuteConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.CreateMuteConfigRequest").msgclass - CreateNotificationConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.CreateNotificationConfigRequest").msgclass - CreateResourceValueConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.CreateResourceValueConfigRequest").msgclass - CreateSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.CreateSourceRequest").msgclass - DeleteBigQueryExportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.DeleteBigQueryExportRequest").msgclass - DeleteMuteConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.DeleteMuteConfigRequest").msgclass - DeleteNotificationConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.DeleteNotificationConfigRequest").msgclass - DeleteResourceValueConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.DeleteResourceValueConfigRequest").msgclass - BigQueryDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.BigQueryDestination").msgclass - ExportFindingsMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ExportFindingsMetadata").msgclass - ExportFindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ExportFindingsResponse").msgclass - GetBigQueryExportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.GetBigQueryExportRequest").msgclass - GetMuteConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.GetMuteConfigRequest").msgclass - GetNotificationConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.GetNotificationConfigRequest").msgclass - GetResourceValueConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.GetResourceValueConfigRequest").msgclass - GetSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.GetSourceRequest").msgclass - GroupFindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.GroupFindingsRequest").msgclass - GroupFindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.GroupFindingsResponse").msgclass - GroupResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.GroupResult").msgclass - ListAttackPathsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListAttackPathsRequest").msgclass - ListAttackPathsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListAttackPathsResponse").msgclass - GetSimulationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.GetSimulationRequest").msgclass - GetValuedResourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.GetValuedResourceRequest").msgclass - ListBigQueryExportsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListBigQueryExportsRequest").msgclass - ListBigQueryExportsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListBigQueryExportsResponse").msgclass - ListFindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListFindingsRequest").msgclass - ListFindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListFindingsResponse").msgclass - ListFindingsResponse::ListFindingsResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListFindingsResponse.ListFindingsResult").msgclass - ListFindingsResponse::ListFindingsResult::Resource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListFindingsResponse.ListFindingsResult.Resource").msgclass - ListMuteConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListMuteConfigsRequest").msgclass - ListMuteConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListMuteConfigsResponse").msgclass - ListNotificationConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListNotificationConfigsRequest").msgclass - ListNotificationConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListNotificationConfigsResponse").msgclass - ListResourceValueConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListResourceValueConfigsRequest").msgclass - ListResourceValueConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListResourceValueConfigsResponse").msgclass - ListSourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListSourcesRequest").msgclass - ListSourcesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListSourcesResponse").msgclass - ListValuedResourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListValuedResourcesRequest").msgclass - ListValuedResourcesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ListValuedResourcesResponse").msgclass - SetFindingStateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.SetFindingStateRequest").msgclass - SetMuteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.SetMuteRequest").msgclass - UpdateBigQueryExportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.UpdateBigQueryExportRequest").msgclass - UpdateExternalSystemRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.UpdateExternalSystemRequest").msgclass - UpdateFindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.UpdateFindingRequest").msgclass - UpdateMuteConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.UpdateMuteConfigRequest").msgclass - UpdateNotificationConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.UpdateNotificationConfigRequest").msgclass - UpdateResourceValueConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.UpdateResourceValueConfigRequest").msgclass - UpdateSecurityMarksRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.UpdateSecurityMarksRequest").msgclass - UpdateSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.UpdateSourceRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/securitycenter_service_services_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/securitycenter_service_services_pb.rb deleted file mode 100644 index 36c3f5bae249..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/securitycenter_service_services_pb.rb +++ /dev/null @@ -1,167 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/securitycenter/v2/securitycenter_service.proto for package 'Google.Cloud.SecurityCenter.V2' -# 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/v2/securitycenter_service_pb' - -module Google - module Cloud - module SecurityCenter - module V2 - module SecurityCenter - # V2 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.v2.SecurityCenter' - - # 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::V2::BatchCreateResourceValueConfigsRequest, ::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsResponse - # Kicks off an LRO to bulk mute findings for a parent based on a filter. If - # no location is specified, findings are muted in global. 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::V2::BulkMuteFindingsRequest, ::Google::Longrunning::Operation - # Creates a BigQuery export. - rpc :CreateBigQueryExport, ::Google::Cloud::SecurityCenter::V2::CreateBigQueryExportRequest, ::Google::Cloud::SecurityCenter::V2::BigQueryExport - # Creates a finding in a location. The corresponding source must exist for - # finding creation to succeed. - rpc :CreateFinding, ::Google::Cloud::SecurityCenter::V2::CreateFindingRequest, ::Google::Cloud::SecurityCenter::V2::Finding - # Creates a mute config. - rpc :CreateMuteConfig, ::Google::Cloud::SecurityCenter::V2::CreateMuteConfigRequest, ::Google::Cloud::SecurityCenter::V2::MuteConfig - # Creates a notification config. - rpc :CreateNotificationConfig, ::Google::Cloud::SecurityCenter::V2::CreateNotificationConfigRequest, ::Google::Cloud::SecurityCenter::V2::NotificationConfig - # Creates a source. - rpc :CreateSource, ::Google::Cloud::SecurityCenter::V2::CreateSourceRequest, ::Google::Cloud::SecurityCenter::V2::Source - # Deletes an existing BigQuery export. - rpc :DeleteBigQueryExport, ::Google::Cloud::SecurityCenter::V2::DeleteBigQueryExportRequest, ::Google::Protobuf::Empty - # Deletes an existing mute config. If no location is specified, default is - # global. - rpc :DeleteMuteConfig, ::Google::Cloud::SecurityCenter::V2::DeleteMuteConfigRequest, ::Google::Protobuf::Empty - # Deletes a notification config. - rpc :DeleteNotificationConfig, ::Google::Cloud::SecurityCenter::V2::DeleteNotificationConfigRequest, ::Google::Protobuf::Empty - # Deletes a ResourceValueConfig. - rpc :DeleteResourceValueConfig, ::Google::Cloud::SecurityCenter::V2::DeleteResourceValueConfigRequest, ::Google::Protobuf::Empty - # Gets a BigQuery export. - rpc :GetBigQueryExport, ::Google::Cloud::SecurityCenter::V2::GetBigQueryExportRequest, ::Google::Cloud::SecurityCenter::V2::BigQueryExport - # Get the simulation by name or the latest simulation for the given - # organization. - rpc :GetSimulation, ::Google::Cloud::SecurityCenter::V2::GetSimulationRequest, ::Google::Cloud::SecurityCenter::V2::Simulation - # Get the valued resource by name - rpc :GetValuedResource, ::Google::Cloud::SecurityCenter::V2::GetValuedResourceRequest, ::Google::Cloud::SecurityCenter::V2::ValuedResource - # Gets the access control policy on the specified Source. - rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy - # Gets a mute config. If no location is specified, default is - # global. - rpc :GetMuteConfig, ::Google::Cloud::SecurityCenter::V2::GetMuteConfigRequest, ::Google::Cloud::SecurityCenter::V2::MuteConfig - # Gets a notification config. - rpc :GetNotificationConfig, ::Google::Cloud::SecurityCenter::V2::GetNotificationConfigRequest, ::Google::Cloud::SecurityCenter::V2::NotificationConfig - # Gets a ResourceValueConfig. - rpc :GetResourceValueConfig, ::Google::Cloud::SecurityCenter::V2::GetResourceValueConfigRequest, ::Google::Cloud::SecurityCenter::V2::ResourceValueConfig - # Gets a source. - rpc :GetSource, ::Google::Cloud::SecurityCenter::V2::GetSourceRequest, ::Google::Cloud::SecurityCenter::V2::Source - # Filters an organization or source's findings and groups them by their - # specified properties in a location. If no location is specified, findings - # are assumed to be in global - # - # To group across all sources provide a `-` as the source id. - # The following list shows some examples: - # - # + `/v2/organizations/{organization_id}/sources/-/findings` - # + - # `/v2/organizations/{organization_id}/sources/-/locations/{location_id}/findings` - # + `/v2/folders/{folder_id}/sources/-/findings` - # + `/v2/folders/{folder_id}/sources/-/locations/{location_id}/findings` - # + `/v2/projects/{project_id}/sources/-/findings` - # + `/v2/projects/{project_id}/sources/-/locations/{location_id}/findings` - rpc :GroupFindings, ::Google::Cloud::SecurityCenter::V2::GroupFindingsRequest, ::Google::Cloud::SecurityCenter::V2::GroupFindingsResponse - # Lists the attack paths for a set of simulation results or valued resources - # and filter. - rpc :ListAttackPaths, ::Google::Cloud::SecurityCenter::V2::ListAttackPathsRequest, ::Google::Cloud::SecurityCenter::V2::ListAttackPathsResponse - # 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::V2::ListBigQueryExportsRequest, ::Google::Cloud::SecurityCenter::V2::ListBigQueryExportsResponse - # Lists an organization or source's findings. - # - # To list across all sources for a given location provide a `-` as the source - # id. If no location is specified, finding are assumed to be in global. - # The following list shows some examples: - # - # + `/v2/organizations/{organization_id}/sources/-/findings` - # + - # `/v2/organizations/{organization_id}/sources/-/locations/{location_id}/findings` - rpc :ListFindings, ::Google::Cloud::SecurityCenter::V2::ListFindingsRequest, ::Google::Cloud::SecurityCenter::V2::ListFindingsResponse - # Lists mute configs. If no location is specified, default is - # global. - rpc :ListMuteConfigs, ::Google::Cloud::SecurityCenter::V2::ListMuteConfigsRequest, ::Google::Cloud::SecurityCenter::V2::ListMuteConfigsResponse - # Lists notification configs. - rpc :ListNotificationConfigs, ::Google::Cloud::SecurityCenter::V2::ListNotificationConfigsRequest, ::Google::Cloud::SecurityCenter::V2::ListNotificationConfigsResponse - # Lists all ResourceValueConfigs. - rpc :ListResourceValueConfigs, ::Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsRequest, ::Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsResponse - # Lists all sources belonging to an organization. - rpc :ListSources, ::Google::Cloud::SecurityCenter::V2::ListSourcesRequest, ::Google::Cloud::SecurityCenter::V2::ListSourcesResponse - # Lists the valued resources for a set of simulation results and filter. - rpc :ListValuedResources, ::Google::Cloud::SecurityCenter::V2::ListValuedResourcesRequest, ::Google::Cloud::SecurityCenter::V2::ListValuedResourcesResponse - # Updates the state of a finding. If no location is specified, finding is - # assumed to be in global - rpc :SetFindingState, ::Google::Cloud::SecurityCenter::V2::SetFindingStateRequest, ::Google::Cloud::SecurityCenter::V2::Finding - # Sets the access control policy on the specified Source. - rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy - # Updates the mute state of a finding. If no location is specified, finding - # is assumed to be in global - rpc :SetMute, ::Google::Cloud::SecurityCenter::V2::SetMuteRequest, ::Google::Cloud::SecurityCenter::V2::Finding - # Returns the permissions that a caller has on the specified source. - rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse - # Updates a BigQuery export. - rpc :UpdateBigQueryExport, ::Google::Cloud::SecurityCenter::V2::UpdateBigQueryExportRequest, ::Google::Cloud::SecurityCenter::V2::BigQueryExport - # Updates external system. This is for a given finding. If no location is - # specified, finding is assumed to be in global - rpc :UpdateExternalSystem, ::Google::Cloud::SecurityCenter::V2::UpdateExternalSystemRequest, ::Google::Cloud::SecurityCenter::V2::ExternalSystem - # Creates or updates a finding. If no location is specified, finding is - # assumed to be in global. The corresponding source must exist for a finding - # creation to succeed. - rpc :UpdateFinding, ::Google::Cloud::SecurityCenter::V2::UpdateFindingRequest, ::Google::Cloud::SecurityCenter::V2::Finding - # Updates a mute config. If no location is specified, default is - # global. - rpc :UpdateMuteConfig, ::Google::Cloud::SecurityCenter::V2::UpdateMuteConfigRequest, ::Google::Cloud::SecurityCenter::V2::MuteConfig - # Updates a notification config. The following update - # fields are allowed: description, pubsub_topic, streaming_config.filter - rpc :UpdateNotificationConfig, ::Google::Cloud::SecurityCenter::V2::UpdateNotificationConfigRequest, ::Google::Cloud::SecurityCenter::V2::NotificationConfig - # Updates an existing ResourceValueConfigs with new rules. - rpc :UpdateResourceValueConfig, ::Google::Cloud::SecurityCenter::V2::UpdateResourceValueConfigRequest, ::Google::Cloud::SecurityCenter::V2::ResourceValueConfig - # Updates security marks. For Finding Security marks, if no location is - # specified, finding is assumed to be in global. Assets Security Marks can - # only be accessed through global endpoint. - rpc :UpdateSecurityMarks, ::Google::Cloud::SecurityCenter::V2::UpdateSecurityMarksRequest, ::Google::Cloud::SecurityCenter::V2::SecurityMarks - # Updates a source. - rpc :UpdateSource, ::Google::Cloud::SecurityCenter::V2::UpdateSourceRequest, ::Google::Cloud::SecurityCenter::V2::Source - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/simulation_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/simulation_pb.rb deleted file mode 100644 index 7ffa40f95f0a..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/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/v2/simulation.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/securitycenter/v2/resource_pb' -require 'google/cloud/securitycenter/v2/valued_resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n/google/cloud/securitycenter/v2/simulation.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a-google/cloud/securitycenter/v2/resource.proto\x1a\x34google/cloud/securitycenter/v2/valued_resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xca\x03\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.v2.ResourceValueConfigMetadata\x12\x45\n\x0e\x63loud_provider\x18\x04 \x01(\x0e\x32-.google.cloud.securitycenter.v2.CloudProvider:\xca\x01\xea\x41\xc6\x01\n(securitycenter.googleapis.com/Simulation\x12\x35organizations/{organization}/simulations/{simulation}\x12Jorganizations/{organization}/locations/{location}/simulations/{simluation}*\x0bsimulations2\nsimulationB\xe9\x01\n\"com.google.cloud.securitycenter.v2B\x0fSimulationProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - Simulation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Simulation").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/source_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/source_pb.rb deleted file mode 100644 index 073204318455..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/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/v2/source.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' - - -descriptor_data = "\n+google/cloud/securitycenter/v2/source.proto\x12\x1egoogle.cloud.securitycenter.v2\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\x04 \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\xe5\x01\n\"com.google.cloud.securitycenter.v2B\x0bSourceProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - Source = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Source").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/toxic_combination_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/toxic_combination_pb.rb deleted file mode 100644 index 7096e7b98ac2..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/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/v2/toxic_combination.proto - -require 'google/protobuf' - - -descriptor_data = "\n6google/cloud/securitycenter/v2/toxic_combination.proto\x12\x1egoogle.cloud.securitycenter.v2\"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.v2B\x15ToxicCombinationProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - ToxicCombination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ToxicCombination").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/valued_resource_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/valued_resource_pb.rb deleted file mode 100644 index b7df23211efc..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/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/v2/valued_resource.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' - - -descriptor_data = "\n4google/cloud/securitycenter/v2/valued_resource.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x19google/api/resource.proto\"\xc6\x05\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.v2.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.v2.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:\x9a\x02\xea\x41\x96\x02\n,securitycenter.googleapis.com/ValuedResource\x12Worganizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}\x12lorganizations/{organization}/locations/{location}/simulations/{simluation}/valuedResources/{valued_resource}*\x0fvaluedResources2\x0evaluedResource\"+\n\x1bResourceValueConfigMetadata\x12\x0c\n\x04name\x18\x01 \x01(\tB\xed\x01\n\"com.google.cloud.securitycenter.v2B\x13ValuedResourceProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - ValuedResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ValuedResource").msgclass - ValuedResource::ResourceValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ValuedResource.ResourceValue").enummodule - ResourceValueConfigMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.ResourceValueConfigMetadata").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/vertex_ai_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/vertex_ai_pb.rb deleted file mode 100644 index 00ccbb3b5a21..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/vertex_ai_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/v2/vertex_ai.proto - -require 'google/protobuf' - - -descriptor_data = "\n.google/cloud/securitycenter/v2/vertex_ai.proto\x12\x1egoogle.cloud.securitycenter.v2\"\x83\x02\n\x08VertexAi\x12\x42\n\x08\x64\x61tasets\x18\x01 \x03(\x0b\x32\x30.google.cloud.securitycenter.v2.VertexAi.Dataset\x12\x44\n\tpipelines\x18\x02 \x03(\x0b\x32\x31.google.cloud.securitycenter.v2.VertexAi.Pipeline\x1a=\n\x07\x44\x61taset\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x0e\n\x06source\x18\x03 \x01(\t\x1a.\n\x08Pipeline\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\tB\xe7\x01\n\"com.google.cloud.securitycenter.v2B\rVertexAiProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - VertexAi = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.VertexAi").msgclass - VertexAi::Dataset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.VertexAi.Dataset").msgclass - VertexAi::Pipeline = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.VertexAi.Pipeline").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/vulnerability_pb.rb b/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/vulnerability_pb.rb deleted file mode 100644 index deb4b635f6df..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/lib/google/cloud/securitycenter/v2/vulnerability_pb.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/securitycenter/v2/vulnerability.proto - -require 'google/protobuf' - -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n2google/cloud/securitycenter/v2/vulnerability.proto\x12\x1egoogle.cloud.securitycenter.v2\x1a\x1fgoogle/protobuf/timestamp.proto\"\xf5\x02\n\rVulnerability\x12\x30\n\x03\x63ve\x18\x01 \x01(\x0b\x32#.google.cloud.securitycenter.v2.Cve\x12\x42\n\x11offending_package\x18\x02 \x01(\x0b\x32\'.google.cloud.securitycenter.v2.Package\x12>\n\rfixed_package\x18\x03 \x01(\x0b\x32\'.google.cloud.securitycenter.v2.Package\x12K\n\x11security_bulletin\x18\x04 \x01(\x0b\x32\x30.google.cloud.securitycenter.v2.SecurityBulletin\x12\x1b\n\x13provider_risk_score\x18\x05 \x01(\x03\x12\x11\n\treachable\x18\x06 \x01(\x08\x12\x31\n\x04\x63wes\x18\x07 \x03(\x0b\x32#.google.cloud.securitycenter.v2.Cwe\"\xc7\x05\n\x03\x43ve\x12\n\n\x02id\x18\x01 \x01(\t\x12=\n\nreferences\x18\x02 \x03(\x0b\x32).google.cloud.securitycenter.v2.Reference\x12\x36\n\x06\x63vssv3\x18\x03 \x01(\x0b\x32&.google.cloud.securitycenter.v2.Cvssv3\x12\x1e\n\x16upstream_fix_available\x18\x04 \x01(\x08\x12>\n\x06impact\x18\x05 \x01(\x0e\x32..google.cloud.securitycenter.v2.Cve.RiskRating\x12W\n\x15\x65xploitation_activity\x18\x06 \x01(\x0e\x32\x38.google.cloud.securitycenter.v2.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\x12;\n\x17\x66irst_exploitation_date\x18\n \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\x02 \x01(\x0e\x32\x33.google.cloud.securitycenter.v2.Cvssv3.AttackVector\x12R\n\x11\x61ttack_complexity\x18\x03 \x01(\x0e\x32\x37.google.cloud.securitycenter.v2.Cvssv3.AttackComplexity\x12V\n\x13privileges_required\x18\x04 \x01(\x0e\x32\x39.google.cloud.securitycenter.v2.Cvssv3.PrivilegesRequired\x12P\n\x10user_interaction\x18\x05 \x01(\x0e\x32\x36.google.cloud.securitycenter.v2.Cvssv3.UserInteraction\x12;\n\x05scope\x18\x06 \x01(\x0e\x32,.google.cloud.securitycenter.v2.Cvssv3.Scope\x12M\n\x16\x63onfidentiality_impact\x18\x07 \x01(\x0e\x32-.google.cloud.securitycenter.v2.Cvssv3.Impact\x12G\n\x10integrity_impact\x18\x08 \x01(\x0e\x32-.google.cloud.securitycenter.v2.Cvssv3.Impact\x12J\n\x13\x61vailability_impact\x18\t \x01(\x0e\x32-.google.cloud.securitycenter.v2.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(\t\"P\n\x03\x43we\x12\n\n\x02id\x18\x01 \x01(\t\x12=\n\nreferences\x18\x02 \x03(\x0b\x32).google.cloud.securitycenter.v2.ReferenceB\xec\x01\n\"com.google.cloud.securitycenter.v2B\x12VulnerabilityProtoP\x01ZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb\xaa\x02\x1eGoogle.Cloud.SecurityCenter.V2\xca\x02\x1eGoogle\\Cloud\\SecurityCenter\\V2\xea\x02!Google::Cloud::SecurityCenter::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module SecurityCenter - module V2 - Vulnerability = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Vulnerability").msgclass - Cve = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Cve").msgclass - Cve::RiskRating = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Cve.RiskRating").enummodule - Cve::ExploitationActivity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Cve.ExploitationActivity").enummodule - Reference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Reference").msgclass - Cvssv3 = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Cvssv3").msgclass - Cvssv3::AttackVector = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Cvssv3.AttackVector").enummodule - Cvssv3::AttackComplexity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Cvssv3.AttackComplexity").enummodule - Cvssv3::PrivilegesRequired = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Cvssv3.PrivilegesRequired").enummodule - Cvssv3::UserInteraction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Cvssv3.UserInteraction").enummodule - Cvssv3::Scope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Cvssv3.Scope").enummodule - Cvssv3::Impact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Cvssv3.Impact").enummodule - Package = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Package").msgclass - SecurityBulletin = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.SecurityBulletin").msgclass - Cwe = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v2.Cwe").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/README.md b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/README.md deleted file mode 100644 index c8ec50fdacaa..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Security Command Center V2 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-v2/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/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-v2/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/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-v2/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/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-v2/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/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-v2/proto_docs/google/api/routing.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/api/routing.rb deleted file mode 100644 index 6d71a9430253..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/api/routing.rb +++ /dev/null @@ -1,463 +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 - # Specifies the routing information that should be sent along with the request - # in the form of routing header. - # **NOTE:** All service configuration rules follow the "last one wins" order. - # - # The examples below will apply to an RPC which has the following request type: - # - # Message Definition: - # - # message Request { - # // The name of the Table - # // Values can be of the following formats: - # // - `projects//tables/
` - # // - `projects//instances//tables/
` - # // - `region//zones//tables/
` - # string table_name = 1; - # - # // This value specifies routing for replication. - # // It can be in the following formats: - # // - `profiles/` - # // - a legacy `profile_id` that can be any string - # string app_profile_id = 2; - # } - # - # Example message: - # - # { - # table_name: projects/proj_foo/instances/instance_bar/table/table_baz, - # app_profile_id: profiles/prof_qux - # } - # - # The routing header consists of one or multiple key-value pairs. The order of - # the key-value pairs is undefined, the order of the `routing_parameters` in - # the `RoutingRule` only matters for the evaluation order of the path - # templates when `field` is the same. See the examples below for more details. - # - # Every key and value in the routing header must be percent-encoded, - # and joined together in the following format: `key1=value1&key2=value2`. - # The examples below skip the percent-encoding for readability. - # - # Example 1 - # - # Extracting a field from the request to put into the routing header - # unchanged, with the key equal to the field name. - # - # annotation: - # - # option (google.api.routing) = { - # // Take the `app_profile_id`. - # routing_parameters { - # field: "app_profile_id" - # } - # }; - # - # result: - # - # x-goog-request-params: app_profile_id=profiles/prof_qux - # - # Example 2 - # - # Extracting a field from the request to put into the routing header - # unchanged, with the key different from the field name. - # - # annotation: - # - # option (google.api.routing) = { - # // Take the `app_profile_id`, but name it `routing_id` in the header. - # routing_parameters { - # field: "app_profile_id" - # path_template: "{routing_id=**}" - # } - # }; - # - # result: - # - # x-goog-request-params: routing_id=profiles/prof_qux - # - # Example 3 - # - # Extracting a field from the request to put into the routing - # header, while matching a path template syntax on the field's value. - # - # NB: it is more useful to send nothing than to send garbage for the purpose - # of dynamic routing, since garbage pollutes cache. Thus the matching. - # - # Sub-example 3a - # - # The field matches the template. - # - # annotation: - # - # option (google.api.routing) = { - # // Take the `table_name`, if it's well-formed (with project-based - # // syntax). - # routing_parameters { - # field: "table_name" - # path_template: "{table_name=projects/*/instances/*/**}" - # } - # }; - # - # result: - # - # x-goog-request-params: - # table_name=projects/proj_foo/instances/instance_bar/table/table_baz - # - # Sub-example 3b - # - # The field does not match the template. - # - # annotation: - # - # option (google.api.routing) = { - # // Take the `table_name`, if it's well-formed (with region-based - # // syntax). - # routing_parameters { - # field: "table_name" - # path_template: "{table_name=regions/*/zones/*/**}" - # } - # }; - # - # result: - # - # - # - # Sub-example 3c - # - # Multiple alternative conflictingly named path templates are - # specified. The one that matches is used to construct the header. - # - # annotation: - # - # option (google.api.routing) = { - # // Take the `table_name`, if it's well-formed, whether - # // using the region- or projects-based syntax. - # - # routing_parameters { - # field: "table_name" - # path_template: "{table_name=regions/*/zones/*/**}" - # } - # routing_parameters { - # field: "table_name" - # path_template: "{table_name=projects/*/instances/*/**}" - # } - # }; - # - # result: - # - # x-goog-request-params: - # table_name=projects/proj_foo/instances/instance_bar/table/table_baz - # - # Example 4 - # - # Extracting a single routing header key-value pair by matching a - # template syntax on (a part of) a single request field. - # - # annotation: - # - # option (google.api.routing) = { - # // Take just the project id from the `table_name` field. - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=projects/*}/**" - # } - # }; - # - # result: - # - # x-goog-request-params: routing_id=projects/proj_foo - # - # Example 5 - # - # Extracting a single routing header key-value pair by matching - # several conflictingly named path templates on (parts of) a single request - # field. The last template to match "wins" the conflict. - # - # annotation: - # - # option (google.api.routing) = { - # // If the `table_name` does not have instances information, - # // take just the project id for routing. - # // Otherwise take project + instance. - # - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=projects/*}/**" - # } - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=projects/*/instances/*}/**" - # } - # }; - # - # result: - # - # x-goog-request-params: - # routing_id=projects/proj_foo/instances/instance_bar - # - # Example 6 - # - # Extracting multiple routing header key-value pairs by matching - # several non-conflicting path templates on (parts of) a single request field. - # - # Sub-example 6a - # - # Make the templates strict, so that if the `table_name` does not - # have an instance information, nothing is sent. - # - # annotation: - # - # option (google.api.routing) = { - # // The routing code needs two keys instead of one composite - # // but works only for the tables with the "project-instance" name - # // syntax. - # - # routing_parameters { - # field: "table_name" - # path_template: "{project_id=projects/*}/instances/*/**" - # } - # routing_parameters { - # field: "table_name" - # path_template: "projects/*/{instance_id=instances/*}/**" - # } - # }; - # - # result: - # - # x-goog-request-params: - # project_id=projects/proj_foo&instance_id=instances/instance_bar - # - # Sub-example 6b - # - # Make the templates loose, so that if the `table_name` does not - # have an instance information, just the project id part is sent. - # - # annotation: - # - # option (google.api.routing) = { - # // The routing code wants two keys instead of one composite - # // but will work with just the `project_id` for tables without - # // an instance in the `table_name`. - # - # routing_parameters { - # field: "table_name" - # path_template: "{project_id=projects/*}/**" - # } - # routing_parameters { - # field: "table_name" - # path_template: "projects/*/{instance_id=instances/*}/**" - # } - # }; - # - # result (is the same as 6a for our example message because it has the instance - # information): - # - # x-goog-request-params: - # project_id=projects/proj_foo&instance_id=instances/instance_bar - # - # Example 7 - # - # Extracting multiple routing header key-value pairs by matching - # several path templates on multiple request fields. - # - # NB: note that here there is no way to specify sending nothing if one of the - # fields does not match its template. E.g. if the `table_name` is in the wrong - # format, the `project_id` will not be sent, but the `routing_id` will be. - # The backend routing code has to be aware of that and be prepared to not - # receive a full complement of keys if it expects multiple. - # - # annotation: - # - # option (google.api.routing) = { - # // The routing needs both `project_id` and `routing_id` - # // (from the `app_profile_id` field) for routing. - # - # routing_parameters { - # field: "table_name" - # path_template: "{project_id=projects/*}/**" - # } - # routing_parameters { - # field: "app_profile_id" - # path_template: "{routing_id=**}" - # } - # }; - # - # result: - # - # x-goog-request-params: - # project_id=projects/proj_foo&routing_id=profiles/prof_qux - # - # Example 8 - # - # Extracting a single routing header key-value pair by matching - # several conflictingly named path templates on several request fields. The - # last template to match "wins" the conflict. - # - # annotation: - # - # option (google.api.routing) = { - # // The `routing_id` can be a project id or a region id depending on - # // the table name format, but only if the `app_profile_id` is not set. - # // If `app_profile_id` is set it should be used instead. - # - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=projects/*}/**" - # } - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=regions/*}/**" - # } - # routing_parameters { - # field: "app_profile_id" - # path_template: "{routing_id=**}" - # } - # }; - # - # result: - # - # x-goog-request-params: routing_id=profiles/prof_qux - # - # Example 9 - # - # Bringing it all together. - # - # annotation: - # - # option (google.api.routing) = { - # // For routing both `table_location` and a `routing_id` are needed. - # // - # // table_location can be either an instance id or a region+zone id. - # // - # // For `routing_id`, take the value of `app_profile_id` - # // - If it's in the format `profiles/`, send - # // just the `` part. - # // - If it's any other literal, send it as is. - # // If the `app_profile_id` is empty, and the `table_name` starts with - # // the project_id, send that instead. - # - # routing_parameters { - # field: "table_name" - # path_template: "projects/*/{table_location=instances/*}/tables/*" - # } - # routing_parameters { - # field: "table_name" - # path_template: "{table_location=regions/*/zones/*}/tables/*" - # } - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=projects/*}/**" - # } - # routing_parameters { - # field: "app_profile_id" - # path_template: "{routing_id=**}" - # } - # routing_parameters { - # field: "app_profile_id" - # path_template: "profiles/{routing_id=*}" - # } - # }; - # - # result: - # - # x-goog-request-params: - # table_location=instances/instance_bar&routing_id=prof_qux - # @!attribute [rw] routing_parameters - # @return [::Array<::Google::Api::RoutingParameter>] - # A collection of Routing Parameter specifications. - # **NOTE:** If multiple Routing Parameters describe the same key - # (via the `path_template` field or via the `field` field when - # `path_template` is not provided), "last one wins" rule - # determines which Parameter gets used. - # See the examples for more details. - class RoutingRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A projection from an input message to the GRPC or REST header. - # @!attribute [rw] field - # @return [::String] - # A request field to extract the header key-value pair from. - # @!attribute [rw] path_template - # @return [::String] - # A pattern matching the key-value field. Optional. - # If not specified, the whole field specified in the `field` field will be - # taken as value, and its name used as key. If specified, it MUST contain - # exactly one named segment (along with any number of unnamed segments) The - # pattern will be matched over the field specified in the `field` field, then - # if the match is successful: - # - the name of the single named segment will be used as a header name, - # - the match value of the segment will be used as a header value; - # if the match is NOT successful, nothing will be sent. - # - # Example: - # - # -- This is a field in the request message - # | that the header value will be extracted from. - # | - # | -- This is the key name in the - # | | routing header. - # V | - # field: "table_name" v - # path_template: "projects/*/{table_location=instances/*}/tables/*" - # ^ ^ - # | | - # In the {} brackets is the pattern that -- | - # specifies what to extract from the | - # field as a value to be sent. | - # | - # The string in the field must match the whole pattern -- - # before brackets, inside brackets, after brackets. - # - # When looking at this specific example, we can see that: - # - A key-value pair with the key `table_location` - # and the value matching `instances/*` should be added - # to the x-goog-request-params routing header. - # - The value is extracted from the request message's `table_name` field - # if it matches the full pattern specified: - # `projects/*/instances/*/tables/*`. - # - # **NB:** If the `path_template` field is not provided, the key name is - # equal to the field name, and the whole field should be sent as a value. - # This makes the pattern for the field and the value functionally equivalent - # to `**`, and the configuration - # - # { - # field: "table_name" - # } - # - # is a functionally equivalent shorthand to: - # - # { - # field: "table_name" - # path_template: "{table_name=**}" - # } - # - # See Example 1 for more details. - class RoutingParameter - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/access.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/access.rb deleted file mode 100644 index 4b452fd07cb2..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/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 V2 - # 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::V2::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::V2::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-v2/proto_docs/google/cloud/securitycenter/v2/affected_resources.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/affected_resources.rb deleted file mode 100644 index 22a4e9fe9934..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/affected_resources.rb +++ /dev/null @@ -1,35 +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 V2 - # Details about resources affected by this finding. - # @!attribute [rw] count - # @return [::Integer] - # The count of resources affected by the finding. - class AffectedResources - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/ai_model.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/ai_model.rb deleted file mode 100644 index fe0106b68b6d..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/ai_model.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 V2 - # Contains information about the AI model associated with the finding. - # @!attribute [rw] name - # @return [::String] - # The name of the AI model, for example, "gemini:1.0.0". - # @!attribute [rw] domain - # @return [::String] - # The domain of the model, for example, “image-classification”. - # @!attribute [rw] library - # @return [::String] - # The name of the model library, for example, “transformers”. - # @!attribute [rw] location - # @return [::String] - # The region in which the model is used, for example, “us-central1”. - # @!attribute [rw] publisher - # @return [::String] - # The publisher of the model, for example, “google” or “nvidia”. - # @!attribute [rw] deployment_platform - # @return [::Google::Cloud::SecurityCenter::V2::AiModel::DeploymentPlatform] - # The platform on which the model is deployed. - # @!attribute [rw] display_name - # @return [::String] - # The user defined display name of model. Ex. baseline-classification-model - class AiModel - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The platform on which the model is deployed. - module DeploymentPlatform - # Unspecified deployment platform. - DEPLOYMENT_PLATFORM_UNSPECIFIED = 0 - - # Vertex AI. - VERTEX_AI = 1 - - # Google Kubernetes Engine. - GKE = 2 - - # Google Compute Engine. - GCE = 3 - - # Fine tuned model. - FINE_TUNED_MODEL = 4 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/application.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/application.rb deleted file mode 100644 index 4c1fa3fef09b..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/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 V2 - # 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 could 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-v2/proto_docs/google/cloud/securitycenter/v2/attack_exposure.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/attack_exposure.rb deleted file mode 100644 index d3543aea2fa0..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/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 V2 - # 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 [r] state - # @return [::Google::Cloud::SecurityCenter::V2::AttackExposure::State] - # Output only. 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-v2/proto_docs/google/cloud/securitycenter/v2/attack_path.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/attack_path.rb deleted file mode 100644 index 395034b6cbf5..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/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 V2 - # 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/simulations/34/valuedResources/56/attackPaths/78` - # @!attribute [rw] path_nodes - # @return [::Array<::Google::Cloud::SecurityCenter::V2::AttackPath::AttackPathNode>] - # A list of nodes that exist in this attack path. - # @!attribute [rw] edges - # @return [::Array<::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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-v2/proto_docs/google/cloud/securitycenter/v2/backup_disaster_recovery.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/backup_disaster_recovery.rb deleted file mode 100644 index b49d6ad06453..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/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 V2 - # 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-v2/proto_docs/google/cloud/securitycenter/v2/bigquery_export.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/bigquery_export.rb deleted file mode 100644 index 09155c2a96e1..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/bigquery_export.rb +++ /dev/null @@ -1,96 +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 V2 - # Configures how to deliver Findings to BigQuery Instance. - # @!attribute [rw] name - # @return [::String] - # Identifier. The relative resource name of this export. See: - # https://cloud.google.com/apis/design/resource_names#relative_resource_name. - # The following list shows some examples: - # - # + - # `organizations/{organization_id}/locations/{location_id}/bigQueryExports/{export_id}` - # + `folders/{folder_id}/locations/{location_id}/bigQueryExports/{export_id}` - # + - # `projects/{project_id}/locations/{location_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-v2/proto_docs/google/cloud/securitycenter/v2/chokepoint.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/chokepoint.rb deleted file mode 100644 index 4ac87a98cfbd..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/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 V2 - # 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-v2/proto_docs/google/cloud/securitycenter/v2/cloud_armor.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/cloud_armor.rb deleted file mode 100644 index de5568f900ac..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/cloud_armor.rb +++ /dev/null @@ -1,138 +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 V2 - # Fields related to Google Cloud Armor findings. - # @!attribute [rw] security_policy - # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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_long - # @return [::Integer] - # Total PPS (packets per second) volume of attack. - # @!attribute [rw] volume_bps_long - # @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'. - # @!attribute [rw] volume_pps - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Integer] - # Total PPS (packets per second) volume of attack. Deprecated - refer to - # volume_pps_long instead. - # @!attribute [rw] volume_bps - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Integer] - # Total BPS (bytes per second) volume of attack. Deprecated - refer to - # volume_bps_long instead. - 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-v2/proto_docs/google/cloud/securitycenter/v2/cloud_dlp_data_profile.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/cloud_dlp_data_profile.rb deleted file mode 100644 index 346e66b5e35d..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/cloud_dlp_data_profile.rb +++ /dev/null @@ -1,52 +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 V2 - # 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::V2::CloudDlpDataProfile::ParentType] - # The resource hierarchy level at which the data profile was generated. - 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 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/cloud_dlp_inspection.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/cloud_dlp_inspection.rb deleted file mode 100644 index 123bea548585..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/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 V2 - # 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-v2/proto_docs/google/cloud/securitycenter/v2/compliance.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/compliance.rb deleted file mode 100644 index 01a4fe458c2d..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/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 V2 - # 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-v2/proto_docs/google/cloud/securitycenter/v2/connection.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/connection.rb deleted file mode 100644 index 6e6ae87bd5c1..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/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 V2 - # 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::V2::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-v2/proto_docs/google/cloud/securitycenter/v2/contact_details.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/contact_details.rb deleted file mode 100644 index 70a23d045d97..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/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 V2 - # Details about specific contacts - # @!attribute [rw] contacts - # @return [::Array<::Google::Cloud::SecurityCenter::V2::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-v2/proto_docs/google/cloud/securitycenter/v2/container.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/container.rb deleted file mode 100644 index 5fd4972d8657..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/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 V2 - # 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::V2::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-v2/proto_docs/google/cloud/securitycenter/v2/data_access_event.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/data_access_event.rb deleted file mode 100644 index 35c543064430..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/data_access_event.rb +++ /dev/null @@ -1,61 +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 V2 - # Details about a data access attempt made by a principal not authorized under - # applicable data security policy. - # @!attribute [rw] event_id - # @return [::String] - # Unique identifier for data access event. - # @!attribute [rw] principal_email - # @return [::String] - # The email address of the principal that accessed the data. The principal - # could be a user account, service account, Google group, or other. - # @!attribute [rw] operation - # @return [::Google::Cloud::SecurityCenter::V2::DataAccessEvent::Operation] - # The operation performed by the principal to access the data. - # @!attribute [rw] event_time - # @return [::Google::Protobuf::Timestamp] - # Timestamp of data access event. - class DataAccessEvent - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The operation of a data access event. - module Operation - # The operation is unspecified. - OPERATION_UNSPECIFIED = 0 - - # Represents a read operation. - READ = 1 - - # Represents a move operation. - MOVE = 2 - - # Represents a copy operation. - COPY = 3 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/data_flow_event.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/data_flow_event.rb deleted file mode 100644 index ae25f8a2cff3..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/data_flow_event.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 V2 - # Details about a data flow event, in which either the data is moved to or is - # accessed from a non-compliant geo-location, as defined in the applicable data - # security policy. - # @!attribute [rw] event_id - # @return [::String] - # Unique identifier for data flow event. - # @!attribute [rw] principal_email - # @return [::String] - # The email address of the principal that initiated the data flow event. The - # principal could be a user account, service account, Google group, or other. - # @!attribute [rw] operation - # @return [::Google::Cloud::SecurityCenter::V2::DataFlowEvent::Operation] - # The operation performed by the principal for the data flow event. - # @!attribute [rw] violated_location - # @return [::String] - # Non-compliant location of the principal or the data destination. - # @!attribute [rw] event_time - # @return [::Google::Protobuf::Timestamp] - # Timestamp of data flow event. - class DataFlowEvent - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The operation of a data flow event. - module Operation - # The operation is unspecified. - OPERATION_UNSPECIFIED = 0 - - # Represents a read operation. - READ = 1 - - # Represents a move operation. - MOVE = 2 - - # Represents a copy operation. - COPY = 3 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/data_retention_deletion_event.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/data_retention_deletion_event.rb deleted file mode 100644 index 978743068cc9..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/data_retention_deletion_event.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 V2 - # Details about data retention deletion violations, in which the data is - # non-compliant based on their retention or deletion time, as defined in the - # applicable data security policy. The Data Retention Deletion (DRD) control is - # a control of the DSPM (Data Security Posture Management) suite that enables - # organizations to manage data retention and deletion policies in compliance - # with regulations, such as GDPR and CRPA. DRD supports two primary policy - # types: maximum storage length (max TTL) and minimum storage length (min TTL). - # Both are aimed at helping organizations meet regulatory and data management - # commitments. - # @!attribute [rw] event_detection_time - # @return [::Google::Protobuf::Timestamp] - # Timestamp indicating when the event was detected. - # @!attribute [rw] data_object_count - # @return [::Integer] - # Number of objects that violated the policy for this resource. If the number - # is less than 1,000, then the value of this field is the exact number. If - # the number of objects that violated the policy is greater than or equal to - # 1,000, then the value of this field is 1000. - # @!attribute [rw] max_retention_allowed - # @return [::Google::Protobuf::Duration] - # Maximum duration of retention allowed from the DRD control. This comes - # from the DRD control where users set a max TTL for their data. For example, - # suppose that a user sets the max TTL for a Cloud Storage bucket to 90 days. - # However, an object in that bucket is 100 days old. In this case, a - # DataRetentionDeletionEvent will be generated for that Cloud Storage bucket, - # and the max_retention_allowed is 90 days. - # @!attribute [rw] event_type - # @return [::Google::Cloud::SecurityCenter::V2::DataRetentionDeletionEvent::EventType] - # Type of the DRD event. - class DataRetentionDeletionEvent - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Type of the DRD event. - module EventType - # Unspecified event type. - EVENT_TYPE_UNSPECIFIED = 0 - - # The maximum retention time has been exceeded. - EVENT_TYPE_MAX_TTL_EXCEEDED = 1 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/database.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/database.rb deleted file mode 100644 index 39782b12e5ae..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/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 V2 - # 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-v2/proto_docs/google/cloud/securitycenter/v2/disk.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/disk.rb deleted file mode 100644 index 0f63d09304ea..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/disk.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 V2 - # Contains information about the disk associated with the finding. - # @!attribute [rw] name - # @return [::String] - # The name of the disk, for example, - # "https://www.googleapis.com/compute/v1/projects/\\{project-id}/zones/\\{zone-id}/disks/\\{disk-id}". - class Disk - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/exfiltration.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/exfiltration.rb deleted file mode 100644 index e982b02dfc10..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/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 V2 - # 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::V2::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::V2::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-v2/proto_docs/google/cloud/securitycenter/v2/external_system.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/external_system.rb deleted file mode 100644 index d13da6e40e27..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/external_system.rb +++ /dev/null @@ -1,106 +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 V2 - # Representation of third party SIEM/SOAR fields within SCC. - # @!attribute [rw] name - # @return [::String] - # Full resource name of the external system. The following list - # shows some examples: - # - # + `organizations/1234/sources/5678/findings/123456/externalSystems/jira` - # + - # `organizations/1234/sources/5678/locations/us/findings/123456/externalSystems/jira` - # + `folders/1234/sources/5678/findings/123456/externalSystems/jira` - # + - # `folders/1234/sources/5678/locations/us/findings/123456/externalSystems/jira` - # + `projects/1234/sources/5678/findings/123456/externalSystems/jira` - # + - # `projects/1234/sources/5678/locations/us/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::V2::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-v2/proto_docs/google/cloud/securitycenter/v2/file.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/file.rb deleted file mode 100644 index fcea377226df..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/file.rb +++ /dev/null @@ -1,105 +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 V2 - # 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::V2::File::DiskPath] - # Path of the file in terms of underlying disk/partition identifiers. - # @!attribute [rw] operations - # @return [::Array<::Google::Cloud::SecurityCenter::V2::File::FileOperation>] - # Operation(s) performed on a file. - 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 - - # Operation(s) performed on a file. - # @!attribute [rw] type - # @return [::Google::Cloud::SecurityCenter::V2::File::FileOperation::OperationType] - # The type of the operation - class FileOperation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of the operation - module OperationType - # The operation is unspecified. - OPERATION_TYPE_UNSPECIFIED = 0 - - # Represents an open operation. - OPEN = 1 - - # Represents a read operation. - READ = 2 - - # Represents a rename operation. - RENAME = 3 - - # Represents a write operation. - WRITE = 4 - - # Represents an execute operation. - EXECUTE = 5 - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/finding.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/finding.rb deleted file mode 100644 index 80e00cbf53ed..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/finding.rb +++ /dev/null @@ -1,533 +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 V2 - # 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] - # Identifier. The [relative resource - # name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) - # of the finding. The following list shows some examples: - # - # + - # `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}` - # + - # `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` - # + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}` - # + - # `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` - # + `projects/{project_id}/sources/{source_id}/findings/{finding_id}` - # + - # `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` - # @!attribute [r] canonical_name - # @return [::String] - # Output only. The canonical name of the finding. The following list shows - # some examples: - # - # + - # `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}` - # + - # `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` - # + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}` - # + - # `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` - # + `projects/{project_id}/sources/{source_id}/findings/{finding_id}` - # + - # `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` - # - # The prefix is the closest CRM ancestor of the resource associated with the - # finding. - # @!attribute [rw] parent - # @return [::String] - # The relative resource name of the source and location the finding belongs - # to. See: - # https://cloud.google.com/apis/design/resource_names#relative_resource_name - # This field is immutable after creation time. The following list shows some - # examples: - # - # + `organizations/{organization_id}/sources/{source_id}` - # + `folders/{folders_id}/sources/{source_id}` - # + `projects/{projects_id}/sources/{source_id}` - # + - # `organizations/{organization_id}/sources/{source_id}/locations/{location_id}` - # + `folders/{folders_id}/sources/{source_id}/locations/{location_id}` - # + `projects/{projects_id}/sources/{source_id}/locations/{location_id}` - # @!attribute [rw] resource_name - # @return [::String] - # Immutable. 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. - # @!attribute [r] state - # @return [::Google::Cloud::SecurityCenter::V2::Finding::State] - # Output only. The state of the finding. - # @!attribute [rw] category - # @return [::String] - # Immutable. The additional taxonomy group within findings from a given - # source. 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::V2::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 [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which the finding was created in Security Command - # Center. - # @!attribute [rw] severity - # @return [::Google::Cloud::SecurityCenter::V2::Finding::Severity] - # The severity of the finding. This field is managed by the source that - # writes the finding. - # @!attribute [rw] mute - # @return [::Google::Cloud::SecurityCenter::V2::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 [r] mute_info - # @return [::Google::Cloud::SecurityCenter::V2::Finding::MuteInfo] - # Output only. The mute information regarding this finding. - # @!attribute [rw] finding_class - # @return [::Google::Cloud::SecurityCenter::V2::Finding::FindingClass] - # The class of the finding. - # @!attribute [rw] indicator - # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::MitreAttack] - # MITRE ATT&CK tactics and techniques related to this finding. - # See: https://attack.mitre.org - # @!attribute [rw] access - # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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](https://cloud.google.com/security-command-center/docs/how-to-mute-findings) - # that muted the finding and the user who muted the finding. - # @!attribute [rw] processes - # @return [::Array<::Google::Cloud::SecurityCenter::V2::Process>] - # Represents operating system processes associated with the Finding. - # @!attribute [r] contacts - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::Exfiltration] - # Represents exfiltrations associated with the finding. - # @!attribute [rw] iam_bindings - # @return [::Array<::Google::Cloud::SecurityCenter::V2::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::V2::Container>] - # Containers associated with the finding. This field provides information for - # both Kubernetes and non-Kubernetes containers. - # @!attribute [rw] kubernetes - # @return [::Google::Cloud::SecurityCenter::V2::Kubernetes] - # Kubernetes resources associated with the finding. - # @!attribute [rw] database - # @return [::Google::Cloud::SecurityCenter::V2::Database] - # Database associated with the finding. - # @!attribute [rw] attack_exposure - # @return [::Google::Cloud::SecurityCenter::V2::AttackExposure] - # The results of an attack path simulation relevant to this finding. - # @!attribute [rw] files - # @return [::Array<::Google::Cloud::SecurityCenter::V2::File>] - # File associated with the finding. - # @!attribute [rw] cloud_dlp_inspection - # @return [::Google::Cloud::SecurityCenter::V2::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::V2::CloudDlpDataProfile] - # Cloud DLP data profile that is associated with the finding. - # @!attribute [rw] kernel_rootkit - # @return [::Google::Cloud::SecurityCenter::V2::KernelRootkit] - # Signature of the kernel rootkit. - # @!attribute [rw] org_policies - # @return [::Array<::Google::Cloud::SecurityCenter::V2::OrgPolicy>] - # Contains information about the org policies associated with the finding. - # @!attribute [rw] job - # @return [::Google::Cloud::SecurityCenter::V2::Job] - # Job associated with the finding. - # @!attribute [rw] application - # @return [::Google::Cloud::SecurityCenter::V2::Application] - # Represents an application associated with the finding. - # @!attribute [rw] ip_rules - # @return [::Google::Cloud::SecurityCenter::V2::IpRules] - # IP rules associated with the finding. - # @!attribute [rw] backup_disaster_recovery - # @return [::Google::Cloud::SecurityCenter::V2::BackupDisasterRecovery] - # Fields related to Backup and DR findings. - # @!attribute [rw] security_posture - # @return [::Google::Cloud::SecurityCenter::V2::SecurityPosture] - # The security posture associated with the finding. - # @!attribute [rw] log_entries - # @return [::Array<::Google::Cloud::SecurityCenter::V2::LogEntry>] - # Log entries that are relevant to the finding. - # @!attribute [rw] load_balancers - # @return [::Array<::Google::Cloud::SecurityCenter::V2::LoadBalancer>] - # The load balancers associated with the finding. - # @!attribute [rw] cloud_armor - # @return [::Google::Cloud::SecurityCenter::V2::CloudArmor] - # Fields related to Cloud Armor findings. - # @!attribute [rw] notebook - # @return [::Google::Cloud::SecurityCenter::V2::Notebook] - # Notebook associated with the finding. - # @!attribute [rw] toxic_combination - # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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] disk - # @return [::Google::Cloud::SecurityCenter::V2::Disk] - # Disk associated with the finding. - # @!attribute [rw] data_access_events - # @return [::Array<::Google::Cloud::SecurityCenter::V2::DataAccessEvent>] - # Data access events associated with the finding. - # @!attribute [rw] data_flow_events - # @return [::Array<::Google::Cloud::SecurityCenter::V2::DataFlowEvent>] - # Data flow events associated with the finding. - # @!attribute [rw] networks - # @return [::Array<::Google::Cloud::SecurityCenter::V2::Network>] - # Represents the VPC networks that the resource is attached to. - # @!attribute [rw] data_retention_deletion_events - # @return [::Array<::Google::Cloud::SecurityCenter::V2::DataRetentionDeletionEvent>] - # Data retention deletion events associated with the finding. - # @!attribute [rw] affected_resources - # @return [::Google::Cloud::SecurityCenter::V2::AffectedResources] - # AffectedResources associated with the finding. - # @!attribute [rw] ai_model - # @return [::Google::Cloud::SecurityCenter::V2::AiModel] - # The AI model associated with the finding. - # @!attribute [rw] chokepoint - # @return [::Google::Cloud::SecurityCenter::V2::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] vertex_ai - # @return [::Google::Cloud::SecurityCenter::V2::VertexAi] - # VertexAi associated with the finding. - # @!attribute [rw] agent - # @return [::Google::Cloud::SecurityCenter::V2::Agent] - # Primary Agent that the specified finding was flagged for - # @!attribute [rw] agent_sessions - # @return [::Array<::Google::Cloud::SecurityCenter::V2::AgentSession>] - # Conversational session(s) where the finding occurred. - # @!attribute [rw] agent_anomaly - # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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 = 3 - 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 combination of security issues that represent a more severe - # security problem when taken together. - 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 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/folder.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/folder.rb deleted file mode 100644 index a56cbebc0318..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/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 V2 - # 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-v2/proto_docs/google/cloud/securitycenter/v2/group_membership.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/group_membership.rb deleted file mode 100644 index 4b2f90a8e17c..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/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 V2 - # 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::V2::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-v2/proto_docs/google/cloud/securitycenter/v2/iam_binding.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/iam_binding.rb deleted file mode 100644 index 879809624b27..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/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 V2 - # Represents a particular IAM binding, which captures a member's role addition, - # removal, or state. - # @!attribute [rw] action - # @return [::Google::Cloud::SecurityCenter::V2::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-v2/proto_docs/google/cloud/securitycenter/v2/indicator.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/indicator.rb deleted file mode 100644 index 85acfa00a4c5..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/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 V2 - # 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::V2::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::V2::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::V2::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::V2::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::V2::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-v2/proto_docs/google/cloud/securitycenter/v2/ip_rules.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/ip_rules.rb deleted file mode 100644 index ce71b3883188..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/ip_rules.rb +++ /dev/null @@ -1,122 +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 V2 - # IP rules associated with the finding. - # @!attribute [rw] direction - # @return [::Google::Cloud::SecurityCenter::V2::IpRules::Direction] - # The direction that the rule is applicable to, one of ingress or egress. - # @!attribute [rw] allowed - # @return [::Google::Cloud::SecurityCenter::V2::Allowed] - # Tuple with allowed rules. - # - # Note: The following fields are mutually exclusive: `allowed`, `denied`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] denied - # @return [::Google::Cloud::SecurityCenter::V2::Denied] - # Tuple with denied rules. - # - # Note: The following fields are mutually exclusive: `denied`, `allowed`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] source_ip_ranges - # @return [::Array<::String>] - # If source IP ranges are specified, the firewall rule applies only to - # traffic that has a source IP address in these ranges. These ranges must be - # expressed in CIDR format. Only supports IPv4. - # @!attribute [rw] destination_ip_ranges - # @return [::Array<::String>] - # If destination IP ranges are specified, the firewall rule applies only to - # traffic that has a destination IP address in these ranges. These ranges - # must be expressed in CIDR format. Only supports IPv4. - # @!attribute [rw] exposed_services - # @return [::Array<::String>] - # Name of the network protocol service, such as FTP, that is exposed by the - # open port. Follows the naming convention available at: - # https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml. - class IpRules - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of direction that the rule is applicable to, one of ingress or - # egress. Not applicable to OPEN_X_PORT findings. - module Direction - # Unspecified direction value. - DIRECTION_UNSPECIFIED = 0 - - # Ingress direction value. - INGRESS = 1 - - # Egress direction value. - EGRESS = 2 - end - end - - # IP rule information. - # @!attribute [rw] protocol - # @return [::String] - # The IP protocol this rule applies to. This value can either be one of the - # following well known protocol strings (TCP, UDP, ICMP, ESP, AH, IPIP, - # SCTP) or a string representation of the integer value. - # @!attribute [rw] port_ranges - # @return [::Array<::Google::Cloud::SecurityCenter::V2::IpRule::PortRange>] - # Optional. An optional list of ports to which this rule applies. This field - # is only applicable for the UDP or (S)TCP protocols. Each entry must be - # either an integer or a range including a min and max port number. - class IpRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A port range which is inclusive of the min and max values. - # Values are between 0 and 2^16-1. The max can be equal / must be not smaller - # than the min value. If min and max are equal this indicates that it is a - # single port. - # @!attribute [rw] min - # @return [::Integer] - # Minimum port value. - # @!attribute [rw] max - # @return [::Integer] - # Maximum port value. - class PortRange - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Allowed IP rule. - # @!attribute [rw] ip_rules - # @return [::Array<::Google::Cloud::SecurityCenter::V2::IpRule>] - # Optional. Optional list of allowed IP rules. - class Allowed - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Denied IP rule. - # @!attribute [rw] ip_rules - # @return [::Array<::Google::Cloud::SecurityCenter::V2::IpRule>] - # Optional. Optional list of denied IP rules. - class Denied - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/job.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/job.rb deleted file mode 100644 index e8f38e48dc1b..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/job.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 V2 - # Describes a job - # @!attribute [rw] name - # @return [::String] - # The fully-qualified name for a job. - # e.g. `projects//jobs/` - # @!attribute [r] state - # @return [::Google::Cloud::SecurityCenter::V2::JobState] - # Output only. State of the job, such as `RUNNING` or `PENDING`. - # @!attribute [rw] error_code - # @return [::Integer] - # Optional. If the job did not complete successfully, this field describes - # why. - # @!attribute [rw] location - # @return [::String] - # Optional. Gives the location where the job ran, such as `US` or - # `europe-west1` - class Job - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # JobState represents the state of the job. - module JobState - # Unspecified represents an unknown state and should not be used. - JOB_STATE_UNSPECIFIED = 0 - - # Job is scheduled and pending for run - PENDING = 1 - - # Job in progress - RUNNING = 2 - - # Job has completed with success - SUCCEEDED = 3 - - # Job has completed but with failure - FAILED = 4 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/kernel_rootkit.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/kernel_rootkit.rb deleted file mode 100644 index 0e324f832355..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/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 V2 - # 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-v2/proto_docs/google/cloud/securitycenter/v2/kubernetes.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/kubernetes.rb deleted file mode 100644 index 444ecd5eec70..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/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 V2 - # Kubernetes-related attributes. - # @!attribute [rw] pods - # @return [::Array<::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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::V2::Kubernetes::AccessReview>] - # Provides information on any Kubernetes access reviews (privilege checks) - # relevant to the finding. - # @!attribute [rw] objects - # @return [::Array<::Google::Cloud::SecurityCenter::V2::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::V2::Label>] - # Pod labels. For Kubernetes containers, these are applied to the - # container. - # @!attribute [rw] containers - # @return [::Array<::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::Kubernetes::Role] - # The Role or ClusterRole referenced by the binding. - # @!attribute [rw] subjects - # @return [::Array<::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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-v2/proto_docs/google/cloud/securitycenter/v2/label.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/label.rb deleted file mode 100644 index 609c1859cbe1..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/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 V2 - # 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-v2/proto_docs/google/cloud/securitycenter/v2/load_balancer.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/load_balancer.rb deleted file mode 100644 index a9d466c92655..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/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 V2 - # 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-v2/proto_docs/google/cloud/securitycenter/v2/log_entry.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/log_entry.rb deleted file mode 100644 index f3ea1bf4b29d..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/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 V2 - # An individual entry in a log. - # @!attribute [rw] cloud_logging_entry - # @return [::Google::Cloud::SecurityCenter::V2::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 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-v2/proto_docs/google/cloud/securitycenter/v2/mitre_attack.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/mitre_attack.rb deleted file mode 100644 index a1f6f5b169c8..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/mitre_attack.rb +++ /dev/null @@ -1,521 +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 V2 - # MITRE ATT&CK tactics and techniques related to this finding. - # See: https://attack.mitre.org - # @!attribute [rw] primary_tactic - # @return [::Google::Cloud::SecurityCenter::V2::MitreAttack::Tactic] - # The MITRE ATT&CK tactic most closely represented by this finding, if any. - # @!attribute [rw] primary_techniques - # @return [::Array<::Google::Cloud::SecurityCenter::V2::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::V2::MitreAttack::Tactic>] - # Additional MITRE ATT&CK tactics related to this finding, if any. - # @!attribute [rw] additional_techniques - # @return [::Array<::Google::Cloud::SecurityCenter::V2::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 Security Command Center - # findings. See: https://attack.mitre.org/techniques/enterprise/ - module Technique - # Unspecified value. - TECHNIQUE_UNSPECIFIED = 0 - - # T1001 - DATA_OBFUSCATION = 70 - - # T1001.002 - DATA_OBFUSCATION_STEGANOGRAPHY = 71 - - # T1003 - OS_CREDENTIAL_DUMPING = 114 - - # T1003.007 - OS_CREDENTIAL_DUMPING_PROC_FILESYSTEM = 115 - - # T1003.008 - OS_CREDENTIAL_DUMPING_ETC_PASSWORD_AND_ETC_SHADOW = 122 - - # T1005 - DATA_FROM_LOCAL_SYSTEM = 117 - - # T1020 - AUTOMATED_EXFILTRATION = 68 - - # T1027 - OBFUSCATED_FILES_OR_INFO = 72 - - # T1027.003 - STEGANOGRAPHY = 73 - - # T1027.004 - COMPILE_AFTER_DELIVERY = 74 - - # T1027.010 - COMMAND_OBFUSCATION = 75 - - # T1029 - SCHEDULED_TRANSFER = 120 - - # T1033 - SYSTEM_OWNER_USER_DISCOVERY = 118 - - # 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 - - # T1053 - SCHEDULED_TASK_JOB = 89 - - # T1053.003 - SCHEDULED_TASK_JOB_CRON = 119 - - # T1053.007 - CONTAINER_ORCHESTRATION_JOB = 90 - - # T1055 - PROCESS_INJECTION = 93 - - # T1056 - INPUT_CAPTURE = 103 - - # T1056.001 - INPUT_CAPTURE_KEYLOGGING = 104 - - # 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 - INDICATOR_REMOVAL = 123 - - # T1070.002 - INDICATOR_REMOVAL_CLEAR_LINUX_OR_MAC_SYSTEM_LOGS = 124 - - # T1070.003 - INDICATOR_REMOVAL_CLEAR_COMMAND_HISTORY = 125 - - # T1070.004 - INDICATOR_REMOVAL_FILE_DELETION = 64 - - # T1070.006 - INDICATOR_REMOVAL_TIMESTOMP = 128 - - # T1070.008 - INDICATOR_REMOVAL_CLEAR_MAILBOX_DATA = 126 - - # 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 - - # T1083 - FILE_AND_DIRECTORY_DISCOVERY = 121 - - # T1087.001 - ACCOUNT_DISCOVERY_LOCAL_ACCOUNT = 116 - - # 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.003 - ADDITIONAL_CLOUD_ROLES = 67 - - # T1098.004 - SSH_AUTHORIZED_KEYS = 23 - - # T1098.006 - ADDITIONAL_CONTAINER_CLUSTER_ROLES = 58 - - # T1104 - MULTI_STAGE_CHANNELS = 76 - - # T1105 - INGRESS_TOOL_TRANSFER = 3 - - # T1106 - NATIVE_API = 4 - - # T1110 - BRUTE_FORCE = 44 - - # T1119 - AUTOMATED_COLLECTION = 94 - - # T1129 - SHARED_MODULES = 5 - - # T1132 - DATA_ENCODING = 77 - - # T1132.001 - STANDARD_ENCODING = 78 - - # T1134 - ACCESS_TOKEN_MANIPULATION = 33 - - # T1134.001 - TOKEN_IMPERSONATION_OR_THEFT = 39 - - # T1136 - CREATE_ACCOUNT = 79 - - # T1136.001 - LOCAL_ACCOUNT = 80 - - # T1140 - DEOBFUSCATE_DECODE_FILES_OR_INFO = 95 - - # T1190 - EXPLOIT_PUBLIC_FACING_APPLICATION = 27 - - # T1195 - SUPPLY_CHAIN_COMPROMISE = 129 - - # T1195.001 - COMPROMISE_SOFTWARE_DEPENDENCIES_AND_DEVELOPMENT_TOOLS = 130 - - # T1203 - EXPLOITATION_FOR_CLIENT_EXECUTION = 134 - - # T1204 - USER_EXECUTION = 69 - - # T1222.002 - LINUX_AND_MAC_FILE_AND_DIRECTORY_PERMISSIONS_MODIFICATION = 135 - - # T1484 - DOMAIN_POLICY_MODIFICATION = 30 - - # T1485 - DATA_DESTRUCTION = 29 - - # T1486 - DATA_ENCRYPTED_FOR_IMPACT = 132 - - # T1489 - SERVICE_STOP = 52 - - # T1490 - INHIBIT_SYSTEM_RECOVERY = 36 - - # T1495 - FIRMWARE_CORRUPTION = 81 - - # 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 - - # T1537 - TRANSFER_DATA_TO_CLOUD_ACCOUNT = 91 - - # T1539 - STEAL_WEB_SESSION_COOKIE = 25 - - # T1543 - CREATE_OR_MODIFY_SYSTEM_PROCESS = 24 - - # T1546 - EVENT_TRIGGERED_EXECUTION = 65 - - # T1547 - BOOT_OR_LOGON_AUTOSTART_EXECUTION = 82 - - # T1547.006 - KERNEL_MODULES_AND_EXTENSIONS = 83 - - # T1547.009 - SHORTCUT_MODIFICATION = 127 - - # T1548 - ABUSE_ELEVATION_CONTROL_MECHANISM = 34 - - # T1548.001 - ABUSE_ELEVATION_CONTROL_MECHANISM_SETUID_AND_SETGID = 136 - - # T1548.003 - ABUSE_ELEVATION_CONTROL_MECHANISM_SUDO_AND_SUDO_CACHING = 109 - - # T1552 - UNSECURED_CREDENTIALS = 13 - - # T1552.001 - CREDENTIALS_IN_FILES = 105 - - # T1552.003 - BASH_HISTORY = 96 - - # T1552.004 - PRIVATE_KEYS = 97 - - # T1553 - SUBVERT_TRUST_CONTROL = 106 - - # T1553.004 - INSTALL_ROOT_CERTIFICATE = 107 - - # T1554 - COMPROMISE_HOST_SOFTWARE_BINARY = 84 - - # T1555 - CREDENTIALS_FROM_PASSWORD_STORES = 98 - - # T1556 - MODIFY_AUTHENTICATION_PROCESS = 28 - - # T1556.003 - PLUGGABLE_AUTHENTICATION_MODULES = 108 - - # T1556.006 - MULTI_FACTOR_AUTHENTICATION = 137 - - # T1562 - IMPAIR_DEFENSES = 31 - - # T1562.001 - DISABLE_OR_MODIFY_TOOLS = 55 - - # T1562.006 - INDICATOR_BLOCKING = 110 - - # T1562.012 - DISABLE_OR_MODIFY_LINUX_AUDIT_SYSTEM = 111 - - # T1564 - HIDE_ARTIFACTS = 85 - - # T1564.001 - HIDDEN_FILES_AND_DIRECTORIES = 86 - - # T1564.002 - HIDDEN_USERS = 87 - - # T1567 - EXFILTRATION_OVER_WEB_SERVICE = 20 - - # T1567.002 - EXFILTRATION_TO_CLOUD_STORAGE = 21 - - # T1568 - DYNAMIC_RESOLUTION = 12 - - # T1570 - LATERAL_TOOL_TRANSFER = 41 - - # T1574 - HIJACK_EXECUTION_FLOW = 112 - - # T1574.006 - HIJACK_EXECUTION_FLOW_DYNAMIC_LINKER_HIJACKING = 113 - - # T1578 - MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE = 26 - - # T1578.001 - CREATE_SNAPSHOT = 54 - - # T1580 - CLOUD_INFRASTRUCTURE_DISCOVERY = 53 - - # T1587 - DEVELOP_CAPABILITIES = 99 - - # T1587.001 - DEVELOP_CAPABILITIES_MALWARE = 100 - - # T1588 - OBTAIN_CAPABILITIES = 43 - - # T1588.001 - OBTAIN_CAPABILITIES_MALWARE = 101 - - # T1588.006 - OBTAIN_CAPABILITIES_VULNERABILITIES = 133 - - # T1595 - ACTIVE_SCANNING = 1 - - # T1595.001 - SCANNING_IP_BLOCKS = 2 - - # T1608 - STAGE_CAPABILITIES = 88 - - # T1608.001 - UPLOAD_MALWARE = 102 - - # T1609 - CONTAINER_ADMINISTRATION_COMMAND = 60 - - # T1610 - DEPLOY_CONTAINER = 66 - - # T1611 - ESCAPE_TO_HOST = 61 - - # T1613 - CONTAINER_AND_RESOURCE_DISCOVERY = 57 - - # T1620 - REFLECTIVE_CODE_LOADING = 92 - - # T1649 - STEAL_OR_FORGE_AUTHENTICATION_CERTIFICATES = 62 - - # T1657 - FINANCIAL_THEFT = 131 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/mute_config.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/mute_config.rb deleted file mode 100644 index db9977d397e7..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/mute_config.rb +++ /dev/null @@ -1,113 +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 V2 - # A mute config is a Cloud SCC resource that contains the configuration - # to mute create/update events of findings. - # @!attribute [rw] name - # @return [::String] - # Identifier. This field will be ignored if provided on config creation. The - # following list shows some examples of the format: - # - # + `organizations/{organization}/muteConfigs/{mute_config}` - # + - # `organizations/{organization}locations/{location}//muteConfigs/{mute_config}` - # + `folders/{folder}/muteConfigs/{mute_config}` - # + `folders/{folder}/locations/{location}/muteConfigs/{mute_config}` - # + `projects/{project}/muteConfigs/{mute_config}` - # + `projects/{project}/locations/{location}/muteConfigs/{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::V2::MuteConfig::MuteConfigType] - # Required. The type of the mute config, which determines what type of mute - # state the config affects. Immutable after 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-v2/proto_docs/google/cloud/securitycenter/v2/network.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/network.rb deleted file mode 100644 index 7fb133f55dc2..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/network.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 V2 - # Contains information about a VPC network associated with the finding. - # @!attribute [rw] name - # @return [::String] - # The name of the VPC network resource, for example, - # `//compute.googleapis.com/projects/my-project/global/networks/my-network`. - class Network - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/notebook.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/notebook.rb deleted file mode 100644 index 0d1e37a099ef..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/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 V2 - # 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-v2/proto_docs/google/cloud/securitycenter/v2/notification_config.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/notification_config.rb deleted file mode 100644 index b5de722177ff..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/notification_config.rb +++ /dev/null @@ -1,94 +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 V2 - # 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] - # Identifier. The relative resource name of this notification config. See: - # https://cloud.google.com/apis/design/resource_names#relative_resource_name - # The following list shows some examples: - # + - # `organizations/{organization_id}/locations/{location_id}/notificationConfigs/notify_public_bucket` - # + - # `folders/{folder_id}/locations/{location_id}/notificationConfigs/notify_public_bucket` - # + - # `projects/{project_id}/locations/{location_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::V2::NotificationConfig::StreamingConfig] - # The config for triggering streaming-based notifications. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp of when the notification config was last - # updated. - 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-v2/proto_docs/google/cloud/securitycenter/v2/notification_message.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/notification_message.rb deleted file mode 100644 index bd3046afd7de..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/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 V2 - # 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::V2::Finding] - # If it's a Finding based notification config, this field will be - # populated. - # @!attribute [rw] resource - # @return [::Google::Cloud::SecurityCenter::V2::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-v2/proto_docs/google/cloud/securitycenter/v2/org_policy.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/org_policy.rb deleted file mode 100644 index b90cb7b8d034..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/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 V2 - # Contains information about the org policies associated with the finding. - # @!attribute [rw] name - # @return [::String] - # Identifier. 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-v2/proto_docs/google/cloud/securitycenter/v2/process.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/process.rb deleted file mode 100644 index e127710a40a5..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/process.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 V2 - # 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::V2::File] - # File information for the process executable. - # @!attribute [rw] libraries - # @return [::Array<::Google::Cloud::SecurityCenter::V2::File>] - # File information for libraries loaded by the process. - # @!attribute [rw] script - # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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. - # @!attribute [rw] user_id - # @return [::Integer] - # The ID of the user that executed the process. E.g. If this is the root user - # this will always be 0. - 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-v2/proto_docs/google/cloud/securitycenter/v2/resource.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/resource.rb deleted file mode 100644 index aaa75073c739..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/resource.rb +++ /dev/null @@ -1,314 +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 V2 - # 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] cloud_provider - # @return [::Google::Cloud::SecurityCenter::V2::CloudProvider] - # Indicates which cloud provider the finding is from. - # @!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] gcp_metadata - # @return [::Google::Cloud::SecurityCenter::V2::GcpMetadata] - # The GCP metadata associated with the finding. - # - # Note: The following fields are mutually exclusive: `gcp_metadata`, `aws_metadata`, `azure_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] aws_metadata - # @return [::Google::Cloud::SecurityCenter::V2::AwsMetadata] - # The AWS metadata associated with the finding. - # - # Note: The following fields are mutually exclusive: `aws_metadata`, `gcp_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::V2::AzureMetadata] - # The Azure metadata associated with the finding. - # - # Note: The following fields are mutually exclusive: `azure_metadata`, `gcp_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::V2::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 - - # Google Cloud metadata associated with the resource. Only applicable if the - # finding's cloud provider is Google Cloud. - # @!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::V2::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] organization - # @return [::String] - # The name of the organization that the resource belongs to. - class GcpMetadata - 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::V2::AwsMetadata::AwsOrganization] - # The AWS organization associated with the resource. - # @!attribute [rw] organizational_units - # @return [::Array<::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::AzureMetadata::AzureSubscription] - # The Azure subscription associated with the resource. - # @!attribute [rw] resource_group - # @return [::Google::Cloud::SecurityCenter::V2::AzureMetadata::AzureResourceGroup] - # The Azure resource group associated with the resource. - # @!attribute [rw] tenant - # @return [::Google::Cloud::SecurityCenter::V2::AzureMetadata::AzureTenant] - # The Azure Entra tenant 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] id - # @return [::String] - # The ID of the 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 - - # Represents a Microsoft Entra tenant. - # @!attribute [rw] id - # @return [::String] - # The ID of the Microsoft Entra tenant, for example, - # "a11aaa11-aa11-1aa1-11aa-1aaa11a". - # @!attribute [rw] display_name - # @return [::String] - # The display name of the Azure tenant. - class AzureTenant - 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::V2::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::V2::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 - - # The cloud provider the finding pertains to. - module CloudProvider - # The cloud provider is unspecified. - CLOUD_PROVIDER_UNSPECIFIED = 0 - - # The cloud provider is Google Cloud. - 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-v2/proto_docs/google/cloud/securitycenter/v2/resource_value_config.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/resource_value_config.rb deleted file mode 100644 index 450e83f704b5..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/resource_value_config.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 Cloud - module SecurityCenter - module V2 - # 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] - # Identifier. Name for the resource value configuration - # @!attribute [rw] resource_value - # @return [::Google::Cloud::SecurityCenter::V2::ResourceValue] - # Resource value level this expression represents - # Only required when there is no Sensitive Data Protection mapping in the - # request - # @!attribute [rw] tag_values - # @return [::Array<::String>] - # Tag values combined with `AND` to check against. - # For Google Cloud resources, they are tag value IDs in the form of - # "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 and 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::V2::CloudProvider] - # Cloud provider this configuration applies to - # @!attribute [rw] sensitive_data_protection_mapping - # @return [::Google::Cloud::SecurityCenter::V2::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::V2::ResourceValue] - # Resource value mapping for high-sensitivity Sensitive Data Protection - # findings - # @!attribute [rw] medium_sensitivity_mapping - # @return [::Google::Cloud::SecurityCenter::V2::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-v2/proto_docs/google/cloud/securitycenter/v2/security_marks.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/security_marks.rb deleted file mode 100644 index 1e3bcc93a58a..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/security_marks.rb +++ /dev/null @@ -1,84 +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 V2 - # 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 - # The following list shows some examples: - # - # + `organizations/{organization_id}/assets/{asset_id}/securityMarks` - # + - # `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks` - # + - # `organizations/{organization_id}/sources/{source_id}/locations/{location}/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. The following list shows some examples: - # - # + `organizations/{organization_id}/assets/{asset_id}/securityMarks` - # + - # `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks` - # + - # `organizations/{organization_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks` - # + `folders/{folder_id}/assets/{asset_id}/securityMarks` - # + - # `folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks` - # + - # `folders/{folder_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks` - # + `projects/{project_number}/assets/{asset_id}/securityMarks` - # + - # `projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks` - # + - # `projects/{project_number}/sources/{source_id}/locations/{location}/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-v2/proto_docs/google/cloud/securitycenter/v2/security_posture.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/security_posture.rb deleted file mode 100644 index 3c2c9899fac1..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/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 V2 - # 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 policy set, 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::V2::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-v2/proto_docs/google/cloud/securitycenter/v2/securitycenter_service.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/securitycenter_service.rb deleted file mode 100644 index 5aa1b2607e39..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/securitycenter_service.rb +++ /dev/null @@ -1,1216 +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 V2 - # 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::V2::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::V2::ResourceValueConfig>] - # The resource value configs created - class BatchCreateResourceValueConfigsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # 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. If no - # location is specified, findings are updated in global. The following list - # shows some examples: - # - # + `organizations/[organization_id]` - # + `organizations/[organization_id]/locations/[location_id]` - # + `folders/[folder_id]` - # + `folders/[folder_id]/locations/[location_id]` - # + `projects/[project_id]` - # + `projects/[project_id]/locations/[location_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_state - # @return [::Google::Cloud::SecurityCenter::V2::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 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]/locations/[location_id]`, - # `folders/[folder_id]/locations/[location_id]`, or - # `projects/[project_id]/locations/[location_id]`. - # @!attribute [rw] big_query_export - # @return [::Google::Cloud::SecurityCenter::V2::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 creating a finding. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the new finding's parent. The following list - # shows some examples of the format: - # + - # `organizations/[organization_id]/sources/[source_id]` - # + - # `organizations/[organization_id]/sources/[source_id]/locations/[location_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::V2::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]/locations/[location_id]`, - # `folders/[folder_id]/locations/[location_id]`, or - # `projects/[project_id]/locations/[location_id]`. - # @!attribute [rw] mute_config - # @return [::Google::Cloud::SecurityCenter::V2::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 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]/locations/[location_id]`, - # `folders/[folder_id]/locations/[location_id]`, or - # `projects/[project_id]/locations/[location_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::V2::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 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::V2::ResourceValueConfig] - # Required. The resource value config being created. - class CreateResourceValueConfigRequest - 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::V2::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 BigQuery export. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the BigQuery export to delete. The following list - # shows some examples of the format: - # - # + - # `organizations/{organization}/locations/{location}/bigQueryExports/{export_id}` - # + `folders/{folder}/locations/{location}/bigQueryExports/{export_id}` - # + `projects/{project}/locations/{location}/bigQueryExports/{export_id}` - class DeleteBigQueryExportRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for deleting a mute config. If no location is specified, - # default is global. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the mute config to delete. The following list shows some - # examples of the format: - # - # + `organizations/{organization}/muteConfigs/{config_id}` - # + - # `organizations/{organization}/locations/{location}/muteConfigs/{config_id}` - # + `folders/{folder}/muteConfigs/{config_id}` - # + `folders/{folder}/locations/{location}/muteConfigs/{config_id}` - # + `projects/{project}/muteConfigs/{config_id}` - # + `projects/{project}/locations/{location}/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. The following list - # shows some examples of the format: - # - # + - # `organizations/[organization_id]/locations/[location_id]/notificationConfigs/[config_id]` - # + - # `folders/[folder_id]/locations/[location_id]notificationConfigs/[config_id]` - # + - # `projects/[project_id]/locations/[location_id]notificationConfigs/[config_id]` - class DeleteNotificationConfigRequest - 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 - - # The destination big query dataset to export findings to. - # @!attribute [rw] dataset - # @return [::String] - # Required. The relative resource name of the destination dataset, in the - # form projects/\\{projectId}/datasets/\\{datasetId}. - class BigQueryDestination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The LRO metadata for a ExportFindings request. - # @!attribute [rw] export_start_time - # @return [::Google::Protobuf::Timestamp] - # Optional. Timestamp at which export was started - # @!attribute [rw] big_query_destination - # @return [::Google::Cloud::SecurityCenter::V2::BigQueryDestination] - # Required. The destination big query dataset to export findings to. - class ExportFindingsMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response to a ExportFindings request. Contains the LRO information. - class ExportFindingsResponse - 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. The following list shows - # some examples of the format: - # - # + - # `organizations/{organization}/locations/{location}/bigQueryExports/{export_id}` - # + `folders/{folder}/locations/{location}/bigQueryExports/{export_id}` - # + `projects/{project}locations/{location}//bigQueryExports/{export_id}` - class GetBigQueryExportRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for retrieving a mute config. If no location is specified, - # default is global. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the mute config to retrieve. The following list shows - # some examples of the format: - # - # + `organizations/{organization}/muteConfigs/{config_id}` - # + - # `organizations/{organization}/locations/{location}/muteConfigs/{config_id}` - # + `folders/{folder}/muteConfigs/{config_id}` - # + `folders/{folder}/locations/{location}/muteConfigs/{config_id}` - # + `projects/{project}/muteConfigs/{config_id}` - # + `projects/{project}/locations/{location}/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. The following list shows - # some examples of the format: - # - # + - # `organizations/[organization_id]/locations/[location_id]/notificationConfigs/[config_id]` - # + - # `folders/[folder_id]/locations/[location_id]/notificationConfigs/[config_id]` - # + - # `projects/[project_id]/locations/[location_id]/notificationConfigs/[config_id]` - class GetNotificationConfigRequest - 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 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 findings. - # @!attribute [rw] parent - # @return [::String] - # Required. Name of the source to groupBy. If no location is specified, - # finding is assumed to be in global. - # The following list shows some examples: - # - # + `organizations/[organization_id]/sources/[source_id]` - # + - # `organizations/[organization_id]/sources/[source_id]/locations/[location_id]` - # + `folders/[folder_id]/sources/[source_id]` - # + `folders/[folder_id]/sources/[source_id]/locations/[location_id]` - # + `projects/[project_id]/sources/[source_id]` - # + `projects/[project_id]/sources/[source_id]/locations/[location_id]` - # - # To groupBy across all sources provide a source_id of `-`. The following - # list shows some examples: - # - # + `organizations/{organization_id}/sources/-` - # + `organizations/{organization_id}/sources/-/locations/[location_id]` - # + `folders/{folder_id}/sources/-` - # + `folders/{folder_id}/sources/-/locations/[location_id]` - # + `projects/{project_id}/sources/-` - # + `projects/{project_id}/sources/-/locations/[location_id]` - # @!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 - # * 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: `=`, `:` - # * security_marks.marks: `=`, `:` - # * 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. - # The string value should follow SQL syntax: comma separated list of fields. - # For example: "parent,resource_name". - # @!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::V2::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] 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 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::V2::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 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]/locations/[location_id]`, - # `folders/[folder_id]/locations/[location_id]`, or - # `projects/[project_id]/locations/[location_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::V2::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 listing findings. - # @!attribute [rw] parent - # @return [::String] - # Required. Name of the source the findings belong to. If no location is - # specified, the default is global. The following list shows some examples: - # - # + `organizations/[organization_id]/sources/[source_id]` - # + - # `organizations/[organization_id]/sources/[source_id]/locations/[location_id]` - # + `folders/[folder_id]/sources/[source_id]` - # + `folders/[folder_id]/sources/[source_id]/locations/[location_id]` - # + `projects/[project_id]/sources/[source_id]` - # + `projects/[project_id]/sources/[source_id]/locations/[location_id]` - # - # To list across all sources provide a source_id of `-`. The following - # list shows some examples: - # - # + `organizations/{organization_id}/sources/-` - # + `organizations/{organization_id}/sources/-/locations/{location_id}` - # + `folders/{folder_id}/sources/-` - # + `folders/{folder_id}/sources/-locations/{location_id}` - # + `projects/{projects_id}/sources/-` - # + `projects/{projects_id}/sources/-/locations/{location_id}` - # @!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 - # * 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: `=`, `:` - # * security_marks.marks: `=`, `:` - # * 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,parent". 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,parent". Redundant space characters in the - # syntax are insignificant. "name desc,parent" and " - # name desc , parent " are equivalent. - # - # The following fields are supported: - # name - # parent - # state - # category - # resource_name - # event_time - # security_marks.marks - # @!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::V2::ListFindingsResponse::ListFindingsResult>] - # Findings matching 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. - # @!attribute [rw] finding - # @return [::Google::Cloud::SecurityCenter::V2::Finding] - # Finding matching the search request. - # @!attribute [r] resource - # @return [::Google::Cloud::SecurityCenter::V2::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] cloud_provider - # @return [::Google::Cloud::SecurityCenter::V2::CloudProvider] - # Indicates which cloud provider the finding is from. - # @!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] gcp_metadata - # @return [::Google::Cloud::SecurityCenter::V2::GcpMetadata] - # The GCP metadata associated with the finding. - # - # Note: The following fields are mutually exclusive: `gcp_metadata`, `aws_metadata`, `azure_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] aws_metadata - # @return [::Google::Cloud::SecurityCenter::V2::AwsMetadata] - # The AWS metadata associated with the finding. - # - # Note: The following fields are mutually exclusive: `aws_metadata`, `gcp_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::V2::AzureMetadata] - # The Azure metadata associated with the finding. - # - # Note: The following fields are mutually exclusive: `azure_metadata`, `gcp_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::V2::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 - end - end - - # Request message for listing mute configs at a given scope e.g. organization, - # folder or project. If no location is specified, default is - # global. - # @!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]`, - # `organizations/[organization_id]/locations/[location_id]`, - # `folders/[folder_id]/locations/[location_id]`, - # `projects/[project_id]/locations/[location_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::V2::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]/locations/[location_id]", - # "folders/[folder_id]/locations/[location_id]", or - # "projects/[project_id]/locations/[location_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::V2::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 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 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 `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::V2::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 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::V2::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 the valued resources for a given simulation. - # @!attribute [rw] parent - # @return [::String] - # Required. Name of parent to list exposed 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` - # - # 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::V2::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 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. If no location is specified, finding is assumed to be in - # global. The following list shows some examples: - # - # + - # `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}` - # + - # `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` - # + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}` - # + - # `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` - # + `projects/{project_id}/sources/{source_id}/findings/{finding_id}` - # + - # `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` - # @!attribute [rw] state - # @return [::Google::Cloud::SecurityCenter::V2::Finding::State] - # Required. The desired State of the finding. - 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. If no location is specified, finding is assumed to be in - # global. The following list shows some examples: - # - # + - # `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}` - # + - # `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` - # + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}` - # + - # `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` - # + `projects/{project_id}/sources/{source_id}/findings/{finding_id}` - # + - # `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` - # @!attribute [rw] mute - # @return [::Google::Cloud::SecurityCenter::V2::Finding::Mute] - # Required. The desired state of the Mute. - class SetMuteRequest - 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::V2::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 updating a ExternalSystem resource. - # @!attribute [rw] external_system - # @return [::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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 to update resource value config - # @!attribute [rw] resource_value_config - # @return [::Google::Cloud::SecurityCenter::V2::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. - # - # To update nested fields, include the top level field in the mask - # For example, to update gcp_metadata.resource_type, include the - # "gcp_metadata" field mask - class UpdateResourceValueConfigRequest - 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::V2::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.". - class UpdateSecurityMarksRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for updating a source. - # @!attribute [rw] source - # @return [::Google::Cloud::SecurityCenter::V2::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 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/simulation.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/simulation.rb deleted file mode 100644 index 05bb5af8f001..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/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 V2 - # 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::V2::ResourceValueConfigMetadata>] - # Resource value configurations' metadata used in this simulation. Maximum of - # 100. - # @!attribute [rw] cloud_provider - # @return [::Google::Cloud::SecurityCenter::V2::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-v2/proto_docs/google/cloud/securitycenter/v2/source.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/source.rb deleted file mode 100644 index 27dd5626b0cf..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/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 V2 - # 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-v2/proto_docs/google/cloud/securitycenter/v2/toxic_combination.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/toxic_combination.rb deleted file mode 100644 index dff76d98c704..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/toxic_combination.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 V2 - # 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-v2/proto_docs/google/cloud/securitycenter/v2/valued_resource.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/valued_resource.rb deleted file mode 100644 index e97a21960308..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/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 V2 - # 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::V2::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::V2::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-v2/proto_docs/google/cloud/securitycenter/v2/vertex_ai.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/vertex_ai.rb deleted file mode 100644 index f11b0348de0a..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/vertex_ai.rb +++ /dev/null @@ -1,68 +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 V2 - # Vertex AI-related information associated with the finding. - # @!attribute [rw] datasets - # @return [::Array<::Google::Cloud::SecurityCenter::V2::VertexAi::Dataset>] - # Datasets associated with the finding. - # @!attribute [rw] pipelines - # @return [::Array<::Google::Cloud::SecurityCenter::V2::VertexAi::Pipeline>] - # Pipelines associated with the finding. - class VertexAi - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Vertex AI dataset associated with the finding. - # @!attribute [rw] name - # @return [::String] - # Resource name of the dataset, e.g. - # projects/\\{project}/locations/\\{location}/datasets/2094040236064505856 - # @!attribute [rw] display_name - # @return [::String] - # The user defined display name of dataset, e.g. plants-dataset - # @!attribute [rw] source - # @return [::String] - # Data source, such as a BigQuery source URI, e.g. - # bq://scc-nexus-test.AIPPtest.gsod - class Dataset - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Vertex AI training pipeline associated with the finding. - # @!attribute [rw] name - # @return [::String] - # Resource name of the pipeline, e.g. - # projects/\\{project}/locations/\\{location}/trainingPipelines/5253428229225578496 - # @!attribute [rw] display_name - # @return [::String] - # The user-defined display name of pipeline, e.g. plants-classification - class Pipeline - 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-v2/proto_docs/google/cloud/securitycenter/v2/vulnerability.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/vulnerability.rb deleted file mode 100644 index 41c3a3589f1d..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/cloud/securitycenter/v2/vulnerability.rb +++ /dev/null @@ -1,365 +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 V2 - # Refers to common vulnerability fields e.g. cve, cvss, cwe etc. - # @!attribute [rw] cve - # @return [::Google::Cloud::SecurityCenter::V2::Cve] - # CVE stands for Common Vulnerabilities and Exposures - # (https://cve.mitre.org/about/) - # @!attribute [rw] offending_package - # @return [::Google::Cloud::SecurityCenter::V2::Package] - # The offending package is relevant to the finding. - # @!attribute [rw] fixed_package - # @return [::Google::Cloud::SecurityCenter::V2::Package] - # The fixed package is relevant to the finding. - # @!attribute [rw] security_bulletin - # @return [::Google::Cloud::SecurityCenter::V2::SecurityBulletin] - # The security bulletin is relevant to this finding. - # @!attribute [rw] provider_risk_score - # @return [::Integer] - # Provider provided risk_score based on multiple factors. The higher the risk - # score, the more risky the vulnerability is. - # @!attribute [rw] reachable - # @return [::Boolean] - # Represents whether the vulnerability is reachable (detected via static - # analysis) - # @!attribute [rw] cwes - # @return [::Array<::Google::Cloud::SecurityCenter::V2::Cwe>] - # Represents one or more Common Weakness Enumeration (CWE) information on - # this vulnerability. - 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::V2::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::V2::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::V2::Cve::RiskRating] - # The potential impact of the vulnerability if it was to be exploited. - # @!attribute [rw] exploitation_activity - # @return [::Google::Cloud::SecurityCenter::V2::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. - # @!attribute [rw] first_exploitation_date - # @return [::Google::Protobuf::Timestamp] - # Date of the earliest known exploitation. - 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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::Cvssv3::Impact] - # This metric measures the impact to integrity of a successfully exploited - # vulnerability. - # @!attribute [rw] availability_impact - # @return [::Google::Cloud::SecurityCenter::V2::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 - - # CWE stands for Common Weakness Enumeration. Information about this weakness, - # as described by [CWE](https://cwe.mitre.org/). - # @!attribute [rw] id - # @return [::String] - # The CWE identifier, e.g. CWE-94 - # @!attribute [rw] references - # @return [::Array<::Google::Cloud::SecurityCenter::V2::Reference>] - # Any reference to the details on the CWE, for example, - # https://cwe.mitre.org/data/definitions/94.html - class Cwe - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/iam/v1/iam_policy.rb deleted file mode 100644 index 5445c77f8258..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/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-v2/proto_docs/google/iam/v1/options.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/iam/v1/options.rb deleted file mode 100644 index 60713d995b86..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/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-v2/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/iam/v1/policy.rb deleted file mode 100644 index 999575b797df..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/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-v2/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/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-v2/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/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-v2/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/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-v2/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/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-v2/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/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-v2/proto_docs/google/protobuf/struct.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/struct.rb deleted file mode 100644 index 39e1aca868d2..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/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-v2/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/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-v2/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/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-v2/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-security_center-v2/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/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-v2/snippets/Gemfile b/owl-bot-staging/google-cloud-security_center-v2/snippets/Gemfile deleted file mode 100644 index 99432c66bb92..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/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-v2", path: "../" -else - gem "google-cloud-security_center-v2" -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-v2/snippets/security_center/batch_create_resource_value_configs.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/batch_create_resource_value_configs.rb deleted file mode 100644 index 35868ebf184f..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_BatchCreateResourceValueConfigs_sync] -require "google/cloud/security_center/v2" - -## -# 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::V2::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::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::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::V2::BatchCreateResourceValueConfigsResponse. - p result -end -# [END securitycenter_v2_generated_SecurityCenter_BatchCreateResourceValueConfigs_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/bulk_mute_findings.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/bulk_mute_findings.rb deleted file mode 100644 index 937f173f1687..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_BulkMuteFindings_sync] -require "google/cloud/security_center/v2" - -## -# 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::V2::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::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::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_v2_generated_SecurityCenter_BulkMuteFindings_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_big_query_export.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_big_query_export.rb deleted file mode 100644 index 34909f562782..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_CreateBigQueryExport_sync] -require "google/cloud/security_center/v2" - -## -# 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::V2::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::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::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::V2::BigQueryExport. - p result -end -# [END securitycenter_v2_generated_SecurityCenter_CreateBigQueryExport_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_finding.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_finding.rb deleted file mode 100644 index b2dbeb349717..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_CreateFinding_sync] -require "google/cloud/security_center/v2" - -## -# 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::V2::SecurityCenter::Client#create_finding. -# -def create_finding - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::CreateFindingRequest.new - - # Call the create_finding method. - result = client.create_finding request - - # The returned object is of type Google::Cloud::SecurityCenter::V2::Finding. - p result -end -# [END securitycenter_v2_generated_SecurityCenter_CreateFinding_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_mute_config.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_mute_config.rb deleted file mode 100644 index 5ac853e23ca6..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_CreateMuteConfig_sync] -require "google/cloud/security_center/v2" - -## -# 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::V2::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::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::CreateMuteConfigRequest.new - - # Call the create_mute_config method. - result = client.create_mute_config request - - # The returned object is of type Google::Cloud::SecurityCenter::V2::MuteConfig. - p result -end -# [END securitycenter_v2_generated_SecurityCenter_CreateMuteConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_notification_config.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_notification_config.rb deleted file mode 100644 index 8d63ccdb2cc6..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_CreateNotificationConfig_sync] -require "google/cloud/security_center/v2" - -## -# 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::V2::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::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::CreateNotificationConfigRequest.new - - # Call the create_notification_config method. - result = client.create_notification_config request - - # The returned object is of type Google::Cloud::SecurityCenter::V2::NotificationConfig. - p result -end -# [END securitycenter_v2_generated_SecurityCenter_CreateNotificationConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_source.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/create_source.rb deleted file mode 100644 index 042a0de0ff05..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_CreateSource_sync] -require "google/cloud/security_center/v2" - -## -# 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::V2::SecurityCenter::Client#create_source. -# -def create_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::CreateSourceRequest.new - - # Call the create_source method. - result = client.create_source request - - # The returned object is of type Google::Cloud::SecurityCenter::V2::Source. - p result -end -# [END securitycenter_v2_generated_SecurityCenter_CreateSource_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/delete_big_query_export.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/delete_big_query_export.rb deleted file mode 100644 index c5b9ec740f3f..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_DeleteBigQueryExport_sync] -require "google/cloud/security_center/v2" - -## -# 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::V2::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::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::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_v2_generated_SecurityCenter_DeleteBigQueryExport_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/delete_mute_config.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/delete_mute_config.rb deleted file mode 100644 index f6d9fe6232b5..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_DeleteMuteConfig_sync] -require "google/cloud/security_center/v2" - -## -# 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::V2::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::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::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_v2_generated_SecurityCenter_DeleteMuteConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/delete_notification_config.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/delete_notification_config.rb deleted file mode 100644 index e7084636df2d..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_DeleteNotificationConfig_sync] -require "google/cloud/security_center/v2" - -## -# 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::V2::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::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::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_v2_generated_SecurityCenter_DeleteNotificationConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/delete_resource_value_config.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/delete_resource_value_config.rb deleted file mode 100644 index f369d1ca9754..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_DeleteResourceValueConfig_sync] -require "google/cloud/security_center/v2" - -## -# 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::V2::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::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::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_v2_generated_SecurityCenter_DeleteResourceValueConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_big_query_export.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_big_query_export.rb deleted file mode 100644 index 167844fa3f97..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_GetBigQueryExport_sync] -require "google/cloud/security_center/v2" - -## -# 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::V2::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::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::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::V2::BigQueryExport. - p result -end -# [END securitycenter_v2_generated_SecurityCenter_GetBigQueryExport_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_iam_policy.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_iam_policy.rb deleted file mode 100644 index e260df274f67..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_GetIamPolicy_sync] -require "google/cloud/security_center/v2" - -## -# 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::V2::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::V2::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_v2_generated_SecurityCenter_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_mute_config.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_mute_config.rb deleted file mode 100644 index 737f0b9b778a..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_GetMuteConfig_sync] -require "google/cloud/security_center/v2" - -## -# 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::V2::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::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::GetMuteConfigRequest.new - - # Call the get_mute_config method. - result = client.get_mute_config request - - # The returned object is of type Google::Cloud::SecurityCenter::V2::MuteConfig. - p result -end -# [END securitycenter_v2_generated_SecurityCenter_GetMuteConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_notification_config.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_notification_config.rb deleted file mode 100644 index a6e6fe0bf43d..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_GetNotificationConfig_sync] -require "google/cloud/security_center/v2" - -## -# 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::V2::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::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::GetNotificationConfigRequest.new - - # Call the get_notification_config method. - result = client.get_notification_config request - - # The returned object is of type Google::Cloud::SecurityCenter::V2::NotificationConfig. - p result -end -# [END securitycenter_v2_generated_SecurityCenter_GetNotificationConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_resource_value_config.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_resource_value_config.rb deleted file mode 100644 index dca8397631b9..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_GetResourceValueConfig_sync] -require "google/cloud/security_center/v2" - -## -# 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::V2::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::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::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::V2::ResourceValueConfig. - p result -end -# [END securitycenter_v2_generated_SecurityCenter_GetResourceValueConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_simulation.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_simulation.rb deleted file mode 100644 index 97887b9c87b5..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_GetSimulation_sync] -require "google/cloud/security_center/v2" - -## -# 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::V2::SecurityCenter::Client#get_simulation. -# -def get_simulation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::GetSimulationRequest.new - - # Call the get_simulation method. - result = client.get_simulation request - - # The returned object is of type Google::Cloud::SecurityCenter::V2::Simulation. - p result -end -# [END securitycenter_v2_generated_SecurityCenter_GetSimulation_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_source.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_source.rb deleted file mode 100644 index 9e23b772526e..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_GetSource_sync] -require "google/cloud/security_center/v2" - -## -# 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::V2::SecurityCenter::Client#get_source. -# -def get_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::GetSourceRequest.new - - # Call the get_source method. - result = client.get_source request - - # The returned object is of type Google::Cloud::SecurityCenter::V2::Source. - p result -end -# [END securitycenter_v2_generated_SecurityCenter_GetSource_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_valued_resource.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/get_valued_resource.rb deleted file mode 100644 index 1d27e0e2a2bd..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_GetValuedResource_sync] -require "google/cloud/security_center/v2" - -## -# 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::V2::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::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::GetValuedResourceRequest.new - - # Call the get_valued_resource method. - result = client.get_valued_resource request - - # The returned object is of type Google::Cloud::SecurityCenter::V2::ValuedResource. - p result -end -# [END securitycenter_v2_generated_SecurityCenter_GetValuedResource_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/group_findings.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/group_findings.rb deleted file mode 100644 index 1c83d2e734fb..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_GroupFindings_sync] -require "google/cloud/security_center/v2" - -## -# 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::V2::SecurityCenter::Client#group_findings. -# -def group_findings - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::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::V2::GroupResult. - p item - end -end -# [END securitycenter_v2_generated_SecurityCenter_GroupFindings_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_attack_paths.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_attack_paths.rb deleted file mode 100644 index efd9cc9a111e..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_ListAttackPaths_sync] -require "google/cloud/security_center/v2" - -## -# 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::V2::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::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::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::V2::AttackPath. - p item - end -end -# [END securitycenter_v2_generated_SecurityCenter_ListAttackPaths_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_big_query_exports.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_big_query_exports.rb deleted file mode 100644 index b499ded4d8b6..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_ListBigQueryExports_sync] -require "google/cloud/security_center/v2" - -## -# 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::V2::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::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::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::V2::BigQueryExport. - p item - end -end -# [END securitycenter_v2_generated_SecurityCenter_ListBigQueryExports_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_findings.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_findings.rb deleted file mode 100644 index f8f726312d73..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_ListFindings_sync] -require "google/cloud/security_center/v2" - -## -# 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::V2::SecurityCenter::Client#list_findings. -# -def list_findings - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::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::V2::ListFindingsResponse::ListFindingsResult. - p item - end -end -# [END securitycenter_v2_generated_SecurityCenter_ListFindings_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_mute_configs.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_mute_configs.rb deleted file mode 100644 index aa028407968b..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_ListMuteConfigs_sync] -require "google/cloud/security_center/v2" - -## -# 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::V2::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::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::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::V2::MuteConfig. - p item - end -end -# [END securitycenter_v2_generated_SecurityCenter_ListMuteConfigs_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_notification_configs.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_notification_configs.rb deleted file mode 100644 index 421f44da22ce..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_ListNotificationConfigs_sync] -require "google/cloud/security_center/v2" - -## -# 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::V2::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::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::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::V2::NotificationConfig. - p item - end -end -# [END securitycenter_v2_generated_SecurityCenter_ListNotificationConfigs_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_resource_value_configs.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_resource_value_configs.rb deleted file mode 100644 index ebd23f97037d..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_ListResourceValueConfigs_sync] -require "google/cloud/security_center/v2" - -## -# 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::V2::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::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::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::V2::ResourceValueConfig. - p item - end -end -# [END securitycenter_v2_generated_SecurityCenter_ListResourceValueConfigs_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_sources.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_sources.rb deleted file mode 100644 index 0d014e61ce97..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_ListSources_sync] -require "google/cloud/security_center/v2" - -## -# 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::V2::SecurityCenter::Client#list_sources. -# -def list_sources - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::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::V2::Source. - p item - end -end -# [END securitycenter_v2_generated_SecurityCenter_ListSources_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_valued_resources.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/list_valued_resources.rb deleted file mode 100644 index ff34383c5836..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_ListValuedResources_sync] -require "google/cloud/security_center/v2" - -## -# 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::V2::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::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::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::V2::ValuedResource. - p item - end -end -# [END securitycenter_v2_generated_SecurityCenter_ListValuedResources_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/set_finding_state.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/set_finding_state.rb deleted file mode 100644 index 948f27b578d9..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_SetFindingState_sync] -require "google/cloud/security_center/v2" - -## -# 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::V2::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::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::SetFindingStateRequest.new - - # Call the set_finding_state method. - result = client.set_finding_state request - - # The returned object is of type Google::Cloud::SecurityCenter::V2::Finding. - p result -end -# [END securitycenter_v2_generated_SecurityCenter_SetFindingState_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/set_iam_policy.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/set_iam_policy.rb deleted file mode 100644 index 357443d72dfc..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_SetIamPolicy_sync] -require "google/cloud/security_center/v2" - -## -# 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::V2::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::V2::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_v2_generated_SecurityCenter_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/set_mute.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/set_mute.rb deleted file mode 100644 index 7928a7e3a85b..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_SetMute_sync] -require "google/cloud/security_center/v2" - -## -# 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::V2::SecurityCenter::Client#set_mute. -# -def set_mute - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::SetMuteRequest.new - - # Call the set_mute method. - result = client.set_mute request - - # The returned object is of type Google::Cloud::SecurityCenter::V2::Finding. - p result -end -# [END securitycenter_v2_generated_SecurityCenter_SetMute_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/test_iam_permissions.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/test_iam_permissions.rb deleted file mode 100644 index 7a22e129a409..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_TestIamPermissions_sync] -require "google/cloud/security_center/v2" - -## -# 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::V2::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::V2::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_v2_generated_SecurityCenter_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_big_query_export.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_big_query_export.rb deleted file mode 100644 index c3357e841268..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_UpdateBigQueryExport_sync] -require "google/cloud/security_center/v2" - -## -# 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::V2::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::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::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::V2::BigQueryExport. - p result -end -# [END securitycenter_v2_generated_SecurityCenter_UpdateBigQueryExport_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_external_system.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_external_system.rb deleted file mode 100644 index 58bb7f1196d7..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_UpdateExternalSystem_sync] -require "google/cloud/security_center/v2" - -## -# 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::V2::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::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::UpdateExternalSystemRequest.new - - # Call the update_external_system method. - result = client.update_external_system request - - # The returned object is of type Google::Cloud::SecurityCenter::V2::ExternalSystem. - p result -end -# [END securitycenter_v2_generated_SecurityCenter_UpdateExternalSystem_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_finding.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_finding.rb deleted file mode 100644 index 3d8d7bc0e599..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_UpdateFinding_sync] -require "google/cloud/security_center/v2" - -## -# 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::V2::SecurityCenter::Client#update_finding. -# -def update_finding - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::UpdateFindingRequest.new - - # Call the update_finding method. - result = client.update_finding request - - # The returned object is of type Google::Cloud::SecurityCenter::V2::Finding. - p result -end -# [END securitycenter_v2_generated_SecurityCenter_UpdateFinding_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_mute_config.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_mute_config.rb deleted file mode 100644 index efa2c28e01be..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_UpdateMuteConfig_sync] -require "google/cloud/security_center/v2" - -## -# 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::V2::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::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::UpdateMuteConfigRequest.new - - # Call the update_mute_config method. - result = client.update_mute_config request - - # The returned object is of type Google::Cloud::SecurityCenter::V2::MuteConfig. - p result -end -# [END securitycenter_v2_generated_SecurityCenter_UpdateMuteConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_notification_config.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_notification_config.rb deleted file mode 100644 index 50e827404937..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_UpdateNotificationConfig_sync] -require "google/cloud/security_center/v2" - -## -# 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::V2::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::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::UpdateNotificationConfigRequest.new - - # Call the update_notification_config method. - result = client.update_notification_config request - - # The returned object is of type Google::Cloud::SecurityCenter::V2::NotificationConfig. - p result -end -# [END securitycenter_v2_generated_SecurityCenter_UpdateNotificationConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_resource_value_config.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_resource_value_config.rb deleted file mode 100644 index fb28fc12506d..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_UpdateResourceValueConfig_sync] -require "google/cloud/security_center/v2" - -## -# 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::V2::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::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::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::V2::ResourceValueConfig. - p result -end -# [END securitycenter_v2_generated_SecurityCenter_UpdateResourceValueConfig_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_security_marks.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_security_marks.rb deleted file mode 100644 index 828f608dee92..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_UpdateSecurityMarks_sync] -require "google/cloud/security_center/v2" - -## -# 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::V2::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::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::UpdateSecurityMarksRequest.new - - # Call the update_security_marks method. - result = client.update_security_marks request - - # The returned object is of type Google::Cloud::SecurityCenter::V2::SecurityMarks. - p result -end -# [END securitycenter_v2_generated_SecurityCenter_UpdateSecurityMarks_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_source.rb b/owl-bot-staging/google-cloud-security_center-v2/snippets/security_center/update_source.rb deleted file mode 100644 index 7dad0281409d..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/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_v2_generated_SecurityCenter_UpdateSource_sync] -require "google/cloud/security_center/v2" - -## -# 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::V2::SecurityCenter::Client#update_source. -# -def update_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::SecurityCenter::V2::UpdateSourceRequest.new - - # Call the update_source method. - result = client.update_source request - - # The returned object is of type Google::Cloud::SecurityCenter::V2::Source. - p result -end -# [END securitycenter_v2_generated_SecurityCenter_UpdateSource_sync] diff --git a/owl-bot-staging/google-cloud-security_center-v2/snippets/snippet_metadata_google.cloud.securitycenter.v2.json b/owl-bot-staging/google-cloud-security_center-v2/snippets/snippet_metadata_google.cloud.securitycenter.v2.json deleted file mode 100644 index 8b78714ab7d9..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/snippets/snippet_metadata_google.cloud.securitycenter.v2.json +++ /dev/null @@ -1,1615 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-security_center-v2", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.securitycenter.v2", - "version": "v2" - } - ] - }, - "snippets": [ - { - "region_tag": "securitycenter_v2_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::V2::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::V2::SecurityCenter::Client#batch_create_resource_value_configs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "BatchCreateResourceValueConfigs", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.BatchCreateResourceValueConfigs", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_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::V2::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::V2::SecurityCenter::Client#bulk_mute_findings", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::BulkMuteFindingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "BulkMuteFindings", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.BulkMuteFindings", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_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::V2::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::V2::SecurityCenter::Client#create_big_query_export", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::CreateBigQueryExportRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V2::BigQueryExport", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "CreateBigQueryExport", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.CreateBigQueryExport", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_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::V2::SecurityCenter::Client#create_finding.", - "file": "security_center/create_finding.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_finding", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#create_finding", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::CreateFindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V2::Finding", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "CreateFinding", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.CreateFinding", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_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::V2::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::V2::SecurityCenter::Client#create_mute_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::CreateMuteConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V2::MuteConfig", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "CreateMuteConfig", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.CreateMuteConfig", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_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::V2::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::V2::SecurityCenter::Client#create_notification_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::CreateNotificationConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V2::NotificationConfig", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "CreateNotificationConfig", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.CreateNotificationConfig", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_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::V2::SecurityCenter::Client#create_source.", - "file": "security_center/create_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_source", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#create_source", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::CreateSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V2::Source", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "CreateSource", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.CreateSource", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_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::V2::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::V2::SecurityCenter::Client#delete_big_query_export", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::DeleteBigQueryExportRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "DeleteBigQueryExport", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.DeleteBigQueryExport", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_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::V2::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::V2::SecurityCenter::Client#delete_mute_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::DeleteMuteConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "DeleteMuteConfig", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.DeleteMuteConfig", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_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::V2::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::V2::SecurityCenter::Client#delete_notification_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::DeleteNotificationConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "DeleteNotificationConfig", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.DeleteNotificationConfig", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_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::V2::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::V2::SecurityCenter::Client#delete_resource_value_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::DeleteResourceValueConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "DeleteResourceValueConfig", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.DeleteResourceValueConfig", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_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::V2::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::V2::SecurityCenter::Client#get_big_query_export", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::GetBigQueryExportRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V2::BigQueryExport", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "GetBigQueryExport", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.GetBigQueryExport", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_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::V2::SecurityCenter::Client#get_simulation.", - "file": "security_center/get_simulation.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_simulation", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#get_simulation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::GetSimulationRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V2::Simulation", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "GetSimulation", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.GetSimulation", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_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::V2::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::V2::SecurityCenter::Client#get_valued_resource", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::GetValuedResourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V2::ValuedResource", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "GetValuedResource", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.GetValuedResource", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_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::V2::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::V2::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::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "GetIamPolicy", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.GetIamPolicy", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_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::V2::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::V2::SecurityCenter::Client#get_mute_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::GetMuteConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V2::MuteConfig", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "GetMuteConfig", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.GetMuteConfig", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_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::V2::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::V2::SecurityCenter::Client#get_notification_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::GetNotificationConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V2::NotificationConfig", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "GetNotificationConfig", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.GetNotificationConfig", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_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::V2::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::V2::SecurityCenter::Client#get_resource_value_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::GetResourceValueConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V2::ResourceValueConfig", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "GetResourceValueConfig", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.GetResourceValueConfig", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_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::V2::SecurityCenter::Client#get_source.", - "file": "security_center/get_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_source", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#get_source", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::GetSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V2::Source", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "GetSource", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.GetSource", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_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::V2::SecurityCenter::Client#group_findings.", - "file": "security_center/group_findings.rb", - "language": "RUBY", - "client_method": { - "short_name": "group_findings", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#group_findings", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::GroupFindingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V2::GroupFindingsResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "GroupFindings", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.GroupFindings", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_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::V2::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::V2::SecurityCenter::Client#list_attack_paths", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::ListAttackPathsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V2::ListAttackPathsResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "ListAttackPaths", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.ListAttackPaths", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_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::V2::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::V2::SecurityCenter::Client#list_big_query_exports", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::ListBigQueryExportsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V2::ListBigQueryExportsResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "ListBigQueryExports", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.ListBigQueryExports", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_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::V2::SecurityCenter::Client#list_findings.", - "file": "security_center/list_findings.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_findings", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#list_findings", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::ListFindingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V2::ListFindingsResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "ListFindings", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.ListFindings", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_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::V2::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::V2::SecurityCenter::Client#list_mute_configs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::ListMuteConfigsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V2::ListMuteConfigsResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "ListMuteConfigs", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.ListMuteConfigs", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_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::V2::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::V2::SecurityCenter::Client#list_notification_configs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::ListNotificationConfigsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V2::ListNotificationConfigsResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "ListNotificationConfigs", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.ListNotificationConfigs", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_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::V2::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::V2::SecurityCenter::Client#list_resource_value_configs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "ListResourceValueConfigs", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.ListResourceValueConfigs", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_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::V2::SecurityCenter::Client#list_sources.", - "file": "security_center/list_sources.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_sources", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#list_sources", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::ListSourcesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V2::ListSourcesResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "ListSources", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.ListSources", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_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::V2::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::V2::SecurityCenter::Client#list_valued_resources", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::ListValuedResourcesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V2::ListValuedResourcesResponse", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "ListValuedResources", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.ListValuedResources", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_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::V2::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::V2::SecurityCenter::Client#set_finding_state", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::SetFindingStateRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V2::Finding", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "SetFindingState", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.SetFindingState", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_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::V2::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::V2::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::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "SetIamPolicy", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.SetIamPolicy", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_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::V2::SecurityCenter::Client#set_mute.", - "file": "security_center/set_mute.rb", - "language": "RUBY", - "client_method": { - "short_name": "set_mute", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#set_mute", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::SetMuteRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V2::Finding", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "SetMute", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.SetMute", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_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::V2::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::V2::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::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "TestIamPermissions", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.TestIamPermissions", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_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::V2::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::V2::SecurityCenter::Client#update_big_query_export", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::UpdateBigQueryExportRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V2::BigQueryExport", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "UpdateBigQueryExport", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.UpdateBigQueryExport", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_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::V2::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::V2::SecurityCenter::Client#update_external_system", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::UpdateExternalSystemRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V2::ExternalSystem", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "UpdateExternalSystem", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.UpdateExternalSystem", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_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::V2::SecurityCenter::Client#update_finding.", - "file": "security_center/update_finding.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_finding", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#update_finding", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::UpdateFindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V2::Finding", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "UpdateFinding", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.UpdateFinding", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_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::V2::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::V2::SecurityCenter::Client#update_mute_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::UpdateMuteConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V2::MuteConfig", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "UpdateMuteConfig", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.UpdateMuteConfig", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_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::V2::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::V2::SecurityCenter::Client#update_notification_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::UpdateNotificationConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V2::NotificationConfig", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "UpdateNotificationConfig", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.UpdateNotificationConfig", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_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::V2::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::V2::SecurityCenter::Client#update_resource_value_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::UpdateResourceValueConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V2::ResourceValueConfig", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "UpdateResourceValueConfig", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.UpdateResourceValueConfig", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_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::V2::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::V2::SecurityCenter::Client#update_security_marks", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::UpdateSecurityMarksRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V2::SecurityMarks", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "UpdateSecurityMarks", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.UpdateSecurityMarks", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "securitycenter_v2_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::V2::SecurityCenter::Client#update_source.", - "file": "security_center/update_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_source", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client#update_source", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::SecurityCenter::V2::UpdateSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::SecurityCenter::V2::Source", - "client": { - "short_name": "SecurityCenter::Client", - "full_name": "::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client" - }, - "method": { - "short_name": "UpdateSource", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter.UpdateSource", - "service": { - "short_name": "SecurityCenter", - "full_name": "google.cloud.securitycenter.v2.SecurityCenter" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_operations_test.rb b/owl-bot-staging/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_operations_test.rb deleted file mode 100644 index f30feef48b99..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/test/google/cloud/security_center/v2/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/v2/securitycenter_service_pb" -require "google/cloud/securitycenter/v2/securitycenter_service_services_pb" -require "google/cloud/security_center/v2/security_center" - -class ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::SecurityCenter::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_paths_test.rb b/owl-bot-staging/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_paths_test.rb deleted file mode 100644 index 88ac82de925a..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_paths_test.rb +++ /dev/null @@ -1,403 +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/v2/security_center" - -class ::Google::Cloud::SecurityCenter::V2::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::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.big_query_export_path organization: "value0", location: "value1", export: "value2" - assert_equal "organizations/value0/locations/value1/bigQueryExports/value2", path - - path = client.big_query_export_path folder: "value0", location: "value1", export: "value2" - assert_equal "folders/value0/locations/value1/bigQueryExports/value2", path - - path = client.big_query_export_path project: "value0", location: "value1", export: "value2" - assert_equal "projects/value0/locations/value1/bigQueryExports/value2", 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::V2::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_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::V2::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 organization: "value0", source: "value1", location: "value2", finding: "value3", externalsystem: "value4" - assert_equal "organizations/value0/sources/value1/locations/value2/findings/value3/externalSystems/value4", 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 folder: "value0", source: "value1", location: "value2", finding: "value3", externalsystem: "value4" - assert_equal "folders/value0/sources/value1/locations/value2/findings/value3/externalSystems/value4", 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 - - path = client.external_system_path project: "value0", source: "value1", location: "value2", finding: "value3", externalsystem: "value4" - assert_equal "projects/value0/sources/value1/locations/value2/findings/value3/externalSystems/value4", 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::V2::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 organization: "value0", source: "value1", location: "value2", finding: "value3" - assert_equal "organizations/value0/sources/value1/locations/value2/findings/value3", path - - path = client.finding_path folder: "value0", source: "value1", finding: "value2" - assert_equal "folders/value0/sources/value1/findings/value2", path - - path = client.finding_path folder: "value0", source: "value1", location: "value2", finding: "value3" - assert_equal "folders/value0/sources/value1/locations/value2/findings/value3", path - - path = client.finding_path project: "value0", source: "value1", finding: "value2" - assert_equal "projects/value0/sources/value1/findings/value2", path - - path = client.finding_path project: "value0", source: "value1", location: "value2", finding: "value3" - assert_equal "projects/value0/sources/value1/locations/value2/findings/value3", 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::V2::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::V2::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::V2::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::V2::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 organization: "value0", location: "value1", mute_config: "value2" - assert_equal "organizations/value0/locations/value1/muteConfigs/value2", path - - path = client.mute_config_path folder: "value0", mute_config: "value1" - assert_equal "folders/value0/muteConfigs/value1", 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", mute_config: "value1" - assert_equal "projects/value0/muteConfigs/value1", 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::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.notification_config_path organization: "value0", location: "value1", notification_config: "value2" - assert_equal "organizations/value0/locations/value1/notificationConfigs/value2", path - - path = client.notification_config_path folder: "value0", location: "value1", notification_config: "value2" - assert_equal "folders/value0/locations/value1/notificationConfigs/value2", path - - path = client.notification_config_path project: "value0", location: "value1", notification_config: "value2" - assert_equal "projects/value0/locations/value1/notificationConfigs/value2", 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::V2::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::V2::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_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::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.organization_valued_resource_path organization: "value0", location: "value1", simulation: "value2", valued_resource: "value3" - assert_equal "organizations/value0/locations/value1/simulations/value2/valuedResources/value3", 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::V2::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::V2::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::V2::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 - - path = client.resource_value_config_path organization: "value0", location: "value1", resource_value_config: "value2" - assert_equal "organizations/value0/locations/value1/resourceValueConfigs/value2", 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::V2::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 organization: "value0", source: "value1", location: "value2", finding: "value3" - assert_equal "organizations/value0/sources/value1/locations/value2/findings/value3/securityMarks", path - - path = client.security_marks_path folder: "value0", asset: "value1" - assert_equal "folders/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 folder: "value0", source: "value1", location: "value2", finding: "value3" - assert_equal "folders/value0/sources/value1/locations/value2/findings/value3/securityMarks", path - - path = client.security_marks_path project: "value0", asset: "value1" - assert_equal "projects/value0/assets/value1/securityMarks", path - - path = client.security_marks_path project: "value0", source: "value1", finding: "value2" - assert_equal "projects/value0/sources/value1/findings/value2/securityMarks", path - - path = client.security_marks_path project: "value0", source: "value1", location: "value2", finding: "value3" - assert_equal "projects/value0/sources/value1/locations/value2/findings/value3/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::V2::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 - - path = client.simulation_path organization: "value0", location: "value1", simluation: "value2" - assert_equal "organizations/value0/locations/value1/simulations/value2", 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::V2::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::V2::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::V2::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::V2::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 - - path = client.valued_resource_path organization: "value0", location: "value1", simluation: "value2", valued_resource: "value3" - assert_equal "organizations/value0/locations/value1/simulations/value2/valuedResources/value3", path - end - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_rest_test.rb b/owl-bot-staging/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_rest_test.rb deleted file mode 100644 index f48ffed9375a..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_rest_test.rb +++ /dev/null @@ -1,2311 +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/v2/securitycenter_service_pb" -require "google/cloud/security_center/v2/security_center/rest" - - -class ::Google::Cloud::SecurityCenter::V2::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_batch_create_resource_value_configs - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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_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_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::V2::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::V2::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.bulk_mute_findings({ parent: parent, filter: filter, 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_state: mute_state do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.bulk_mute_findings ::Google::Cloud::SecurityCenter::V2::BulkMuteFindingsRequest.new(parent: parent, filter: filter, 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_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::V2::BulkMuteFindingsRequest.new(parent: parent, filter: filter, 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_big_query_export - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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_create_finding - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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_create_source - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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_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::V2::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::V2::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::V2::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::V2::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_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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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_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::V2::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::V2::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::V2::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::V2::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_big_query_export - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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_simulation - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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_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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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_resource_value_config - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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_get_source - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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_findings - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V2::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" - 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::V2::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::V2::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, 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, 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::V2::GroupFindingsRequest.new(parent: parent, filter: filter, group_by: group_by, 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, 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::V2::GroupFindingsRequest.new(parent: parent, filter: filter, group_by: group_by, 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_attack_paths - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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_list_big_query_exports - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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_list_findings - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V2::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" - 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::V2::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::V2::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, 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, 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::V2::ListFindingsRequest.new(parent: parent, filter: filter, order_by: order_by, 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, 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::V2::ListFindingsRequest.new(parent: parent, filter: filter, order_by: order_by, 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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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_resource_value_configs - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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_list_sources - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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_list_valued_resources - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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_set_finding_state - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V2::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 - - 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::V2::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::V2::SecurityCenter::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.set_finding_state({ name: name, state: state }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.set_finding_state name: name, state: state do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.set_finding_state ::Google::Cloud::SecurityCenter::V2::SetFindingStateRequest.new(name: name, state: state) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.set_finding_state({ name: name, state: state }, 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::V2::SetFindingStateRequest.new(name: name, state: state), 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_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::V2::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::V2::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_set_mute - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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_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::V2::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::V2::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_update_big_query_export - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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_update_external_system - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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_resource_value_config - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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_update_security_marks - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V2::SecurityMarks.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - security_marks = {} - update_mask = {} - - 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::V2::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::V2::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 }) 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 do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_security_marks ::Google::Cloud::SecurityCenter::V2::UpdateSecurityMarksRequest.new(security_marks: security_marks, update_mask: update_mask) 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 }, 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::V2::UpdateSecurityMarksRequest.new(security_marks: security_marks, 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_marks_client_stub.call_count - end - end - end - - def test_update_source - # Create test objects. - client_result = ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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_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::V2::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::V2::SecurityCenter::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_test.rb b/owl-bot-staging/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_test.rb deleted file mode 100644 index b3295b2bd5b5..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/test/google/cloud/security_center/v2/security_center_test.rb +++ /dev/null @@ -1,2592 +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/v2/securitycenter_service_pb" -require "google/cloud/security_center/v2/security_center" - -class ::Google::Cloud::SecurityCenter::V2::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_batch_create_resource_value_configs - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V2::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::V2::BatchCreateResourceValueConfigsRequest, request - assert_equal "hello world", request["parent"] - assert_kind_of ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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_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_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::V2::BulkMuteFindingsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["filter"] - 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::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.bulk_mute_findings({ parent: parent, filter: filter, 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_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::V2::BulkMuteFindingsRequest.new(parent: parent, filter: filter, 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_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::V2::BulkMuteFindingsRequest.new(parent: parent, filter: filter, 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_big_query_export - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V2::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::V2::CreateBigQueryExportRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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_create_finding - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V2::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::V2::CreateFindingRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["finding_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V2::Finding), request["finding"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_finding_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::CreateMuteConfigRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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::V2::CreateNotificationConfigRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["config_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V2::NotificationConfig), request["notification_config"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_notification_config_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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_create_source - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V2::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::V2::CreateSourceRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V2::Source), request["source"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_source_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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_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::V2::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::V2::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::V2::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::V2::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_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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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_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::V2::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::V2::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::V2::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::V2::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_big_query_export - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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_simulation - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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_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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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_resource_value_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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_get_source - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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_findings - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V2::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" - 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::V2::GroupFindingsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["group_by"] - 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::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.group_findings({ parent: parent, filter: filter, group_by: group_by, 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, 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::V2::GroupFindingsRequest.new(parent: parent, filter: filter, group_by: group_by, 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, 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::V2::GroupFindingsRequest.new(parent: parent, filter: filter, group_by: group_by, 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_attack_paths - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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_list_big_query_exports - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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_list_findings - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V2::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" - 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::V2::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::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::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_findings({ parent: parent, filter: filter, order_by: order_by, 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, 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::V2::ListFindingsRequest.new(parent: parent, filter: filter, order_by: order_by, 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, 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::V2::ListFindingsRequest.new(parent: parent, filter: filter, order_by: order_by, 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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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::V2::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_resource_value_configs - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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_list_sources - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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_list_valued_resources - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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_set_finding_state - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V2::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 - - 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::V2::SetFindingStateRequest, request - assert_equal "hello world", request["name"] - assert_equal :STATE_UNSPECIFIED, request["state"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, set_finding_state_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.set_finding_state({ name: name, state: state }) 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 do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.set_finding_state ::Google::Cloud::SecurityCenter::V2::SetFindingStateRequest.new(name: name, state: state) 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 }, 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::V2::SetFindingStateRequest.new(name: name, state: state), 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_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::V2::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_set_mute - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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_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::V2::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_update_big_query_export - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V2::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::V2::UpdateBigQueryExportRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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_update_external_system - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V2::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::V2::UpdateExternalSystemRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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::V2::UpdateFindingRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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::V2::UpdateMuteConfigRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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::V2::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::V2::UpdateNotificationConfigRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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_resource_value_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V2::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::V2::UpdateResourceValueConfigRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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_update_security_marks - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V2::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 = {} - - 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::V2::UpdateSecurityMarksRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V2::SecurityMarks), request["security_marks"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_security_marks_client_stub do - # Create client - c = ::Google::Cloud::SecurityCenter::V2::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 }) 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 do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_security_marks ::Google::Cloud::SecurityCenter::V2::UpdateSecurityMarksRequest.new(security_marks: security_marks, 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_marks({ security_marks: security_marks, 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_marks(::Google::Cloud::SecurityCenter::V2::UpdateSecurityMarksRequest.new(security_marks: security_marks, 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_marks_client_stub.call_rpc_count - end - end - - def test_update_source - # Create GRPC objects. - grpc_response = ::Google::Cloud::SecurityCenter::V2::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::V2::UpdateSourceRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::SecurityCenter::V2::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::V2::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::V2::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::V2::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_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::V2::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::V2::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::V2::SecurityCenter::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::SecurityCenter::V2::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::V2::SecurityCenter::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-security_center-v2/test/helper.rb b/owl-bot-staging/google-cloud-security_center-v2/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-security_center-v2/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"