From 8e61f63b2b61922bdfa39ff372ffc7680c084e6a Mon Sep 17 00:00:00 2001 From: yoshi-code-bot <70984784+yoshi-code-bot@users.noreply.github.com> Date: Mon, 11 Mar 2024 19:02:25 -0700 Subject: [PATCH] feat: Automated regeneration of SecurityCenter client (#10896) Auto-created at 2024-03-12 01:34:44 +0000 using the toys pull request generator. --- .../security_center/v1/api/folders.ex | 2062 ++++++++++- .../security_center/v1/api/organizations.ex | 3166 +++++++++++++++-- .../security_center/v1/api/projects.ex | 2062 ++++++++++- .../google_api/security_center/v1/metadata.ex | 2 +- .../security_center/v1/model/access.ex | 15 +- .../security_center/v1/model/access_review.ex | 14 +- .../security_center/v1/model/application.ex | 49 + .../v1/model/attack_exposure.ex | 64 + .../security_center/v1/model/attack_path.ex | 52 + .../v1/model/{edge.ex => attack_path_edge.ex} | 14 +- .../v1/model/attack_path_node.ex | 66 + .../v1/model/attack_step_node.ex | 58 + .../v1/model/backup_disaster_recovery.ex | 73 + ...h_create_resource_value_configs_request.ex | 55 + ..._create_resource_value_configs_response.ex | 58 + .../security_center/v1/model/binding.ex | 4 +- .../v1/model/cloud_dlp_data_profile.ex | 49 + .../v1/model/cloud_dlp_inspection.ex | 55 + .../v1/model/cloud_logging_entry.ex | 55 + .../security_center/v1/model/compliance.ex | 6 +- .../v1/model/compliance_snapshot.ex | 67 + .../security_center/v1/model/contact.ex | 4 +- .../v1/model/contact_details.ex | 2 +- .../security_center/v1/model/container.ex | 9 +- .../create_resource_value_config_request.ex | 54 + .../model/custom_module_validation_error.ex | 55 + .../model/custom_module_validation_errors.ex | 46 + .../security_center/v1/model/cve.ex | 16 +- .../security_center/v1/model/database.ex | 17 +- .../security_center/v1/model/disk_path.ex | 49 + ...ve_event_threat_detection_custom_module.ex | 66 + .../v1/model/environment_variable.ex | 2 +- .../event_threat_detection_custom_module.ex | 70 + .../v1/model/exfil_resource.ex | 6 +- .../security_center/v1/model/exfiltration.ex | 7 +- .../security_center/v1/model/file.ex | 5 +- .../security_center/v1/model/finding.ex | 54 +- ...loud_securitycenter_v1_big_query_export.ex | 8 +- .../google_cloud_securitycenter_v1_binding.ex | 6 +- ...e_cloud_securitycenter_v1_custom_config.ex | 77 + ...ud_securitycenter_v1_custom_output_spec.ex | 55 + ...security_health_analytics_custom_module.ex | 66 + ...loud_securitycenter_v1_exposed_resource.ex | 66 - ...cloud_securitycenter_v1_external_system.ex | 28 +- ...gle_cloud_securitycenter_v1_mute_config.ex | 2 +- ...google_cloud_securitycenter_v1_property.ex | 49 + ...oud_securitycenter_v1_resource_selector.ex | 51 + ...securitycenter_v1_resource_value_config.ex | 26 +- ...security_health_analytics_custom_module.ex | 76 + ...er_v1_sensitive_data_protection_mapping.ex | 54 + .../google_cloud_securitycenter_v2_access.ex | 88 + ...e_cloud_securitycenter_v2_access_review.ex | 69 + ...gle_cloud_securitycenter_v2_application.ex | 54 + ...cloud_securitycenter_v2_attack_exposure.ex | 69 + ...uritycenter_v2_backup_disaster_recovery.ex | 78 + ...loud_securitycenter_v2_big_query_export.ex | 72 + .../google_cloud_securitycenter_v2_binding.ex | 60 + ...tycenter_v2_bulk_mute_findings_response.ex | 46 + ...ecuritycenter_v2_cloud_dlp_data_profile.ex | 54 + ..._securitycenter_v2_cloud_dlp_inspection.ex | 60 + ...d_securitycenter_v2_cloud_logging_entry.ex | 60 + ...ogle_cloud_securitycenter_v2_compliance.ex | 54 + ...ogle_cloud_securitycenter_v2_connection.ex | 60 + .../google_cloud_securitycenter_v2_contact.ex | 46 + ...cloud_securitycenter_v2_contact_details.ex | 55 + ...oogle_cloud_securitycenter_v2_container.ex | 66 + .../google_cloud_securitycenter_v2_cve.ex | 74 + .../google_cloud_securitycenter_v2_cvssv3.ex | 70 + ...google_cloud_securitycenter_v2_database.ex | 61 + ...oogle_cloud_securitycenter_v2_detection.ex | 51 + ...oogle_cloud_securitycenter_v2_disk_path.ex | 49 + ..._securitycenter_v2_environment_variable.ex | 54 + ..._cloud_securitycenter_v2_exfil_resource.ex | 54 + ...le_cloud_securitycenter_v2_exfiltration.ex | 69 + ...cloud_securitycenter_v2_external_system.ex | 82 + .../google_cloud_securitycenter_v2_file.ex | 65 + .../google_cloud_securitycenter_v2_finding.ex | 300 ++ ...gle_cloud_securitycenter_v2_geolocation.ex | 51 + ...gle_cloud_securitycenter_v2_iam_binding.ex | 54 + ...oogle_cloud_securitycenter_v2_indicator.ex | 66 + ..._cloud_securitycenter_v2_kernel_rootkit.ex | 75 + ...ogle_cloud_securitycenter_v2_kubernetes.ex | 92 + .../google_cloud_securitycenter_v2_label.ex | 49 + ...e_cloud_securitycenter_v2_load_balancer.ex | 51 + ...oogle_cloud_securitycenter_v2_log_entry.ex | 50 + ...securitycenter_v2_memory_hash_signature.ex | 59 + ...le_cloud_securitycenter_v2_mitre_attack.ex | 63 + ...gle_cloud_securitycenter_v2_mute_config.ex | 66 + .../google_cloud_securitycenter_v2_node.ex | 46 + ...oogle_cloud_securitycenter_v2_node_pool.ex | 51 + ..._securitycenter_v2_notification_message.ex | 59 + .../google_cloud_securitycenter_v2_object.ex | 63 + ...ogle_cloud_securitycenter_v2_org_policy.ex | 48 + .../google_cloud_securitycenter_v2_package.ex | 55 + .../google_cloud_securitycenter_v2_pod.ex | 65 + ..._securitycenter_v2_policy_drift_details.ex | 57 + .../google_cloud_securitycenter_v2_process.ex | 88 + ...ud_securitycenter_v2_process_signature.ex} | 42 +- ...oogle_cloud_securitycenter_v2_reference.ex | 51 + ...google_cloud_securitycenter_v2_resource.ex | 52 + ...securitycenter_v2_resource_value_config.ex | 85 + .../google_cloud_securitycenter_v2_role.ex | 52 + ...oud_securitycenter_v2_security_bulletin.ex | 57 + ..._cloud_securitycenter_v2_security_marks.ex | 57 + ...loud_securitycenter_v2_security_posture.ex | 81 + ...er_v2_sensitive_data_protection_mapping.ex | 54 + ...nter_v2_service_account_delegation_info.ex | 54 + .../google_cloud_securitycenter_v2_subject.ex | 52 + ...gle_cloud_securitycenter_v2_ticket_info.ex | 63 + ...e_cloud_securitycenter_v2_vulnerability.ex | 70 + ...d_securitycenter_v2_yara_rule_signature.ex | 51 + .../security_center/v1/model/iam_binding.ex | 2 +- .../security_center/v1/model/indicator.ex | 4 +- .../v1/model/kernel_rootkit.ex | 70 + .../security_center/v1/model/kubernetes.ex | 17 +- .../security_center/v1/model/label.ex | 6 +- .../v1/model/list_attack_paths_response.ex | 49 + ...hreat_detection_custom_modules_response.ex | 59 + ...ealth_analytics_custom_modules_response.ex | 65 + ...hreat_detection_custom_modules_response.ex | 60 + ...ealth_analytics_custom_modules_response.ex | 63 + ...hreat_detection_custom_modules_response.ex | 59 + .../list_resource_value_configs_response.ex | 57 + ...ealth_analytics_custom_modules_response.ex | 63 + .../model/list_valued_resources_response.ex | 52 + .../security_center/v1/model/load_balancer.ex | 46 + .../security_center/v1/model/log_entry.ex | 46 + .../security_center/v1/model/node.ex | 4 +- .../security_center/v1/model/node_pool.ex | 4 +- .../v1/model/notification_config.ex | 2 +- .../security_center/v1/model/object.ex | 58 + .../security_center/v1/model/operation.ex | 2 +- .../security_center/v1/model/org_policy.ex | 46 + .../v1/model/organization_settings.ex | 2 +- .../security_center/v1/model/package.ex | 55 + .../security_center/v1/model/path_node.ex | 56 - ...ing.ex => path_node_associated_finding.ex} | 16 +- .../security_center/v1/model/pod.ex | 2 +- .../security_center/v1/model/policy.ex | 2 +- .../v1/model/policy_drift_details.ex | 52 + .../security_center/v1/model/position.ex | 49 + .../security_center/v1/model/process.ex | 8 +- .../v1/model/process_signature.ex | 3 + .../model/resource_value_config_metadata.ex | 46 + .../v1/model/security_bulletin.ex | 52 + .../v1/model/security_posture.ex | 70 + ..._health_analytics_custom_module_request.ex | 58 + ...health_analytics_custom_module_response.ex | 51 + .../v1/model/simulated_resource.ex | 52 + .../v1/model/simulated_result.ex | 52 + .../security_center/v1/model/simulation.ex | 57 + .../security_center/v1/model/source.ex | 2 +- .../security_center/v1/model/subject.ex | 8 +- .../security_center/v1/model/ticket_info.ex | 61 + ..._threat_detection_custom_module_request.ex | 54 + ...threat_detection_custom_module_response.ex | 51 + .../v1/model/valued_resource.ex | 69 + .../security_center/v1/model/vulnerability.ex | 11 +- 158 files changed, 13990 insertions(+), 804 deletions(-) create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/application.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/attack_exposure.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/attack_path.ex rename clients/security_center/lib/google_api/security_center/v1/model/{edge.ex => attack_path_edge.ex} (67%) create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/attack_path_node.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/attack_step_node.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/backup_disaster_recovery.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/batch_create_resource_value_configs_request.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/batch_create_resource_value_configs_response.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/cloud_dlp_data_profile.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/cloud_dlp_inspection.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/cloud_logging_entry.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/compliance_snapshot.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/create_resource_value_config_request.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/custom_module_validation_error.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/custom_module_validation_errors.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/disk_path.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/effective_event_threat_detection_custom_module.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/event_threat_detection_custom_module.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v1_custom_config.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v1_custom_output_spec.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v1_effective_security_health_analytics_custom_module.ex delete mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v1_exposed_resource.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v1_property.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v1_resource_selector.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v1_security_health_analytics_custom_module.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v1_sensitive_data_protection_mapping.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_access.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_access_review.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_application.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_attack_exposure.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_backup_disaster_recovery.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_big_query_export.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_binding.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_bulk_mute_findings_response.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_cloud_dlp_data_profile.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_cloud_dlp_inspection.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_cloud_logging_entry.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_compliance.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_connection.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_contact.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_contact_details.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_container.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_cve.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_cvssv3.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_database.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_detection.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_disk_path.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_environment_variable.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_exfil_resource.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_exfiltration.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_external_system.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_file.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_finding.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_geolocation.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_iam_binding.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_indicator.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_kernel_rootkit.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_kubernetes.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_label.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_load_balancer.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_log_entry.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_memory_hash_signature.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_mitre_attack.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_mute_config.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_node.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_node_pool.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_notification_message.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_object.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_org_policy.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_package.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_pod.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_policy_drift_details.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_process.ex rename clients/security_center/lib/google_api/security_center/v1/model/{google_cloud_securitycenter_v1_exposure_path.ex => google_cloud_securitycenter_v2_process_signature.ex} (53%) create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_reference.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_resource.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_resource_value_config.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_role.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_security_bulletin.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_security_marks.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_security_posture.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_sensitive_data_protection_mapping.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_service_account_delegation_info.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_subject.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_ticket_info.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_vulnerability.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_yara_rule_signature.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/kernel_rootkit.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/list_attack_paths_response.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/list_descendant_event_threat_detection_custom_modules_response.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/list_descendant_security_health_analytics_custom_modules_response.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/list_effective_event_threat_detection_custom_modules_response.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/list_effective_security_health_analytics_custom_modules_response.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/list_event_threat_detection_custom_modules_response.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/list_resource_value_configs_response.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/list_security_health_analytics_custom_modules_response.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/list_valued_resources_response.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/load_balancer.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/log_entry.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/object.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/org_policy.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/package.ex delete mode 100644 clients/security_center/lib/google_api/security_center/v1/model/path_node.ex rename clients/security_center/lib/google_api/security_center/v1/model/{associated_finding.ex => path_node_associated_finding.ex} (66%) create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/policy_drift_details.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/position.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/resource_value_config_metadata.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/security_bulletin.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/security_posture.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/simulate_security_health_analytics_custom_module_request.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/simulate_security_health_analytics_custom_module_response.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/simulated_resource.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/simulated_result.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/simulation.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/ticket_info.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/validate_event_threat_detection_custom_module_request.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/validate_event_threat_detection_custom_module_response.ex create mode 100644 clients/security_center/lib/google_api/security_center/v1/model/valued_resource.ex diff --git a/clients/security_center/lib/google_api/security_center/v1/api/folders.ex b/clients/security_center/lib/google_api/security_center/v1/api/folders.ex index c436e1f6b5..23c8fcc440 100644 --- a/clients/security_center/lib/google_api/security_center/v1/api/folders.ex +++ b/clients/security_center/lib/google_api/security_center/v1/api/folders.ex @@ -31,7 +31,7 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Folders do ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `folders_id` (*type:* `String.t`) - Part of `parent`. Required. Name of the organization to groupBy. Its format is "organizations/[organization_id], folders/[folder_id], or projects/[project_id]". + * `folders_id` (*type:* `String.t`) - Part of `parent`. Required. The name of the parent to group the assets by. Its format is "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]". * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -98,7 +98,7 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Folders do ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `folders_id` (*type:* `String.t`) - Part of `parent`. Required. Name of the organization assets should belong to. Its format is "organizations/[organization_id], folders/[folder_id], or projects/[project_id]". + * `folders_id` (*type:* `String.t`) - Part of `parent`. Required. The name of the parent resource that contains the assets. The value that you can specify on parent depends on the method in which you specify parent. You can specify one of the following values: "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]". * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -252,12 +252,12 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Folders do end @doc """ - Creates a big query export. + Creates a BigQuery export. ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `folders_id` (*type:* `String.t`) - Part of `parent`. Required. Resource name of the new big query export's parent. Its format is "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]". + * `folders_id` (*type:* `String.t`) - Part of `parent`. Required. The name of the parent resource of the new BigQuery export. Its format is "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]". * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -270,7 +270,7 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Folders do * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). - * `:bigQueryExportId` (*type:* `String.t`) - Required. Unique identifier provided by the client within the parent scope. It must consist of lower case letters, numbers, and hyphen, with the first character a letter, the last a letter or a number, and a 63 character maximum. + * `:bigQueryExportId` (*type:* `String.t`) - 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. * `:body` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1BigQueryExport.t`) - * `opts` (*type:* `keyword()`) - Call options @@ -329,12 +329,12 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Folders do end @doc """ - Deletes an existing big query export. + Deletes an existing BigQuery export. ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `folders_id` (*type:* `String.t`) - Part of `name`. Required. Name of the big query export to delete. Its format is organizations/{organization}/bigQueryExports/{export_id}, folders/{folder}/bigQueryExports/{export_id}, or projects/{project}/bigQueryExports/{export_id} + * `folders_id` (*type:* `String.t`) - Part of `name`. Required. The name of the BigQuery export to delete. Its format is organizations/{organization}/bigQueryExports/{export_id}, folders/{folder}/bigQueryExports/{export_id}, or projects/{project}/bigQueryExports/{export_id} * `big_query_exports_id` (*type:* `String.t`) - Part of `name`. See documentation of `foldersId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. @@ -404,12 +404,12 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Folders do end @doc """ - Gets a big query export. + Gets a BigQuery export. ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `folders_id` (*type:* `String.t`) - Part of `name`. Required. Name of the big query export to retrieve. Its format is organizations/{organization}/bigQueryExports/{export_id}, folders/{folder}/bigQueryExports/{export_id}, or projects/{project}/bigQueryExports/{export_id} + * `folders_id` (*type:* `String.t`) - Part of `name`. Required. Name of the BigQuery export to retrieve. Its format is organizations/{organization}/bigQueryExports/{export_id}, folders/{folder}/bigQueryExports/{export_id}, or projects/{project}/bigQueryExports/{export_id} * `big_query_exports_id` (*type:* `String.t`) - Part of `name`. See documentation of `foldersId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. @@ -640,12 +640,12 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Folders do end @doc """ - Kicks off an LRO to bulk mute findings for a parent based on a filter. The parent can be either an organization, folder or project. The findings matched by the filter will be muted after the LRO is done. + Validates the given Event Threat Detection custom module. ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `folders_id` (*type:* `String.t`) - Part of `parent`. Required. The parent, at which bulk action needs to be applied. Its format is "organizations/[organization_id]", "folders/[folder_id]", "projects/[project_id]". + * `folders_id` (*type:* `String.t`) - Part of `parent`. Required. Resource name of the parent to validate the Custom Module under. Its format is: * "organizations/{organization}/eventThreatDetectionSettings". * "folders/{folder}/eventThreatDetectionSettings". * "projects/{project}/eventThreatDetectionSettings". * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -658,25 +658,26 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Folders do * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). - * `:body` (*type:* `GoogleApi.SecurityCenter.V1.Model.BulkMuteFindingsRequest.t`) - + * `:body` (*type:* `GoogleApi.SecurityCenter.V1.Model.ValidateEventThreatDetectionCustomModuleRequest.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.SecurityCenter.V1.Model.Operation{}}` on success + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.ValidateEventThreatDetectionCustomModuleResponse{}}` on success * `{:error, info}` on failure """ - @spec securitycenter_folders_findings_bulk_mute( + @spec securitycenter_folders_event_threat_detection_settings_validate_custom_module( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.SecurityCenter.V1.Model.Operation.t()} + {:ok, + GoogleApi.SecurityCenter.V1.Model.ValidateEventThreatDetectionCustomModuleResponse.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def securitycenter_folders_findings_bulk_mute( + def securitycenter_folders_event_threat_detection_settings_validate_custom_module( connection, folders_id, optional_params \\ [], @@ -700,24 +701,33 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Folders do request = Request.new() |> Request.method(:post) - |> Request.url("/v1/folders/{foldersId}/findings:bulkMute", %{ - "foldersId" => URI.encode(folders_id, &URI.char_unreserved?/1) - }) + |> Request.url( + "/v1/folders/{foldersId}/eventThreatDetectionSettings:validateCustomModule", + %{ + "foldersId" => URI.encode(folders_id, &URI.char_unreserved?/1) + } + ) |> Request.add_optional_params(optional_params_config, optional_params) |> Request.library_version(@library_version) connection |> Connection.execute(request) - |> Response.decode(opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.Operation{}]) + |> Response.decode( + opts ++ + [ + struct: + %GoogleApi.SecurityCenter.V1.Model.ValidateEventThreatDetectionCustomModuleResponse{} + ] + ) end @doc """ - Creates a mute config. + Creates a resident Event Threat Detection custom module at the scope of the given Resource Manager parent, and also creates inherited custom modules for all descendants of the given parent. These modules are enabled by default. ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `folders_id` (*type:* `String.t`) - Part of `parent`. Required. Resource name of the new mute configs's parent. Its format is "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]". + * `folders_id` (*type:* `String.t`) - Part of `parent`. Required. The new custom module's parent. Its format is: * "organizations/{organization}/eventThreatDetectionSettings". * "folders/{folder}/eventThreatDetectionSettings". * "projects/{project}/eventThreatDetectionSettings". * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -730,26 +740,25 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Folders do * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). - * `:muteConfigId` (*type:* `String.t`) - Required. Unique identifier provided by the client within the parent scope. It must consist of lower case letters, numbers, and hyphen, with the first character a letter, the last a letter or a number, and a 63 character maximum. - * `:body` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig.t`) - + * `:body` (*type:* `GoogleApi.SecurityCenter.V1.Model.EventThreatDetectionCustomModule.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig{}}` on success + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.EventThreatDetectionCustomModule{}}` on success * `{:error, info}` on failure """ - @spec securitycenter_folders_mute_configs_create( + @spec securitycenter_folders_event_threat_detection_settings_custom_modules_create( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig.t()} + {:ok, GoogleApi.SecurityCenter.V1.Model.EventThreatDetectionCustomModule.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def securitycenter_folders_mute_configs_create( + def securitycenter_folders_event_threat_detection_settings_custom_modules_create( connection, folders_id, optional_params \\ [], @@ -767,14 +776,13 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Folders do :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, - :muteConfigId => :query, :body => :body } request = Request.new() |> Request.method(:post) - |> Request.url("/v1/folders/{foldersId}/muteConfigs", %{ + |> Request.url("/v1/folders/{foldersId}/eventThreatDetectionSettings/customModules", %{ "foldersId" => URI.encode(folders_id, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) @@ -783,18 +791,18 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Folders do connection |> Connection.execute(request) |> Response.decode( - opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig{}] + opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.EventThreatDetectionCustomModule{}] ) end @doc """ - Deletes an existing mute config. + Deletes the specified Event Threat Detection custom module and all of its descendants in the Resource Manager hierarchy. This method is only supported for resident custom modules. ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `folders_id` (*type:* `String.t`) - Part of `name`. Required. Name of the mute config to delete. Its format is organizations/{organization}/muteConfigs/{config_id}, folders/{folder}/muteConfigs/{config_id}, or projects/{project}/muteConfigs/{config_id} - * `mute_configs_id` (*type:* `String.t`) - Part of `name`. See documentation of `foldersId`. + * `folders_id` (*type:* `String.t`) - Part of `name`. Required. Name of the custom module to delete. Its format is: * "organizations/{organization}/eventThreatDetectionSettings/customModules/{module}". * "folders/{folder}/eventThreatDetectionSettings/customModules/{module}". * "projects/{project}/eventThreatDetectionSettings/customModules/{module}". + * `custom_modules_id` (*type:* `String.t`) - Part of `name`. See documentation of `foldersId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -814,7 +822,7 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Folders do * `{:ok, %GoogleApi.SecurityCenter.V1.Model.Empty{}}` on success * `{:error, info}` on failure """ - @spec securitycenter_folders_mute_configs_delete( + @spec securitycenter_folders_event_threat_detection_settings_custom_modules_delete( Tesla.Env.client(), String.t(), String.t(), @@ -825,10 +833,10 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Folders do | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def securitycenter_folders_mute_configs_delete( + def securitycenter_folders_event_threat_detection_settings_custom_modules_delete( connection, folders_id, - mute_configs_id, + custom_modules_id, optional_params \\ [], opts \\ [] ) do @@ -849,10 +857,14 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Folders do request = Request.new() |> Request.method(:delete) - |> Request.url("/v1/folders/{foldersId}/muteConfigs/{muteConfigsId}", %{ - "foldersId" => URI.encode(folders_id, &URI.char_unreserved?/1), - "muteConfigsId" => URI.encode(mute_configs_id, &(URI.char_unreserved?(&1) || &1 == ?/)) - }) + |> Request.url( + "/v1/folders/{foldersId}/eventThreatDetectionSettings/customModules/{customModulesId}", + %{ + "foldersId" => URI.encode(folders_id, &URI.char_unreserved?/1), + "customModulesId" => + URI.encode(custom_modules_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + } + ) |> Request.add_optional_params(optional_params_config, optional_params) |> Request.library_version(@library_version) @@ -862,13 +874,13 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Folders do end @doc """ - Gets a mute config. + Gets an Event Threat Detection custom module. ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `folders_id` (*type:* `String.t`) - Part of `name`. Required. Name of the mute config to retrieve. Its format is organizations/{organization}/muteConfigs/{config_id}, folders/{folder}/muteConfigs/{config_id}, or projects/{project}/muteConfigs/{config_id} - * `mute_configs_id` (*type:* `String.t`) - Part of `name`. See documentation of `foldersId`. + * `folders_id` (*type:* `String.t`) - Part of `name`. Required. Name of the custom module to get. Its format is: * "organizations/{organization}/eventThreatDetectionSettings/customModules/{module}". * "folders/{folder}/eventThreatDetectionSettings/customModules/{module}". * "projects/{project}/eventThreatDetectionSettings/customModules/{module}". + * `custom_modules_id` (*type:* `String.t`) - Part of `name`. See documentation of `foldersId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -885,24 +897,24 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Folders do ## Returns - * `{:ok, %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig{}}` on success + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.EventThreatDetectionCustomModule{}}` on success * `{:error, info}` on failure """ - @spec securitycenter_folders_mute_configs_get( + @spec securitycenter_folders_event_threat_detection_settings_custom_modules_get( Tesla.Env.client(), String.t(), String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig.t()} + {:ok, GoogleApi.SecurityCenter.V1.Model.EventThreatDetectionCustomModule.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def securitycenter_folders_mute_configs_get( + def securitycenter_folders_event_threat_detection_settings_custom_modules_get( connection, folders_id, - mute_configs_id, + custom_modules_id, optional_params \\ [], opts \\ [] ) do @@ -923,27 +935,31 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Folders do request = Request.new() |> Request.method(:get) - |> Request.url("/v1/folders/{foldersId}/muteConfigs/{muteConfigsId}", %{ - "foldersId" => URI.encode(folders_id, &URI.char_unreserved?/1), - "muteConfigsId" => URI.encode(mute_configs_id, &(URI.char_unreserved?(&1) || &1 == ?/)) - }) + |> Request.url( + "/v1/folders/{foldersId}/eventThreatDetectionSettings/customModules/{customModulesId}", + %{ + "foldersId" => URI.encode(folders_id, &URI.char_unreserved?/1), + "customModulesId" => + URI.encode(custom_modules_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + } + ) |> Request.add_optional_params(optional_params_config, optional_params) |> Request.library_version(@library_version) connection |> Connection.execute(request) |> Response.decode( - opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig{}] + opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.EventThreatDetectionCustomModule{}] ) end @doc """ - Lists mute configs. + Lists all Event Threat Detection custom modules for the given Resource Manager parent. This includes resident modules defined at the scope of the parent along with modules inherited from ancestors. ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `folders_id` (*type:* `String.t`) - Part of `parent`. Required. The parent, which owns the collection of mute configs. Its format is "organizations/[organization_id]", "folders/[folder_id]", "projects/[project_id]". + * `folders_id` (*type:* `String.t`) - Part of `parent`. Required. Name of the parent to list custom modules under. Its format is: * "organizations/{organization}/eventThreatDetectionSettings". * "folders/{folder}/eventThreatDetectionSettings". * "projects/{project}/eventThreatDetectionSettings". * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -956,26 +972,27 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Folders do * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). - * `:pageSize` (*type:* `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. - * `:pageToken` (*type:* `String.t`) - 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. + * `:pageSize` (*type:* `integer()`) - The maximum number of modules to return. The service may return fewer than this value. If unspecified, at most 10 configs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. + * `:pageToken` (*type:* `String.t`) - A page token, received from a previous `ListEventThreatDetectionCustomModules` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListEventThreatDetectionCustomModules` must match the call that provided the page token. * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.SecurityCenter.V1.Model.ListMuteConfigsResponse{}}` on success + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.ListEventThreatDetectionCustomModulesResponse{}}` on success * `{:error, info}` on failure """ - @spec securitycenter_folders_mute_configs_list( + @spec securitycenter_folders_event_threat_detection_settings_custom_modules_list( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.SecurityCenter.V1.Model.ListMuteConfigsResponse.t()} + {:ok, + GoogleApi.SecurityCenter.V1.Model.ListEventThreatDetectionCustomModulesResponse.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def securitycenter_folders_mute_configs_list( + def securitycenter_folders_event_threat_detection_settings_custom_modules_list( connection, folders_id, optional_params \\ [], @@ -1000,7 +1017,7 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Folders do request = Request.new() |> Request.method(:get) - |> Request.url("/v1/folders/{foldersId}/muteConfigs", %{ + |> Request.url("/v1/folders/{foldersId}/eventThreatDetectionSettings/customModules", %{ "foldersId" => URI.encode(folders_id, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) @@ -1009,18 +1026,21 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Folders do connection |> Connection.execute(request) |> Response.decode( - opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.ListMuteConfigsResponse{}] + opts ++ + [ + struct: + %GoogleApi.SecurityCenter.V1.Model.ListEventThreatDetectionCustomModulesResponse{} + ] ) end @doc """ - Updates a mute config. + Lists all resident Event Threat Detection custom modules under the given Resource Manager parent and its descendants. ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `folders_id` (*type:* `String.t`) - Part of `muteConfig.name`. This field will be ignored if provided on config creation. Format "organizations/{organization}/muteConfigs/{mute_config}" "folders/{folder}/muteConfigs/{mute_config}" "projects/{project}/muteConfigs/{mute_config}" - * `mute_configs_id` (*type:* `String.t`) - Part of `muteConfig.name`. See documentation of `foldersId`. + * `folders_id` (*type:* `String.t`) - Part of `parent`. Required. Name of the parent to list custom modules under. Its format is: * "organizations/{organization}/eventThreatDetectionSettings". * "folders/{folder}/eventThreatDetectionSettings". * "projects/{project}/eventThreatDetectionSettings". * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1033,30 +1053,29 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Folders do * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). - * `:updateMask` (*type:* `String.t`) - The list of fields to be updated. If empty all mutable fields will be updated. - * `:body` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig.t`) - + * `:pageSize` (*type:* `integer()`) - The maximum number of modules to return. The service may return fewer than this value. If unspecified, at most 10 configs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. + * `:pageToken` (*type:* `String.t`) - A page token, received from a previous `ListDescendantEventThreatDetectionCustomModules` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListDescendantEventThreatDetectionCustomModules` must match the call that provided the page token. * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig{}}` on success + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.ListDescendantEventThreatDetectionCustomModulesResponse{}}` on success * `{:error, info}` on failure """ - @spec securitycenter_folders_mute_configs_patch( + @spec securitycenter_folders_event_threat_detection_settings_custom_modules_list_descendant( Tesla.Env.client(), String.t(), - String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig.t()} + {:ok, + GoogleApi.SecurityCenter.V1.Model.ListDescendantEventThreatDetectionCustomModulesResponse.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def securitycenter_folders_mute_configs_patch( + def securitycenter_folders_event_threat_detection_settings_custom_modules_list_descendant( connection, folders_id, - mute_configs_id, optional_params \\ [], opts \\ [] ) do @@ -1072,34 +1091,41 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Folders do :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, - :updateMask => :query, - :body => :body + :pageSize => :query, + :pageToken => :query } request = Request.new() - |> Request.method(:patch) - |> Request.url("/v1/folders/{foldersId}/muteConfigs/{muteConfigsId}", %{ - "foldersId" => URI.encode(folders_id, &URI.char_unreserved?/1), - "muteConfigsId" => URI.encode(mute_configs_id, &(URI.char_unreserved?(&1) || &1 == ?/)) - }) + |> Request.method(:get) + |> Request.url( + "/v1/folders/{foldersId}/eventThreatDetectionSettings/customModules:listDescendant", + %{ + "foldersId" => URI.encode(folders_id, &URI.char_unreserved?/1) + } + ) |> Request.add_optional_params(optional_params_config, optional_params) |> Request.library_version(@library_version) connection |> Connection.execute(request) |> Response.decode( - opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig{}] + opts ++ + [ + struct: + %GoogleApi.SecurityCenter.V1.Model.ListDescendantEventThreatDetectionCustomModulesResponse{} + ] ) end @doc """ - Creates a notification config. + Updates the Event Threat Detection custom module with the given name based on the given update mask. Updating the enablement state is supported for both resident and inherited modules (though resident modules cannot have an enablement state of "inherited"). Updating the display name or configuration of a module is supported for resident modules only. The type of a module cannot be changed. ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `folders_id` (*type:* `String.t`) - Part of `parent`. Required. Resource name of the new notification config's parent. Its format is "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]". + * `folders_id` (*type:* `String.t`) - Part of `eventThreatDetectionCustomModule.name`. Immutable. The resource name of the Event Threat Detection custom module. Its format is: * "organizations/{organization}/eventThreatDetectionSettings/customModules/{module}". * "folders/{folder}/eventThreatDetectionSettings/customModules/{module}". * "projects/{project}/eventThreatDetectionSettings/customModules/{module}". + * `custom_modules_id` (*type:* `String.t`) - Part of `eventThreatDetectionCustomModule.name`. See documentation of `foldersId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1112,28 +1138,30 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Folders do * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). - * `:configId` (*type:* `String.t`) - Required. Unique identifier provided by the client within the parent scope. It must be between 1 and 128 characters, and contains alphanumeric characters, underscores or hyphens only. - * `:body` (*type:* `GoogleApi.SecurityCenter.V1.Model.NotificationConfig.t`) - + * `:updateMask` (*type:* `String.t`) - The list of fields to be updated. If empty all mutable fields will be updated. + * `:body` (*type:* `GoogleApi.SecurityCenter.V1.Model.EventThreatDetectionCustomModule.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.SecurityCenter.V1.Model.NotificationConfig{}}` on success + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.EventThreatDetectionCustomModule{}}` on success * `{:error, info}` on failure """ - @spec securitycenter_folders_notification_configs_create( + @spec securitycenter_folders_event_threat_detection_settings_custom_modules_patch( Tesla.Env.client(), String.t(), + String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.SecurityCenter.V1.Model.NotificationConfig.t()} + {:ok, GoogleApi.SecurityCenter.V1.Model.EventThreatDetectionCustomModule.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def securitycenter_folders_notification_configs_create( + def securitycenter_folders_event_threat_detection_settings_custom_modules_patch( connection, folders_id, + custom_modules_id, optional_params \\ [], opts \\ [] ) do @@ -1149,32 +1177,39 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Folders do :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, - :configId => :query, + :updateMask => :query, :body => :body } request = Request.new() - |> Request.method(:post) - |> Request.url("/v1/folders/{foldersId}/notificationConfigs", %{ - "foldersId" => URI.encode(folders_id, &URI.char_unreserved?/1) - }) + |> Request.method(:patch) + |> Request.url( + "/v1/folders/{foldersId}/eventThreatDetectionSettings/customModules/{customModulesId}", + %{ + "foldersId" => URI.encode(folders_id, &URI.char_unreserved?/1), + "customModulesId" => + URI.encode(custom_modules_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + } + ) |> Request.add_optional_params(optional_params_config, optional_params) |> Request.library_version(@library_version) connection |> Connection.execute(request) - |> Response.decode(opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.NotificationConfig{}]) + |> Response.decode( + opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.EventThreatDetectionCustomModule{}] + ) end @doc """ - Deletes a notification config. + Gets an effective Event Threat Detection custom module at the given level. ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `folders_id` (*type:* `String.t`) - Part of `name`. Required. Name of the notification config to delete. Its format is "organizations/[organization_id]/notificationConfigs/[config_id]". - * `notification_configs_id` (*type:* `String.t`) - Part of `name`. See documentation of `foldersId`. + * `folders_id` (*type:* `String.t`) - Part of `name`. Required. The resource name of the effective Event Threat Detection custom module. Its format is: * "organizations/{organization}/eventThreatDetectionSettings/effectiveCustomModules/{module}". * "folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}". * "projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}". + * `effective_custom_modules_id` (*type:* `String.t`) - Part of `name`. See documentation of `foldersId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1191,24 +1226,24 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Folders do ## Returns - * `{:ok, %GoogleApi.SecurityCenter.V1.Model.Empty{}}` on success + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.EffectiveEventThreatDetectionCustomModule{}}` on success * `{:error, info}` on failure """ - @spec securitycenter_folders_notification_configs_delete( + @spec securitycenter_folders_event_threat_detection_settings_effective_custom_modules_get( Tesla.Env.client(), String.t(), String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.SecurityCenter.V1.Model.Empty.t()} + {:ok, GoogleApi.SecurityCenter.V1.Model.EffectiveEventThreatDetectionCustomModule.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def securitycenter_folders_notification_configs_delete( + def securitycenter_folders_event_threat_detection_settings_effective_custom_modules_get( connection, folders_id, - notification_configs_id, + effective_custom_modules_id, optional_params \\ [], opts \\ [] ) do @@ -1228,28 +1263,33 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Folders do request = Request.new() - |> Request.method(:delete) - |> Request.url("/v1/folders/{foldersId}/notificationConfigs/{notificationConfigsId}", %{ - "foldersId" => URI.encode(folders_id, &URI.char_unreserved?/1), - "notificationConfigsId" => - URI.encode(notification_configs_id, &(URI.char_unreserved?(&1) || &1 == ?/)) - }) + |> Request.method(:get) + |> Request.url( + "/v1/folders/{foldersId}/eventThreatDetectionSettings/effectiveCustomModules/{effectiveCustomModulesId}", + %{ + "foldersId" => URI.encode(folders_id, &URI.char_unreserved?/1), + "effectiveCustomModulesId" => + URI.encode(effective_custom_modules_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + } + ) |> Request.add_optional_params(optional_params_config, optional_params) |> Request.library_version(@library_version) connection |> Connection.execute(request) - |> Response.decode(opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.Empty{}]) + |> Response.decode( + opts ++ + [struct: %GoogleApi.SecurityCenter.V1.Model.EffectiveEventThreatDetectionCustomModule{}] + ) end @doc """ - Gets a notification config. + Lists all effective Event Threat Detection custom modules for the given parent. This includes resident modules defined at the scope of the parent along with modules inherited from its ancestors. ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `folders_id` (*type:* `String.t`) - Part of `name`. Required. Name of the notification config to get. Its format is "organizations/[organization_id]/notificationConfigs/[config_id]". - * `notification_configs_id` (*type:* `String.t`) - Part of `name`. See documentation of `foldersId`. + * `folders_id` (*type:* `String.t`) - Part of `parent`. Required. Name of the parent to list custom modules for. Its format is: * "organizations/{organization}/eventThreatDetectionSettings". * "folders/{folder}/eventThreatDetectionSettings". * "projects/{project}/eventThreatDetectionSettings". * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1262,28 +1302,29 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Folders do * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:pageSize` (*type:* `integer()`) - The maximum number of modules to return. The service may return fewer than this value. If unspecified, at most 10 configs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. + * `:pageToken` (*type:* `String.t`) - A page token, received from a previous `ListEffectiveEventThreatDetectionCustomModules` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListEffectiveEventThreatDetectionCustomModules` must match the call that provided the page token. * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.SecurityCenter.V1.Model.NotificationConfig{}}` on success + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.ListEffectiveEventThreatDetectionCustomModulesResponse{}}` on success * `{:error, info}` on failure """ - @spec securitycenter_folders_notification_configs_get( + @spec securitycenter_folders_event_threat_detection_settings_effective_custom_modules_list( Tesla.Env.client(), String.t(), - String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.SecurityCenter.V1.Model.NotificationConfig.t()} + {:ok, + GoogleApi.SecurityCenter.V1.Model.ListEffectiveEventThreatDetectionCustomModulesResponse.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def securitycenter_folders_notification_configs_get( + def securitycenter_folders_event_threat_detection_settings_effective_custom_modules_list( connection, folders_id, - notification_configs_id, optional_params \\ [], opts \\ [] ) do @@ -1298,32 +1339,41 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Folders do :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, - :upload_protocol => :query + :upload_protocol => :query, + :pageSize => :query, + :pageToken => :query } request = Request.new() |> Request.method(:get) - |> Request.url("/v1/folders/{foldersId}/notificationConfigs/{notificationConfigsId}", %{ - "foldersId" => URI.encode(folders_id, &URI.char_unreserved?/1), - "notificationConfigsId" => - URI.encode(notification_configs_id, &(URI.char_unreserved?(&1) || &1 == ?/)) - }) + |> Request.url( + "/v1/folders/{foldersId}/eventThreatDetectionSettings/effectiveCustomModules", + %{ + "foldersId" => URI.encode(folders_id, &URI.char_unreserved?/1) + } + ) |> Request.add_optional_params(optional_params_config, optional_params) |> Request.library_version(@library_version) connection |> Connection.execute(request) - |> Response.decode(opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.NotificationConfig{}]) + |> Response.decode( + opts ++ + [ + struct: + %GoogleApi.SecurityCenter.V1.Model.ListEffectiveEventThreatDetectionCustomModulesResponse{} + ] + ) end @doc """ - Lists notification configs. + Kicks off an LRO to bulk mute findings for a parent based on a filter. The parent can be either an organization, folder or project. The findings matched by the filter will be muted after the LRO is done. ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `folders_id` (*type:* `String.t`) - Part of `parent`. Required. Name of the organization to list notification configs. Its format is "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]". + * `folders_id` (*type:* `String.t`) - Part of `parent`. Required. The parent, at which bulk action needs to be applied. Its format is "organizations/[organization_id]", "folders/[folder_id]", "projects/[project_id]". * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1336,26 +1386,25 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Folders do * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). - * `:pageSize` (*type:* `integer()`) - The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000. - * `:pageToken` (*type:* `String.t`) - 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. + * `:body` (*type:* `GoogleApi.SecurityCenter.V1.Model.BulkMuteFindingsRequest.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.SecurityCenter.V1.Model.ListNotificationConfigsResponse{}}` on success + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.Operation{}}` on success * `{:error, info}` on failure """ - @spec securitycenter_folders_notification_configs_list( + @spec securitycenter_folders_findings_bulk_mute( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.SecurityCenter.V1.Model.ListNotificationConfigsResponse.t()} + {:ok, GoogleApi.SecurityCenter.V1.Model.Operation.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def securitycenter_folders_notification_configs_list( + def securitycenter_folders_findings_bulk_mute( connection, folders_id, optional_params \\ [], @@ -1373,14 +1422,13 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Folders do :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, - :pageSize => :query, - :pageToken => :query + :body => :body } request = Request.new() - |> Request.method(:get) - |> Request.url("/v1/folders/{foldersId}/notificationConfigs", %{ + |> Request.method(:post) + |> Request.url("/v1/folders/{foldersId}/findings:bulkMute", %{ "foldersId" => URI.encode(folders_id, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) @@ -1388,19 +1436,18 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Folders do connection |> Connection.execute(request) - |> Response.decode( - opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.ListNotificationConfigsResponse{}] - ) + |> Response.decode(opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.Operation{}]) end @doc """ - Updates a notification config. The following update fields are allowed: description, pubsub_topic, streaming_config.filter + Deletes an existing mute config. ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `folders_id` (*type:* `String.t`) - Part of `notificationConfig.name`. The relative resource name of this notification config. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: "organizations/{organization_id}/notificationConfigs/notify_public_bucket". - * `notification_configs_id` (*type:* `String.t`) - Part of `notificationConfig.name`. See documentation of `foldersId`. + * `folders_id` (*type:* `String.t`) - Part of `name`. Required. Name of the mute config to delete. Its format is organizations/{organization}/muteConfigs/{config_id}, folders/{folder}/muteConfigs/{config_id}, projects/{project}/muteConfigs/{config_id}, organizations/{organization}/locations/global/muteConfigs/{config_id}, folders/{folder}/locations/global/muteConfigs/{config_id}, or projects/{project}/locations/global/muteConfigs/{config_id}. + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `foldersId`. + * `mute_configs_id` (*type:* `String.t`) - Part of `name`. See documentation of `foldersId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1413,30 +1460,30 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Folders do * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). - * `:updateMask` (*type:* `String.t`) - The FieldMask to use when updating the notification config. If empty all mutable fields will be updated. - * `:body` (*type:* `GoogleApi.SecurityCenter.V1.Model.NotificationConfig.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.SecurityCenter.V1.Model.NotificationConfig{}}` on success + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.Empty{}}` on success * `{:error, info}` on failure """ - @spec securitycenter_folders_notification_configs_patch( + @spec securitycenter_folders_locations_mute_configs_delete( Tesla.Env.client(), String.t(), String.t(), + String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.SecurityCenter.V1.Model.NotificationConfig.t()} + {:ok, GoogleApi.SecurityCenter.V1.Model.Empty.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def securitycenter_folders_notification_configs_patch( + def securitycenter_folders_locations_mute_configs_delete( connection, folders_id, - notification_configs_id, + locations_id, + mute_configs_id, optional_params \\ [], opts \\ [] ) do @@ -1451,25 +1498,1704 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Folders do :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, - :upload_protocol => :query, - :updateMask => :query, - :body => :body + :upload_protocol => :query } request = Request.new() - |> Request.method(:patch) - |> Request.url("/v1/folders/{foldersId}/notificationConfigs/{notificationConfigsId}", %{ - "foldersId" => URI.encode(folders_id, &URI.char_unreserved?/1), - "notificationConfigsId" => - URI.encode(notification_configs_id, &(URI.char_unreserved?(&1) || &1 == ?/)) - }) + |> Request.method(:delete) + |> Request.url( + "/v1/folders/{foldersId}/locations/{locationsId}/muteConfigs/{muteConfigsId}", + %{ + "foldersId" => URI.encode(folders_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "muteConfigsId" => URI.encode(mute_configs_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + } + ) |> Request.add_optional_params(optional_params_config, optional_params) |> Request.library_version(@library_version) connection |> Connection.execute(request) - |> Response.decode(opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.NotificationConfig{}]) + |> Response.decode(opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.Empty{}]) + end + + @doc """ + Gets a mute config. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `folders_id` (*type:* `String.t`) - Part of `name`. Required. Name of the mute config to retrieve. Its format is organizations/{organization}/muteConfigs/{config_id}, folders/{folder}/muteConfigs/{config_id}, projects/{project}/muteConfigs/{config_id}, organizations/{organization}/locations/global/muteConfigs/{config_id}, folders/{folder}/locations/global/muteConfigs/{config_id}, or projects/{project}/locations/global/muteConfigs/{config_id}. + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `foldersId`. + * `mute_configs_id` (*type:* `String.t`) - Part of `name`. See documentation of `foldersId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_folders_locations_mute_configs_get( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_folders_locations_mute_configs_get( + connection, + folders_id, + locations_id, + mute_configs_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url( + "/v1/folders/{foldersId}/locations/{locationsId}/muteConfigs/{muteConfigsId}", + %{ + "foldersId" => URI.encode(folders_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "muteConfigsId" => URI.encode(mute_configs_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig{}] + ) + end + + @doc """ + Updates a mute config. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `folders_id` (*type:* `String.t`) - Part of `muteConfig.name`. This field will be ignored if provided on config creation. Format "organizations/{organization}/muteConfigs/{mute_config}" "folders/{folder}/muteConfigs/{mute_config}" "projects/{project}/muteConfigs/{mute_config}" "organizations/{organization}/locations/global/muteConfigs/{mute_config}" "folders/{folder}/locations/global/muteConfigs/{mute_config}" "projects/{project}/locations/global/muteConfigs/{mute_config}" + * `locations_id` (*type:* `String.t`) - Part of `muteConfig.name`. See documentation of `foldersId`. + * `mute_configs_id` (*type:* `String.t`) - Part of `muteConfig.name`. See documentation of `foldersId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:updateMask` (*type:* `String.t`) - The list of fields to be updated. If empty all mutable fields will be updated. + * `:body` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_folders_locations_mute_configs_patch( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_folders_locations_mute_configs_patch( + connection, + folders_id, + locations_id, + mute_configs_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :updateMask => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:patch) + |> Request.url( + "/v1/folders/{foldersId}/locations/{locationsId}/muteConfigs/{muteConfigsId}", + %{ + "foldersId" => URI.encode(folders_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "muteConfigsId" => URI.encode(mute_configs_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig{}] + ) + end + + @doc """ + Creates a mute config. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `folders_id` (*type:* `String.t`) - Part of `parent`. Required. Resource name of the new mute configs's parent. Its format is "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]". + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:muteConfigId` (*type:* `String.t`) - 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. + * `:body` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_folders_mute_configs_create( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_folders_mute_configs_create( + connection, + folders_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :muteConfigId => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url("/v1/folders/{foldersId}/muteConfigs", %{ + "foldersId" => URI.encode(folders_id, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig{}] + ) + end + + @doc """ + Deletes an existing mute config. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `folders_id` (*type:* `String.t`) - Part of `name`. Required. Name of the mute config to delete. Its format is organizations/{organization}/muteConfigs/{config_id}, folders/{folder}/muteConfigs/{config_id}, projects/{project}/muteConfigs/{config_id}, organizations/{organization}/locations/global/muteConfigs/{config_id}, folders/{folder}/locations/global/muteConfigs/{config_id}, or projects/{project}/locations/global/muteConfigs/{config_id}. + * `mute_configs_id` (*type:* `String.t`) - Part of `name`. See documentation of `foldersId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.Empty{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_folders_mute_configs_delete( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.SecurityCenter.V1.Model.Empty.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_folders_mute_configs_delete( + connection, + folders_id, + mute_configs_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:delete) + |> Request.url("/v1/folders/{foldersId}/muteConfigs/{muteConfigsId}", %{ + "foldersId" => URI.encode(folders_id, &URI.char_unreserved?/1), + "muteConfigsId" => URI.encode(mute_configs_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.Empty{}]) + end + + @doc """ + Gets a mute config. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `folders_id` (*type:* `String.t`) - Part of `name`. Required. Name of the mute config to retrieve. Its format is organizations/{organization}/muteConfigs/{config_id}, folders/{folder}/muteConfigs/{config_id}, projects/{project}/muteConfigs/{config_id}, organizations/{organization}/locations/global/muteConfigs/{config_id}, folders/{folder}/locations/global/muteConfigs/{config_id}, or projects/{project}/locations/global/muteConfigs/{config_id}. + * `mute_configs_id` (*type:* `String.t`) - Part of `name`. See documentation of `foldersId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_folders_mute_configs_get( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_folders_mute_configs_get( + connection, + folders_id, + mute_configs_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1/folders/{foldersId}/muteConfigs/{muteConfigsId}", %{ + "foldersId" => URI.encode(folders_id, &URI.char_unreserved?/1), + "muteConfigsId" => URI.encode(mute_configs_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig{}] + ) + end + + @doc """ + Lists mute configs. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `folders_id` (*type:* `String.t`) - Part of `parent`. Required. The parent, which owns the collection of mute configs. Its format is "organizations/[organization_id]", "folders/[folder_id]", "projects/[project_id]". + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:pageSize` (*type:* `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. + * `:pageToken` (*type:* `String.t`) - 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. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.ListMuteConfigsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_folders_mute_configs_list( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.SecurityCenter.V1.Model.ListMuteConfigsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_folders_mute_configs_list( + connection, + folders_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1/folders/{foldersId}/muteConfigs", %{ + "foldersId" => URI.encode(folders_id, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.ListMuteConfigsResponse{}] + ) + end + + @doc """ + Updates a mute config. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `folders_id` (*type:* `String.t`) - Part of `muteConfig.name`. This field will be ignored if provided on config creation. Format "organizations/{organization}/muteConfigs/{mute_config}" "folders/{folder}/muteConfigs/{mute_config}" "projects/{project}/muteConfigs/{mute_config}" "organizations/{organization}/locations/global/muteConfigs/{mute_config}" "folders/{folder}/locations/global/muteConfigs/{mute_config}" "projects/{project}/locations/global/muteConfigs/{mute_config}" + * `mute_configs_id` (*type:* `String.t`) - Part of `muteConfig.name`. See documentation of `foldersId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:updateMask` (*type:* `String.t`) - The list of fields to be updated. If empty all mutable fields will be updated. + * `:body` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_folders_mute_configs_patch( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_folders_mute_configs_patch( + connection, + folders_id, + mute_configs_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :updateMask => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:patch) + |> Request.url("/v1/folders/{foldersId}/muteConfigs/{muteConfigsId}", %{ + "foldersId" => URI.encode(folders_id, &URI.char_unreserved?/1), + "muteConfigsId" => URI.encode(mute_configs_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig{}] + ) + end + + @doc """ + Creates a notification config. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `folders_id` (*type:* `String.t`) - Part of `parent`. Required. Resource name of the new notification config's parent. Its format is "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]". + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:configId` (*type:* `String.t`) - 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. + * `:body` (*type:* `GoogleApi.SecurityCenter.V1.Model.NotificationConfig.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.NotificationConfig{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_folders_notification_configs_create( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.SecurityCenter.V1.Model.NotificationConfig.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_folders_notification_configs_create( + connection, + folders_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :configId => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url("/v1/folders/{foldersId}/notificationConfigs", %{ + "foldersId" => URI.encode(folders_id, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.NotificationConfig{}]) + end + + @doc """ + Deletes a notification config. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `folders_id` (*type:* `String.t`) - Part of `name`. Required. Name of the notification config to delete. Its format is "organizations/[organization_id]/notificationConfigs/[config_id]", "folders/[folder_id]/notificationConfigs/[config_id]", or "projects/[project_id]/notificationConfigs/[config_id]". + * `notification_configs_id` (*type:* `String.t`) - Part of `name`. See documentation of `foldersId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.Empty{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_folders_notification_configs_delete( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.SecurityCenter.V1.Model.Empty.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_folders_notification_configs_delete( + connection, + folders_id, + notification_configs_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:delete) + |> Request.url("/v1/folders/{foldersId}/notificationConfigs/{notificationConfigsId}", %{ + "foldersId" => URI.encode(folders_id, &URI.char_unreserved?/1), + "notificationConfigsId" => + URI.encode(notification_configs_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.Empty{}]) + end + + @doc """ + Gets a notification config. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `folders_id` (*type:* `String.t`) - Part of `name`. Required. Name of the notification config to get. Its format is "organizations/[organization_id]/notificationConfigs/[config_id]", "folders/[folder_id]/notificationConfigs/[config_id]", or "projects/[project_id]/notificationConfigs/[config_id]". + * `notification_configs_id` (*type:* `String.t`) - Part of `name`. See documentation of `foldersId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.NotificationConfig{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_folders_notification_configs_get( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.SecurityCenter.V1.Model.NotificationConfig.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_folders_notification_configs_get( + connection, + folders_id, + notification_configs_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1/folders/{foldersId}/notificationConfigs/{notificationConfigsId}", %{ + "foldersId" => URI.encode(folders_id, &URI.char_unreserved?/1), + "notificationConfigsId" => + URI.encode(notification_configs_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.NotificationConfig{}]) + end + + @doc """ + Lists notification configs. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `folders_id` (*type:* `String.t`) - Part of `parent`. Required. The name of the parent in which to list the notification configurations. Its format is "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]". + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:pageSize` (*type:* `integer()`) - The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000. + * `:pageToken` (*type:* `String.t`) - 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. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.ListNotificationConfigsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_folders_notification_configs_list( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.SecurityCenter.V1.Model.ListNotificationConfigsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_folders_notification_configs_list( + connection, + folders_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1/folders/{foldersId}/notificationConfigs", %{ + "foldersId" => URI.encode(folders_id, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.ListNotificationConfigsResponse{}] + ) + end + + @doc """ + Updates a notification config. The following update fields are allowed: description, pubsub_topic, streaming_config.filter + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `folders_id` (*type:* `String.t`) - Part of `notificationConfig.name`. The relative resource name of this notification config. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: "organizations/{organization_id}/notificationConfigs/notify_public_bucket", "folders/{folder_id}/notificationConfigs/notify_public_bucket", or "projects/{project_id}/notificationConfigs/notify_public_bucket". + * `notification_configs_id` (*type:* `String.t`) - Part of `notificationConfig.name`. See documentation of `foldersId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:updateMask` (*type:* `String.t`) - The FieldMask to use when updating the notification config. If empty all mutable fields will be updated. + * `:body` (*type:* `GoogleApi.SecurityCenter.V1.Model.NotificationConfig.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.NotificationConfig{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_folders_notification_configs_patch( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.SecurityCenter.V1.Model.NotificationConfig.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_folders_notification_configs_patch( + connection, + folders_id, + notification_configs_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :updateMask => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:patch) + |> Request.url("/v1/folders/{foldersId}/notificationConfigs/{notificationConfigsId}", %{ + "foldersId" => URI.encode(folders_id, &URI.char_unreserved?/1), + "notificationConfigsId" => + URI.encode(notification_configs_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.NotificationConfig{}]) + end + + @doc """ + Creates a resident SecurityHealthAnalyticsCustomModule at the scope of the given CRM parent, and also creates inherited SecurityHealthAnalyticsCustomModules for all CRM descendants of the given parent. These modules are enabled by default. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `folders_id` (*type:* `String.t`) - Part of `parent`. Required. Resource name of the new custom module's parent. Its format is "organizations/{organization}/securityHealthAnalyticsSettings", "folders/{folder}/securityHealthAnalyticsSettings", or "projects/{project}/securityHealthAnalyticsSettings" + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:body` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_folders_security_health_analytics_settings_custom_modules_create( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_folders_security_health_analytics_settings_custom_modules_create( + connection, + folders_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url("/v1/folders/{foldersId}/securityHealthAnalyticsSettings/customModules", %{ + "foldersId" => URI.encode(folders_id, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ + [ + struct: + %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule{} + ] + ) + end + + @doc """ + Deletes the specified SecurityHealthAnalyticsCustomModule and all of its descendants in the CRM hierarchy. This method is only supported for resident custom modules. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `folders_id` (*type:* `String.t`) - Part of `name`. Required. Name of the custom module to delete. Its format is "organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}", "folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}", or "projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}" + * `custom_modules_id` (*type:* `String.t`) - Part of `name`. See documentation of `foldersId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.Empty{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_folders_security_health_analytics_settings_custom_modules_delete( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.SecurityCenter.V1.Model.Empty.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_folders_security_health_analytics_settings_custom_modules_delete( + connection, + folders_id, + custom_modules_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:delete) + |> Request.url( + "/v1/folders/{foldersId}/securityHealthAnalyticsSettings/customModules/{customModulesId}", + %{ + "foldersId" => URI.encode(folders_id, &URI.char_unreserved?/1), + "customModulesId" => + URI.encode(custom_modules_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.Empty{}]) + end + + @doc """ + Retrieves a SecurityHealthAnalyticsCustomModule. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `folders_id` (*type:* `String.t`) - Part of `name`. Required. Name of the custom module to get. Its format is "organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}", "folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}", or "projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}" + * `custom_modules_id` (*type:* `String.t`) - Part of `name`. See documentation of `foldersId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_folders_security_health_analytics_settings_custom_modules_get( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_folders_security_health_analytics_settings_custom_modules_get( + connection, + folders_id, + custom_modules_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url( + "/v1/folders/{foldersId}/securityHealthAnalyticsSettings/customModules/{customModulesId}", + %{ + "foldersId" => URI.encode(folders_id, &URI.char_unreserved?/1), + "customModulesId" => + URI.encode(custom_modules_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ + [ + struct: + %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule{} + ] + ) + end + + @doc """ + Returns a list of all SecurityHealthAnalyticsCustomModules for the given parent. This includes resident modules defined at the scope of the parent, and inherited modules, inherited from CRM ancestors. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `folders_id` (*type:* `String.t`) - Part of `parent`. Required. Name of parent to list custom modules. Its format is "organizations/{organization}/securityHealthAnalyticsSettings", "folders/{folder}/securityHealthAnalyticsSettings", or "projects/{project}/securityHealthAnalyticsSettings" + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:pageSize` (*type:* `integer()`) - The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000. + * `:pageToken` (*type:* `String.t`) - The value returned by the last call indicating a continuation + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.ListSecurityHealthAnalyticsCustomModulesResponse{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_folders_security_health_analytics_settings_custom_modules_list( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.SecurityCenter.V1.Model.ListSecurityHealthAnalyticsCustomModulesResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_folders_security_health_analytics_settings_custom_modules_list( + connection, + folders_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1/folders/{foldersId}/securityHealthAnalyticsSettings/customModules", %{ + "foldersId" => URI.encode(folders_id, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ + [ + struct: + %GoogleApi.SecurityCenter.V1.Model.ListSecurityHealthAnalyticsCustomModulesResponse{} + ] + ) + end + + @doc """ + Returns a list of all resident SecurityHealthAnalyticsCustomModules under the given CRM parent and all of the parent’s CRM descendants. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `folders_id` (*type:* `String.t`) - Part of `parent`. Required. Name of parent to list descendant custom modules. Its format is "organizations/{organization}/securityHealthAnalyticsSettings", "folders/{folder}/securityHealthAnalyticsSettings", or "projects/{project}/securityHealthAnalyticsSettings" + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:pageSize` (*type:* `integer()`) - The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000. + * `:pageToken` (*type:* `String.t`) - The value returned by the last call indicating a continuation + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.ListDescendantSecurityHealthAnalyticsCustomModulesResponse{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_folders_security_health_analytics_settings_custom_modules_list_descendant( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.SecurityCenter.V1.Model.ListDescendantSecurityHealthAnalyticsCustomModulesResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_folders_security_health_analytics_settings_custom_modules_list_descendant( + connection, + folders_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url( + "/v1/folders/{foldersId}/securityHealthAnalyticsSettings/customModules:listDescendant", + %{ + "foldersId" => URI.encode(folders_id, &URI.char_unreserved?/1) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ + [ + struct: + %GoogleApi.SecurityCenter.V1.Model.ListDescendantSecurityHealthAnalyticsCustomModulesResponse{} + ] + ) + end + + @doc """ + Updates the SecurityHealthAnalyticsCustomModule under the given name based on the given update mask. Updating the enablement state is supported on both resident and inherited modules (though resident modules cannot have an enablement state of "inherited"). Updating the display name and custom config of a module is supported on resident modules only. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `folders_id` (*type:* `String.t`) - Part of `securityHealthAnalyticsCustomModule.name`. Immutable. The resource name of the custom module. Its format is "organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}", or "folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}", or "projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}" The id {customModule} is server-generated and is not user settable. It will be a numeric id containing 1-20 digits. + * `custom_modules_id` (*type:* `String.t`) - Part of `securityHealthAnalyticsCustomModule.name`. See documentation of `foldersId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:updateMask` (*type:* `String.t`) - The list of fields to be updated. The only fields that can be updated are `enablement_state` and `custom_config`. If empty or set to the wildcard value `*`, both `enablement_state` and `custom_config` are updated. + * `:body` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_folders_security_health_analytics_settings_custom_modules_patch( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_folders_security_health_analytics_settings_custom_modules_patch( + connection, + folders_id, + custom_modules_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :updateMask => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:patch) + |> Request.url( + "/v1/folders/{foldersId}/securityHealthAnalyticsSettings/customModules/{customModulesId}", + %{ + "foldersId" => URI.encode(folders_id, &URI.char_unreserved?/1), + "customModulesId" => + URI.encode(custom_modules_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ + [ + struct: + %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule{} + ] + ) + end + + @doc """ + Simulates a given SecurityHealthAnalyticsCustomModule and Resource. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `folders_id` (*type:* `String.t`) - Part of `parent`. Required. The relative resource name of the organization, project, or folder. For more information about relative resource names, see [Relative Resource Name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) Example: `organizations/{organization_id}` + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:body` (*type:* `GoogleApi.SecurityCenter.V1.Model.SimulateSecurityHealthAnalyticsCustomModuleRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.SimulateSecurityHealthAnalyticsCustomModuleResponse{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_folders_security_health_analytics_settings_custom_modules_simulate( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.SecurityCenter.V1.Model.SimulateSecurityHealthAnalyticsCustomModuleResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_folders_security_health_analytics_settings_custom_modules_simulate( + connection, + folders_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url( + "/v1/folders/{foldersId}/securityHealthAnalyticsSettings/customModules:simulate", + %{ + "foldersId" => URI.encode(folders_id, &URI.char_unreserved?/1) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ + [ + struct: + %GoogleApi.SecurityCenter.V1.Model.SimulateSecurityHealthAnalyticsCustomModuleResponse{} + ] + ) + end + + @doc """ + Retrieves an EffectiveSecurityHealthAnalyticsCustomModule. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `folders_id` (*type:* `String.t`) - Part of `name`. Required. Name of the effective custom module to get. Its format is "organizations/{organization}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}", "folders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}", or "projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}" + * `effective_custom_modules_id` (*type:* `String.t`) - Part of `name`. See documentation of `foldersId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1EffectiveSecurityHealthAnalyticsCustomModule{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_folders_security_health_analytics_settings_effective_custom_modules_get( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1EffectiveSecurityHealthAnalyticsCustomModule.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_folders_security_health_analytics_settings_effective_custom_modules_get( + connection, + folders_id, + effective_custom_modules_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url( + "/v1/folders/{foldersId}/securityHealthAnalyticsSettings/effectiveCustomModules/{effectiveCustomModulesId}", + %{ + "foldersId" => URI.encode(folders_id, &URI.char_unreserved?/1), + "effectiveCustomModulesId" => + URI.encode(effective_custom_modules_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ + [ + struct: + %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1EffectiveSecurityHealthAnalyticsCustomModule{} + ] + ) + end + + @doc """ + Returns a list of all EffectiveSecurityHealthAnalyticsCustomModules for the given parent. This includes resident modules defined at the scope of the parent, and inherited modules, inherited from CRM ancestors. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `folders_id` (*type:* `String.t`) - Part of `parent`. Required. Name of parent to list effective custom modules. Its format is "organizations/{organization}/securityHealthAnalyticsSettings", "folders/{folder}/securityHealthAnalyticsSettings", or "projects/{project}/securityHealthAnalyticsSettings" + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:pageSize` (*type:* `integer()`) - The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000. + * `:pageToken` (*type:* `String.t`) - The value returned by the last call indicating a continuation + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_folders_security_health_analytics_settings_effective_custom_modules_list( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.SecurityCenter.V1.Model.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_folders_security_health_analytics_settings_effective_custom_modules_list( + connection, + folders_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url( + "/v1/folders/{foldersId}/securityHealthAnalyticsSettings/effectiveCustomModules", + %{ + "foldersId" => URI.encode(folders_id, &URI.char_unreserved?/1) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ + [ + struct: + %GoogleApi.SecurityCenter.V1.Model.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse{} + ] + ) end @doc """ @@ -1478,7 +3204,7 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Folders do ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `folders_id` (*type:* `String.t`) - Part of `parent`. Required. Resource name of the parent of sources to list. Its format should be "organizations/[organization_id], folders/[folder_id], or projects/[project_id]". + * `folders_id` (*type:* `String.t`) - Part of `parent`. Required. Resource name of the parent of sources to list. Its format should be "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]". * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1715,7 +3441,7 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Folders do ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `folders_id` (*type:* `String.t`) - Part of `finding.name`. The relative resource name of this finding. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}" + * `folders_id` (*type:* `String.t`) - Part of `finding.name`. The [relative resource name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding. Example: "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", "projects/{project_id}/sources/{source_id}/findings/{finding_id}". * `sources_id` (*type:* `String.t`) - Part of `finding.name`. See documentation of `foldersId`. * `findings_id` (*type:* `String.t`) - Part of `finding.name`. See documentation of `foldersId`. * `optional_params` (*type:* `keyword()`) - Optional parameters @@ -1797,7 +3523,7 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Folders do ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `folders_id` (*type:* `String.t`) - Part of `name`. Required. The relative resource name of the finding. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", "projects/{project_id}/sources/{source_id}/findings/{finding_id}". + * `folders_id` (*type:* `String.t`) - Part of `name`. Required. The [relative resource name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding. Example: "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", "projects/{project_id}/sources/{source_id}/findings/{finding_id}". * `sources_id` (*type:* `String.t`) - Part of `name`. See documentation of `foldersId`. * `findings_id` (*type:* `String.t`) - Part of `name`. See documentation of `foldersId`. * `optional_params` (*type:* `keyword()`) - Optional parameters @@ -1880,7 +3606,7 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Folders do ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `folders_id` (*type:* `String.t`) - Part of `name`. Required. The relative resource name of the finding. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}". + * `folders_id` (*type:* `String.t`) - Part of `name`. Required. The [relative resource name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding. Example: "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", "projects/{project_id}/sources/{source_id}/findings/{finding_id}". * `sources_id` (*type:* `String.t`) - Part of `name`. See documentation of `foldersId`. * `findings_id` (*type:* `String.t`) - Part of `name`. See documentation of `foldersId`. * `optional_params` (*type:* `keyword()`) - Optional parameters @@ -2050,7 +3776,7 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Folders do ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `folders_id` (*type:* `String.t`) - Part of `externalSystem.name`. External System Name e.g. jira, demisto, etc. e.g.: `organizations/1234/sources/5678/findings/123456/externalSystems/jira` `folders/1234/sources/5678/findings/123456/externalSystems/jira` `projects/1234/sources/5678/findings/123456/externalSystems/jira` + * `folders_id` (*type:* `String.t`) - Part of `externalSystem.name`. Full resource name of the external system, for example: "organizations/1234/sources/5678/findings/123456/externalSystems/jira", "folders/1234/sources/5678/findings/123456/externalSystems/jira", "projects/1234/sources/5678/findings/123456/externalSystems/jira" * `sources_id` (*type:* `String.t`) - Part of `externalSystem.name`. See documentation of `foldersId`. * `findings_id` (*type:* `String.t`) - Part of `externalSystem.name`. See documentation of `foldersId`. * `external_systems_id` (*type:* `String.t`) - Part of `externalSystem.name`. See documentation of `foldersId`. diff --git a/clients/security_center/lib/google_api/security_center/v1/api/organizations.ex b/clients/security_center/lib/google_api/security_center/v1/api/organizations.ex index b40897bfa3..52d45767aa 100644 --- a/clients/security_center/lib/google_api/security_center/v1/api/organizations.ex +++ b/clients/security_center/lib/google_api/security_center/v1/api/organizations.ex @@ -179,7 +179,7 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Organizations do ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `organizations_id` (*type:* `String.t`) - Part of `parent`. Required. Name of the organization to groupBy. Its format is "organizations/[organization_id], folders/[folder_id], or projects/[project_id]". + * `organizations_id` (*type:* `String.t`) - Part of `parent`. Required. The name of the parent to group the assets by. Its format is "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]". * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -251,7 +251,7 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Organizations do ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `organizations_id` (*type:* `String.t`) - Part of `parent`. Required. Name of the organization assets should belong to. Its format is "organizations/[organization_id], folders/[folder_id], or projects/[project_id]". + * `organizations_id` (*type:* `String.t`) - Part of `parent`. Required. The name of the parent resource that contains the assets. The value that you can specify on parent depends on the method in which you specify parent. You can specify one of the following values: "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]". * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -482,12 +482,12 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Organizations do end @doc """ - Creates a big query export. + Creates a BigQuery export. ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `organizations_id` (*type:* `String.t`) - Part of `parent`. Required. Resource name of the new big query export's parent. Its format is "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]". + * `organizations_id` (*type:* `String.t`) - Part of `parent`. Required. The name of the parent resource of the new BigQuery export. Its format is "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]". * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -500,7 +500,7 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Organizations do * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). - * `:bigQueryExportId` (*type:* `String.t`) - Required. Unique identifier provided by the client within the parent scope. It must consist of lower case letters, numbers, and hyphen, with the first character a letter, the last a letter or a number, and a 63 character maximum. + * `:bigQueryExportId` (*type:* `String.t`) - 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. * `:body` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1BigQueryExport.t`) - * `opts` (*type:* `keyword()`) - Call options @@ -559,12 +559,12 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Organizations do end @doc """ - Deletes an existing big query export. + Deletes an existing BigQuery export. ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `organizations_id` (*type:* `String.t`) - Part of `name`. Required. Name of the big query export to delete. Its format is organizations/{organization}/bigQueryExports/{export_id}, folders/{folder}/bigQueryExports/{export_id}, or projects/{project}/bigQueryExports/{export_id} + * `organizations_id` (*type:* `String.t`) - Part of `name`. Required. The name of the BigQuery export to delete. Its format is organizations/{organization}/bigQueryExports/{export_id}, folders/{folder}/bigQueryExports/{export_id}, or projects/{project}/bigQueryExports/{export_id} * `big_query_exports_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. @@ -634,12 +634,12 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Organizations do end @doc """ - Gets a big query export. + Gets a BigQuery export. ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `organizations_id` (*type:* `String.t`) - Part of `name`. Required. Name of the big query export to retrieve. Its format is organizations/{organization}/bigQueryExports/{export_id}, folders/{folder}/bigQueryExports/{export_id}, or projects/{project}/bigQueryExports/{export_id} + * `organizations_id` (*type:* `String.t`) - Part of `name`. Required. Name of the BigQuery export to retrieve. Its format is organizations/{organization}/bigQueryExports/{export_id}, folders/{folder}/bigQueryExports/{export_id}, or projects/{project}/bigQueryExports/{export_id} * `big_query_exports_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. @@ -870,12 +870,12 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Organizations do end @doc """ - Kicks off an LRO to bulk mute findings for a parent based on a filter. The parent can be either an organization, folder or project. The findings matched by the filter will be muted after the LRO is done. + Validates the given Event Threat Detection custom module. ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `organizations_id` (*type:* `String.t`) - Part of `parent`. Required. The parent, at which bulk action needs to be applied. Its format is "organizations/[organization_id]", "folders/[folder_id]", "projects/[project_id]". + * `organizations_id` (*type:* `String.t`) - Part of `parent`. Required. Resource name of the parent to validate the Custom Module under. Its format is: * "organizations/{organization}/eventThreatDetectionSettings". * "folders/{folder}/eventThreatDetectionSettings". * "projects/{project}/eventThreatDetectionSettings". * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -888,25 +888,26 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Organizations do * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). - * `:body` (*type:* `GoogleApi.SecurityCenter.V1.Model.BulkMuteFindingsRequest.t`) - + * `:body` (*type:* `GoogleApi.SecurityCenter.V1.Model.ValidateEventThreatDetectionCustomModuleRequest.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.SecurityCenter.V1.Model.Operation{}}` on success + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.ValidateEventThreatDetectionCustomModuleResponse{}}` on success * `{:error, info}` on failure """ - @spec securitycenter_organizations_findings_bulk_mute( + @spec securitycenter_organizations_event_threat_detection_settings_validate_custom_module( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.SecurityCenter.V1.Model.Operation.t()} + {:ok, + GoogleApi.SecurityCenter.V1.Model.ValidateEventThreatDetectionCustomModuleResponse.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def securitycenter_organizations_findings_bulk_mute( + def securitycenter_organizations_event_threat_detection_settings_validate_custom_module( connection, organizations_id, optional_params \\ [], @@ -930,24 +931,33 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Organizations do request = Request.new() |> Request.method(:post) - |> Request.url("/v1/organizations/{organizationsId}/findings:bulkMute", %{ - "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1) - }) + |> Request.url( + "/v1/organizations/{organizationsId}/eventThreatDetectionSettings:validateCustomModule", + %{ + "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1) + } + ) |> Request.add_optional_params(optional_params_config, optional_params) |> Request.library_version(@library_version) connection |> Connection.execute(request) - |> Response.decode(opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.Operation{}]) + |> Response.decode( + opts ++ + [ + struct: + %GoogleApi.SecurityCenter.V1.Model.ValidateEventThreatDetectionCustomModuleResponse{} + ] + ) end @doc """ - Creates a mute config. + Creates a resident Event Threat Detection custom module at the scope of the given Resource Manager parent, and also creates inherited custom modules for all descendants of the given parent. These modules are enabled by default. ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `organizations_id` (*type:* `String.t`) - Part of `parent`. Required. Resource name of the new mute configs's parent. Its format is "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]". + * `organizations_id` (*type:* `String.t`) - Part of `parent`. Required. The new custom module's parent. Its format is: * "organizations/{organization}/eventThreatDetectionSettings". * "folders/{folder}/eventThreatDetectionSettings". * "projects/{project}/eventThreatDetectionSettings". * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -960,26 +970,25 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Organizations do * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). - * `:muteConfigId` (*type:* `String.t`) - Required. Unique identifier provided by the client within the parent scope. It must consist of lower case letters, numbers, and hyphen, with the first character a letter, the last a letter or a number, and a 63 character maximum. - * `:body` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig.t`) - + * `:body` (*type:* `GoogleApi.SecurityCenter.V1.Model.EventThreatDetectionCustomModule.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig{}}` on success + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.EventThreatDetectionCustomModule{}}` on success * `{:error, info}` on failure """ - @spec securitycenter_organizations_mute_configs_create( + @spec securitycenter_organizations_event_threat_detection_settings_custom_modules_create( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig.t()} + {:ok, GoogleApi.SecurityCenter.V1.Model.EventThreatDetectionCustomModule.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def securitycenter_organizations_mute_configs_create( + def securitycenter_organizations_event_threat_detection_settings_custom_modules_create( connection, organizations_id, optional_params \\ [], @@ -997,34 +1006,36 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Organizations do :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, - :muteConfigId => :query, :body => :body } request = Request.new() |> Request.method(:post) - |> Request.url("/v1/organizations/{organizationsId}/muteConfigs", %{ - "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1) - }) + |> Request.url( + "/v1/organizations/{organizationsId}/eventThreatDetectionSettings/customModules", + %{ + "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1) + } + ) |> Request.add_optional_params(optional_params_config, optional_params) |> Request.library_version(@library_version) connection |> Connection.execute(request) |> Response.decode( - opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig{}] + opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.EventThreatDetectionCustomModule{}] ) end @doc """ - Deletes an existing mute config. + Deletes the specified Event Threat Detection custom module and all of its descendants in the Resource Manager hierarchy. This method is only supported for resident custom modules. ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `organizations_id` (*type:* `String.t`) - Part of `name`. Required. Name of the mute config to delete. Its format is organizations/{organization}/muteConfigs/{config_id}, folders/{folder}/muteConfigs/{config_id}, or projects/{project}/muteConfigs/{config_id} - * `mute_configs_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. + * `organizations_id` (*type:* `String.t`) - Part of `name`. Required. Name of the custom module to delete. Its format is: * "organizations/{organization}/eventThreatDetectionSettings/customModules/{module}". * "folders/{folder}/eventThreatDetectionSettings/customModules/{module}". * "projects/{project}/eventThreatDetectionSettings/customModules/{module}". + * `custom_modules_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1044,7 +1055,7 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Organizations do * `{:ok, %GoogleApi.SecurityCenter.V1.Model.Empty{}}` on success * `{:error, info}` on failure """ - @spec securitycenter_organizations_mute_configs_delete( + @spec securitycenter_organizations_event_threat_detection_settings_custom_modules_delete( Tesla.Env.client(), String.t(), String.t(), @@ -1055,10 +1066,10 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Organizations do | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def securitycenter_organizations_mute_configs_delete( + def securitycenter_organizations_event_threat_detection_settings_custom_modules_delete( connection, organizations_id, - mute_configs_id, + custom_modules_id, optional_params \\ [], opts \\ [] ) do @@ -1079,10 +1090,14 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Organizations do request = Request.new() |> Request.method(:delete) - |> Request.url("/v1/organizations/{organizationsId}/muteConfigs/{muteConfigsId}", %{ - "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1), - "muteConfigsId" => URI.encode(mute_configs_id, &(URI.char_unreserved?(&1) || &1 == ?/)) - }) + |> Request.url( + "/v1/organizations/{organizationsId}/eventThreatDetectionSettings/customModules/{customModulesId}", + %{ + "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1), + "customModulesId" => + URI.encode(custom_modules_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + } + ) |> Request.add_optional_params(optional_params_config, optional_params) |> Request.library_version(@library_version) @@ -1092,13 +1107,13 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Organizations do end @doc """ - Gets a mute config. + Gets an Event Threat Detection custom module. ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `organizations_id` (*type:* `String.t`) - Part of `name`. Required. Name of the mute config to retrieve. Its format is organizations/{organization}/muteConfigs/{config_id}, folders/{folder}/muteConfigs/{config_id}, or projects/{project}/muteConfigs/{config_id} - * `mute_configs_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. + * `organizations_id` (*type:* `String.t`) - Part of `name`. Required. Name of the custom module to get. Its format is: * "organizations/{organization}/eventThreatDetectionSettings/customModules/{module}". * "folders/{folder}/eventThreatDetectionSettings/customModules/{module}". * "projects/{project}/eventThreatDetectionSettings/customModules/{module}". + * `custom_modules_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1115,24 +1130,24 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Organizations do ## Returns - * `{:ok, %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig{}}` on success + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.EventThreatDetectionCustomModule{}}` on success * `{:error, info}` on failure """ - @spec securitycenter_organizations_mute_configs_get( + @spec securitycenter_organizations_event_threat_detection_settings_custom_modules_get( Tesla.Env.client(), String.t(), String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig.t()} + {:ok, GoogleApi.SecurityCenter.V1.Model.EventThreatDetectionCustomModule.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def securitycenter_organizations_mute_configs_get( + def securitycenter_organizations_event_threat_detection_settings_custom_modules_get( connection, organizations_id, - mute_configs_id, + custom_modules_id, optional_params \\ [], opts \\ [] ) do @@ -1153,27 +1168,31 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Organizations do request = Request.new() |> Request.method(:get) - |> Request.url("/v1/organizations/{organizationsId}/muteConfigs/{muteConfigsId}", %{ - "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1), - "muteConfigsId" => URI.encode(mute_configs_id, &(URI.char_unreserved?(&1) || &1 == ?/)) - }) + |> Request.url( + "/v1/organizations/{organizationsId}/eventThreatDetectionSettings/customModules/{customModulesId}", + %{ + "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1), + "customModulesId" => + URI.encode(custom_modules_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + } + ) |> Request.add_optional_params(optional_params_config, optional_params) |> Request.library_version(@library_version) connection |> Connection.execute(request) |> Response.decode( - opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig{}] + opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.EventThreatDetectionCustomModule{}] ) end @doc """ - Lists mute configs. + Lists all Event Threat Detection custom modules for the given Resource Manager parent. This includes resident modules defined at the scope of the parent along with modules inherited from ancestors. ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `organizations_id` (*type:* `String.t`) - Part of `parent`. Required. The parent, which owns the collection of mute configs. Its format is "organizations/[organization_id]", "folders/[folder_id]", "projects/[project_id]". + * `organizations_id` (*type:* `String.t`) - Part of `parent`. Required. Name of the parent to list custom modules under. Its format is: * "organizations/{organization}/eventThreatDetectionSettings". * "folders/{folder}/eventThreatDetectionSettings". * "projects/{project}/eventThreatDetectionSettings". * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1186,26 +1205,27 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Organizations do * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). - * `:pageSize` (*type:* `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. - * `:pageToken` (*type:* `String.t`) - 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. + * `:pageSize` (*type:* `integer()`) - The maximum number of modules to return. The service may return fewer than this value. If unspecified, at most 10 configs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. + * `:pageToken` (*type:* `String.t`) - A page token, received from a previous `ListEventThreatDetectionCustomModules` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListEventThreatDetectionCustomModules` must match the call that provided the page token. * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.SecurityCenter.V1.Model.ListMuteConfigsResponse{}}` on success + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.ListEventThreatDetectionCustomModulesResponse{}}` on success * `{:error, info}` on failure """ - @spec securitycenter_organizations_mute_configs_list( + @spec securitycenter_organizations_event_threat_detection_settings_custom_modules_list( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.SecurityCenter.V1.Model.ListMuteConfigsResponse.t()} + {:ok, + GoogleApi.SecurityCenter.V1.Model.ListEventThreatDetectionCustomModulesResponse.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def securitycenter_organizations_mute_configs_list( + def securitycenter_organizations_event_threat_detection_settings_custom_modules_list( connection, organizations_id, optional_params \\ [], @@ -1230,27 +1250,33 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Organizations do request = Request.new() |> Request.method(:get) - |> Request.url("/v1/organizations/{organizationsId}/muteConfigs", %{ - "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1) - }) + |> Request.url( + "/v1/organizations/{organizationsId}/eventThreatDetectionSettings/customModules", + %{ + "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1) + } + ) |> Request.add_optional_params(optional_params_config, optional_params) |> Request.library_version(@library_version) connection |> Connection.execute(request) |> Response.decode( - opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.ListMuteConfigsResponse{}] + opts ++ + [ + struct: + %GoogleApi.SecurityCenter.V1.Model.ListEventThreatDetectionCustomModulesResponse{} + ] ) end @doc """ - Updates a mute config. + Lists all resident Event Threat Detection custom modules under the given Resource Manager parent and its descendants. ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `organizations_id` (*type:* `String.t`) - Part of `muteConfig.name`. This field will be ignored if provided on config creation. Format "organizations/{organization}/muteConfigs/{mute_config}" "folders/{folder}/muteConfigs/{mute_config}" "projects/{project}/muteConfigs/{mute_config}" - * `mute_configs_id` (*type:* `String.t`) - Part of `muteConfig.name`. See documentation of `organizationsId`. + * `organizations_id` (*type:* `String.t`) - Part of `parent`. Required. Name of the parent to list custom modules under. Its format is: * "organizations/{organization}/eventThreatDetectionSettings". * "folders/{folder}/eventThreatDetectionSettings". * "projects/{project}/eventThreatDetectionSettings". * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1263,30 +1289,29 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Organizations do * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). - * `:updateMask` (*type:* `String.t`) - The list of fields to be updated. If empty all mutable fields will be updated. - * `:body` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig.t`) - + * `:pageSize` (*type:* `integer()`) - The maximum number of modules to return. The service may return fewer than this value. If unspecified, at most 10 configs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. + * `:pageToken` (*type:* `String.t`) - A page token, received from a previous `ListDescendantEventThreatDetectionCustomModules` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListDescendantEventThreatDetectionCustomModules` must match the call that provided the page token. * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig{}}` on success + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.ListDescendantEventThreatDetectionCustomModulesResponse{}}` on success * `{:error, info}` on failure """ - @spec securitycenter_organizations_mute_configs_patch( + @spec securitycenter_organizations_event_threat_detection_settings_custom_modules_list_descendant( Tesla.Env.client(), String.t(), - String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig.t()} + {:ok, + GoogleApi.SecurityCenter.V1.Model.ListDescendantEventThreatDetectionCustomModulesResponse.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def securitycenter_organizations_mute_configs_patch( + def securitycenter_organizations_event_threat_detection_settings_custom_modules_list_descendant( connection, organizations_id, - mute_configs_id, optional_params \\ [], opts \\ [] ) do @@ -1302,34 +1327,41 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Organizations do :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, - :updateMask => :query, - :body => :body + :pageSize => :query, + :pageToken => :query } request = Request.new() - |> Request.method(:patch) - |> Request.url("/v1/organizations/{organizationsId}/muteConfigs/{muteConfigsId}", %{ - "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1), - "muteConfigsId" => URI.encode(mute_configs_id, &(URI.char_unreserved?(&1) || &1 == ?/)) - }) + |> Request.method(:get) + |> Request.url( + "/v1/organizations/{organizationsId}/eventThreatDetectionSettings/customModules:listDescendant", + %{ + "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1) + } + ) |> Request.add_optional_params(optional_params_config, optional_params) |> Request.library_version(@library_version) connection |> Connection.execute(request) |> Response.decode( - opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig{}] + opts ++ + [ + struct: + %GoogleApi.SecurityCenter.V1.Model.ListDescendantEventThreatDetectionCustomModulesResponse{} + ] ) end @doc """ - Creates a notification config. + Updates the Event Threat Detection custom module with the given name based on the given update mask. Updating the enablement state is supported for both resident and inherited modules (though resident modules cannot have an enablement state of "inherited"). Updating the display name or configuration of a module is supported for resident modules only. The type of a module cannot be changed. ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `organizations_id` (*type:* `String.t`) - Part of `parent`. Required. Resource name of the new notification config's parent. Its format is "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]". + * `organizations_id` (*type:* `String.t`) - Part of `eventThreatDetectionCustomModule.name`. Immutable. The resource name of the Event Threat Detection custom module. Its format is: * "organizations/{organization}/eventThreatDetectionSettings/customModules/{module}". * "folders/{folder}/eventThreatDetectionSettings/customModules/{module}". * "projects/{project}/eventThreatDetectionSettings/customModules/{module}". + * `custom_modules_id` (*type:* `String.t`) - Part of `eventThreatDetectionCustomModule.name`. See documentation of `organizationsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1342,28 +1374,30 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Organizations do * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). - * `:configId` (*type:* `String.t`) - Required. Unique identifier provided by the client within the parent scope. It must be between 1 and 128 characters, and contains alphanumeric characters, underscores or hyphens only. - * `:body` (*type:* `GoogleApi.SecurityCenter.V1.Model.NotificationConfig.t`) - + * `:updateMask` (*type:* `String.t`) - The list of fields to be updated. If empty all mutable fields will be updated. + * `:body` (*type:* `GoogleApi.SecurityCenter.V1.Model.EventThreatDetectionCustomModule.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.SecurityCenter.V1.Model.NotificationConfig{}}` on success + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.EventThreatDetectionCustomModule{}}` on success * `{:error, info}` on failure """ - @spec securitycenter_organizations_notification_configs_create( + @spec securitycenter_organizations_event_threat_detection_settings_custom_modules_patch( Tesla.Env.client(), String.t(), + String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.SecurityCenter.V1.Model.NotificationConfig.t()} + {:ok, GoogleApi.SecurityCenter.V1.Model.EventThreatDetectionCustomModule.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def securitycenter_organizations_notification_configs_create( + def securitycenter_organizations_event_threat_detection_settings_custom_modules_patch( connection, organizations_id, + custom_modules_id, optional_params \\ [], opts \\ [] ) do @@ -1379,32 +1413,39 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Organizations do :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, - :configId => :query, + :updateMask => :query, :body => :body } request = Request.new() - |> Request.method(:post) - |> Request.url("/v1/organizations/{organizationsId}/notificationConfigs", %{ - "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1) - }) + |> Request.method(:patch) + |> Request.url( + "/v1/organizations/{organizationsId}/eventThreatDetectionSettings/customModules/{customModulesId}", + %{ + "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1), + "customModulesId" => + URI.encode(custom_modules_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + } + ) |> Request.add_optional_params(optional_params_config, optional_params) |> Request.library_version(@library_version) connection |> Connection.execute(request) - |> Response.decode(opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.NotificationConfig{}]) + |> Response.decode( + opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.EventThreatDetectionCustomModule{}] + ) end @doc """ - Deletes a notification config. + Gets an effective Event Threat Detection custom module at the given level. ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `organizations_id` (*type:* `String.t`) - Part of `name`. Required. Name of the notification config to delete. Its format is "organizations/[organization_id]/notificationConfigs/[config_id]". - * `notification_configs_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. + * `organizations_id` (*type:* `String.t`) - Part of `name`. Required. The resource name of the effective Event Threat Detection custom module. Its format is: * "organizations/{organization}/eventThreatDetectionSettings/effectiveCustomModules/{module}". * "folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}". * "projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}". + * `effective_custom_modules_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1421,24 +1462,24 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Organizations do ## Returns - * `{:ok, %GoogleApi.SecurityCenter.V1.Model.Empty{}}` on success + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.EffectiveEventThreatDetectionCustomModule{}}` on success * `{:error, info}` on failure """ - @spec securitycenter_organizations_notification_configs_delete( + @spec securitycenter_organizations_event_threat_detection_settings_effective_custom_modules_get( Tesla.Env.client(), String.t(), String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.SecurityCenter.V1.Model.Empty.t()} + {:ok, GoogleApi.SecurityCenter.V1.Model.EffectiveEventThreatDetectionCustomModule.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def securitycenter_organizations_notification_configs_delete( + def securitycenter_organizations_event_threat_detection_settings_effective_custom_modules_get( connection, organizations_id, - notification_configs_id, + effective_custom_modules_id, optional_params \\ [], opts \\ [] ) do @@ -1458,13 +1499,13 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Organizations do request = Request.new() - |> Request.method(:delete) + |> Request.method(:get) |> Request.url( - "/v1/organizations/{organizationsId}/notificationConfigs/{notificationConfigsId}", + "/v1/organizations/{organizationsId}/eventThreatDetectionSettings/effectiveCustomModules/{effectiveCustomModulesId}", %{ "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1), - "notificationConfigsId" => - URI.encode(notification_configs_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + "effectiveCustomModulesId" => + URI.encode(effective_custom_modules_id, &(URI.char_unreserved?(&1) || &1 == ?/)) } ) |> Request.add_optional_params(optional_params_config, optional_params) @@ -1472,17 +1513,19 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Organizations do connection |> Connection.execute(request) - |> Response.decode(opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.Empty{}]) + |> Response.decode( + opts ++ + [struct: %GoogleApi.SecurityCenter.V1.Model.EffectiveEventThreatDetectionCustomModule{}] + ) end @doc """ - Gets a notification config. + Lists all effective Event Threat Detection custom modules for the given parent. This includes resident modules defined at the scope of the parent along with modules inherited from its ancestors. ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `organizations_id` (*type:* `String.t`) - Part of `name`. Required. Name of the notification config to get. Its format is "organizations/[organization_id]/notificationConfigs/[config_id]". - * `notification_configs_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. + * `organizations_id` (*type:* `String.t`) - Part of `parent`. Required. Name of the parent to list custom modules for. Its format is: * "organizations/{organization}/eventThreatDetectionSettings". * "folders/{folder}/eventThreatDetectionSettings". * "projects/{project}/eventThreatDetectionSettings". * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1495,28 +1538,29 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Organizations do * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:pageSize` (*type:* `integer()`) - The maximum number of modules to return. The service may return fewer than this value. If unspecified, at most 10 configs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. + * `:pageToken` (*type:* `String.t`) - A page token, received from a previous `ListEffectiveEventThreatDetectionCustomModules` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListEffectiveEventThreatDetectionCustomModules` must match the call that provided the page token. * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.SecurityCenter.V1.Model.NotificationConfig{}}` on success + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.ListEffectiveEventThreatDetectionCustomModulesResponse{}}` on success * `{:error, info}` on failure """ - @spec securitycenter_organizations_notification_configs_get( + @spec securitycenter_organizations_event_threat_detection_settings_effective_custom_modules_list( Tesla.Env.client(), String.t(), - String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.SecurityCenter.V1.Model.NotificationConfig.t()} + {:ok, + GoogleApi.SecurityCenter.V1.Model.ListEffectiveEventThreatDetectionCustomModulesResponse.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def securitycenter_organizations_notification_configs_get( + def securitycenter_organizations_event_threat_detection_settings_effective_custom_modules_list( connection, organizations_id, - notification_configs_id, optional_params \\ [], opts \\ [] ) do @@ -1531,18 +1575,18 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Organizations do :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, - :upload_protocol => :query + :upload_protocol => :query, + :pageSize => :query, + :pageToken => :query } request = Request.new() |> Request.method(:get) |> Request.url( - "/v1/organizations/{organizationsId}/notificationConfigs/{notificationConfigsId}", + "/v1/organizations/{organizationsId}/eventThreatDetectionSettings/effectiveCustomModules", %{ - "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1), - "notificationConfigsId" => - URI.encode(notification_configs_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1) } ) |> Request.add_optional_params(optional_params_config, optional_params) @@ -1550,16 +1594,22 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Organizations do connection |> Connection.execute(request) - |> Response.decode(opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.NotificationConfig{}]) + |> Response.decode( + opts ++ + [ + struct: + %GoogleApi.SecurityCenter.V1.Model.ListEffectiveEventThreatDetectionCustomModulesResponse{} + ] + ) end @doc """ - Lists notification configs. + Kicks off an LRO to bulk mute findings for a parent based on a filter. The parent can be either an organization, folder or project. The findings matched by the filter will be muted after the LRO is done. ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `organizations_id` (*type:* `String.t`) - Part of `parent`. Required. Name of the organization to list notification configs. Its format is "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]". + * `organizations_id` (*type:* `String.t`) - Part of `parent`. Required. The parent, at which bulk action needs to be applied. Its format is "organizations/[organization_id]", "folders/[folder_id]", "projects/[project_id]". * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1572,26 +1622,25 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Organizations do * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). - * `:pageSize` (*type:* `integer()`) - The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000. - * `:pageToken` (*type:* `String.t`) - 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. + * `:body` (*type:* `GoogleApi.SecurityCenter.V1.Model.BulkMuteFindingsRequest.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.SecurityCenter.V1.Model.ListNotificationConfigsResponse{}}` on success + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.Operation{}}` on success * `{:error, info}` on failure """ - @spec securitycenter_organizations_notification_configs_list( + @spec securitycenter_organizations_findings_bulk_mute( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.SecurityCenter.V1.Model.ListNotificationConfigsResponse.t()} + {:ok, GoogleApi.SecurityCenter.V1.Model.Operation.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def securitycenter_organizations_notification_configs_list( + def securitycenter_organizations_findings_bulk_mute( connection, organizations_id, optional_params \\ [], @@ -1609,14 +1658,13 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Organizations do :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, - :pageSize => :query, - :pageToken => :query + :body => :body } request = Request.new() - |> Request.method(:get) - |> Request.url("/v1/organizations/{organizationsId}/notificationConfigs", %{ + |> Request.method(:post) + |> Request.url("/v1/organizations/{organizationsId}/findings:bulkMute", %{ "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) @@ -1624,19 +1672,18 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Organizations do connection |> Connection.execute(request) - |> Response.decode( - opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.ListNotificationConfigsResponse{}] - ) + |> Response.decode(opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.Operation{}]) end @doc """ - Updates a notification config. The following update fields are allowed: description, pubsub_topic, streaming_config.filter + Deletes an existing mute config. ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `organizations_id` (*type:* `String.t`) - Part of `notificationConfig.name`. The relative resource name of this notification config. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: "organizations/{organization_id}/notificationConfigs/notify_public_bucket". - * `notification_configs_id` (*type:* `String.t`) - Part of `notificationConfig.name`. See documentation of `organizationsId`. + * `organizations_id` (*type:* `String.t`) - Part of `name`. Required. Name of the mute config to delete. Its format is organizations/{organization}/muteConfigs/{config_id}, folders/{folder}/muteConfigs/{config_id}, projects/{project}/muteConfigs/{config_id}, organizations/{organization}/locations/global/muteConfigs/{config_id}, folders/{folder}/locations/global/muteConfigs/{config_id}, or projects/{project}/locations/global/muteConfigs/{config_id}. + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. + * `mute_configs_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1649,30 +1696,30 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Organizations do * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). - * `:updateMask` (*type:* `String.t`) - The FieldMask to use when updating the notification config. If empty all mutable fields will be updated. - * `:body` (*type:* `GoogleApi.SecurityCenter.V1.Model.NotificationConfig.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.SecurityCenter.V1.Model.NotificationConfig{}}` on success + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.Empty{}}` on success * `{:error, info}` on failure """ - @spec securitycenter_organizations_notification_configs_patch( + @spec securitycenter_organizations_locations_mute_configs_delete( Tesla.Env.client(), String.t(), String.t(), + String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.SecurityCenter.V1.Model.NotificationConfig.t()} + {:ok, GoogleApi.SecurityCenter.V1.Model.Empty.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def securitycenter_organizations_notification_configs_patch( + def securitycenter_organizations_locations_mute_configs_delete( connection, organizations_id, - notification_configs_id, + locations_id, + mute_configs_id, optional_params \\ [], opts \\ [] ) do @@ -1687,20 +1734,18 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Organizations do :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, - :upload_protocol => :query, - :updateMask => :query, - :body => :body + :upload_protocol => :query } request = Request.new() - |> Request.method(:patch) + |> Request.method(:delete) |> Request.url( - "/v1/organizations/{organizationsId}/notificationConfigs/{notificationConfigsId}", + "/v1/organizations/{organizationsId}/locations/{locationsId}/muteConfigs/{muteConfigsId}", %{ "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1), - "notificationConfigsId" => - URI.encode(notification_configs_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "muteConfigsId" => URI.encode(mute_configs_id, &(URI.char_unreserved?(&1) || &1 == ?/)) } ) |> Request.add_optional_params(optional_params_config, optional_params) @@ -1708,17 +1753,18 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Organizations do connection |> Connection.execute(request) - |> Response.decode(opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.NotificationConfig{}]) + |> Response.decode(opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.Empty{}]) end @doc """ - 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 Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + Gets a mute config. ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `organizations_id` (*type:* `String.t`) - Part of `name`. The name of the operation resource to be cancelled. - * `operations_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. + * `organizations_id` (*type:* `String.t`) - Part of `name`. Required. Name of the mute config to retrieve. Its format is organizations/{organization}/muteConfigs/{config_id}, folders/{folder}/muteConfigs/{config_id}, projects/{project}/muteConfigs/{config_id}, organizations/{organization}/locations/global/muteConfigs/{config_id}, folders/{folder}/locations/global/muteConfigs/{config_id}, or projects/{project}/locations/global/muteConfigs/{config_id}. + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. + * `mute_configs_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1735,24 +1781,26 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Organizations do ## Returns - * `{:ok, %GoogleApi.SecurityCenter.V1.Model.Empty{}}` on success + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig{}}` on success * `{:error, info}` on failure """ - @spec securitycenter_organizations_operations_cancel( + @spec securitycenter_organizations_locations_mute_configs_get( Tesla.Env.client(), String.t(), String.t(), + String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.SecurityCenter.V1.Model.Empty.t()} + {:ok, GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def securitycenter_organizations_operations_cancel( + def securitycenter_organizations_locations_mute_configs_get( connection, organizations_id, - operations_id, + locations_id, + mute_configs_id, optional_params \\ [], opts \\ [] ) do @@ -1772,27 +1820,34 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Organizations do request = Request.new() - |> Request.method(:post) - |> Request.url("/v1/organizations/{organizationsId}/operations/{operationsId}:cancel", %{ - "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1), - "operationsId" => URI.encode(operations_id, &URI.char_unreserved?/1) - }) + |> Request.method(:get) + |> Request.url( + "/v1/organizations/{organizationsId}/locations/{locationsId}/muteConfigs/{muteConfigsId}", + %{ + "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "muteConfigsId" => URI.encode(mute_configs_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + } + ) |> Request.add_optional_params(optional_params_config, optional_params) |> Request.library_version(@library_version) connection |> Connection.execute(request) - |> Response.decode(opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.Empty{}]) + |> Response.decode( + opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig{}] + ) end @doc """ - 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`. + Updates a mute config. ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `organizations_id` (*type:* `String.t`) - Part of `name`. The name of the operation resource to be deleted. - * `operations_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. + * `organizations_id` (*type:* `String.t`) - Part of `muteConfig.name`. This field will be ignored if provided on config creation. Format "organizations/{organization}/muteConfigs/{mute_config}" "folders/{folder}/muteConfigs/{mute_config}" "projects/{project}/muteConfigs/{mute_config}" "organizations/{organization}/locations/global/muteConfigs/{mute_config}" "folders/{folder}/locations/global/muteConfigs/{mute_config}" "projects/{project}/locations/global/muteConfigs/{mute_config}" + * `locations_id` (*type:* `String.t`) - Part of `muteConfig.name`. See documentation of `organizationsId`. + * `mute_configs_id` (*type:* `String.t`) - Part of `muteConfig.name`. See documentation of `organizationsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1805,14 +1860,176 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Organizations do * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:updateMask` (*type:* `String.t`) - The list of fields to be updated. If empty all mutable fields will be updated. + * `:body` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.SecurityCenter.V1.Model.Empty{}}` on success + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig{}}` on success * `{:error, info}` on failure """ - @spec securitycenter_organizations_operations_delete( + @spec securitycenter_organizations_locations_mute_configs_patch( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_organizations_locations_mute_configs_patch( + connection, + organizations_id, + locations_id, + mute_configs_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :updateMask => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:patch) + |> Request.url( + "/v1/organizations/{organizationsId}/locations/{locationsId}/muteConfigs/{muteConfigsId}", + %{ + "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "muteConfigsId" => URI.encode(mute_configs_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig{}] + ) + end + + @doc """ + Creates a mute config. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `organizations_id` (*type:* `String.t`) - Part of `parent`. Required. Resource name of the new mute configs's parent. Its format is "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]". + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:muteConfigId` (*type:* `String.t`) - 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. + * `:body` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_organizations_mute_configs_create( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_organizations_mute_configs_create( + connection, + organizations_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :muteConfigId => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url("/v1/organizations/{organizationsId}/muteConfigs", %{ + "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig{}] + ) + end + + @doc """ + Deletes an existing mute config. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `organizations_id` (*type:* `String.t`) - Part of `name`. Required. Name of the mute config to delete. Its format is organizations/{organization}/muteConfigs/{config_id}, folders/{folder}/muteConfigs/{config_id}, projects/{project}/muteConfigs/{config_id}, organizations/{organization}/locations/global/muteConfigs/{config_id}, folders/{folder}/locations/global/muteConfigs/{config_id}, or projects/{project}/locations/global/muteConfigs/{config_id}. + * `mute_configs_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.Empty{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_organizations_mute_configs_delete( Tesla.Env.client(), String.t(), String.t(), @@ -1823,10 +2040,10 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Organizations do | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def securitycenter_organizations_operations_delete( + def securitycenter_organizations_mute_configs_delete( connection, organizations_id, - operations_id, + mute_configs_id, optional_params \\ [], opts \\ [] ) do @@ -1847,9 +2064,9 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Organizations do request = Request.new() |> Request.method(:delete) - |> Request.url("/v1/organizations/{organizationsId}/operations/{operationsId}", %{ + |> Request.url("/v1/organizations/{organizationsId}/muteConfigs/{muteConfigsId}", %{ "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1), - "operationsId" => URI.encode(operations_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + "muteConfigsId" => URI.encode(mute_configs_id, &(URI.char_unreserved?(&1) || &1 == ?/)) }) |> Request.add_optional_params(optional_params_config, optional_params) |> Request.library_version(@library_version) @@ -1860,13 +2077,13 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Organizations do end @doc """ - 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. + Gets a mute config. ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `organizations_id` (*type:* `String.t`) - Part of `name`. The name of the operation resource. - * `operations_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. + * `organizations_id` (*type:* `String.t`) - Part of `name`. Required. Name of the mute config to retrieve. Its format is organizations/{organization}/muteConfigs/{config_id}, folders/{folder}/muteConfigs/{config_id}, projects/{project}/muteConfigs/{config_id}, organizations/{organization}/locations/global/muteConfigs/{config_id}, folders/{folder}/locations/global/muteConfigs/{config_id}, or projects/{project}/locations/global/muteConfigs/{config_id}. + * `mute_configs_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1883,24 +2100,24 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Organizations do ## Returns - * `{:ok, %GoogleApi.SecurityCenter.V1.Model.Operation{}}` on success + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig{}}` on success * `{:error, info}` on failure """ - @spec securitycenter_organizations_operations_get( + @spec securitycenter_organizations_mute_configs_get( Tesla.Env.client(), String.t(), String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.SecurityCenter.V1.Model.Operation.t()} + {:ok, GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def securitycenter_organizations_operations_get( + def securitycenter_organizations_mute_configs_get( connection, organizations_id, - operations_id, + mute_configs_id, optional_params \\ [], opts \\ [] ) do @@ -1921,25 +2138,27 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Organizations do request = Request.new() |> Request.method(:get) - |> Request.url("/v1/organizations/{organizationsId}/operations/{operationsId}", %{ + |> Request.url("/v1/organizations/{organizationsId}/muteConfigs/{muteConfigsId}", %{ "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1), - "operationsId" => URI.encode(operations_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + "muteConfigsId" => URI.encode(mute_configs_id, &(URI.char_unreserved?(&1) || &1 == ?/)) }) |> Request.add_optional_params(optional_params_config, optional_params) |> Request.library_version(@library_version) connection |> Connection.execute(request) - |> Response.decode(opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.Operation{}]) + |> Response.decode( + opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig{}] + ) end @doc """ - Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `"/v1/{name=users/*}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id. + Lists mute configs. ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `organizations_id` (*type:* `String.t`) - Part of `name`. The name of the operation's parent resource. + * `organizations_id` (*type:* `String.t`) - Part of `parent`. Required. The parent, which owns the collection of mute configs. Its format is "organizations/[organization_id]", "folders/[folder_id]", "projects/[project_id]". * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1952,27 +2171,26 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Organizations do * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). - * `:filter` (*type:* `String.t`) - The standard list filter. - * `:pageSize` (*type:* `integer()`) - The standard list page size. - * `:pageToken` (*type:* `String.t`) - The standard list page token. + * `:pageSize` (*type:* `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. + * `:pageToken` (*type:* `String.t`) - 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. * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.SecurityCenter.V1.Model.ListOperationsResponse{}}` on success + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.ListMuteConfigsResponse{}}` on success * `{:error, info}` on failure """ - @spec securitycenter_organizations_operations_list( + @spec securitycenter_organizations_mute_configs_list( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.SecurityCenter.V1.Model.ListOperationsResponse.t()} + {:ok, GoogleApi.SecurityCenter.V1.Model.ListMuteConfigsResponse.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def securitycenter_organizations_operations_list( + def securitycenter_organizations_mute_configs_list( connection, organizations_id, optional_params \\ [], @@ -1990,7 +2208,6 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Organizations do :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, - :filter => :query, :pageSize => :query, :pageToken => :query } @@ -1998,7 +2215,7 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Organizations do request = Request.new() |> Request.method(:get) - |> Request.url("/v1/organizations/{organizationsId}/operations", %{ + |> Request.url("/v1/organizations/{organizationsId}/muteConfigs", %{ "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) @@ -2007,7 +2224,2530 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Organizations do connection |> Connection.execute(request) |> Response.decode( - opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.ListOperationsResponse{}] + opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.ListMuteConfigsResponse{}] + ) + end + + @doc """ + Updates a mute config. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `organizations_id` (*type:* `String.t`) - Part of `muteConfig.name`. This field will be ignored if provided on config creation. Format "organizations/{organization}/muteConfigs/{mute_config}" "folders/{folder}/muteConfigs/{mute_config}" "projects/{project}/muteConfigs/{mute_config}" "organizations/{organization}/locations/global/muteConfigs/{mute_config}" "folders/{folder}/locations/global/muteConfigs/{mute_config}" "projects/{project}/locations/global/muteConfigs/{mute_config}" + * `mute_configs_id` (*type:* `String.t`) - Part of `muteConfig.name`. See documentation of `organizationsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:updateMask` (*type:* `String.t`) - The list of fields to be updated. If empty all mutable fields will be updated. + * `:body` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_organizations_mute_configs_patch( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_organizations_mute_configs_patch( + connection, + organizations_id, + mute_configs_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :updateMask => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:patch) + |> Request.url("/v1/organizations/{organizationsId}/muteConfigs/{muteConfigsId}", %{ + "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1), + "muteConfigsId" => URI.encode(mute_configs_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig{}] + ) + end + + @doc """ + Creates a notification config. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `organizations_id` (*type:* `String.t`) - Part of `parent`. Required. Resource name of the new notification config's parent. Its format is "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]". + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:configId` (*type:* `String.t`) - 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. + * `:body` (*type:* `GoogleApi.SecurityCenter.V1.Model.NotificationConfig.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.NotificationConfig{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_organizations_notification_configs_create( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.SecurityCenter.V1.Model.NotificationConfig.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_organizations_notification_configs_create( + connection, + organizations_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :configId => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url("/v1/organizations/{organizationsId}/notificationConfigs", %{ + "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.NotificationConfig{}]) + end + + @doc """ + Deletes a notification config. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `organizations_id` (*type:* `String.t`) - Part of `name`. Required. Name of the notification config to delete. Its format is "organizations/[organization_id]/notificationConfigs/[config_id]", "folders/[folder_id]/notificationConfigs/[config_id]", or "projects/[project_id]/notificationConfigs/[config_id]". + * `notification_configs_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.Empty{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_organizations_notification_configs_delete( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.SecurityCenter.V1.Model.Empty.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_organizations_notification_configs_delete( + connection, + organizations_id, + notification_configs_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:delete) + |> Request.url( + "/v1/organizations/{organizationsId}/notificationConfigs/{notificationConfigsId}", + %{ + "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1), + "notificationConfigsId" => + URI.encode(notification_configs_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.Empty{}]) + end + + @doc """ + Gets a notification config. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `organizations_id` (*type:* `String.t`) - Part of `name`. Required. Name of the notification config to get. Its format is "organizations/[organization_id]/notificationConfigs/[config_id]", "folders/[folder_id]/notificationConfigs/[config_id]", or "projects/[project_id]/notificationConfigs/[config_id]". + * `notification_configs_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.NotificationConfig{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_organizations_notification_configs_get( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.SecurityCenter.V1.Model.NotificationConfig.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_organizations_notification_configs_get( + connection, + organizations_id, + notification_configs_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url( + "/v1/organizations/{organizationsId}/notificationConfigs/{notificationConfigsId}", + %{ + "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1), + "notificationConfigsId" => + URI.encode(notification_configs_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.NotificationConfig{}]) + end + + @doc """ + Lists notification configs. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `organizations_id` (*type:* `String.t`) - Part of `parent`. Required. The name of the parent in which to list the notification configurations. Its format is "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]". + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:pageSize` (*type:* `integer()`) - The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000. + * `:pageToken` (*type:* `String.t`) - 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. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.ListNotificationConfigsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_organizations_notification_configs_list( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.SecurityCenter.V1.Model.ListNotificationConfigsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_organizations_notification_configs_list( + connection, + organizations_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1/organizations/{organizationsId}/notificationConfigs", %{ + "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.ListNotificationConfigsResponse{}] + ) + end + + @doc """ + Updates a notification config. The following update fields are allowed: description, pubsub_topic, streaming_config.filter + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `organizations_id` (*type:* `String.t`) - Part of `notificationConfig.name`. The relative resource name of this notification config. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: "organizations/{organization_id}/notificationConfigs/notify_public_bucket", "folders/{folder_id}/notificationConfigs/notify_public_bucket", or "projects/{project_id}/notificationConfigs/notify_public_bucket". + * `notification_configs_id` (*type:* `String.t`) - Part of `notificationConfig.name`. See documentation of `organizationsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:updateMask` (*type:* `String.t`) - The FieldMask to use when updating the notification config. If empty all mutable fields will be updated. + * `:body` (*type:* `GoogleApi.SecurityCenter.V1.Model.NotificationConfig.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.NotificationConfig{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_organizations_notification_configs_patch( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.SecurityCenter.V1.Model.NotificationConfig.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_organizations_notification_configs_patch( + connection, + organizations_id, + notification_configs_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :updateMask => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:patch) + |> Request.url( + "/v1/organizations/{organizationsId}/notificationConfigs/{notificationConfigsId}", + %{ + "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1), + "notificationConfigsId" => + URI.encode(notification_configs_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.NotificationConfig{}]) + end + + @doc """ + 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 Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `organizations_id` (*type:* `String.t`) - Part of `name`. The name of the operation resource to be cancelled. + * `operations_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.Empty{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_organizations_operations_cancel( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.SecurityCenter.V1.Model.Empty.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_organizations_operations_cancel( + connection, + organizations_id, + operations_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url("/v1/organizations/{organizationsId}/operations/{operationsId}:cancel", %{ + "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1), + "operationsId" => URI.encode(operations_id, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.Empty{}]) + end + + @doc """ + 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`. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `organizations_id` (*type:* `String.t`) - Part of `name`. The name of the operation resource to be deleted. + * `operations_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.Empty{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_organizations_operations_delete( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.SecurityCenter.V1.Model.Empty.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_organizations_operations_delete( + connection, + organizations_id, + operations_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:delete) + |> Request.url("/v1/organizations/{organizationsId}/operations/{operationsId}", %{ + "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1), + "operationsId" => URI.encode(operations_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.Empty{}]) + end + + @doc """ + 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. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `organizations_id` (*type:* `String.t`) - Part of `name`. The name of the operation resource. + * `operations_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_organizations_operations_get( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.SecurityCenter.V1.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_organizations_operations_get( + connection, + organizations_id, + operations_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1/organizations/{organizationsId}/operations/{operationsId}", %{ + "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1), + "operationsId" => URI.encode(operations_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.Operation{}]) + end + + @doc """ + Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `organizations_id` (*type:* `String.t`) - Part of `name`. The name of the operation's parent resource. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:filter` (*type:* `String.t`) - The standard list filter. + * `:pageSize` (*type:* `integer()`) - The standard list page size. + * `:pageToken` (*type:* `String.t`) - The standard list page token. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.ListOperationsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_organizations_operations_list( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.SecurityCenter.V1.Model.ListOperationsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_organizations_operations_list( + connection, + organizations_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :filter => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1/organizations/{organizationsId}/operations", %{ + "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.ListOperationsResponse{}] + ) + end + + @doc """ + Creates a ResourceValueConfig for an organization. Maps user's tags to difference resource values for use by the attack path simulation. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `organizations_id` (*type:* `String.t`) - Part of `parent`. Required. Resource name of the new ResourceValueConfig's parent. The parent field in the CreateResourceValueConfigRequest messages must either be empty or match this field. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:body` (*type:* `GoogleApi.SecurityCenter.V1.Model.BatchCreateResourceValueConfigsRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.BatchCreateResourceValueConfigsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_organizations_resource_value_configs_batch_create( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.SecurityCenter.V1.Model.BatchCreateResourceValueConfigsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_organizations_resource_value_configs_batch_create( + connection, + organizations_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url("/v1/organizations/{organizationsId}/resourceValueConfigs:batchCreate", %{ + "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ + [struct: %GoogleApi.SecurityCenter.V1.Model.BatchCreateResourceValueConfigsResponse{}] + ) + end + + @doc """ + Deletes a ResourceValueConfig. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `organizations_id` (*type:* `String.t`) - Part of `name`. Required. Name of the ResourceValueConfig to delete + * `resource_value_configs_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.Empty{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_organizations_resource_value_configs_delete( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.SecurityCenter.V1.Model.Empty.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_organizations_resource_value_configs_delete( + connection, + organizations_id, + resource_value_configs_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:delete) + |> Request.url( + "/v1/organizations/{organizationsId}/resourceValueConfigs/{resourceValueConfigsId}", + %{ + "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1), + "resourceValueConfigsId" => + URI.encode(resource_value_configs_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.Empty{}]) + end + + @doc """ + Gets a ResourceValueConfig. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `organizations_id` (*type:* `String.t`) - Part of `name`. Required. Name of the resource value config to retrieve. Its format is organizations/{organization}/resourceValueConfigs/{config_id}. + * `resource_value_configs_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1ResourceValueConfig{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_organizations_resource_value_configs_get( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1ResourceValueConfig.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_organizations_resource_value_configs_get( + connection, + organizations_id, + resource_value_configs_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url( + "/v1/organizations/{organizationsId}/resourceValueConfigs/{resourceValueConfigsId}", + %{ + "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1), + "resourceValueConfigsId" => + URI.encode(resource_value_configs_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ + [ + struct: + %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1ResourceValueConfig{} + ] + ) + end + + @doc """ + Lists all ResourceValueConfigs. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `organizations_id` (*type:* `String.t`) - Part of `parent`. Required. The parent, which owns the collection of resource value configs. Its format is "organizations/[organization_id]" + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:pageSize` (*type:* `integer()`) - The number of results to return. The service may return fewer than this value. If unspecified, at most 10 configs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. + * `:pageToken` (*type:* `String.t`) - 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. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.ListResourceValueConfigsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_organizations_resource_value_configs_list( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.SecurityCenter.V1.Model.ListResourceValueConfigsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_organizations_resource_value_configs_list( + connection, + organizations_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1/organizations/{organizationsId}/resourceValueConfigs", %{ + "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.ListResourceValueConfigsResponse{}] + ) + end + + @doc """ + Updates an existing ResourceValueConfigs with new rules. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `organizations_id` (*type:* `String.t`) - Part of `resourceValueConfig.name`. Name for the resource value config + * `resource_value_configs_id` (*type:* `String.t`) - Part of `resourceValueConfig.name`. See documentation of `organizationsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:updateMask` (*type:* `String.t`) - The list of fields to be updated. If empty all mutable fields will be updated. + * `:body` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1ResourceValueConfig.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1ResourceValueConfig{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_organizations_resource_value_configs_patch( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1ResourceValueConfig.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_organizations_resource_value_configs_patch( + connection, + organizations_id, + resource_value_configs_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :updateMask => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:patch) + |> Request.url( + "/v1/organizations/{organizationsId}/resourceValueConfigs/{resourceValueConfigsId}", + %{ + "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1), + "resourceValueConfigsId" => + URI.encode(resource_value_configs_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ + [ + struct: + %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1ResourceValueConfig{} + ] + ) + end + + @doc """ + Creates a resident SecurityHealthAnalyticsCustomModule at the scope of the given CRM parent, and also creates inherited SecurityHealthAnalyticsCustomModules for all CRM descendants of the given parent. These modules are enabled by default. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `organizations_id` (*type:* `String.t`) - Part of `parent`. Required. Resource name of the new custom module's parent. Its format is "organizations/{organization}/securityHealthAnalyticsSettings", "folders/{folder}/securityHealthAnalyticsSettings", or "projects/{project}/securityHealthAnalyticsSettings" + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:body` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_organizations_security_health_analytics_settings_custom_modules_create( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_organizations_security_health_analytics_settings_custom_modules_create( + connection, + organizations_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url( + "/v1/organizations/{organizationsId}/securityHealthAnalyticsSettings/customModules", + %{ + "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ + [ + struct: + %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule{} + ] + ) + end + + @doc """ + Deletes the specified SecurityHealthAnalyticsCustomModule and all of its descendants in the CRM hierarchy. This method is only supported for resident custom modules. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `organizations_id` (*type:* `String.t`) - Part of `name`. Required. Name of the custom module to delete. Its format is "organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}", "folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}", or "projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}" + * `custom_modules_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.Empty{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_organizations_security_health_analytics_settings_custom_modules_delete( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.SecurityCenter.V1.Model.Empty.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_organizations_security_health_analytics_settings_custom_modules_delete( + connection, + organizations_id, + custom_modules_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:delete) + |> Request.url( + "/v1/organizations/{organizationsId}/securityHealthAnalyticsSettings/customModules/{customModulesId}", + %{ + "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1), + "customModulesId" => + URI.encode(custom_modules_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.Empty{}]) + end + + @doc """ + Retrieves a SecurityHealthAnalyticsCustomModule. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `organizations_id` (*type:* `String.t`) - Part of `name`. Required. Name of the custom module to get. Its format is "organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}", "folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}", or "projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}" + * `custom_modules_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_organizations_security_health_analytics_settings_custom_modules_get( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_organizations_security_health_analytics_settings_custom_modules_get( + connection, + organizations_id, + custom_modules_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url( + "/v1/organizations/{organizationsId}/securityHealthAnalyticsSettings/customModules/{customModulesId}", + %{ + "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1), + "customModulesId" => + URI.encode(custom_modules_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ + [ + struct: + %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule{} + ] + ) + end + + @doc """ + Returns a list of all SecurityHealthAnalyticsCustomModules for the given parent. This includes resident modules defined at the scope of the parent, and inherited modules, inherited from CRM ancestors. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `organizations_id` (*type:* `String.t`) - Part of `parent`. Required. Name of parent to list custom modules. Its format is "organizations/{organization}/securityHealthAnalyticsSettings", "folders/{folder}/securityHealthAnalyticsSettings", or "projects/{project}/securityHealthAnalyticsSettings" + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:pageSize` (*type:* `integer()`) - The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000. + * `:pageToken` (*type:* `String.t`) - The value returned by the last call indicating a continuation + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.ListSecurityHealthAnalyticsCustomModulesResponse{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_organizations_security_health_analytics_settings_custom_modules_list( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.SecurityCenter.V1.Model.ListSecurityHealthAnalyticsCustomModulesResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_organizations_security_health_analytics_settings_custom_modules_list( + connection, + organizations_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url( + "/v1/organizations/{organizationsId}/securityHealthAnalyticsSettings/customModules", + %{ + "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ + [ + struct: + %GoogleApi.SecurityCenter.V1.Model.ListSecurityHealthAnalyticsCustomModulesResponse{} + ] + ) + end + + @doc """ + Returns a list of all resident SecurityHealthAnalyticsCustomModules under the given CRM parent and all of the parent’s CRM descendants. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `organizations_id` (*type:* `String.t`) - Part of `parent`. Required. Name of parent to list descendant custom modules. Its format is "organizations/{organization}/securityHealthAnalyticsSettings", "folders/{folder}/securityHealthAnalyticsSettings", or "projects/{project}/securityHealthAnalyticsSettings" + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:pageSize` (*type:* `integer()`) - The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000. + * `:pageToken` (*type:* `String.t`) - The value returned by the last call indicating a continuation + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.ListDescendantSecurityHealthAnalyticsCustomModulesResponse{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_organizations_security_health_analytics_settings_custom_modules_list_descendant( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.SecurityCenter.V1.Model.ListDescendantSecurityHealthAnalyticsCustomModulesResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_organizations_security_health_analytics_settings_custom_modules_list_descendant( + connection, + organizations_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url( + "/v1/organizations/{organizationsId}/securityHealthAnalyticsSettings/customModules:listDescendant", + %{ + "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ + [ + struct: + %GoogleApi.SecurityCenter.V1.Model.ListDescendantSecurityHealthAnalyticsCustomModulesResponse{} + ] + ) + end + + @doc """ + Updates the SecurityHealthAnalyticsCustomModule under the given name based on the given update mask. Updating the enablement state is supported on both resident and inherited modules (though resident modules cannot have an enablement state of "inherited"). Updating the display name and custom config of a module is supported on resident modules only. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `organizations_id` (*type:* `String.t`) - Part of `securityHealthAnalyticsCustomModule.name`. Immutable. The resource name of the custom module. Its format is "organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}", or "folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}", or "projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}" The id {customModule} is server-generated and is not user settable. It will be a numeric id containing 1-20 digits. + * `custom_modules_id` (*type:* `String.t`) - Part of `securityHealthAnalyticsCustomModule.name`. See documentation of `organizationsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:updateMask` (*type:* `String.t`) - The list of fields to be updated. The only fields that can be updated are `enablement_state` and `custom_config`. If empty or set to the wildcard value `*`, both `enablement_state` and `custom_config` are updated. + * `:body` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_organizations_security_health_analytics_settings_custom_modules_patch( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_organizations_security_health_analytics_settings_custom_modules_patch( + connection, + organizations_id, + custom_modules_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :updateMask => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:patch) + |> Request.url( + "/v1/organizations/{organizationsId}/securityHealthAnalyticsSettings/customModules/{customModulesId}", + %{ + "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1), + "customModulesId" => + URI.encode(custom_modules_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ + [ + struct: + %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule{} + ] + ) + end + + @doc """ + Simulates a given SecurityHealthAnalyticsCustomModule and Resource. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `organizations_id` (*type:* `String.t`) - Part of `parent`. Required. The relative resource name of the organization, project, or folder. For more information about relative resource names, see [Relative Resource Name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) Example: `organizations/{organization_id}` + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:body` (*type:* `GoogleApi.SecurityCenter.V1.Model.SimulateSecurityHealthAnalyticsCustomModuleRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.SimulateSecurityHealthAnalyticsCustomModuleResponse{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_organizations_security_health_analytics_settings_custom_modules_simulate( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.SecurityCenter.V1.Model.SimulateSecurityHealthAnalyticsCustomModuleResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_organizations_security_health_analytics_settings_custom_modules_simulate( + connection, + organizations_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url( + "/v1/organizations/{organizationsId}/securityHealthAnalyticsSettings/customModules:simulate", + %{ + "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ + [ + struct: + %GoogleApi.SecurityCenter.V1.Model.SimulateSecurityHealthAnalyticsCustomModuleResponse{} + ] + ) + end + + @doc """ + Retrieves an EffectiveSecurityHealthAnalyticsCustomModule. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `organizations_id` (*type:* `String.t`) - Part of `name`. Required. Name of the effective custom module to get. Its format is "organizations/{organization}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}", "folders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}", or "projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}" + * `effective_custom_modules_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1EffectiveSecurityHealthAnalyticsCustomModule{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_organizations_security_health_analytics_settings_effective_custom_modules_get( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1EffectiveSecurityHealthAnalyticsCustomModule.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_organizations_security_health_analytics_settings_effective_custom_modules_get( + connection, + organizations_id, + effective_custom_modules_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url( + "/v1/organizations/{organizationsId}/securityHealthAnalyticsSettings/effectiveCustomModules/{effectiveCustomModulesId}", + %{ + "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1), + "effectiveCustomModulesId" => + URI.encode(effective_custom_modules_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ + [ + struct: + %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1EffectiveSecurityHealthAnalyticsCustomModule{} + ] + ) + end + + @doc """ + Returns a list of all EffectiveSecurityHealthAnalyticsCustomModules for the given parent. This includes resident modules defined at the scope of the parent, and inherited modules, inherited from CRM ancestors. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `organizations_id` (*type:* `String.t`) - Part of `parent`. Required. Name of parent to list effective custom modules. Its format is "organizations/{organization}/securityHealthAnalyticsSettings", "folders/{folder}/securityHealthAnalyticsSettings", or "projects/{project}/securityHealthAnalyticsSettings" + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:pageSize` (*type:* `integer()`) - The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000. + * `:pageToken` (*type:* `String.t`) - The value returned by the last call indicating a continuation + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_organizations_security_health_analytics_settings_effective_custom_modules_list( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.SecurityCenter.V1.Model.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_organizations_security_health_analytics_settings_effective_custom_modules_list( + connection, + organizations_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url( + "/v1/organizations/{organizationsId}/securityHealthAnalyticsSettings/effectiveCustomModules", + %{ + "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ + [ + struct: + %GoogleApi.SecurityCenter.V1.Model.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse{} + ] + ) + end + + @doc """ + Get the simulation by name or the latest simulation for the given organization. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `organizations_id` (*type:* `String.t`) - Part of `name`. Required. The organization name or simulation name of this simulation Valid format: "organizations/{organization}/simulations/latest" "organizations/{organization}/simulations/{simulation}" + * `simulations_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.Simulation{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_organizations_simulations_get( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.SecurityCenter.V1.Model.Simulation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_organizations_simulations_get( + connection, + organizations_id, + simulations_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1/organizations/{organizationsId}/simulations/{simulationsId}", %{ + "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1), + "simulationsId" => URI.encode(simulations_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.Simulation{}]) + end + + @doc """ + Lists the attack paths for a set of simulation results or valued resources and filter. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `organizations_id` (*type:* `String.t`) - Part of `parent`. 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}" + * `simulations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `organizationsId`. + * `attack_exposure_results_id` (*type:* `String.t`) - Part of `parent`. See documentation of `organizationsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:filter` (*type:* `String.t`) - The filter expression that filters the attack path in the response. Supported fields: * `valued_resources` supports = + * `:pageSize` (*type:* `integer()`) - The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000. + * `:pageToken` (*type:* `String.t`) - 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. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.ListAttackPathsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_organizations_simulations_attack_exposure_results_attack_paths_list( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.SecurityCenter.V1.Model.ListAttackPathsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_organizations_simulations_attack_exposure_results_attack_paths_list( + connection, + organizations_id, + simulations_id, + attack_exposure_results_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :filter => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url( + "/v1/organizations/{organizationsId}/simulations/{simulationsId}/attackExposureResults/{attackExposureResultsId}/attackPaths", + %{ + "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1), + "simulationsId" => URI.encode(simulations_id, &URI.char_unreserved?/1), + "attackExposureResultsId" => + URI.encode(attack_exposure_results_id, &URI.char_unreserved?/1) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.ListAttackPathsResponse{}] + ) + end + + @doc """ + Lists the valued resources for a set of simulation results and filter. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `organizations_id` (*type:* `String.t`) - Part of `parent`. Required. Name of parent to list valued resources. Valid formats: "organizations/{organization}", "organizations/{organization}/simulations/{simulation}" "organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}" + * `simulations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `organizationsId`. + * `attack_exposure_results_id` (*type:* `String.t`) - Part of `parent`. See documentation of `organizationsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:filter` (*type:* `String.t`) - The filter expression that filters the valued resources in the response. Supported fields: * `resource_value` supports = * `resource_type` supports = + * `:orderBy` (*type:* `String.t`) - Optional. The fields by which to order the valued resources response. Supported fields: * `exposed_score` * `resource_value` * `resource_type` * `resource` * `display_name` Values should be a comma separated list of fields. For example: `exposed_score,resource_value`. The default sorting order is descending. To specify ascending or descending order for a field, append a " ASC" or a " DESC" suffix, respectively; for example: `exposed_score DESC`. + * `:pageSize` (*type:* `integer()`) - The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000. + * `:pageToken` (*type:* `String.t`) - 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. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.ListValuedResourcesResponse{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_organizations_simulations_attack_exposure_results_valued_resources_list( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.SecurityCenter.V1.Model.ListValuedResourcesResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_organizations_simulations_attack_exposure_results_valued_resources_list( + connection, + organizations_id, + simulations_id, + attack_exposure_results_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :filter => :query, + :orderBy => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url( + "/v1/organizations/{organizationsId}/simulations/{simulationsId}/attackExposureResults/{attackExposureResultsId}/valuedResources", + %{ + "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1), + "simulationsId" => URI.encode(simulations_id, &URI.char_unreserved?/1), + "attackExposureResultsId" => + URI.encode(attack_exposure_results_id, &URI.char_unreserved?/1) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.ListValuedResourcesResponse{}] + ) + end + + @doc """ + Lists the attack paths for a set of simulation results or valued resources and filter. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `organizations_id` (*type:* `String.t`) - Part of `parent`. 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}" + * `simulations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `organizationsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:filter` (*type:* `String.t`) - The filter expression that filters the attack path in the response. Supported fields: * `valued_resources` supports = + * `:pageSize` (*type:* `integer()`) - The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000. + * `:pageToken` (*type:* `String.t`) - 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. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.ListAttackPathsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_organizations_simulations_attack_paths_list( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.SecurityCenter.V1.Model.ListAttackPathsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_organizations_simulations_attack_paths_list( + connection, + organizations_id, + simulations_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :filter => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url( + "/v1/organizations/{organizationsId}/simulations/{simulationsId}/attackPaths", + %{ + "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1), + "simulationsId" => URI.encode(simulations_id, &URI.char_unreserved?/1) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.ListAttackPathsResponse{}] + ) + end + + @doc """ + Get the valued resource by name + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `organizations_id` (*type:* `String.t`) - Part of `name`. Required. The name of this valued resource Valid format: "organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}" + * `simulations_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. + * `valued_resources_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.ValuedResource{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_organizations_simulations_valued_resources_get( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.SecurityCenter.V1.Model.ValuedResource.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_organizations_simulations_valued_resources_get( + connection, + organizations_id, + simulations_id, + valued_resources_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url( + "/v1/organizations/{organizationsId}/simulations/{simulationsId}/valuedResources/{valuedResourcesId}", + %{ + "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1), + "simulationsId" => URI.encode(simulations_id, &URI.char_unreserved?/1), + "valuedResourcesId" => + URI.encode(valued_resources_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.ValuedResource{}]) + end + + @doc """ + Lists the valued resources for a set of simulation results and filter. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `organizations_id` (*type:* `String.t`) - Part of `parent`. Required. Name of parent to list valued resources. Valid formats: "organizations/{organization}", "organizations/{organization}/simulations/{simulation}" "organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}" + * `simulations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `organizationsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:filter` (*type:* `String.t`) - The filter expression that filters the valued resources in the response. Supported fields: * `resource_value` supports = * `resource_type` supports = + * `:orderBy` (*type:* `String.t`) - Optional. The fields by which to order the valued resources response. Supported fields: * `exposed_score` * `resource_value` * `resource_type` * `resource` * `display_name` Values should be a comma separated list of fields. For example: `exposed_score,resource_value`. The default sorting order is descending. To specify ascending or descending order for a field, append a " ASC" or a " DESC" suffix, respectively; for example: `exposed_score DESC`. + * `:pageSize` (*type:* `integer()`) - The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000. + * `:pageToken` (*type:* `String.t`) - 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. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.ListValuedResourcesResponse{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_organizations_simulations_valued_resources_list( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.SecurityCenter.V1.Model.ListValuedResourcesResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_organizations_simulations_valued_resources_list( + connection, + organizations_id, + simulations_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :filter => :query, + :orderBy => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url( + "/v1/organizations/{organizationsId}/simulations/{simulationsId}/valuedResources", + %{ + "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1), + "simulationsId" => URI.encode(simulations_id, &URI.char_unreserved?/1) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.ListValuedResourcesResponse{}] + ) + end + + @doc """ + Lists the attack paths for a set of simulation results or valued resources and filter. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `organizations_id` (*type:* `String.t`) - Part of `parent`. 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}" + * `simulations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `organizationsId`. + * `valued_resources_id` (*type:* `String.t`) - Part of `parent`. See documentation of `organizationsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:filter` (*type:* `String.t`) - The filter expression that filters the attack path in the response. Supported fields: * `valued_resources` supports = + * `:pageSize` (*type:* `integer()`) - The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000. + * `:pageToken` (*type:* `String.t`) - 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. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.ListAttackPathsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_organizations_simulations_valued_resources_attack_paths_list( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.SecurityCenter.V1.Model.ListAttackPathsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_organizations_simulations_valued_resources_attack_paths_list( + connection, + organizations_id, + simulations_id, + valued_resources_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :filter => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url( + "/v1/organizations/{organizationsId}/simulations/{simulationsId}/valuedResources/{valuedResourcesId}/attackPaths", + %{ + "organizationsId" => URI.encode(organizations_id, &URI.char_unreserved?/1), + "simulationsId" => URI.encode(simulations_id, &URI.char_unreserved?/1), + "valuedResourcesId" => URI.encode(valued_resources_id, &URI.char_unreserved?/1) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.ListAttackPathsResponse{}] ) end @@ -2239,7 +4979,7 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Organizations do ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `organizations_id` (*type:* `String.t`) - Part of `parent`. Required. Resource name of the parent of sources to list. Its format should be "organizations/[organization_id], folders/[folder_id], or projects/[project_id]". + * `organizations_id` (*type:* `String.t`) - Part of `parent`. Required. Resource name of the parent of sources to list. Its format should be "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]". * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -2794,7 +5534,7 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Organizations do ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `organizations_id` (*type:* `String.t`) - Part of `finding.name`. The relative resource name of this finding. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}" + * `organizations_id` (*type:* `String.t`) - Part of `finding.name`. The [relative resource name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding. Example: "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", "projects/{project_id}/sources/{source_id}/findings/{finding_id}". * `sources_id` (*type:* `String.t`) - Part of `finding.name`. See documentation of `organizationsId`. * `findings_id` (*type:* `String.t`) - Part of `finding.name`. See documentation of `organizationsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters @@ -2879,7 +5619,7 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Organizations do ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `organizations_id` (*type:* `String.t`) - Part of `name`. Required. The relative resource name of the finding. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", "projects/{project_id}/sources/{source_id}/findings/{finding_id}". + * `organizations_id` (*type:* `String.t`) - Part of `name`. Required. The [relative resource name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding. Example: "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", "projects/{project_id}/sources/{source_id}/findings/{finding_id}". * `sources_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. * `findings_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters @@ -2962,7 +5702,7 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Organizations do ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `organizations_id` (*type:* `String.t`) - Part of `name`. Required. The relative resource name of the finding. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}". + * `organizations_id` (*type:* `String.t`) - Part of `name`. Required. The [relative resource name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding. Example: "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", "projects/{project_id}/sources/{source_id}/findings/{finding_id}". * `sources_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. * `findings_id` (*type:* `String.t`) - Part of `name`. See documentation of `organizationsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters @@ -3132,7 +5872,7 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Organizations do ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `organizations_id` (*type:* `String.t`) - Part of `externalSystem.name`. External System Name e.g. jira, demisto, etc. e.g.: `organizations/1234/sources/5678/findings/123456/externalSystems/jira` `folders/1234/sources/5678/findings/123456/externalSystems/jira` `projects/1234/sources/5678/findings/123456/externalSystems/jira` + * `organizations_id` (*type:* `String.t`) - Part of `externalSystem.name`. Full resource name of the external system, for example: "organizations/1234/sources/5678/findings/123456/externalSystems/jira", "folders/1234/sources/5678/findings/123456/externalSystems/jira", "projects/1234/sources/5678/findings/123456/externalSystems/jira" * `sources_id` (*type:* `String.t`) - Part of `externalSystem.name`. See documentation of `organizationsId`. * `findings_id` (*type:* `String.t`) - Part of `externalSystem.name`. See documentation of `organizationsId`. * `external_systems_id` (*type:* `String.t`) - Part of `externalSystem.name`. See documentation of `organizationsId`. diff --git a/clients/security_center/lib/google_api/security_center/v1/api/projects.ex b/clients/security_center/lib/google_api/security_center/v1/api/projects.ex index 516f38252e..82036a77e5 100644 --- a/clients/security_center/lib/google_api/security_center/v1/api/projects.ex +++ b/clients/security_center/lib/google_api/security_center/v1/api/projects.ex @@ -31,7 +31,7 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Projects do ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. Name of the organization to groupBy. Its format is "organizations/[organization_id], folders/[folder_id], or projects/[project_id]". + * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. The name of the parent to group the assets by. Its format is "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]". * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -98,7 +98,7 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Projects do ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. Name of the organization assets should belong to. Its format is "organizations/[organization_id], folders/[folder_id], or projects/[project_id]". + * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. The name of the parent resource that contains the assets. The value that you can specify on parent depends on the method in which you specify parent. You can specify one of the following values: "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]". * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -252,12 +252,12 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Projects do end @doc """ - Creates a big query export. + Creates a BigQuery export. ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. Resource name of the new big query export's parent. Its format is "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]". + * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. The name of the parent resource of the new BigQuery export. Its format is "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]". * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -270,7 +270,7 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Projects do * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). - * `:bigQueryExportId` (*type:* `String.t`) - Required. Unique identifier provided by the client within the parent scope. It must consist of lower case letters, numbers, and hyphen, with the first character a letter, the last a letter or a number, and a 63 character maximum. + * `:bigQueryExportId` (*type:* `String.t`) - 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. * `:body` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1BigQueryExport.t`) - * `opts` (*type:* `keyword()`) - Call options @@ -329,12 +329,12 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Projects do end @doc """ - Deletes an existing big query export. + Deletes an existing BigQuery export. ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `projects_id` (*type:* `String.t`) - Part of `name`. Required. Name of the big query export to delete. Its format is organizations/{organization}/bigQueryExports/{export_id}, folders/{folder}/bigQueryExports/{export_id}, or projects/{project}/bigQueryExports/{export_id} + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The name of the BigQuery export to delete. Its format is organizations/{organization}/bigQueryExports/{export_id}, folders/{folder}/bigQueryExports/{export_id}, or projects/{project}/bigQueryExports/{export_id} * `big_query_exports_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. @@ -404,12 +404,12 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Projects do end @doc """ - Gets a big query export. + Gets a BigQuery export. ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `projects_id` (*type:* `String.t`) - Part of `name`. Required. Name of the big query export to retrieve. Its format is organizations/{organization}/bigQueryExports/{export_id}, folders/{folder}/bigQueryExports/{export_id}, or projects/{project}/bigQueryExports/{export_id} + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. Name of the BigQuery export to retrieve. Its format is organizations/{organization}/bigQueryExports/{export_id}, folders/{folder}/bigQueryExports/{export_id}, or projects/{project}/bigQueryExports/{export_id} * `big_query_exports_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. @@ -640,12 +640,12 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Projects do end @doc """ - Kicks off an LRO to bulk mute findings for a parent based on a filter. The parent can be either an organization, folder or project. The findings matched by the filter will be muted after the LRO is done. + Validates the given Event Threat Detection custom module. ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. The parent, at which bulk action needs to be applied. Its format is "organizations/[organization_id]", "folders/[folder_id]", "projects/[project_id]". + * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. Resource name of the parent to validate the Custom Module under. Its format is: * "organizations/{organization}/eventThreatDetectionSettings". * "folders/{folder}/eventThreatDetectionSettings". * "projects/{project}/eventThreatDetectionSettings". * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -658,25 +658,26 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Projects do * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). - * `:body` (*type:* `GoogleApi.SecurityCenter.V1.Model.BulkMuteFindingsRequest.t`) - + * `:body` (*type:* `GoogleApi.SecurityCenter.V1.Model.ValidateEventThreatDetectionCustomModuleRequest.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.SecurityCenter.V1.Model.Operation{}}` on success + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.ValidateEventThreatDetectionCustomModuleResponse{}}` on success * `{:error, info}` on failure """ - @spec securitycenter_projects_findings_bulk_mute( + @spec securitycenter_projects_event_threat_detection_settings_validate_custom_module( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.SecurityCenter.V1.Model.Operation.t()} + {:ok, + GoogleApi.SecurityCenter.V1.Model.ValidateEventThreatDetectionCustomModuleResponse.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def securitycenter_projects_findings_bulk_mute( + def securitycenter_projects_event_threat_detection_settings_validate_custom_module( connection, projects_id, optional_params \\ [], @@ -700,24 +701,33 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Projects do request = Request.new() |> Request.method(:post) - |> Request.url("/v1/projects/{projectsId}/findings:bulkMute", %{ - "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1) - }) + |> Request.url( + "/v1/projects/{projectsId}/eventThreatDetectionSettings:validateCustomModule", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1) + } + ) |> Request.add_optional_params(optional_params_config, optional_params) |> Request.library_version(@library_version) connection |> Connection.execute(request) - |> Response.decode(opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.Operation{}]) + |> Response.decode( + opts ++ + [ + struct: + %GoogleApi.SecurityCenter.V1.Model.ValidateEventThreatDetectionCustomModuleResponse{} + ] + ) end @doc """ - Creates a mute config. + Creates a resident Event Threat Detection custom module at the scope of the given Resource Manager parent, and also creates inherited custom modules for all descendants of the given parent. These modules are enabled by default. ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. Resource name of the new mute configs's parent. Its format is "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]". + * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. The new custom module's parent. Its format is: * "organizations/{organization}/eventThreatDetectionSettings". * "folders/{folder}/eventThreatDetectionSettings". * "projects/{project}/eventThreatDetectionSettings". * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -730,26 +740,25 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Projects do * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). - * `:muteConfigId` (*type:* `String.t`) - Required. Unique identifier provided by the client within the parent scope. It must consist of lower case letters, numbers, and hyphen, with the first character a letter, the last a letter or a number, and a 63 character maximum. - * `:body` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig.t`) - + * `:body` (*type:* `GoogleApi.SecurityCenter.V1.Model.EventThreatDetectionCustomModule.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig{}}` on success + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.EventThreatDetectionCustomModule{}}` on success * `{:error, info}` on failure """ - @spec securitycenter_projects_mute_configs_create( + @spec securitycenter_projects_event_threat_detection_settings_custom_modules_create( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig.t()} + {:ok, GoogleApi.SecurityCenter.V1.Model.EventThreatDetectionCustomModule.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def securitycenter_projects_mute_configs_create( + def securitycenter_projects_event_threat_detection_settings_custom_modules_create( connection, projects_id, optional_params \\ [], @@ -767,14 +776,13 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Projects do :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, - :muteConfigId => :query, :body => :body } request = Request.new() |> Request.method(:post) - |> Request.url("/v1/projects/{projectsId}/muteConfigs", %{ + |> Request.url("/v1/projects/{projectsId}/eventThreatDetectionSettings/customModules", %{ "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) @@ -783,18 +791,18 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Projects do connection |> Connection.execute(request) |> Response.decode( - opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig{}] + opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.EventThreatDetectionCustomModule{}] ) end @doc """ - Deletes an existing mute config. + Deletes the specified Event Threat Detection custom module and all of its descendants in the Resource Manager hierarchy. This method is only supported for resident custom modules. ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `projects_id` (*type:* `String.t`) - Part of `name`. Required. Name of the mute config to delete. Its format is organizations/{organization}/muteConfigs/{config_id}, folders/{folder}/muteConfigs/{config_id}, or projects/{project}/muteConfigs/{config_id} - * `mute_configs_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. Name of the custom module to delete. Its format is: * "organizations/{organization}/eventThreatDetectionSettings/customModules/{module}". * "folders/{folder}/eventThreatDetectionSettings/customModules/{module}". * "projects/{project}/eventThreatDetectionSettings/customModules/{module}". + * `custom_modules_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -814,7 +822,7 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Projects do * `{:ok, %GoogleApi.SecurityCenter.V1.Model.Empty{}}` on success * `{:error, info}` on failure """ - @spec securitycenter_projects_mute_configs_delete( + @spec securitycenter_projects_event_threat_detection_settings_custom_modules_delete( Tesla.Env.client(), String.t(), String.t(), @@ -825,10 +833,10 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Projects do | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def securitycenter_projects_mute_configs_delete( + def securitycenter_projects_event_threat_detection_settings_custom_modules_delete( connection, projects_id, - mute_configs_id, + custom_modules_id, optional_params \\ [], opts \\ [] ) do @@ -849,10 +857,14 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Projects do request = Request.new() |> Request.method(:delete) - |> Request.url("/v1/projects/{projectsId}/muteConfigs/{muteConfigsId}", %{ - "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), - "muteConfigsId" => URI.encode(mute_configs_id, &(URI.char_unreserved?(&1) || &1 == ?/)) - }) + |> Request.url( + "/v1/projects/{projectsId}/eventThreatDetectionSettings/customModules/{customModulesId}", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "customModulesId" => + URI.encode(custom_modules_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + } + ) |> Request.add_optional_params(optional_params_config, optional_params) |> Request.library_version(@library_version) @@ -862,13 +874,13 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Projects do end @doc """ - Gets a mute config. + Gets an Event Threat Detection custom module. ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `projects_id` (*type:* `String.t`) - Part of `name`. Required. Name of the mute config to retrieve. Its format is organizations/{organization}/muteConfigs/{config_id}, folders/{folder}/muteConfigs/{config_id}, or projects/{project}/muteConfigs/{config_id} - * `mute_configs_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. Name of the custom module to get. Its format is: * "organizations/{organization}/eventThreatDetectionSettings/customModules/{module}". * "folders/{folder}/eventThreatDetectionSettings/customModules/{module}". * "projects/{project}/eventThreatDetectionSettings/customModules/{module}". + * `custom_modules_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -885,24 +897,24 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Projects do ## Returns - * `{:ok, %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig{}}` on success + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.EventThreatDetectionCustomModule{}}` on success * `{:error, info}` on failure """ - @spec securitycenter_projects_mute_configs_get( + @spec securitycenter_projects_event_threat_detection_settings_custom_modules_get( Tesla.Env.client(), String.t(), String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig.t()} + {:ok, GoogleApi.SecurityCenter.V1.Model.EventThreatDetectionCustomModule.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def securitycenter_projects_mute_configs_get( + def securitycenter_projects_event_threat_detection_settings_custom_modules_get( connection, projects_id, - mute_configs_id, + custom_modules_id, optional_params \\ [], opts \\ [] ) do @@ -923,27 +935,31 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Projects do request = Request.new() |> Request.method(:get) - |> Request.url("/v1/projects/{projectsId}/muteConfigs/{muteConfigsId}", %{ - "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), - "muteConfigsId" => URI.encode(mute_configs_id, &(URI.char_unreserved?(&1) || &1 == ?/)) - }) + |> Request.url( + "/v1/projects/{projectsId}/eventThreatDetectionSettings/customModules/{customModulesId}", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "customModulesId" => + URI.encode(custom_modules_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + } + ) |> Request.add_optional_params(optional_params_config, optional_params) |> Request.library_version(@library_version) connection |> Connection.execute(request) |> Response.decode( - opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig{}] + opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.EventThreatDetectionCustomModule{}] ) end @doc """ - Lists mute configs. + Lists all Event Threat Detection custom modules for the given Resource Manager parent. This includes resident modules defined at the scope of the parent along with modules inherited from ancestors. ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. The parent, which owns the collection of mute configs. Its format is "organizations/[organization_id]", "folders/[folder_id]", "projects/[project_id]". + * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. Name of the parent to list custom modules under. Its format is: * "organizations/{organization}/eventThreatDetectionSettings". * "folders/{folder}/eventThreatDetectionSettings". * "projects/{project}/eventThreatDetectionSettings". * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -956,26 +972,27 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Projects do * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). - * `:pageSize` (*type:* `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. - * `:pageToken` (*type:* `String.t`) - 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. + * `:pageSize` (*type:* `integer()`) - The maximum number of modules to return. The service may return fewer than this value. If unspecified, at most 10 configs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. + * `:pageToken` (*type:* `String.t`) - A page token, received from a previous `ListEventThreatDetectionCustomModules` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListEventThreatDetectionCustomModules` must match the call that provided the page token. * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.SecurityCenter.V1.Model.ListMuteConfigsResponse{}}` on success + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.ListEventThreatDetectionCustomModulesResponse{}}` on success * `{:error, info}` on failure """ - @spec securitycenter_projects_mute_configs_list( + @spec securitycenter_projects_event_threat_detection_settings_custom_modules_list( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.SecurityCenter.V1.Model.ListMuteConfigsResponse.t()} + {:ok, + GoogleApi.SecurityCenter.V1.Model.ListEventThreatDetectionCustomModulesResponse.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def securitycenter_projects_mute_configs_list( + def securitycenter_projects_event_threat_detection_settings_custom_modules_list( connection, projects_id, optional_params \\ [], @@ -1000,7 +1017,7 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Projects do request = Request.new() |> Request.method(:get) - |> Request.url("/v1/projects/{projectsId}/muteConfigs", %{ + |> Request.url("/v1/projects/{projectsId}/eventThreatDetectionSettings/customModules", %{ "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) @@ -1009,18 +1026,21 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Projects do connection |> Connection.execute(request) |> Response.decode( - opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.ListMuteConfigsResponse{}] + opts ++ + [ + struct: + %GoogleApi.SecurityCenter.V1.Model.ListEventThreatDetectionCustomModulesResponse{} + ] ) end @doc """ - Updates a mute config. + Lists all resident Event Threat Detection custom modules under the given Resource Manager parent and its descendants. ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `projects_id` (*type:* `String.t`) - Part of `muteConfig.name`. This field will be ignored if provided on config creation. Format "organizations/{organization}/muteConfigs/{mute_config}" "folders/{folder}/muteConfigs/{mute_config}" "projects/{project}/muteConfigs/{mute_config}" - * `mute_configs_id` (*type:* `String.t`) - Part of `muteConfig.name`. See documentation of `projectsId`. + * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. Name of the parent to list custom modules under. Its format is: * "organizations/{organization}/eventThreatDetectionSettings". * "folders/{folder}/eventThreatDetectionSettings". * "projects/{project}/eventThreatDetectionSettings". * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1033,30 +1053,29 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Projects do * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). - * `:updateMask` (*type:* `String.t`) - The list of fields to be updated. If empty all mutable fields will be updated. - * `:body` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig.t`) - + * `:pageSize` (*type:* `integer()`) - The maximum number of modules to return. The service may return fewer than this value. If unspecified, at most 10 configs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. + * `:pageToken` (*type:* `String.t`) - A page token, received from a previous `ListDescendantEventThreatDetectionCustomModules` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListDescendantEventThreatDetectionCustomModules` must match the call that provided the page token. * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig{}}` on success + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.ListDescendantEventThreatDetectionCustomModulesResponse{}}` on success * `{:error, info}` on failure """ - @spec securitycenter_projects_mute_configs_patch( + @spec securitycenter_projects_event_threat_detection_settings_custom_modules_list_descendant( Tesla.Env.client(), String.t(), - String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig.t()} + {:ok, + GoogleApi.SecurityCenter.V1.Model.ListDescendantEventThreatDetectionCustomModulesResponse.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def securitycenter_projects_mute_configs_patch( + def securitycenter_projects_event_threat_detection_settings_custom_modules_list_descendant( connection, projects_id, - mute_configs_id, optional_params \\ [], opts \\ [] ) do @@ -1072,34 +1091,41 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Projects do :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, - :updateMask => :query, - :body => :body + :pageSize => :query, + :pageToken => :query } request = Request.new() - |> Request.method(:patch) - |> Request.url("/v1/projects/{projectsId}/muteConfigs/{muteConfigsId}", %{ - "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), - "muteConfigsId" => URI.encode(mute_configs_id, &(URI.char_unreserved?(&1) || &1 == ?/)) - }) + |> Request.method(:get) + |> Request.url( + "/v1/projects/{projectsId}/eventThreatDetectionSettings/customModules:listDescendant", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1) + } + ) |> Request.add_optional_params(optional_params_config, optional_params) |> Request.library_version(@library_version) connection |> Connection.execute(request) |> Response.decode( - opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig{}] + opts ++ + [ + struct: + %GoogleApi.SecurityCenter.V1.Model.ListDescendantEventThreatDetectionCustomModulesResponse{} + ] ) end @doc """ - Creates a notification config. + Updates the Event Threat Detection custom module with the given name based on the given update mask. Updating the enablement state is supported for both resident and inherited modules (though resident modules cannot have an enablement state of "inherited"). Updating the display name or configuration of a module is supported for resident modules only. The type of a module cannot be changed. ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. Resource name of the new notification config's parent. Its format is "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]". + * `projects_id` (*type:* `String.t`) - Part of `eventThreatDetectionCustomModule.name`. Immutable. The resource name of the Event Threat Detection custom module. Its format is: * "organizations/{organization}/eventThreatDetectionSettings/customModules/{module}". * "folders/{folder}/eventThreatDetectionSettings/customModules/{module}". * "projects/{project}/eventThreatDetectionSettings/customModules/{module}". + * `custom_modules_id` (*type:* `String.t`) - Part of `eventThreatDetectionCustomModule.name`. See documentation of `projectsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1112,28 +1138,30 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Projects do * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). - * `:configId` (*type:* `String.t`) - Required. Unique identifier provided by the client within the parent scope. It must be between 1 and 128 characters, and contains alphanumeric characters, underscores or hyphens only. - * `:body` (*type:* `GoogleApi.SecurityCenter.V1.Model.NotificationConfig.t`) - + * `:updateMask` (*type:* `String.t`) - The list of fields to be updated. If empty all mutable fields will be updated. + * `:body` (*type:* `GoogleApi.SecurityCenter.V1.Model.EventThreatDetectionCustomModule.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.SecurityCenter.V1.Model.NotificationConfig{}}` on success + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.EventThreatDetectionCustomModule{}}` on success * `{:error, info}` on failure """ - @spec securitycenter_projects_notification_configs_create( + @spec securitycenter_projects_event_threat_detection_settings_custom_modules_patch( Tesla.Env.client(), String.t(), + String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.SecurityCenter.V1.Model.NotificationConfig.t()} + {:ok, GoogleApi.SecurityCenter.V1.Model.EventThreatDetectionCustomModule.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def securitycenter_projects_notification_configs_create( + def securitycenter_projects_event_threat_detection_settings_custom_modules_patch( connection, projects_id, + custom_modules_id, optional_params \\ [], opts \\ [] ) do @@ -1149,32 +1177,39 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Projects do :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, - :configId => :query, + :updateMask => :query, :body => :body } request = Request.new() - |> Request.method(:post) - |> Request.url("/v1/projects/{projectsId}/notificationConfigs", %{ - "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1) - }) + |> Request.method(:patch) + |> Request.url( + "/v1/projects/{projectsId}/eventThreatDetectionSettings/customModules/{customModulesId}", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "customModulesId" => + URI.encode(custom_modules_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + } + ) |> Request.add_optional_params(optional_params_config, optional_params) |> Request.library_version(@library_version) connection |> Connection.execute(request) - |> Response.decode(opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.NotificationConfig{}]) + |> Response.decode( + opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.EventThreatDetectionCustomModule{}] + ) end @doc """ - Deletes a notification config. + Gets an effective Event Threat Detection custom module at the given level. ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `projects_id` (*type:* `String.t`) - Part of `name`. Required. Name of the notification config to delete. Its format is "organizations/[organization_id]/notificationConfigs/[config_id]". - * `notification_configs_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The resource name of the effective Event Threat Detection custom module. Its format is: * "organizations/{organization}/eventThreatDetectionSettings/effectiveCustomModules/{module}". * "folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}". * "projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}". + * `effective_custom_modules_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1191,24 +1226,24 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Projects do ## Returns - * `{:ok, %GoogleApi.SecurityCenter.V1.Model.Empty{}}` on success + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.EffectiveEventThreatDetectionCustomModule{}}` on success * `{:error, info}` on failure """ - @spec securitycenter_projects_notification_configs_delete( + @spec securitycenter_projects_event_threat_detection_settings_effective_custom_modules_get( Tesla.Env.client(), String.t(), String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.SecurityCenter.V1.Model.Empty.t()} + {:ok, GoogleApi.SecurityCenter.V1.Model.EffectiveEventThreatDetectionCustomModule.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def securitycenter_projects_notification_configs_delete( + def securitycenter_projects_event_threat_detection_settings_effective_custom_modules_get( connection, projects_id, - notification_configs_id, + effective_custom_modules_id, optional_params \\ [], opts \\ [] ) do @@ -1228,28 +1263,33 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Projects do request = Request.new() - |> Request.method(:delete) - |> Request.url("/v1/projects/{projectsId}/notificationConfigs/{notificationConfigsId}", %{ - "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), - "notificationConfigsId" => - URI.encode(notification_configs_id, &(URI.char_unreserved?(&1) || &1 == ?/)) - }) + |> Request.method(:get) + |> Request.url( + "/v1/projects/{projectsId}/eventThreatDetectionSettings/effectiveCustomModules/{effectiveCustomModulesId}", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "effectiveCustomModulesId" => + URI.encode(effective_custom_modules_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + } + ) |> Request.add_optional_params(optional_params_config, optional_params) |> Request.library_version(@library_version) connection |> Connection.execute(request) - |> Response.decode(opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.Empty{}]) + |> Response.decode( + opts ++ + [struct: %GoogleApi.SecurityCenter.V1.Model.EffectiveEventThreatDetectionCustomModule{}] + ) end @doc """ - Gets a notification config. + Lists all effective Event Threat Detection custom modules for the given parent. This includes resident modules defined at the scope of the parent along with modules inherited from its ancestors. ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `projects_id` (*type:* `String.t`) - Part of `name`. Required. Name of the notification config to get. Its format is "organizations/[organization_id]/notificationConfigs/[config_id]". - * `notification_configs_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. Name of the parent to list custom modules for. Its format is: * "organizations/{organization}/eventThreatDetectionSettings". * "folders/{folder}/eventThreatDetectionSettings". * "projects/{project}/eventThreatDetectionSettings". * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1262,28 +1302,29 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Projects do * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:pageSize` (*type:* `integer()`) - The maximum number of modules to return. The service may return fewer than this value. If unspecified, at most 10 configs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. + * `:pageToken` (*type:* `String.t`) - A page token, received from a previous `ListEffectiveEventThreatDetectionCustomModules` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListEffectiveEventThreatDetectionCustomModules` must match the call that provided the page token. * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.SecurityCenter.V1.Model.NotificationConfig{}}` on success + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.ListEffectiveEventThreatDetectionCustomModulesResponse{}}` on success * `{:error, info}` on failure """ - @spec securitycenter_projects_notification_configs_get( + @spec securitycenter_projects_event_threat_detection_settings_effective_custom_modules_list( Tesla.Env.client(), String.t(), - String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.SecurityCenter.V1.Model.NotificationConfig.t()} + {:ok, + GoogleApi.SecurityCenter.V1.Model.ListEffectiveEventThreatDetectionCustomModulesResponse.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def securitycenter_projects_notification_configs_get( + def securitycenter_projects_event_threat_detection_settings_effective_custom_modules_list( connection, projects_id, - notification_configs_id, optional_params \\ [], opts \\ [] ) do @@ -1298,32 +1339,41 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Projects do :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, - :upload_protocol => :query + :upload_protocol => :query, + :pageSize => :query, + :pageToken => :query } request = Request.new() |> Request.method(:get) - |> Request.url("/v1/projects/{projectsId}/notificationConfigs/{notificationConfigsId}", %{ - "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), - "notificationConfigsId" => - URI.encode(notification_configs_id, &(URI.char_unreserved?(&1) || &1 == ?/)) - }) + |> Request.url( + "/v1/projects/{projectsId}/eventThreatDetectionSettings/effectiveCustomModules", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1) + } + ) |> Request.add_optional_params(optional_params_config, optional_params) |> Request.library_version(@library_version) connection |> Connection.execute(request) - |> Response.decode(opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.NotificationConfig{}]) + |> Response.decode( + opts ++ + [ + struct: + %GoogleApi.SecurityCenter.V1.Model.ListEffectiveEventThreatDetectionCustomModulesResponse{} + ] + ) end @doc """ - Lists notification configs. + Kicks off an LRO to bulk mute findings for a parent based on a filter. The parent can be either an organization, folder or project. The findings matched by the filter will be muted after the LRO is done. ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. Name of the organization to list notification configs. Its format is "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]". + * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. The parent, at which bulk action needs to be applied. Its format is "organizations/[organization_id]", "folders/[folder_id]", "projects/[project_id]". * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1336,26 +1386,25 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Projects do * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). - * `:pageSize` (*type:* `integer()`) - The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000. - * `:pageToken` (*type:* `String.t`) - 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. + * `:body` (*type:* `GoogleApi.SecurityCenter.V1.Model.BulkMuteFindingsRequest.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.SecurityCenter.V1.Model.ListNotificationConfigsResponse{}}` on success + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.Operation{}}` on success * `{:error, info}` on failure """ - @spec securitycenter_projects_notification_configs_list( + @spec securitycenter_projects_findings_bulk_mute( Tesla.Env.client(), String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.SecurityCenter.V1.Model.ListNotificationConfigsResponse.t()} + {:ok, GoogleApi.SecurityCenter.V1.Model.Operation.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def securitycenter_projects_notification_configs_list( + def securitycenter_projects_findings_bulk_mute( connection, projects_id, optional_params \\ [], @@ -1373,14 +1422,13 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Projects do :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, - :pageSize => :query, - :pageToken => :query + :body => :body } request = Request.new() - |> Request.method(:get) - |> Request.url("/v1/projects/{projectsId}/notificationConfigs", %{ + |> Request.method(:post) + |> Request.url("/v1/projects/{projectsId}/findings:bulkMute", %{ "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1) }) |> Request.add_optional_params(optional_params_config, optional_params) @@ -1388,19 +1436,18 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Projects do connection |> Connection.execute(request) - |> Response.decode( - opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.ListNotificationConfigsResponse{}] - ) + |> Response.decode(opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.Operation{}]) end @doc """ - Updates a notification config. The following update fields are allowed: description, pubsub_topic, streaming_config.filter + Deletes an existing mute config. ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `projects_id` (*type:* `String.t`) - Part of `notificationConfig.name`. The relative resource name of this notification config. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: "organizations/{organization_id}/notificationConfigs/notify_public_bucket". - * `notification_configs_id` (*type:* `String.t`) - Part of `notificationConfig.name`. See documentation of `projectsId`. + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. Name of the mute config to delete. Its format is organizations/{organization}/muteConfigs/{config_id}, folders/{folder}/muteConfigs/{config_id}, projects/{project}/muteConfigs/{config_id}, organizations/{organization}/locations/global/muteConfigs/{config_id}, folders/{folder}/locations/global/muteConfigs/{config_id}, or projects/{project}/locations/global/muteConfigs/{config_id}. + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `mute_configs_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1413,30 +1460,30 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Projects do * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). - * `:updateMask` (*type:* `String.t`) - The FieldMask to use when updating the notification config. If empty all mutable fields will be updated. - * `:body` (*type:* `GoogleApi.SecurityCenter.V1.Model.NotificationConfig.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.SecurityCenter.V1.Model.NotificationConfig{}}` on success + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.Empty{}}` on success * `{:error, info}` on failure """ - @spec securitycenter_projects_notification_configs_patch( + @spec securitycenter_projects_locations_mute_configs_delete( Tesla.Env.client(), String.t(), String.t(), + String.t(), keyword(), keyword() ) :: - {:ok, GoogleApi.SecurityCenter.V1.Model.NotificationConfig.t()} + {:ok, GoogleApi.SecurityCenter.V1.Model.Empty.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def securitycenter_projects_notification_configs_patch( + def securitycenter_projects_locations_mute_configs_delete( connection, projects_id, - notification_configs_id, + locations_id, + mute_configs_id, optional_params \\ [], opts \\ [] ) do @@ -1451,25 +1498,1704 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Projects do :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, - :upload_protocol => :query, - :updateMask => :query, - :body => :body + :upload_protocol => :query } request = Request.new() - |> Request.method(:patch) - |> Request.url("/v1/projects/{projectsId}/notificationConfigs/{notificationConfigsId}", %{ - "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), - "notificationConfigsId" => - URI.encode(notification_configs_id, &(URI.char_unreserved?(&1) || &1 == ?/)) - }) + |> Request.method(:delete) + |> Request.url( + "/v1/projects/{projectsId}/locations/{locationsId}/muteConfigs/{muteConfigsId}", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "muteConfigsId" => URI.encode(mute_configs_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + } + ) |> Request.add_optional_params(optional_params_config, optional_params) |> Request.library_version(@library_version) connection |> Connection.execute(request) - |> Response.decode(opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.NotificationConfig{}]) + |> Response.decode(opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.Empty{}]) + end + + @doc """ + Gets a mute config. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. Name of the mute config to retrieve. Its format is organizations/{organization}/muteConfigs/{config_id}, folders/{folder}/muteConfigs/{config_id}, projects/{project}/muteConfigs/{config_id}, organizations/{organization}/locations/global/muteConfigs/{config_id}, folders/{folder}/locations/global/muteConfigs/{config_id}, or projects/{project}/locations/global/muteConfigs/{config_id}. + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `mute_configs_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_projects_locations_mute_configs_get( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_projects_locations_mute_configs_get( + connection, + projects_id, + locations_id, + mute_configs_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url( + "/v1/projects/{projectsId}/locations/{locationsId}/muteConfigs/{muteConfigsId}", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "muteConfigsId" => URI.encode(mute_configs_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig{}] + ) + end + + @doc """ + Updates a mute config. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `muteConfig.name`. This field will be ignored if provided on config creation. Format "organizations/{organization}/muteConfigs/{mute_config}" "folders/{folder}/muteConfigs/{mute_config}" "projects/{project}/muteConfigs/{mute_config}" "organizations/{organization}/locations/global/muteConfigs/{mute_config}" "folders/{folder}/locations/global/muteConfigs/{mute_config}" "projects/{project}/locations/global/muteConfigs/{mute_config}" + * `locations_id` (*type:* `String.t`) - Part of `muteConfig.name`. See documentation of `projectsId`. + * `mute_configs_id` (*type:* `String.t`) - Part of `muteConfig.name`. See documentation of `projectsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:updateMask` (*type:* `String.t`) - The list of fields to be updated. If empty all mutable fields will be updated. + * `:body` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_projects_locations_mute_configs_patch( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_projects_locations_mute_configs_patch( + connection, + projects_id, + locations_id, + mute_configs_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :updateMask => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:patch) + |> Request.url( + "/v1/projects/{projectsId}/locations/{locationsId}/muteConfigs/{muteConfigsId}", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "muteConfigsId" => URI.encode(mute_configs_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig{}] + ) + end + + @doc """ + Creates a mute config. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. Resource name of the new mute configs's parent. Its format is "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]". + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:muteConfigId` (*type:* `String.t`) - 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. + * `:body` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_projects_mute_configs_create( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_projects_mute_configs_create( + connection, + projects_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :muteConfigId => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url("/v1/projects/{projectsId}/muteConfigs", %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig{}] + ) + end + + @doc """ + Deletes an existing mute config. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. Name of the mute config to delete. Its format is organizations/{organization}/muteConfigs/{config_id}, folders/{folder}/muteConfigs/{config_id}, projects/{project}/muteConfigs/{config_id}, organizations/{organization}/locations/global/muteConfigs/{config_id}, folders/{folder}/locations/global/muteConfigs/{config_id}, or projects/{project}/locations/global/muteConfigs/{config_id}. + * `mute_configs_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.Empty{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_projects_mute_configs_delete( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.SecurityCenter.V1.Model.Empty.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_projects_mute_configs_delete( + connection, + projects_id, + mute_configs_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:delete) + |> Request.url("/v1/projects/{projectsId}/muteConfigs/{muteConfigsId}", %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "muteConfigsId" => URI.encode(mute_configs_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.Empty{}]) + end + + @doc """ + Gets a mute config. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. Name of the mute config to retrieve. Its format is organizations/{organization}/muteConfigs/{config_id}, folders/{folder}/muteConfigs/{config_id}, projects/{project}/muteConfigs/{config_id}, organizations/{organization}/locations/global/muteConfigs/{config_id}, folders/{folder}/locations/global/muteConfigs/{config_id}, or projects/{project}/locations/global/muteConfigs/{config_id}. + * `mute_configs_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_projects_mute_configs_get( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_projects_mute_configs_get( + connection, + projects_id, + mute_configs_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1/projects/{projectsId}/muteConfigs/{muteConfigsId}", %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "muteConfigsId" => URI.encode(mute_configs_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig{}] + ) + end + + @doc """ + Lists mute configs. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. The parent, which owns the collection of mute configs. Its format is "organizations/[organization_id]", "folders/[folder_id]", "projects/[project_id]". + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:pageSize` (*type:* `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. + * `:pageToken` (*type:* `String.t`) - 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. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.ListMuteConfigsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_projects_mute_configs_list( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.SecurityCenter.V1.Model.ListMuteConfigsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_projects_mute_configs_list( + connection, + projects_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1/projects/{projectsId}/muteConfigs", %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.ListMuteConfigsResponse{}] + ) + end + + @doc """ + Updates a mute config. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `muteConfig.name`. This field will be ignored if provided on config creation. Format "organizations/{organization}/muteConfigs/{mute_config}" "folders/{folder}/muteConfigs/{mute_config}" "projects/{project}/muteConfigs/{mute_config}" "organizations/{organization}/locations/global/muteConfigs/{mute_config}" "folders/{folder}/locations/global/muteConfigs/{mute_config}" "projects/{project}/locations/global/muteConfigs/{mute_config}" + * `mute_configs_id` (*type:* `String.t`) - Part of `muteConfig.name`. See documentation of `projectsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:updateMask` (*type:* `String.t`) - The list of fields to be updated. If empty all mutable fields will be updated. + * `:body` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_projects_mute_configs_patch( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_projects_mute_configs_patch( + connection, + projects_id, + mute_configs_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :updateMask => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:patch) + |> Request.url("/v1/projects/{projectsId}/muteConfigs/{muteConfigsId}", %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "muteConfigsId" => URI.encode(mute_configs_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfig{}] + ) + end + + @doc """ + Creates a notification config. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. Resource name of the new notification config's parent. Its format is "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]". + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:configId` (*type:* `String.t`) - 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. + * `:body` (*type:* `GoogleApi.SecurityCenter.V1.Model.NotificationConfig.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.NotificationConfig{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_projects_notification_configs_create( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.SecurityCenter.V1.Model.NotificationConfig.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_projects_notification_configs_create( + connection, + projects_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :configId => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url("/v1/projects/{projectsId}/notificationConfigs", %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.NotificationConfig{}]) + end + + @doc """ + Deletes a notification config. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. Name of the notification config to delete. Its format is "organizations/[organization_id]/notificationConfigs/[config_id]", "folders/[folder_id]/notificationConfigs/[config_id]", or "projects/[project_id]/notificationConfigs/[config_id]". + * `notification_configs_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.Empty{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_projects_notification_configs_delete( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.SecurityCenter.V1.Model.Empty.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_projects_notification_configs_delete( + connection, + projects_id, + notification_configs_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:delete) + |> Request.url("/v1/projects/{projectsId}/notificationConfigs/{notificationConfigsId}", %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "notificationConfigsId" => + URI.encode(notification_configs_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.Empty{}]) + end + + @doc """ + Gets a notification config. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. Name of the notification config to get. Its format is "organizations/[organization_id]/notificationConfigs/[config_id]", "folders/[folder_id]/notificationConfigs/[config_id]", or "projects/[project_id]/notificationConfigs/[config_id]". + * `notification_configs_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.NotificationConfig{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_projects_notification_configs_get( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.SecurityCenter.V1.Model.NotificationConfig.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_projects_notification_configs_get( + connection, + projects_id, + notification_configs_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1/projects/{projectsId}/notificationConfigs/{notificationConfigsId}", %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "notificationConfigsId" => + URI.encode(notification_configs_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.NotificationConfig{}]) + end + + @doc """ + Lists notification configs. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. The name of the parent in which to list the notification configurations. Its format is "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]". + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:pageSize` (*type:* `integer()`) - The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000. + * `:pageToken` (*type:* `String.t`) - 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. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.ListNotificationConfigsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_projects_notification_configs_list( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.SecurityCenter.V1.Model.ListNotificationConfigsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_projects_notification_configs_list( + connection, + projects_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1/projects/{projectsId}/notificationConfigs", %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.ListNotificationConfigsResponse{}] + ) + end + + @doc """ + Updates a notification config. The following update fields are allowed: description, pubsub_topic, streaming_config.filter + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `notificationConfig.name`. The relative resource name of this notification config. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: "organizations/{organization_id}/notificationConfigs/notify_public_bucket", "folders/{folder_id}/notificationConfigs/notify_public_bucket", or "projects/{project_id}/notificationConfigs/notify_public_bucket". + * `notification_configs_id` (*type:* `String.t`) - Part of `notificationConfig.name`. See documentation of `projectsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:updateMask` (*type:* `String.t`) - The FieldMask to use when updating the notification config. If empty all mutable fields will be updated. + * `:body` (*type:* `GoogleApi.SecurityCenter.V1.Model.NotificationConfig.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.NotificationConfig{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_projects_notification_configs_patch( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.SecurityCenter.V1.Model.NotificationConfig.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_projects_notification_configs_patch( + connection, + projects_id, + notification_configs_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :updateMask => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:patch) + |> Request.url("/v1/projects/{projectsId}/notificationConfigs/{notificationConfigsId}", %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "notificationConfigsId" => + URI.encode(notification_configs_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.NotificationConfig{}]) + end + + @doc """ + Creates a resident SecurityHealthAnalyticsCustomModule at the scope of the given CRM parent, and also creates inherited SecurityHealthAnalyticsCustomModules for all CRM descendants of the given parent. These modules are enabled by default. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. Resource name of the new custom module's parent. Its format is "organizations/{organization}/securityHealthAnalyticsSettings", "folders/{folder}/securityHealthAnalyticsSettings", or "projects/{project}/securityHealthAnalyticsSettings" + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:body` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_projects_security_health_analytics_settings_custom_modules_create( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_projects_security_health_analytics_settings_custom_modules_create( + connection, + projects_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url("/v1/projects/{projectsId}/securityHealthAnalyticsSettings/customModules", %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ + [ + struct: + %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule{} + ] + ) + end + + @doc """ + Deletes the specified SecurityHealthAnalyticsCustomModule and all of its descendants in the CRM hierarchy. This method is only supported for resident custom modules. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. Name of the custom module to delete. Its format is "organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}", "folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}", or "projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}" + * `custom_modules_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.Empty{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_projects_security_health_analytics_settings_custom_modules_delete( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.SecurityCenter.V1.Model.Empty.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_projects_security_health_analytics_settings_custom_modules_delete( + connection, + projects_id, + custom_modules_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:delete) + |> Request.url( + "/v1/projects/{projectsId}/securityHealthAnalyticsSettings/customModules/{customModulesId}", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "customModulesId" => + URI.encode(custom_modules_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.SecurityCenter.V1.Model.Empty{}]) + end + + @doc """ + Retrieves a SecurityHealthAnalyticsCustomModule. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. Name of the custom module to get. Its format is "organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}", "folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}", or "projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}" + * `custom_modules_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_projects_security_health_analytics_settings_custom_modules_get( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_projects_security_health_analytics_settings_custom_modules_get( + connection, + projects_id, + custom_modules_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url( + "/v1/projects/{projectsId}/securityHealthAnalyticsSettings/customModules/{customModulesId}", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "customModulesId" => + URI.encode(custom_modules_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ + [ + struct: + %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule{} + ] + ) + end + + @doc """ + Returns a list of all SecurityHealthAnalyticsCustomModules for the given parent. This includes resident modules defined at the scope of the parent, and inherited modules, inherited from CRM ancestors. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. Name of parent to list custom modules. Its format is "organizations/{organization}/securityHealthAnalyticsSettings", "folders/{folder}/securityHealthAnalyticsSettings", or "projects/{project}/securityHealthAnalyticsSettings" + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:pageSize` (*type:* `integer()`) - The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000. + * `:pageToken` (*type:* `String.t`) - The value returned by the last call indicating a continuation + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.ListSecurityHealthAnalyticsCustomModulesResponse{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_projects_security_health_analytics_settings_custom_modules_list( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.SecurityCenter.V1.Model.ListSecurityHealthAnalyticsCustomModulesResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_projects_security_health_analytics_settings_custom_modules_list( + connection, + projects_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1/projects/{projectsId}/securityHealthAnalyticsSettings/customModules", %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ + [ + struct: + %GoogleApi.SecurityCenter.V1.Model.ListSecurityHealthAnalyticsCustomModulesResponse{} + ] + ) + end + + @doc """ + Returns a list of all resident SecurityHealthAnalyticsCustomModules under the given CRM parent and all of the parent’s CRM descendants. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. Name of parent to list descendant custom modules. Its format is "organizations/{organization}/securityHealthAnalyticsSettings", "folders/{folder}/securityHealthAnalyticsSettings", or "projects/{project}/securityHealthAnalyticsSettings" + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:pageSize` (*type:* `integer()`) - The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000. + * `:pageToken` (*type:* `String.t`) - The value returned by the last call indicating a continuation + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.ListDescendantSecurityHealthAnalyticsCustomModulesResponse{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_projects_security_health_analytics_settings_custom_modules_list_descendant( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.SecurityCenter.V1.Model.ListDescendantSecurityHealthAnalyticsCustomModulesResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_projects_security_health_analytics_settings_custom_modules_list_descendant( + connection, + projects_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url( + "/v1/projects/{projectsId}/securityHealthAnalyticsSettings/customModules:listDescendant", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ + [ + struct: + %GoogleApi.SecurityCenter.V1.Model.ListDescendantSecurityHealthAnalyticsCustomModulesResponse{} + ] + ) + end + + @doc """ + Updates the SecurityHealthAnalyticsCustomModule under the given name based on the given update mask. Updating the enablement state is supported on both resident and inherited modules (though resident modules cannot have an enablement state of "inherited"). Updating the display name and custom config of a module is supported on resident modules only. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `securityHealthAnalyticsCustomModule.name`. Immutable. The resource name of the custom module. Its format is "organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}", or "folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}", or "projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}" The id {customModule} is server-generated and is not user settable. It will be a numeric id containing 1-20 digits. + * `custom_modules_id` (*type:* `String.t`) - Part of `securityHealthAnalyticsCustomModule.name`. See documentation of `projectsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:updateMask` (*type:* `String.t`) - The list of fields to be updated. The only fields that can be updated are `enablement_state` and `custom_config`. If empty or set to the wildcard value `*`, both `enablement_state` and `custom_config` are updated. + * `:body` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_projects_security_health_analytics_settings_custom_modules_patch( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_projects_security_health_analytics_settings_custom_modules_patch( + connection, + projects_id, + custom_modules_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :updateMask => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:patch) + |> Request.url( + "/v1/projects/{projectsId}/securityHealthAnalyticsSettings/customModules/{customModulesId}", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "customModulesId" => + URI.encode(custom_modules_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ + [ + struct: + %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule{} + ] + ) + end + + @doc """ + Simulates a given SecurityHealthAnalyticsCustomModule and Resource. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. The relative resource name of the organization, project, or folder. For more information about relative resource names, see [Relative Resource Name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) Example: `organizations/{organization_id}` + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:body` (*type:* `GoogleApi.SecurityCenter.V1.Model.SimulateSecurityHealthAnalyticsCustomModuleRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.SimulateSecurityHealthAnalyticsCustomModuleResponse{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_projects_security_health_analytics_settings_custom_modules_simulate( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.SecurityCenter.V1.Model.SimulateSecurityHealthAnalyticsCustomModuleResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_projects_security_health_analytics_settings_custom_modules_simulate( + connection, + projects_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url( + "/v1/projects/{projectsId}/securityHealthAnalyticsSettings/customModules:simulate", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ + [ + struct: + %GoogleApi.SecurityCenter.V1.Model.SimulateSecurityHealthAnalyticsCustomModuleResponse{} + ] + ) + end + + @doc """ + Retrieves an EffectiveSecurityHealthAnalyticsCustomModule. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. Name of the effective custom module to get. Its format is "organizations/{organization}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}", "folders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}", or "projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}" + * `effective_custom_modules_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1EffectiveSecurityHealthAnalyticsCustomModule{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_projects_security_health_analytics_settings_effective_custom_modules_get( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1EffectiveSecurityHealthAnalyticsCustomModule.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_projects_security_health_analytics_settings_effective_custom_modules_get( + connection, + projects_id, + effective_custom_modules_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url( + "/v1/projects/{projectsId}/securityHealthAnalyticsSettings/effectiveCustomModules/{effectiveCustomModulesId}", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "effectiveCustomModulesId" => + URI.encode(effective_custom_modules_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ + [ + struct: + %GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1EffectiveSecurityHealthAnalyticsCustomModule{} + ] + ) + end + + @doc """ + Returns a list of all EffectiveSecurityHealthAnalyticsCustomModules for the given parent. This includes resident modules defined at the scope of the parent, and inherited modules, inherited from CRM ancestors. + + ## Parameters + + * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. Name of parent to list effective custom modules. Its format is "organizations/{organization}/securityHealthAnalyticsSettings", "folders/{folder}/securityHealthAnalyticsSettings", or "projects/{project}/securityHealthAnalyticsSettings" + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:pageSize` (*type:* `integer()`) - The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000. + * `:pageToken` (*type:* `String.t`) - The value returned by the last call indicating a continuation + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.SecurityCenter.V1.Model.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse{}}` on success + * `{:error, info}` on failure + """ + @spec securitycenter_projects_security_health_analytics_settings_effective_custom_modules_list( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, + GoogleApi.SecurityCenter.V1.Model.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def securitycenter_projects_security_health_analytics_settings_effective_custom_modules_list( + connection, + projects_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url( + "/v1/projects/{projectsId}/securityHealthAnalyticsSettings/effectiveCustomModules", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ + [ + struct: + %GoogleApi.SecurityCenter.V1.Model.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse{} + ] + ) end @doc """ @@ -1478,7 +3204,7 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Projects do ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. Resource name of the parent of sources to list. Its format should be "organizations/[organization_id], folders/[folder_id], or projects/[project_id]". + * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. Resource name of the parent of sources to list. Its format should be "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]". * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -1715,7 +3441,7 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Projects do ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `projects_id` (*type:* `String.t`) - Part of `finding.name`. The relative resource name of this finding. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}" + * `projects_id` (*type:* `String.t`) - Part of `finding.name`. The [relative resource name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding. Example: "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", "projects/{project_id}/sources/{source_id}/findings/{finding_id}". * `sources_id` (*type:* `String.t`) - Part of `finding.name`. See documentation of `projectsId`. * `findings_id` (*type:* `String.t`) - Part of `finding.name`. See documentation of `projectsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters @@ -1797,7 +3523,7 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Projects do ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The relative resource name of the finding. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", "projects/{project_id}/sources/{source_id}/findings/{finding_id}". + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The [relative resource name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding. Example: "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", "projects/{project_id}/sources/{source_id}/findings/{finding_id}". * `sources_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. * `findings_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters @@ -1880,7 +3606,7 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Projects do ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The relative resource name of the finding. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}". + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The [relative resource name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding. Example: "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", "projects/{project_id}/sources/{source_id}/findings/{finding_id}". * `sources_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. * `findings_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters @@ -2050,7 +3776,7 @@ defmodule GoogleApi.SecurityCenter.V1.Api.Projects do ## Parameters * `connection` (*type:* `GoogleApi.SecurityCenter.V1.Connection.t`) - Connection to server - * `projects_id` (*type:* `String.t`) - Part of `externalSystem.name`. External System Name e.g. jira, demisto, etc. e.g.: `organizations/1234/sources/5678/findings/123456/externalSystems/jira` `folders/1234/sources/5678/findings/123456/externalSystems/jira` `projects/1234/sources/5678/findings/123456/externalSystems/jira` + * `projects_id` (*type:* `String.t`) - Part of `externalSystem.name`. Full resource name of the external system, for example: "organizations/1234/sources/5678/findings/123456/externalSystems/jira", "folders/1234/sources/5678/findings/123456/externalSystems/jira", "projects/1234/sources/5678/findings/123456/externalSystems/jira" * `sources_id` (*type:* `String.t`) - Part of `externalSystem.name`. See documentation of `projectsId`. * `findings_id` (*type:* `String.t`) - Part of `externalSystem.name`. See documentation of `projectsId`. * `external_systems_id` (*type:* `String.t`) - Part of `externalSystem.name`. See documentation of `projectsId`. diff --git a/clients/security_center/lib/google_api/security_center/v1/metadata.ex b/clients/security_center/lib/google_api/security_center/v1/metadata.ex index a1517e8fba..5be3fe7c41 100644 --- a/clients/security_center/lib/google_api/security_center/v1/metadata.ex +++ b/clients/security_center/lib/google_api/security_center/v1/metadata.ex @@ -20,7 +20,7 @@ defmodule GoogleApi.SecurityCenter.V1 do API client metadata for GoogleApi.SecurityCenter.V1. """ - @discovery_revision "20221117" + @discovery_revision "20240302" def discovery_revision(), do: @discovery_revision end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/access.ex b/clients/security_center/lib/google_api/security_center/v1/model/access.ex index 256af08615..3b800ce8e1 100644 --- a/clients/security_center/lib/google_api/security_center/v1/model/access.ex +++ b/clients/security_center/lib/google_api/security_center/v1/model/access.ex @@ -24,13 +24,14 @@ defmodule GoogleApi.SecurityCenter.V1.Model.Access do * `callerIp` (*type:* `String.t`, *default:* `nil`) - Caller's IP address, such as "1.1.1.1". * `callerIpGeo` (*type:* `GoogleApi.SecurityCenter.V1.Model.Geolocation.t`, *default:* `nil`) - The caller IP's geolocation, which identifies where the call came from. * `methodName` (*type:* `String.t`, *default:* `nil`) - The method that the service account called, e.g. "SetIamPolicy". - * `principalEmail` (*type:* `String.t`, *default:* `nil`) - Associated email, such as "foo@google.com". The email address of the authenticated user (or service account on behalf of 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). - * `principalSubject` (*type:* `String.t`, *default:* `nil`) - 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}]` - * `serviceAccountDelegationInfo` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.ServiceAccountDelegationInfo.t)`, *default:* `nil`) - Identity delegation history of an authenticated service account that makes the request. It contains information on the real authorities that try to access GCP 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. - * `serviceAccountKeyName` (*type:* `String.t`, *default:* `nil`) - The name of the service account key used to create or exchange credentials for authenticating the service account making the request. This is a scheme-less URI full resource name. For example: "//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}" + * `principalEmail` (*type:* `String.t`, *default:* `nil`) - 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). + * `principalSubject` (*type:* `String.t`, *default:* `nil`) - 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}]`. + * `serviceAccountDelegationInfo` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.ServiceAccountDelegationInfo.t)`, *default:* `nil`) - 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. + * `serviceAccountKeyName` (*type:* `String.t`, *default:* `nil`) - 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}". * `serviceName` (*type:* `String.t`, *default:* `nil`) - This is the API service that the service account made a call to, e.g. "iam.googleapis.com" - * `userAgentFamily` (*type:* `String.t`, *default:* `nil`) - What kind of user agent is associated, e.g. operating system shells, embedded or stand-alone applications, etc. - * `userName` (*type:* `String.t`, *default:* `nil`) - A string representing a username. This is likely not an IAM principal. For instance, this may be the system user name if the finding is VM-related, or this may be some type of application login user name, depending on the type of finding. + * `userAgent` (*type:* `String.t`, *default:* `nil`) - The caller's user agent string associated with the finding. + * `userAgentFamily` (*type:* `String.t`, *default:* `nil`) - Type of user agent associated with the finding. For example, an operating system shell or an embedded or standalone application. + * `userName` (*type:* `String.t`, *default:* `nil`) - 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. """ use GoogleApi.Gax.ModelBase @@ -45,6 +46,7 @@ defmodule GoogleApi.SecurityCenter.V1.Model.Access do list(GoogleApi.SecurityCenter.V1.Model.ServiceAccountDelegationInfo.t()) | nil, :serviceAccountKeyName => String.t() | nil, :serviceName => String.t() | nil, + :userAgent => String.t() | nil, :userAgentFamily => String.t() | nil, :userName => String.t() | nil } @@ -62,6 +64,7 @@ defmodule GoogleApi.SecurityCenter.V1.Model.Access do field(:serviceAccountKeyName) field(:serviceName) + field(:userAgent) field(:userAgentFamily) field(:userName) end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/access_review.ex b/clients/security_center/lib/google_api/security_center/v1/model/access_review.ex index a821b5e8ed..b7b18a38c5 100644 --- a/clients/security_center/lib/google_api/security_center/v1/model/access_review.ex +++ b/clients/security_center/lib/google_api/security_center/v1/model/access_review.ex @@ -17,17 +17,17 @@ defmodule GoogleApi.SecurityCenter.V1.Model.AccessReview do @moduledoc """ - Conveys information about a Kubernetes access review (e.g. kubectl auth can-i ...) that was involved in a finding. + 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. ## Attributes - * `group` (*type:* `String.t`, *default:* `nil`) - Group is the API Group of the Resource. "*" means all. - * `name` (*type:* `String.t`, *default:* `nil`) - Name is the name of the resource being requested. Empty means all. + * `group` (*type:* `String.t`, *default:* `nil`) - The API group of the resource. "*" means all. + * `name` (*type:* `String.t`, *default:* `nil`) - The name of the resource being requested. Empty means all. * `ns` (*type:* `String.t`, *default:* `nil`) - Namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces. Both are represented by "" (empty). - * `resource` (*type:* `String.t`, *default:* `nil`) - Resource is the optional resource type requested. "*" means all. - * `subresource` (*type:* `String.t`, *default:* `nil`) - Subresource is the optional subresource type. - * `verb` (*type:* `String.t`, *default:* `nil`) - Verb is a Kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all. - * `version` (*type:* `String.t`, *default:* `nil`) - Version is the API Version of the Resource. "*" means all. + * `resource` (*type:* `String.t`, *default:* `nil`) - The optional resource type requested. "*" means all. + * `subresource` (*type:* `String.t`, *default:* `nil`) - The optional subresource type. + * `verb` (*type:* `String.t`, *default:* `nil`) - A Kubernetes resource API verb, like get, list, watch, create, update, delete, proxy. "*" means all. + * `version` (*type:* `String.t`, *default:* `nil`) - The API version of the resource. "*" means all. """ use GoogleApi.Gax.ModelBase diff --git a/clients/security_center/lib/google_api/security_center/v1/model/application.ex b/clients/security_center/lib/google_api/security_center/v1/model/application.ex new file mode 100644 index 0000000000..118b057be6 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/application.ex @@ -0,0 +1,49 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.Application do + @moduledoc """ + Represents an application associated with a finding. + + ## Attributes + + * `baseUri` (*type:* `String.t`, *default:* `nil`) - The base URI that identifies the network location of the application in which the vulnerability was detected. For example, `http://example.com`. + * `fullUri` (*type:* `String.t`, *default:* `nil`) - The full URI with payload that can be used to reproduce the vulnerability. For example, `http://example.com?p=aMmYgI6H`. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :baseUri => String.t() | nil, + :fullUri => String.t() | nil + } + + field(:baseUri) + field(:fullUri) +end + +defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.Application do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.Application.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.SecurityCenter.V1.Model.Application do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/attack_exposure.ex b/clients/security_center/lib/google_api/security_center/v1/model/attack_exposure.ex new file mode 100644 index 0000000000..60acf67c9f --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/attack_exposure.ex @@ -0,0 +1,64 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.AttackExposure do + @moduledoc """ + An attack exposure contains the results of an attack path simulation run. + + ## Attributes + + * `attackExposureResult` (*type:* `String.t`, *default:* `nil`) - 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 + * `exposedHighValueResourcesCount` (*type:* `integer()`, *default:* `nil`) - The number of high value resources that are exposed as a result of this finding. + * `exposedLowValueResourcesCount` (*type:* `integer()`, *default:* `nil`) - The number of high value resources that are exposed as a result of this finding. + * `exposedMediumValueResourcesCount` (*type:* `integer()`, *default:* `nil`) - The number of medium value resources that are exposed as a result of this finding. + * `latestCalculationTime` (*type:* `DateTime.t`, *default:* `nil`) - The most recent time the attack exposure was updated on this finding. + * `score` (*type:* `float()`, *default:* `nil`) - 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. + * `state` (*type:* `String.t`, *default:* `nil`) - What state this AttackExposure is in. This captures whether or not an attack exposure has been calculated or not. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :attackExposureResult => String.t() | nil, + :exposedHighValueResourcesCount => integer() | nil, + :exposedLowValueResourcesCount => integer() | nil, + :exposedMediumValueResourcesCount => integer() | nil, + :latestCalculationTime => DateTime.t() | nil, + :score => float() | nil, + :state => String.t() | nil + } + + field(:attackExposureResult) + field(:exposedHighValueResourcesCount) + field(:exposedLowValueResourcesCount) + field(:exposedMediumValueResourcesCount) + field(:latestCalculationTime, as: DateTime) + field(:score) + field(:state) +end + +defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.AttackExposure do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.AttackExposure.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.SecurityCenter.V1.Model.AttackExposure do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/attack_path.ex b/clients/security_center/lib/google_api/security_center/v1/model/attack_path.ex new file mode 100644 index 0000000000..256da3982e --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/attack_path.ex @@ -0,0 +1,52 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.AttackPath do + @moduledoc """ + A path that an attacker could take to reach an exposed resource. + + ## Attributes + + * `edges` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.AttackPathEdge.t)`, *default:* `nil`) - A list of the edges between nodes in this attack path. + * `name` (*type:* `String.t`, *default:* `nil`) - The attack path name, for example, `organizations/12/simulation/34/valuedResources/56/attackPaths/78` + * `pathNodes` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.AttackPathNode.t)`, *default:* `nil`) - A list of nodes that exist in this attack path. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :edges => list(GoogleApi.SecurityCenter.V1.Model.AttackPathEdge.t()) | nil, + :name => String.t() | nil, + :pathNodes => list(GoogleApi.SecurityCenter.V1.Model.AttackPathNode.t()) | nil + } + + field(:edges, as: GoogleApi.SecurityCenter.V1.Model.AttackPathEdge, type: :list) + field(:name) + field(:pathNodes, as: GoogleApi.SecurityCenter.V1.Model.AttackPathNode, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.AttackPath do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.AttackPath.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.SecurityCenter.V1.Model.AttackPath do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/edge.ex b/clients/security_center/lib/google_api/security_center/v1/model/attack_path_edge.ex similarity index 67% rename from clients/security_center/lib/google_api/security_center/v1/model/edge.ex rename to clients/security_center/lib/google_api/security_center/v1/model/attack_path_edge.ex index 67fa1998f0..05c08506ba 100644 --- a/clients/security_center/lib/google_api/security_center/v1/model/edge.ex +++ b/clients/security_center/lib/google_api/security_center/v1/model/attack_path_edge.ex @@ -15,14 +15,14 @@ # NOTE: This file is auto generated by the elixir code generator program. # Do not edit this file manually. -defmodule GoogleApi.SecurityCenter.V1.Model.Edge do +defmodule GoogleApi.SecurityCenter.V1.Model.AttackPathEdge do @moduledoc """ - Represents a connection between a source node and a destination node in this exposure path. + Represents a connection between a source node and a destination node in this attack path. ## Attributes - * `destination` (*type:* `String.t`, *default:* `nil`) - This is the resource name of the destination node. - * `source` (*type:* `String.t`, *default:* `nil`) - This is the resource name of the source node. + * `destination` (*type:* `String.t`, *default:* `nil`) - The attack node uuid of the destination node. + * `source` (*type:* `String.t`, *default:* `nil`) - The attack node uuid of the source node. """ use GoogleApi.Gax.ModelBase @@ -36,13 +36,13 @@ defmodule GoogleApi.SecurityCenter.V1.Model.Edge do field(:source) end -defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.Edge do +defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.AttackPathEdge do def decode(value, options) do - GoogleApi.SecurityCenter.V1.Model.Edge.decode(value, options) + GoogleApi.SecurityCenter.V1.Model.AttackPathEdge.decode(value, options) end end -defimpl Poison.Encoder, for: GoogleApi.SecurityCenter.V1.Model.Edge do +defimpl Poison.Encoder, for: GoogleApi.SecurityCenter.V1.Model.AttackPathEdge do def encode(value, options) do GoogleApi.Gax.ModelBase.encode(value, options) end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/attack_path_node.ex b/clients/security_center/lib/google_api/security_center/v1/model/attack_path_node.ex new file mode 100644 index 0000000000..a56a4d5f98 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/attack_path_node.ex @@ -0,0 +1,66 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.AttackPathNode do + @moduledoc """ + Represents one point that an attacker passes through in this attack path. + + ## Attributes + + * `associatedFindings` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.PathNodeAssociatedFinding.t)`, *default:* `nil`) - The findings associated with this node in the attack path. + * `attackSteps` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.AttackStepNode.t)`, *default:* `nil`) - A list of attack step nodes that exist in this attack path node. + * `displayName` (*type:* `String.t`, *default:* `nil`) - Human-readable name of this resource. + * `resource` (*type:* `String.t`, *default:* `nil`) - 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") + * `resourceType` (*type:* `String.t`, *default:* `nil`) - The [supported resource type](https://cloud.google.com/asset-inventory/docs/supported-asset-types") + * `uuid` (*type:* `String.t`, *default:* `nil`) - Unique id of the attack path node. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :associatedFindings => + list(GoogleApi.SecurityCenter.V1.Model.PathNodeAssociatedFinding.t()) | nil, + :attackSteps => list(GoogleApi.SecurityCenter.V1.Model.AttackStepNode.t()) | nil, + :displayName => String.t() | nil, + :resource => String.t() | nil, + :resourceType => String.t() | nil, + :uuid => String.t() | nil + } + + field(:associatedFindings, + as: GoogleApi.SecurityCenter.V1.Model.PathNodeAssociatedFinding, + type: :list + ) + + field(:attackSteps, as: GoogleApi.SecurityCenter.V1.Model.AttackStepNode, type: :list) + field(:displayName) + field(:resource) + field(:resourceType) + field(:uuid) +end + +defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.AttackPathNode do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.AttackPathNode.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.SecurityCenter.V1.Model.AttackPathNode do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/attack_step_node.ex b/clients/security_center/lib/google_api/security_center/v1/model/attack_step_node.ex new file mode 100644 index 0000000000..d4ab00851c --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/attack_step_node.ex @@ -0,0 +1,58 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.AttackStepNode do + @moduledoc """ + Detailed steps the attack can take between path nodes. + + ## Attributes + + * `description` (*type:* `String.t`, *default:* `nil`) - Attack step description + * `displayName` (*type:* `String.t`, *default:* `nil`) - User friendly name of the attack step + * `labels` (*type:* `map()`, *default:* `nil`) - Attack step labels for metadata + * `type` (*type:* `String.t`, *default:* `nil`) - Attack step type. Can be either AND, OR or DEFENSE + * `uuid` (*type:* `String.t`, *default:* `nil`) - Unique ID for one Node + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :description => String.t() | nil, + :displayName => String.t() | nil, + :labels => map() | nil, + :type => String.t() | nil, + :uuid => String.t() | nil + } + + field(:description) + field(:displayName) + field(:labels, type: :map) + field(:type) + field(:uuid) +end + +defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.AttackStepNode do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.AttackStepNode.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.SecurityCenter.V1.Model.AttackStepNode do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/backup_disaster_recovery.ex b/clients/security_center/lib/google_api/security_center/v1/model/backup_disaster_recovery.ex new file mode 100644 index 0000000000..8b02b5f7a0 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/backup_disaster_recovery.ex @@ -0,0 +1,73 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.BackupDisasterRecovery do + @moduledoc """ + Information related to Google Cloud Backup and DR Service findings. + + ## Attributes + + * `appliance` (*type:* `String.t`, *default:* `nil`) - The name of the Backup and DR appliance that captures, moves, and manages the lifecycle of backup data. For example, `backup-server-57137`. + * `applications` (*type:* `list(String.t)`, *default:* `nil`) - 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`. + * `backupCreateTime` (*type:* `DateTime.t`, *default:* `nil`) - The timestamp at which the Backup and DR backup was created. + * `backupTemplate` (*type:* `String.t`, *default:* `nil`) - 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`. + * `backupType` (*type:* `String.t`, *default:* `nil`) - The backup type of the Backup and DR image. For example, `Snapshot`, `Remote Snapshot`, `OnVault`. + * `host` (*type:* `String.t`, *default:* `nil`) - 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`. + * `policies` (*type:* `list(String.t)`, *default:* `nil`) - 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`. + * `policyOptions` (*type:* `list(String.t)`, *default:* `nil`) - 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`. + * `profile` (*type:* `String.t`, *default:* `nil`) - 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`. + * `storagePool` (*type:* `String.t`, *default:* `nil`) - 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`. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :appliance => String.t() | nil, + :applications => list(String.t()) | nil, + :backupCreateTime => DateTime.t() | nil, + :backupTemplate => String.t() | nil, + :backupType => String.t() | nil, + :host => String.t() | nil, + :policies => list(String.t()) | nil, + :policyOptions => list(String.t()) | nil, + :profile => String.t() | nil, + :storagePool => String.t() | nil + } + + field(:appliance) + field(:applications, type: :list) + field(:backupCreateTime, as: DateTime) + field(:backupTemplate) + field(:backupType) + field(:host) + field(:policies, type: :list) + field(:policyOptions, type: :list) + field(:profile) + field(:storagePool) +end + +defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.BackupDisasterRecovery do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.BackupDisasterRecovery.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.SecurityCenter.V1.Model.BackupDisasterRecovery do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/batch_create_resource_value_configs_request.ex b/clients/security_center/lib/google_api/security_center/v1/model/batch_create_resource_value_configs_request.ex new file mode 100644 index 0000000000..b8e0b27941 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/batch_create_resource_value_configs_request.ex @@ -0,0 +1,55 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.BatchCreateResourceValueConfigsRequest do + @moduledoc """ + Request message to create multiple resource value configs + + ## Attributes + + * `requests` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.CreateResourceValueConfigRequest.t)`, *default:* `nil`) - Required. The resource value configs to be created. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :requests => + list(GoogleApi.SecurityCenter.V1.Model.CreateResourceValueConfigRequest.t()) | nil + } + + field(:requests, + as: GoogleApi.SecurityCenter.V1.Model.CreateResourceValueConfigRequest, + type: :list + ) +end + +defimpl Poison.Decoder, + for: GoogleApi.SecurityCenter.V1.Model.BatchCreateResourceValueConfigsRequest do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.BatchCreateResourceValueConfigsRequest.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.SecurityCenter.V1.Model.BatchCreateResourceValueConfigsRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/batch_create_resource_value_configs_response.ex b/clients/security_center/lib/google_api/security_center/v1/model/batch_create_resource_value_configs_response.ex new file mode 100644 index 0000000000..7803c72bd4 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/batch_create_resource_value_configs_response.ex @@ -0,0 +1,58 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.BatchCreateResourceValueConfigsResponse do + @moduledoc """ + Response message for BatchCreateResourceValueConfigs + + ## Attributes + + * `resourceValueConfigs` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1ResourceValueConfig.t)`, *default:* `nil`) - The resource value configs created + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :resourceValueConfigs => + list( + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1ResourceValueConfig.t() + ) + | nil + } + + field(:resourceValueConfigs, + as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1ResourceValueConfig, + type: :list + ) +end + +defimpl Poison.Decoder, + for: GoogleApi.SecurityCenter.V1.Model.BatchCreateResourceValueConfigsResponse do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.BatchCreateResourceValueConfigsResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.SecurityCenter.V1.Model.BatchCreateResourceValueConfigsResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/binding.ex b/clients/security_center/lib/google_api/security_center/v1/model/binding.ex index 2f3c162c3f..720ba59630 100644 --- a/clients/security_center/lib/google_api/security_center/v1/model/binding.ex +++ b/clients/security_center/lib/google_api/security_center/v1/model/binding.ex @@ -22,8 +22,8 @@ defmodule GoogleApi.SecurityCenter.V1.Model.Binding do ## Attributes * `condition` (*type:* `GoogleApi.SecurityCenter.V1.Model.Expr.t`, *default:* `nil`) - 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). - * `members` (*type:* `list(String.t)`, *default:* `nil`) - 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. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `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`. - * `role` (*type:* `String.t`, *default:* `nil`) - Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + * `members` (*type:* `list(String.t)`, *default:* `nil`) - 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. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `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. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`. + * `role` (*type:* `String.t`, *default:* `nil`) - Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles). """ use GoogleApi.Gax.ModelBase diff --git a/clients/security_center/lib/google_api/security_center/v1/model/cloud_dlp_data_profile.ex b/clients/security_center/lib/google_api/security_center/v1/model/cloud_dlp_data_profile.ex new file mode 100644 index 0000000000..9fb3bb2f6d --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/cloud_dlp_data_profile.ex @@ -0,0 +1,49 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.CloudDlpDataProfile do + @moduledoc """ + The [data profile](https://cloud.google.com/dlp/docs/data-profiles) associated with the finding. + + ## Attributes + + * `dataProfile` (*type:* `String.t`, *default:* `nil`) - Name of the data profile, for example, `projects/123/locations/europe/tableProfiles/8383929`. + * `parentType` (*type:* `String.t`, *default:* `nil`) - The resource hierarchy level at which the data profile was generated. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :dataProfile => String.t() | nil, + :parentType => String.t() | nil + } + + field(:dataProfile) + field(:parentType) +end + +defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.CloudDlpDataProfile do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.CloudDlpDataProfile.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.SecurityCenter.V1.Model.CloudDlpDataProfile do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/cloud_dlp_inspection.ex b/clients/security_center/lib/google_api/security_center/v1/model/cloud_dlp_inspection.ex new file mode 100644 index 0000000000..ed80367812 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/cloud_dlp_inspection.ex @@ -0,0 +1,55 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.CloudDlpInspection do + @moduledoc """ + Details about the Cloud Data Loss Prevention (Cloud DLP) [inspection job](https://cloud.google.com/dlp/docs/concepts-job-triggers) that produced the finding. + + ## Attributes + + * `fullScan` (*type:* `boolean()`, *default:* `nil`) - Whether Cloud DLP scanned the complete resource or a sampled subset. + * `infoType` (*type:* `String.t`, *default:* `nil`) - The type of information (or *[infoType](https://cloud.google.com/dlp/docs/infotypes-reference)*) found, for example, `EMAIL_ADDRESS` or `STREET_ADDRESS`. + * `infoTypeCount` (*type:* `String.t`, *default:* `nil`) - The number of times Cloud DLP found this infoType within this job and resource. + * `inspectJob` (*type:* `String.t`, *default:* `nil`) - Name of the inspection job, for example, `projects/123/locations/europe/dlpJobs/i-8383929`. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :fullScan => boolean() | nil, + :infoType => String.t() | nil, + :infoTypeCount => String.t() | nil, + :inspectJob => String.t() | nil + } + + field(:fullScan) + field(:infoType) + field(:infoTypeCount) + field(:inspectJob) +end + +defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.CloudDlpInspection do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.CloudDlpInspection.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.SecurityCenter.V1.Model.CloudDlpInspection do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/cloud_logging_entry.ex b/clients/security_center/lib/google_api/security_center/v1/model/cloud_logging_entry.ex new file mode 100644 index 0000000000..e0adbfd34e --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/cloud_logging_entry.ex @@ -0,0 +1,55 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.CloudLoggingEntry do + @moduledoc """ + Metadata taken from a [Cloud Logging LogEntry](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry) + + ## Attributes + + * `insertId` (*type:* `String.t`, *default:* `nil`) - A unique identifier for the log entry. + * `logId` (*type:* `String.t`, *default:* `nil`) - The type of the log (part of `log_name`. `log_name` is the resource name of the log to which this log entry belongs). For example: `cloudresourcemanager.googleapis.com/activity`. Note that this field is not URL-encoded, unlike the `LOG_ID` field in `LogEntry`. + * `resourceContainer` (*type:* `String.t`, *default:* `nil`) - The organization, folder, or project of the monitored resource that produced this log entry. + * `timestamp` (*type:* `DateTime.t`, *default:* `nil`) - The time the event described by the log entry occurred. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :insertId => String.t() | nil, + :logId => String.t() | nil, + :resourceContainer => String.t() | nil, + :timestamp => DateTime.t() | nil + } + + field(:insertId) + field(:logId) + field(:resourceContainer) + field(:timestamp, as: DateTime) +end + +defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.CloudLoggingEntry do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.CloudLoggingEntry.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.SecurityCenter.V1.Model.CloudLoggingEntry do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/compliance.ex b/clients/security_center/lib/google_api/security_center/v1/model/compliance.ex index 332cc7ff19..c1b7a6a750 100644 --- a/clients/security_center/lib/google_api/security_center/v1/model/compliance.ex +++ b/clients/security_center/lib/google_api/security_center/v1/model/compliance.ex @@ -21,9 +21,9 @@ defmodule GoogleApi.SecurityCenter.V1.Model.Compliance do ## Attributes - * `ids` (*type:* `list(String.t)`, *default:* `nil`) - Policies within the standard/benchmark e.g. A.12.4.1 - * `standard` (*type:* `String.t`, *default:* `nil`) - Refers to industry wide standards or benchmarks e.g. "cis", "pci", "owasp", etc. - * `version` (*type:* `String.t`, *default:* `nil`) - Version of the standard/benchmark e.g. 1.1 + * `ids` (*type:* `list(String.t)`, *default:* `nil`) - Policies within the standard or benchmark, for example, A.12.4.1 + * `standard` (*type:* `String.t`, *default:* `nil`) - Industry-wide compliance standards or benchmarks, such as CIS, PCI, and OWASP. + * `version` (*type:* `String.t`, *default:* `nil`) - Version of the standard or benchmark, for example, 1.1 """ use GoogleApi.Gax.ModelBase diff --git a/clients/security_center/lib/google_api/security_center/v1/model/compliance_snapshot.ex b/clients/security_center/lib/google_api/security_center/v1/model/compliance_snapshot.ex new file mode 100644 index 0000000000..505066c5e6 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/compliance_snapshot.ex @@ -0,0 +1,67 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.ComplianceSnapshot do + @moduledoc """ + Result containing the properties and count of a ComplianceSnapshot request. + + ## Attributes + + * `category` (*type:* `String.t`, *default:* `nil`) - The category of Findings matching. + * `complianceStandard` (*type:* `String.t`, *default:* `nil`) - The compliance standard (ie CIS). + * `complianceVersion` (*type:* `String.t`, *default:* `nil`) - The compliance version (ie 1.3) in CIS 1.3. + * `count` (*type:* `String.t`, *default:* `nil`) - Total count of findings for the given properties. + * `leafContainerResource` (*type:* `String.t`, *default:* `nil`) - The leaf container resource name that is closest to the snapshot. + * `name` (*type:* `String.t`, *default:* `nil`) - The compliance snapshot name. Format: //sources//complianceSnapshots/ + * `projectDisplayName` (*type:* `String.t`, *default:* `nil`) - The CRM resource display name that is closest to the snapshot the Findings belong to. + * `snapshotTime` (*type:* `DateTime.t`, *default:* `nil`) - The snapshot time of the snapshot. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :category => String.t() | nil, + :complianceStandard => String.t() | nil, + :complianceVersion => String.t() | nil, + :count => String.t() | nil, + :leafContainerResource => String.t() | nil, + :name => String.t() | nil, + :projectDisplayName => String.t() | nil, + :snapshotTime => DateTime.t() | nil + } + + field(:category) + field(:complianceStandard) + field(:complianceVersion) + field(:count) + field(:leafContainerResource) + field(:name) + field(:projectDisplayName) + field(:snapshotTime, as: DateTime) +end + +defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.ComplianceSnapshot do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.ComplianceSnapshot.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.SecurityCenter.V1.Model.ComplianceSnapshot do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/contact.ex b/clients/security_center/lib/google_api/security_center/v1/model/contact.ex index dfede7ac5f..b3fc4bbb50 100644 --- a/clients/security_center/lib/google_api/security_center/v1/model/contact.ex +++ b/clients/security_center/lib/google_api/security_center/v1/model/contact.ex @@ -17,11 +17,11 @@ defmodule GoogleApi.SecurityCenter.V1.Model.Contact do @moduledoc """ - Representa a single contact's email address + The email address of a contact. ## Attributes - * `email` (*type:* `String.t`, *default:* `nil`) - An email address e.g. "person123@company.com" + * `email` (*type:* `String.t`, *default:* `nil`) - An email address. For example, "`person123@company.com`". """ use GoogleApi.Gax.ModelBase diff --git a/clients/security_center/lib/google_api/security_center/v1/model/contact_details.ex b/clients/security_center/lib/google_api/security_center/v1/model/contact_details.ex index 3af9d51a70..8cc7fb79f9 100644 --- a/clients/security_center/lib/google_api/security_center/v1/model/contact_details.ex +++ b/clients/security_center/lib/google_api/security_center/v1/model/contact_details.ex @@ -17,7 +17,7 @@ defmodule GoogleApi.SecurityCenter.V1.Model.ContactDetails do @moduledoc """ - The details pertaining to specific contacts + Details about specific contacts ## Attributes diff --git a/clients/security_center/lib/google_api/security_center/v1/model/container.ex b/clients/security_center/lib/google_api/security_center/v1/model/container.ex index 0250c83782..2950a88e7f 100644 --- a/clients/security_center/lib/google_api/security_center/v1/model/container.ex +++ b/clients/security_center/lib/google_api/security_center/v1/model/container.ex @@ -21,21 +21,24 @@ defmodule GoogleApi.SecurityCenter.V1.Model.Container do ## Attributes - * `imageId` (*type:* `String.t`, *default:* `nil`) - Optional container image id, when provided by the container runtime. Uniquely identifies the container image launched using a container image digest. + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - The time that the container was created. + * `imageId` (*type:* `String.t`, *default:* `nil`) - Optional container image ID, if provided by the container runtime. Uniquely identifies the container image launched using a container image digest. * `labels` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.Label.t)`, *default:* `nil`) - Container labels, as provided by the container runtime. - * `name` (*type:* `String.t`, *default:* `nil`) - Container name. - * `uri` (*type:* `String.t`, *default:* `nil`) - Container image URI provided when configuring a pod/container. May identify a container image version using mutable tags. + * `name` (*type:* `String.t`, *default:* `nil`) - Name of the container. + * `uri` (*type:* `String.t`, *default:* `nil`) - Container image URI provided when configuring a pod or container. This string can identify a container image version using mutable tags. """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, :imageId => String.t() | nil, :labels => list(GoogleApi.SecurityCenter.V1.Model.Label.t()) | nil, :name => String.t() | nil, :uri => String.t() | nil } + field(:createTime, as: DateTime) field(:imageId) field(:labels, as: GoogleApi.SecurityCenter.V1.Model.Label, type: :list) field(:name) diff --git a/clients/security_center/lib/google_api/security_center/v1/model/create_resource_value_config_request.ex b/clients/security_center/lib/google_api/security_center/v1/model/create_resource_value_config_request.ex new file mode 100644 index 0000000000..3c7ba3e6e0 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/create_resource_value_config_request.ex @@ -0,0 +1,54 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.CreateResourceValueConfigRequest do + @moduledoc """ + Request message to create single resource value config + + ## Attributes + + * `parent` (*type:* `String.t`, *default:* `nil`) - Required. Resource name of the new ResourceValueConfig's parent. + * `resourceValueConfig` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1ResourceValueConfig.t`, *default:* `nil`) - Required. The resource value config being created. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :parent => String.t() | nil, + :resourceValueConfig => + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1ResourceValueConfig.t() + | nil + } + + field(:parent) + + field(:resourceValueConfig, + as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1ResourceValueConfig + ) +end + +defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.CreateResourceValueConfigRequest do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.CreateResourceValueConfigRequest.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.SecurityCenter.V1.Model.CreateResourceValueConfigRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/custom_module_validation_error.ex b/clients/security_center/lib/google_api/security_center/v1/model/custom_module_validation_error.ex new file mode 100644 index 0000000000..455562f4be --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/custom_module_validation_error.ex @@ -0,0 +1,55 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.CustomModuleValidationError do + @moduledoc """ + An error encountered while validating the uploaded configuration of an Event Threat Detection Custom Module. + + ## Attributes + + * `description` (*type:* `String.t`, *default:* `nil`) - A description of the error, suitable for human consumption. Required. + * `end` (*type:* `GoogleApi.SecurityCenter.V1.Model.Position.t`, *default:* `nil`) - The end position of the error in the uploaded text version of the module. This field may be omitted if no specific position applies, or if one could not be computed.. + * `fieldPath` (*type:* `String.t`, *default:* `nil`) - The path, in RFC 8901 JSON Pointer format, to the field that failed validation. This may be left empty if no specific field is affected. + * `start` (*type:* `GoogleApi.SecurityCenter.V1.Model.Position.t`, *default:* `nil`) - The initial position of the error in the uploaded text version of the module. This field may be omitted if no specific position applies, or if one could not be computed. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :description => String.t() | nil, + :end => GoogleApi.SecurityCenter.V1.Model.Position.t() | nil, + :fieldPath => String.t() | nil, + :start => GoogleApi.SecurityCenter.V1.Model.Position.t() | nil + } + + field(:description) + field(:end, as: GoogleApi.SecurityCenter.V1.Model.Position) + field(:fieldPath) + field(:start, as: GoogleApi.SecurityCenter.V1.Model.Position) +end + +defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.CustomModuleValidationError do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.CustomModuleValidationError.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.SecurityCenter.V1.Model.CustomModuleValidationError do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/custom_module_validation_errors.ex b/clients/security_center/lib/google_api/security_center/v1/model/custom_module_validation_errors.ex new file mode 100644 index 0000000000..001b456a46 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/custom_module_validation_errors.ex @@ -0,0 +1,46 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.CustomModuleValidationErrors do + @moduledoc """ + A list of zero or more errors encountered while validating the uploaded configuration of an Event Threat Detection Custom Module. + + ## Attributes + + * `errors` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.CustomModuleValidationError.t)`, *default:* `nil`) - + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :errors => list(GoogleApi.SecurityCenter.V1.Model.CustomModuleValidationError.t()) | nil + } + + field(:errors, as: GoogleApi.SecurityCenter.V1.Model.CustomModuleValidationError, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.CustomModuleValidationErrors do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.CustomModuleValidationErrors.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.SecurityCenter.V1.Model.CustomModuleValidationErrors do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/cve.ex b/clients/security_center/lib/google_api/security_center/v1/model/cve.ex index 4a038d3c14..863aebe968 100644 --- a/clients/security_center/lib/google_api/security_center/v1/model/cve.ex +++ b/clients/security_center/lib/google_api/security_center/v1/model/cve.ex @@ -17,29 +17,41 @@ defmodule GoogleApi.SecurityCenter.V1.Model.Cve do @moduledoc """ - CVE stands for Common Vulnerabilities and Exposures. More information: https://cve.mitre.org + CVE stands for Common Vulnerabilities and Exposures. Information from the [CVE record](https://www.cve.org/ResourcesSupport/Glossary) that describes this vulnerability. ## Attributes * `cvssv3` (*type:* `GoogleApi.SecurityCenter.V1.Model.Cvssv3.t`, *default:* `nil`) - Describe Common Vulnerability Scoring System specified at https://www.first.org/cvss/v3.1/specification-document + * `exploitationActivity` (*type:* `String.t`, *default:* `nil`) - The exploitation activity of the vulnerability in the wild. * `id` (*type:* `String.t`, *default:* `nil`) - The unique identifier for the vulnerability. e.g. CVE-2021-34527 + * `impact` (*type:* `String.t`, *default:* `nil`) - The potential impact of the vulnerability if it was to be exploited. + * `observedInTheWild` (*type:* `boolean()`, *default:* `nil`) - Whether or not the vulnerability has been observed in the wild. * `references` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.Reference.t)`, *default:* `nil`) - Additional information about the CVE. e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527 * `upstreamFixAvailable` (*type:* `boolean()`, *default:* `nil`) - Whether upstream fix is available for the CVE. + * `zeroDay` (*type:* `boolean()`, *default:* `nil`) - Whether or not the vulnerability was zero day when the finding was published. """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ :cvssv3 => GoogleApi.SecurityCenter.V1.Model.Cvssv3.t() | nil, + :exploitationActivity => String.t() | nil, :id => String.t() | nil, + :impact => String.t() | nil, + :observedInTheWild => boolean() | nil, :references => list(GoogleApi.SecurityCenter.V1.Model.Reference.t()) | nil, - :upstreamFixAvailable => boolean() | nil + :upstreamFixAvailable => boolean() | nil, + :zeroDay => boolean() | nil } field(:cvssv3, as: GoogleApi.SecurityCenter.V1.Model.Cvssv3) + field(:exploitationActivity) field(:id) + field(:impact) + field(:observedInTheWild) field(:references, as: GoogleApi.SecurityCenter.V1.Model.Reference, type: :list) field(:upstreamFixAvailable) + field(:zeroDay) end defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.Cve do diff --git a/clients/security_center/lib/google_api/security_center/v1/model/database.ex b/clients/security_center/lib/google_api/security_center/v1/model/database.ex index da0ff24df7..5e4ecf10e2 100644 --- a/clients/security_center/lib/google_api/security_center/v1/model/database.ex +++ b/clients/security_center/lib/google_api/security_center/v1/model/database.ex @@ -17,15 +17,16 @@ defmodule GoogleApi.SecurityCenter.V1.Model.Database do @moduledoc """ - Represents database access information, such as queries. A database may be a sub-resource of an instance (as in the case of CloudSQL instances or Cloud Spanner instances), or the database instance itself. Some database resources may not have the full resource name populated because these resource types are not yet supported by Cloud Asset Inventory (e.g. CloudSQL databases). In these cases only the display name will be provided. + 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. ## Attributes - * `displayName` (*type:* `String.t`, *default:* `nil`) - The human readable name of the database the user connected to. - * `grantees` (*type:* `list(String.t)`, *default:* `nil`) - The target usernames/roles/groups of a SQL privilege grant (not an IAM policy change). - * `name` (*type:* `String.t`, *default:* `nil`) - The full resource name of the database the user connected to, if it is supported by CAI. (https://google.aip.dev/122#full-resource-names) - * `query` (*type:* `String.t`, *default:* `nil`) - The SQL statement associated with the relevant access. - * `userName` (*type:* `String.t`, *default:* `nil`) - The username used to connect to the DB. This may not necessarily be an IAM principal, and has no required format. + * `displayName` (*type:* `String.t`, *default:* `nil`) - The human-readable name of the database that the user connected to. + * `grantees` (*type:* `list(String.t)`, *default:* `nil`) - The target usernames, roles, or groups of an SQL privilege grant, which is not an IAM policy change. + * `name` (*type:* `String.t`, *default:* `nil`) - 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. + * `query` (*type:* `String.t`, *default:* `nil`) - The SQL statement that is associated with the database access. + * `userName` (*type:* `String.t`, *default:* `nil`) - The username used to connect to the database. The username might not be an IAM principal and does not have a set format. + * `version` (*type:* `String.t`, *default:* `nil`) - 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). """ use GoogleApi.Gax.ModelBase @@ -35,7 +36,8 @@ defmodule GoogleApi.SecurityCenter.V1.Model.Database do :grantees => list(String.t()) | nil, :name => String.t() | nil, :query => String.t() | nil, - :userName => String.t() | nil + :userName => String.t() | nil, + :version => String.t() | nil } field(:displayName) @@ -43,6 +45,7 @@ defmodule GoogleApi.SecurityCenter.V1.Model.Database do field(:name) field(:query) field(:userName) + field(:version) end defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.Database do diff --git a/clients/security_center/lib/google_api/security_center/v1/model/disk_path.ex b/clients/security_center/lib/google_api/security_center/v1/model/disk_path.ex new file mode 100644 index 0000000000..a347986c86 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/disk_path.ex @@ -0,0 +1,49 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.DiskPath do + @moduledoc """ + Path of the file in terms of underlying disk/partition identifiers. + + ## Attributes + + * `partitionUuid` (*type:* `String.t`, *default:* `nil`) - UUID of the partition (format https://wiki.archlinux.org/title/persistent_block_device_naming#by-uuid) + * `relativePath` (*type:* `String.t`, *default:* `nil`) - Relative path of the file in the partition as a JSON encoded string. Example: /home/user1/executable_file.sh + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :partitionUuid => String.t() | nil, + :relativePath => String.t() | nil + } + + field(:partitionUuid) + field(:relativePath) +end + +defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.DiskPath do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.DiskPath.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.SecurityCenter.V1.Model.DiskPath do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/effective_event_threat_detection_custom_module.ex b/clients/security_center/lib/google_api/security_center/v1/model/effective_event_threat_detection_custom_module.ex new file mode 100644 index 0000000000..c4b8522cca --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/effective_event_threat_detection_custom_module.ex @@ -0,0 +1,66 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.EffectiveEventThreatDetectionCustomModule do + @moduledoc """ + An EffectiveEventThreatDetectionCustomModule is the representation of an Event Threat Detection custom module at a specified level of the resource hierarchy: organization, folder, or project. If a custom module is inherited from a parent organization or folder, the value of the `enablement_state` property in EffectiveEventThreatDetectionCustomModule is set to the value that is effective in the parent, instead of `INHERITED`. For example, if the module is enabled in a parent organization or folder, the effective `enablement_state` for the module in all child folders or projects is also `enabled`. EffectiveEventThreatDetectionCustomModule is read-only. + + ## Attributes + + * `config` (*type:* `map()`, *default:* `nil`) - Output only. Config for the effective module. + * `description` (*type:* `String.t`, *default:* `nil`) - Output only. The description for the module. + * `displayName` (*type:* `String.t`, *default:* `nil`) - Output only. The human readable name to be displayed for the module. + * `enablementState` (*type:* `String.t`, *default:* `nil`) - Output only. The effective state of enablement for the module at the given level of the hierarchy. + * `name` (*type:* `String.t`, *default:* `nil`) - Output only. The resource name of the effective ETD custom module. Its format is: * "organizations/{organization}/eventThreatDetectionSettings/effectiveCustomModules/{module}". * "folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}". * "projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}". + * `type` (*type:* `String.t`, *default:* `nil`) - Output only. Type for the module. e.g. CONFIGURABLE_BAD_IP. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :config => map() | nil, + :description => String.t() | nil, + :displayName => String.t() | nil, + :enablementState => String.t() | nil, + :name => String.t() | nil, + :type => String.t() | nil + } + + field(:config, type: :map) + field(:description) + field(:displayName) + field(:enablementState) + field(:name) + field(:type) +end + +defimpl Poison.Decoder, + for: GoogleApi.SecurityCenter.V1.Model.EffectiveEventThreatDetectionCustomModule do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.EffectiveEventThreatDetectionCustomModule.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.SecurityCenter.V1.Model.EffectiveEventThreatDetectionCustomModule do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/environment_variable.ex b/clients/security_center/lib/google_api/security_center/v1/model/environment_variable.ex index 63eb19f6e3..f3ab470f52 100644 --- a/clients/security_center/lib/google_api/security_center/v1/model/environment_variable.ex +++ b/clients/security_center/lib/google_api/security_center/v1/model/environment_variable.ex @@ -17,7 +17,7 @@ defmodule GoogleApi.SecurityCenter.V1.Model.EnvironmentVariable do @moduledoc """ - EnvironmentVariable is a name-value pair to store environment variables for Process. + A name-value pair representing an environment variable used in an operating system process. ## Attributes diff --git a/clients/security_center/lib/google_api/security_center/v1/model/event_threat_detection_custom_module.ex b/clients/security_center/lib/google_api/security_center/v1/model/event_threat_detection_custom_module.ex new file mode 100644 index 0000000000..ddd383b30f --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/event_threat_detection_custom_module.ex @@ -0,0 +1,70 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.EventThreatDetectionCustomModule do + @moduledoc """ + Represents an instance of an Event Threat Detection custom module, including its full module name, display name, enablement state, and last updated time. You can create a custom module at the organization, folder, or project level. Custom modules that you create at the organization or folder level are inherited by child folders and projects. + + ## Attributes + + * `ancestorModule` (*type:* `String.t`, *default:* `nil`) - Output only. The closest ancestor module that this module inherits the enablement state from. The format is the same as the EventThreatDetectionCustomModule resource name. + * `config` (*type:* `map()`, *default:* `nil`) - Config for the module. For the resident module, its config value is defined at this level. For the inherited module, its config value is inherited from the ancestor module. + * `description` (*type:* `String.t`, *default:* `nil`) - The description for the module. + * `displayName` (*type:* `String.t`, *default:* `nil`) - The human readable name to be displayed for the module. + * `enablementState` (*type:* `String.t`, *default:* `nil`) - The state of enablement for the module at the given level of the hierarchy. + * `lastEditor` (*type:* `String.t`, *default:* `nil`) - Output only. The editor the module was last updated by. + * `name` (*type:* `String.t`, *default:* `nil`) - Immutable. The resource name of the Event Threat Detection custom module. Its format is: * "organizations/{organization}/eventThreatDetectionSettings/customModules/{module}". * "folders/{folder}/eventThreatDetectionSettings/customModules/{module}". * "projects/{project}/eventThreatDetectionSettings/customModules/{module}". + * `type` (*type:* `String.t`, *default:* `nil`) - Type for the module. e.g. CONFIGURABLE_BAD_IP. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time the module was last updated. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :ancestorModule => String.t() | nil, + :config => map() | nil, + :description => String.t() | nil, + :displayName => String.t() | nil, + :enablementState => String.t() | nil, + :lastEditor => String.t() | nil, + :name => String.t() | nil, + :type => String.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:ancestorModule) + field(:config, type: :map) + field(:description) + field(:displayName) + field(:enablementState) + field(:lastEditor) + field(:name) + field(:type) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.EventThreatDetectionCustomModule do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.EventThreatDetectionCustomModule.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.SecurityCenter.V1.Model.EventThreatDetectionCustomModule do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/exfil_resource.ex b/clients/security_center/lib/google_api/security_center/v1/model/exfil_resource.ex index b97b8fc7d0..c7ac5df564 100644 --- a/clients/security_center/lib/google_api/security_center/v1/model/exfil_resource.ex +++ b/clients/security_center/lib/google_api/security_center/v1/model/exfil_resource.ex @@ -17,12 +17,12 @@ defmodule GoogleApi.SecurityCenter.V1.Model.ExfilResource do @moduledoc """ - Resource that has been exfiltrated or exfiltrated_to. + Resource where data was exfiltrated from or exfiltrated to. ## Attributes - * `components` (*type:* `list(String.t)`, *default:* `nil`) - Subcomponents of the asset that is exfiltrated - these could be URIs used during exfiltration, table names, databases, filenames, etc. For example, multiple tables may be exfiltrated from the same CloudSQL instance, or multiple files from the same Cloud Storage bucket. - * `name` (*type:* `String.t`, *default:* `nil`) - Resource's URI (https://google.aip.dev/122#full-resource-names) + * `components` (*type:* `list(String.t)`, *default:* `nil`) - 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. + * `name` (*type:* `String.t`, *default:* `nil`) - The resource's [full resource name](https://cloud.google.com/apis/design/resource_names#full_resource_name). """ use GoogleApi.Gax.ModelBase diff --git a/clients/security_center/lib/google_api/security_center/v1/model/exfiltration.ex b/clients/security_center/lib/google_api/security_center/v1/model/exfiltration.ex index 8d96e8dc9e..11cb6b4235 100644 --- a/clients/security_center/lib/google_api/security_center/v1/model/exfiltration.ex +++ b/clients/security_center/lib/google_api/security_center/v1/model/exfiltration.ex @@ -17,23 +17,26 @@ defmodule GoogleApi.SecurityCenter.V1.Model.Exfiltration do @moduledoc """ - Exfiltration represents a data exfiltration attempt of one or more sources to one or more targets. Sources represent the source of data that is exfiltrated, and Targets represents the destination the data was copied to. + 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. ## Attributes * `sources` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.ExfilResource.t)`, *default:* `nil`) - 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. * `targets` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.ExfilResource.t)`, *default:* `nil`) - If there are multiple targets, each target would get a complete copy of the "joined" source data. + * `totalExfiltratedBytes` (*type:* `String.t`, *default:* `nil`) - Total exfiltrated bytes processed for the entire job. """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ :sources => list(GoogleApi.SecurityCenter.V1.Model.ExfilResource.t()) | nil, - :targets => list(GoogleApi.SecurityCenter.V1.Model.ExfilResource.t()) | nil + :targets => list(GoogleApi.SecurityCenter.V1.Model.ExfilResource.t()) | nil, + :totalExfiltratedBytes => String.t() | nil } field(:sources, as: GoogleApi.SecurityCenter.V1.Model.ExfilResource, type: :list) field(:targets, as: GoogleApi.SecurityCenter.V1.Model.ExfilResource, type: :list) + field(:totalExfiltratedBytes) end defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.Exfiltration do diff --git a/clients/security_center/lib/google_api/security_center/v1/model/file.ex b/clients/security_center/lib/google_api/security_center/v1/model/file.ex index 4b3db0eb8f..a50877b947 100644 --- a/clients/security_center/lib/google_api/security_center/v1/model/file.ex +++ b/clients/security_center/lib/google_api/security_center/v1/model/file.ex @@ -21,7 +21,8 @@ defmodule GoogleApi.SecurityCenter.V1.Model.File do ## Attributes - * `contents` (*type:* `String.t`, *default:* `nil`) - Prefix of the file contents as a JSON encoded string. (Currently only populated for Malicious Script Executed findings.) + * `contents` (*type:* `String.t`, *default:* `nil`) - Prefix of the file contents as a JSON-encoded string. + * `diskPath` (*type:* `GoogleApi.SecurityCenter.V1.Model.DiskPath.t`, *default:* `nil`) - Path of the file in terms of underlying disk/partition identifiers. * `hashedSize` (*type:* `String.t`, *default:* `nil`) - The length in bytes of the file prefix that was hashed. If hashed_size == size, any hashes reported represent the entire file. * `partiallyHashed` (*type:* `boolean()`, *default:* `nil`) - True when the hash covers only a prefix of the file. * `path` (*type:* `String.t`, *default:* `nil`) - Absolute path of the file as a JSON encoded string. @@ -33,6 +34,7 @@ defmodule GoogleApi.SecurityCenter.V1.Model.File do @type t :: %__MODULE__{ :contents => String.t() | nil, + :diskPath => GoogleApi.SecurityCenter.V1.Model.DiskPath.t() | nil, :hashedSize => String.t() | nil, :partiallyHashed => boolean() | nil, :path => String.t() | nil, @@ -41,6 +43,7 @@ defmodule GoogleApi.SecurityCenter.V1.Model.File do } field(:contents) + field(:diskPath, as: GoogleApi.SecurityCenter.V1.Model.DiskPath) field(:hashedSize) field(:partiallyHashed) field(:path) diff --git a/clients/security_center/lib/google_api/security_center/v1/model/finding.ex b/clients/security_center/lib/google_api/security_center/v1/model/finding.ex index 641778f34c..ea200ad4ba 100644 --- a/clients/security_center/lib/google_api/security_center/v1/model/finding.ex +++ b/clients/security_center/lib/google_api/security_center/v1/model/finding.ex @@ -23,37 +23,48 @@ defmodule GoogleApi.SecurityCenter.V1.Model.Finding do * `eventTime` (*type:* `DateTime.t`, *default:* `nil`) - 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. * `externalSystems` (*type:* `%{optional(String.t) => GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1ExternalSystem.t}`, *default:* `nil`) - Output only. Third party SIEM/SOAR fields within SCC, contains external system information and external system finding fields. - * `muteInitiator` (*type:* `String.t`, *default:* `nil`) - First known as mute_annotation. Records additional information about the mute operation e.g. mute config that muted the finding, user who muted the finding, etc. Unlike other attributes of a finding, a finding provider shouldn't set the value of mute. + * `muteInitiator` (*type:* `String.t`, *default:* `nil`) - Records additional information about the mute operation, for example, the [mute configuration](/security-command-center/docs/how-to-mute-findings) that muted the finding and the user who muted the finding. + * `moduleName` (*type:* `String.t`, *default:* `nil`) - Unique identifier of the module which generated the finding. Example: folders/598186756061/securityHealthAnalyticsSettings/customModules/56799441161885 + * `cloudDlpInspection` (*type:* `GoogleApi.SecurityCenter.V1.Model.CloudDlpInspection.t`, *default:* `nil`) - Cloud Data Loss Prevention (Cloud DLP) inspection results that are associated with the finding. + * `securityPosture` (*type:* `GoogleApi.SecurityCenter.V1.Model.SecurityPosture.t`, *default:* `nil`) - The security posture associated with the finding. * `kubernetes` (*type:* `GoogleApi.SecurityCenter.V1.Model.Kubernetes.t`, *default:* `nil`) - Kubernetes resources associated with the finding. * `mute` (*type:* `String.t`, *default:* `nil`) - 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. * `sourceProperties` (*type:* `map()`, *default:* `nil`) - 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. + * `backupDisasterRecovery` (*type:* `GoogleApi.SecurityCenter.V1.Model.BackupDisasterRecovery.t`, *default:* `nil`) - Fields related to Backup and DR findings. * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - The time at which the finding was created in Security Command Center. - * `vulnerability` (*type:* `GoogleApi.SecurityCenter.V1.Model.Vulnerability.t`, *default:* `nil`) - Represents vulnerability specific fields like cve, cvss scores etc. CVE stands for Common Vulnerabilities and Exposures (https://cve.mitre.org/about/) + * `vulnerability` (*type:* `GoogleApi.SecurityCenter.V1.Model.Vulnerability.t`, *default:* `nil`) - Represents vulnerability-specific fields like CVE and CVSS scores. CVE stands for Common Vulnerabilities and Exposures (https://cve.mitre.org/about/) * `processes` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.Process.t)`, *default:* `nil`) - Represents operating system processes associated with the Finding. - * `description` (*type:* `String.t`, *default:* `nil`) - Contains more detail about the finding. + * `description` (*type:* `String.t`, *default:* `nil`) - Contains more details about the finding. * `files` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.File.t)`, *default:* `nil`) - File associated with the finding. - * `nextSteps` (*type:* `String.t`, *default:* `nil`) - Next steps associate to the finding. + * `nextSteps` (*type:* `String.t`, *default:* `nil`) - Steps to address the finding. * `findingClass` (*type:* `String.t`, *default:* `nil`) - The class of the finding. + * `cloudDlpDataProfile` (*type:* `GoogleApi.SecurityCenter.V1.Model.CloudDlpDataProfile.t`, *default:* `nil`) - Cloud DLP data profile that is associated with the finding. * `securityMarks` (*type:* `GoogleApi.SecurityCenter.V1.Model.SecurityMarks.t`, *default:* `nil`) - 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. - * `name` (*type:* `String.t`, *default:* `nil`) - The relative resource name of this finding. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}" + * `name` (*type:* `String.t`, *default:* `nil`) - The [relative resource name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding. Example: "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", "projects/{project_id}/sources/{source_id}/findings/{finding_id}". * `state` (*type:* `String.t`, *default:* `nil`) - The state of the finding. * `canonicalName` (*type:* `String.t`, *default:* `nil`) - The canonical name of the finding. It's either "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", "folders/{folder_id}/sources/{source_id}/findings/{finding_id}" or "projects/{project_number}/sources/{source_id}/findings/{finding_id}", depending on the closest CRM ancestor of the resource associated with the finding. * `muteUpdateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The most recent time this finding was muted or unmuted. - * `access` (*type:* `GoogleApi.SecurityCenter.V1.Model.Access.t`, *default:* `nil`) - Access details associated to the Finding, such as more information on the caller, which method was accessed, from where, etc. + * `access` (*type:* `GoogleApi.SecurityCenter.V1.Model.Access.t`, *default:* `nil`) - Access details associated with the finding, such as more information on the caller, which method was accessed, and from where. * `compliances` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.Compliance.t)`, *default:* `nil`) - Contains compliance information for security standards associated to the finding. + * `loadBalancers` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.LoadBalancer.t)`, *default:* `nil`) - The load balancers associated with the finding. * `externalUri` (*type:* `String.t`, *default:* `nil`) - 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. - * `iamBindings` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.IamBinding.t)`, *default:* `nil`) - Represents IAM bindings associated with the Finding. - * `indicator` (*type:* `GoogleApi.SecurityCenter.V1.Model.Indicator.t`, *default:* `nil`) - 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. Reference: https://en.wikipedia.org/wiki/Indicator_of_compromise + * `iamBindings` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.IamBinding.t)`, *default:* `nil`) - Represents IAM bindings associated with the finding. + * `indicator` (*type:* `GoogleApi.SecurityCenter.V1.Model.Indicator.t`, *default:* `nil`) - 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). * `mitreAttack` (*type:* `GoogleApi.SecurityCenter.V1.Model.MitreAttack.t`, *default:* `nil`) - MITRE ATT&CK tactics and techniques related to this finding. See: https://attack.mitre.org * `contacts` (*type:* `%{optional(String.t) => GoogleApi.SecurityCenter.V1.Model.ContactDetails.t}`, *default:* `nil`) - 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" } ] } } + * `logEntries` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.LogEntry.t)`, *default:* `nil`) - Log entries that are relevant to the finding. * `connections` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.Connection.t)`, *default:* `nil`) - Contains information about the IP connection associated with the finding. - * `exfiltration` (*type:* `GoogleApi.SecurityCenter.V1.Model.Exfiltration.t`, *default:* `nil`) - Represents exfiltration associated with the Finding. - * `containers` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.Container.t)`, *default:* `nil`) - Containers associated with the finding. containers provides information for both Kubernetes and non-Kubernetes containers. + * `orgPolicies` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.OrgPolicy.t)`, *default:* `nil`) - Contains information about the org policies associated with the finding. + * `exfiltration` (*type:* `GoogleApi.SecurityCenter.V1.Model.Exfiltration.t`, *default:* `nil`) - Represents exfiltrations associated with the finding. + * `containers` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.Container.t)`, *default:* `nil`) - Containers associated with the finding. This field provides information for both Kubernetes and non-Kubernetes containers. + * `attackExposure` (*type:* `GoogleApi.SecurityCenter.V1.Model.AttackExposure.t`, *default:* `nil`) - The results of an attack path simulation relevant to this finding. * `parentDisplayName` (*type:* `String.t`, *default:* `nil`) - Output only. The human readable display name of the finding source such as "Event Threat Detection" or "Security Health Analytics". * `parent` (*type:* `String.t`, *default:* `nil`) - The relative resource name of the source the finding belongs to. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name This field is immutable after creation time. For example: "organizations/{organization_id}/sources/{source_id}" * `category` (*type:* `String.t`, *default:* `nil`) - The additional taxonomy group within findings from a given source. This field is immutable after creation time. Example: "XSS_FLASH_INJECTION" * `resourceName` (*type:* `String.t`, *default:* `nil`) - For findings on Google Cloud resources, the full resource name of the Google Cloud resource this finding is for. See: https://cloud.google.com/apis/design/resource_names#full_resource_name When the finding is for a non-Google Cloud resource, the resourceName can be a customer or partner defined string. This field is immutable after creation time. + * `kernelRootkit` (*type:* `GoogleApi.SecurityCenter.V1.Model.KernelRootkit.t`, *default:* `nil`) - Signature of the kernel rootkit. * `database` (*type:* `GoogleApi.SecurityCenter.V1.Model.Database.t`, *default:* `nil`) - Database associated with the finding. + * `application` (*type:* `GoogleApi.SecurityCenter.V1.Model.Application.t`, *default:* `nil`) - Represents an application associated with the finding. * `severity` (*type:* `String.t`, *default:* `nil`) - The severity of the finding. This field is managed by the source that writes the finding. """ @@ -68,9 +79,14 @@ defmodule GoogleApi.SecurityCenter.V1.Model.Finding do } | nil, :muteInitiator => String.t() | nil, + :moduleName => String.t() | nil, + :cloudDlpInspection => GoogleApi.SecurityCenter.V1.Model.CloudDlpInspection.t() | nil, + :securityPosture => GoogleApi.SecurityCenter.V1.Model.SecurityPosture.t() | nil, :kubernetes => GoogleApi.SecurityCenter.V1.Model.Kubernetes.t() | nil, :mute => String.t() | nil, :sourceProperties => map() | nil, + :backupDisasterRecovery => + GoogleApi.SecurityCenter.V1.Model.BackupDisasterRecovery.t() | nil, :createTime => DateTime.t() | nil, :vulnerability => GoogleApi.SecurityCenter.V1.Model.Vulnerability.t() | nil, :processes => list(GoogleApi.SecurityCenter.V1.Model.Process.t()) | nil, @@ -78,6 +94,7 @@ defmodule GoogleApi.SecurityCenter.V1.Model.Finding do :files => list(GoogleApi.SecurityCenter.V1.Model.File.t()) | nil, :nextSteps => String.t() | nil, :findingClass => String.t() | nil, + :cloudDlpDataProfile => GoogleApi.SecurityCenter.V1.Model.CloudDlpDataProfile.t() | nil, :securityMarks => GoogleApi.SecurityCenter.V1.Model.SecurityMarks.t() | nil, :name => String.t() | nil, :state => String.t() | nil, @@ -85,20 +102,26 @@ defmodule GoogleApi.SecurityCenter.V1.Model.Finding do :muteUpdateTime => DateTime.t() | nil, :access => GoogleApi.SecurityCenter.V1.Model.Access.t() | nil, :compliances => list(GoogleApi.SecurityCenter.V1.Model.Compliance.t()) | nil, + :loadBalancers => list(GoogleApi.SecurityCenter.V1.Model.LoadBalancer.t()) | nil, :externalUri => String.t() | nil, :iamBindings => list(GoogleApi.SecurityCenter.V1.Model.IamBinding.t()) | nil, :indicator => GoogleApi.SecurityCenter.V1.Model.Indicator.t() | nil, :mitreAttack => GoogleApi.SecurityCenter.V1.Model.MitreAttack.t() | nil, :contacts => %{optional(String.t()) => GoogleApi.SecurityCenter.V1.Model.ContactDetails.t()} | nil, + :logEntries => list(GoogleApi.SecurityCenter.V1.Model.LogEntry.t()) | nil, :connections => list(GoogleApi.SecurityCenter.V1.Model.Connection.t()) | nil, + :orgPolicies => list(GoogleApi.SecurityCenter.V1.Model.OrgPolicy.t()) | nil, :exfiltration => GoogleApi.SecurityCenter.V1.Model.Exfiltration.t() | nil, :containers => list(GoogleApi.SecurityCenter.V1.Model.Container.t()) | nil, + :attackExposure => GoogleApi.SecurityCenter.V1.Model.AttackExposure.t() | nil, :parentDisplayName => String.t() | nil, :parent => String.t() | nil, :category => String.t() | nil, :resourceName => String.t() | nil, + :kernelRootkit => GoogleApi.SecurityCenter.V1.Model.KernelRootkit.t() | nil, :database => GoogleApi.SecurityCenter.V1.Model.Database.t() | nil, + :application => GoogleApi.SecurityCenter.V1.Model.Application.t() | nil, :severity => String.t() | nil } @@ -110,9 +133,13 @@ defmodule GoogleApi.SecurityCenter.V1.Model.Finding do ) field(:muteInitiator) + field(:moduleName) + field(:cloudDlpInspection, as: GoogleApi.SecurityCenter.V1.Model.CloudDlpInspection) + field(:securityPosture, as: GoogleApi.SecurityCenter.V1.Model.SecurityPosture) field(:kubernetes, as: GoogleApi.SecurityCenter.V1.Model.Kubernetes) field(:mute) field(:sourceProperties, type: :map) + field(:backupDisasterRecovery, as: GoogleApi.SecurityCenter.V1.Model.BackupDisasterRecovery) field(:createTime, as: DateTime) field(:vulnerability, as: GoogleApi.SecurityCenter.V1.Model.Vulnerability) field(:processes, as: GoogleApi.SecurityCenter.V1.Model.Process, type: :list) @@ -120,6 +147,7 @@ defmodule GoogleApi.SecurityCenter.V1.Model.Finding do field(:files, as: GoogleApi.SecurityCenter.V1.Model.File, type: :list) field(:nextSteps) field(:findingClass) + field(:cloudDlpDataProfile, as: GoogleApi.SecurityCenter.V1.Model.CloudDlpDataProfile) field(:securityMarks, as: GoogleApi.SecurityCenter.V1.Model.SecurityMarks) field(:name) field(:state) @@ -127,19 +155,25 @@ defmodule GoogleApi.SecurityCenter.V1.Model.Finding do field(:muteUpdateTime, as: DateTime) field(:access, as: GoogleApi.SecurityCenter.V1.Model.Access) field(:compliances, as: GoogleApi.SecurityCenter.V1.Model.Compliance, type: :list) + field(:loadBalancers, as: GoogleApi.SecurityCenter.V1.Model.LoadBalancer, type: :list) field(:externalUri) field(:iamBindings, as: GoogleApi.SecurityCenter.V1.Model.IamBinding, type: :list) field(:indicator, as: GoogleApi.SecurityCenter.V1.Model.Indicator) field(:mitreAttack, as: GoogleApi.SecurityCenter.V1.Model.MitreAttack) field(:contacts, as: GoogleApi.SecurityCenter.V1.Model.ContactDetails, type: :map) + field(:logEntries, as: GoogleApi.SecurityCenter.V1.Model.LogEntry, type: :list) field(:connections, as: GoogleApi.SecurityCenter.V1.Model.Connection, type: :list) + field(:orgPolicies, as: GoogleApi.SecurityCenter.V1.Model.OrgPolicy, type: :list) field(:exfiltration, as: GoogleApi.SecurityCenter.V1.Model.Exfiltration) field(:containers, as: GoogleApi.SecurityCenter.V1.Model.Container, type: :list) + field(:attackExposure, as: GoogleApi.SecurityCenter.V1.Model.AttackExposure) field(:parentDisplayName) field(:parent) field(:category) field(:resourceName) + field(:kernelRootkit, as: GoogleApi.SecurityCenter.V1.Model.KernelRootkit) field(:database, as: GoogleApi.SecurityCenter.V1.Model.Database) + field(:application, as: GoogleApi.SecurityCenter.V1.Model.Application) field(:severity) end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v1_big_query_export.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v1_big_query_export.ex index fba9accbac..ceca1588f6 100644 --- a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v1_big_query_export.ex +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v1_big_query_export.ex @@ -21,14 +21,14 @@ defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1BigQueryE ## Attributes - * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time at which the big query export was created. This field is set by the server and will be ignored if provided on export on creation. + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - 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. * `dataset` (*type:* `String.t`, *default:* `nil`) - 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 (_). * `description` (*type:* `String.t`, *default:* `nil`) - The description of the export (max of 1024 characters). * `filter` (*type:* `String.t`, *default:* `nil`) - 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. - * `mostRecentEditor` (*type:* `String.t`, *default:* `nil`) - Output only. Email address of the user who last edited the big query export. This field is set by the server and will be ignored if provided on export creation or update. + * `mostRecentEditor` (*type:* `String.t`, *default:* `nil`) - 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. * `name` (*type:* `String.t`, *default:* `nil`) - The relative resource name of this export. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name. Example format: "organizations/{organization_id}/bigQueryExports/{export_id}" Example format: "folders/{folder_id}/bigQueryExports/{export_id}" Example format: "projects/{project_id}/bigQueryExports/{export_id}" This field is provided in responses, and is ignored when provided in create requests. - * `principal` (*type:* `String.t`, *default:* `nil`) - Output only. The service account that needs permission to create table, upload data to the big query dataset. - * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The most recent time at which the big export was updated. This field is set by the server and will be ignored if provided on export creation or update. + * `principal` (*type:* `String.t`, *default:* `nil`) - Output only. The service account that needs permission to create table and upload data to the BigQuery dataset. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - 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. """ use GoogleApi.Gax.ModelBase diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v1_binding.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v1_binding.ex index b762897248..f3fd94f6c6 100644 --- a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v1_binding.ex +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v1_binding.ex @@ -21,10 +21,10 @@ defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1Binding d ## Attributes - * `name` (*type:* `String.t`, *default:* `nil`) - Name for binding. - * `ns` (*type:* `String.t`, *default:* `nil`) - Namespace for binding. + * `name` (*type:* `String.t`, *default:* `nil`) - Name for the binding. + * `ns` (*type:* `String.t`, *default:* `nil`) - Namespace for the binding. * `role` (*type:* `GoogleApi.SecurityCenter.V1.Model.Role.t`, *default:* `nil`) - The Role or ClusterRole referenced by the binding. - * `subjects` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.Subject.t)`, *default:* `nil`) - Represents the subjects(s) bound to the role. Not always available for PATCH requests. + * `subjects` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.Subject.t)`, *default:* `nil`) - Represents one or more subjects that are bound to the role. Not always available for PATCH requests. """ use GoogleApi.Gax.ModelBase diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v1_custom_config.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v1_custom_config.ex new file mode 100644 index 0000000000..9397d76b0e --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v1_custom_config.ex @@ -0,0 +1,77 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1CustomConfig do + @moduledoc """ + Defines the properties in a custom module configuration for Security Health Analytics. Use the custom module configuration to create custom detectors that generate custom findings for resources that you specify. + + ## Attributes + + * `customOutput` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1CustomOutputSpec.t`, *default:* `nil`) - Custom output properties. + * `description` (*type:* `String.t`, *default:* `nil`) - Text that describes the vulnerability or misconfiguration that the custom module detects. This explanation is returned with each finding instance to help investigators understand the detected issue. The text must be enclosed in quotation marks. + * `predicate` (*type:* `GoogleApi.SecurityCenter.V1.Model.Expr.t`, *default:* `nil`) - The CEL expression to evaluate to produce findings. When the expression evaluates to true against a resource, a finding is generated. + * `recommendation` (*type:* `String.t`, *default:* `nil`) - An explanation of the recommended steps that security teams can take to resolve the detected issue. This explanation is returned with each finding generated by this module in the `nextSteps` property of the finding JSON. + * `resourceSelector` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1ResourceSelector.t`, *default:* `nil`) - The resource types that the custom module operates on. Each custom module can specify up to 5 resource types. + * `severity` (*type:* `String.t`, *default:* `nil`) - The severity to assign to findings generated by the module. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :customOutput => + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1CustomOutputSpec.t() + | nil, + :description => String.t() | nil, + :predicate => GoogleApi.SecurityCenter.V1.Model.Expr.t() | nil, + :recommendation => String.t() | nil, + :resourceSelector => + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1ResourceSelector.t() + | nil, + :severity => String.t() | nil + } + + field(:customOutput, + as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1CustomOutputSpec + ) + + field(:description) + field(:predicate, as: GoogleApi.SecurityCenter.V1.Model.Expr) + field(:recommendation) + + field(:resourceSelector, + as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1ResourceSelector + ) + + field(:severity) +end + +defimpl Poison.Decoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1CustomConfig do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1CustomConfig.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1CustomConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v1_custom_output_spec.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v1_custom_output_spec.ex new file mode 100644 index 0000000000..6179364bda --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v1_custom_output_spec.ex @@ -0,0 +1,55 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1CustomOutputSpec do + @moduledoc """ + A set of optional name-value pairs that define custom source properties to return with each finding that is generated by the custom module. The custom source properties that are defined here are included in the finding JSON under `sourceProperties`. + + ## Attributes + + * `properties` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1Property.t)`, *default:* `nil`) - A list of custom output properties to add to the finding. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :properties => + list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1Property.t()) | nil + } + + field(:properties, + as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1Property, + type: :list + ) +end + +defimpl Poison.Decoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1CustomOutputSpec do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1CustomOutputSpec.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1CustomOutputSpec do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v1_effective_security_health_analytics_custom_module.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v1_effective_security_health_analytics_custom_module.ex new file mode 100644 index 0000000000..0118dd0b47 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v1_effective_security_health_analytics_custom_module.ex @@ -0,0 +1,66 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1EffectiveSecurityHealthAnalyticsCustomModule do + @moduledoc """ + An EffectiveSecurityHealthAnalyticsCustomModule is the representation of a Security Health Analytics custom module at a specified level of the resource hierarchy: organization, folder, or project. If a custom module is inherited from a parent organization or folder, the value of the `enablementState` property in EffectiveSecurityHealthAnalyticsCustomModule is set to the value that is effective in the parent, instead of `INHERITED`. For example, if the module is enabled in a parent organization or folder, the effective enablement_state for the module in all child folders or projects is also `enabled`. EffectiveSecurityHealthAnalyticsCustomModule is read-only. + + ## Attributes + + * `customConfig` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1CustomConfig.t`, *default:* `nil`) - Output only. The user-specified configuration for the module. + * `displayName` (*type:* `String.t`, *default:* `nil`) - Output only. The display name for the custom module. The name must be between 1 and 128 characters, start with a lowercase letter, and contain alphanumeric characters or underscores only. + * `enablementState` (*type:* `String.t`, *default:* `nil`) - Output only. The effective state of enablement for the module at the given level of the hierarchy. + * `name` (*type:* `String.t`, *default:* `nil`) - Output only. The resource name of the custom module. Its format is "organizations/{organization}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}", or "folders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}", or "projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}" + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :customConfig => + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1CustomConfig.t() | nil, + :displayName => String.t() | nil, + :enablementState => String.t() | nil, + :name => String.t() | nil + } + + field(:customConfig, + as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1CustomConfig + ) + + field(:displayName) + field(:enablementState) + field(:name) +end + +defimpl Poison.Decoder, + for: + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1EffectiveSecurityHealthAnalyticsCustomModule do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1EffectiveSecurityHealthAnalyticsCustomModule.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1EffectiveSecurityHealthAnalyticsCustomModule do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v1_exposed_resource.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v1_exposed_resource.ex deleted file mode 100644 index b45aa3ff9d..0000000000 --- a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v1_exposed_resource.ex +++ /dev/null @@ -1,66 +0,0 @@ -# Copyright 2019 Google LLC -# -# Licensed under the Apache License, Version 2.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. - -# NOTE: This file is auto generated by the elixir code generator program. -# Do not edit this file manually. - -defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1ExposedResource do - @moduledoc """ - A resource that is exposed as a result of a finding. - - ## Attributes - - * `displayName` (*type:* `String.t`, *default:* `nil`) - Human readable name of the resource that is exposed. - * `methods` (*type:* `list(String.t)`, *default:* `nil`) - The ways in which this resource is exposed. Examples: Read, Write - * `name` (*type:* `String.t`, *default:* `nil`) - Exposed Resource Name e.g.: `organizations/123/attackExposureResults/456/exposedResources/789` - * `resource` (*type:* `String.t`, *default:* `nil`) - The name of the resource that is exposed. See: https://cloud.google.com/apis/design/resource_names#full_resource_name - * `resourceType` (*type:* `String.t`, *default:* `nil`) - The resource type of the exposed resource. See: https://cloud.google.com/asset-inventory/docs/supported-asset-types - * `resourceValue` (*type:* `String.t`, *default:* `nil`) - How valuable this resource is. - """ - - use GoogleApi.Gax.ModelBase - - @type t :: %__MODULE__{ - :displayName => String.t() | nil, - :methods => list(String.t()) | nil, - :name => String.t() | nil, - :resource => String.t() | nil, - :resourceType => String.t() | nil, - :resourceValue => String.t() | nil - } - - field(:displayName) - field(:methods, type: :list) - field(:name) - field(:resource) - field(:resourceType) - field(:resourceValue) -end - -defimpl Poison.Decoder, - for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1ExposedResource do - def decode(value, options) do - GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1ExposedResource.decode( - value, - options - ) - end -end - -defimpl Poison.Encoder, - for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1ExposedResource do - def encode(value, options) do - GoogleApi.Gax.ModelBase.encode(value, options) - end -end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v1_external_system.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v1_external_system.ex index 201bfa4cd7..f9e06b7bbd 100644 --- a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v1_external_system.ex +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v1_external_system.ex @@ -22,27 +22,45 @@ defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1ExternalS ## Attributes * `assignees` (*type:* `list(String.t)`, *default:* `nil`) - References primary/secondary etc assignees in the external system. - * `externalSystemUpdateTime` (*type:* `DateTime.t`, *default:* `nil`) - The most recent time when the corresponding finding's ticket/tracker was updated in the external system. - * `externalUid` (*type:* `String.t`, *default:* `nil`) - Identifier that's used to track the given finding in the external system. - * `name` (*type:* `String.t`, *default:* `nil`) - External System Name e.g. jira, demisto, etc. e.g.: `organizations/1234/sources/5678/findings/123456/externalSystems/jira` `folders/1234/sources/5678/findings/123456/externalSystems/jira` `projects/1234/sources/5678/findings/123456/externalSystems/jira` - * `status` (*type:* `String.t`, *default:* `nil`) - Most recent status of the corresponding finding's ticket/tracker in the external system. + * `caseCloseTime` (*type:* `DateTime.t`, *default:* `nil`) - The time when the case was closed, as reported by the external system. + * `caseCreateTime` (*type:* `DateTime.t`, *default:* `nil`) - The time when the case was created, as reported by the external system. + * `casePriority` (*type:* `String.t`, *default:* `nil`) - The priority of the finding's corresponding case in the external system. + * `caseSla` (*type:* `DateTime.t`, *default:* `nil`) - The SLA of the finding's corresponding case in the external system. + * `caseUri` (*type:* `String.t`, *default:* `nil`) - The link to the finding's corresponding case in the external system. + * `externalSystemUpdateTime` (*type:* `DateTime.t`, *default:* `nil`) - The time when the case was last updated, as reported by the external system. + * `externalUid` (*type:* `String.t`, *default:* `nil`) - The identifier that's used to track the finding's corresponding case in the external system. + * `name` (*type:* `String.t`, *default:* `nil`) - Full resource name of the external system, for example: "organizations/1234/sources/5678/findings/123456/externalSystems/jira", "folders/1234/sources/5678/findings/123456/externalSystems/jira", "projects/1234/sources/5678/findings/123456/externalSystems/jira" + * `status` (*type:* `String.t`, *default:* `nil`) - The most recent status of the finding's corresponding case, as reported by the external system. + * `ticketInfo` (*type:* `GoogleApi.SecurityCenter.V1.Model.TicketInfo.t`, *default:* `nil`) - Information about the ticket, if any, that is being used to track the resolution of the issue that is identified by this finding. """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ :assignees => list(String.t()) | nil, + :caseCloseTime => DateTime.t() | nil, + :caseCreateTime => DateTime.t() | nil, + :casePriority => String.t() | nil, + :caseSla => DateTime.t() | nil, + :caseUri => String.t() | nil, :externalSystemUpdateTime => DateTime.t() | nil, :externalUid => String.t() | nil, :name => String.t() | nil, - :status => String.t() | nil + :status => String.t() | nil, + :ticketInfo => GoogleApi.SecurityCenter.V1.Model.TicketInfo.t() | nil } field(:assignees, type: :list) + field(:caseCloseTime, as: DateTime) + field(:caseCreateTime, as: DateTime) + field(:casePriority) + field(:caseSla, as: DateTime) + field(:caseUri) field(:externalSystemUpdateTime, as: DateTime) field(:externalUid) field(:name) field(:status) + field(:ticketInfo, as: GoogleApi.SecurityCenter.V1.Model.TicketInfo) end defimpl Poison.Decoder, diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v1_mute_config.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v1_mute_config.ex index b040862349..fb7cc1f20e 100644 --- a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v1_mute_config.ex +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v1_mute_config.ex @@ -26,7 +26,7 @@ defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1MuteConfi * `displayName` (*type:* `String.t`, *default:* `nil`) - The human readable name to be displayed for the mute config. * `filter` (*type:* `String.t`, *default:* `nil`) - 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: `=`, `:` * `mostRecentEditor` (*type:* `String.t`, *default:* `nil`) - 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. - * `name` (*type:* `String.t`, *default:* `nil`) - This field will be ignored if provided on config creation. Format "organizations/{organization}/muteConfigs/{mute_config}" "folders/{folder}/muteConfigs/{mute_config}" "projects/{project}/muteConfigs/{mute_config}" + * `name` (*type:* `String.t`, *default:* `nil`) - This field will be ignored if provided on config creation. Format "organizations/{organization}/muteConfigs/{mute_config}" "folders/{folder}/muteConfigs/{mute_config}" "projects/{project}/muteConfigs/{mute_config}" "organizations/{organization}/locations/global/muteConfigs/{mute_config}" "folders/{folder}/locations/global/muteConfigs/{mute_config}" "projects/{project}/locations/global/muteConfigs/{mute_config}" * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - 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. """ diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v1_property.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v1_property.ex new file mode 100644 index 0000000000..8aff280af3 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v1_property.ex @@ -0,0 +1,49 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1Property do + @moduledoc """ + An individual name-value pair that defines a custom source property. + + ## Attributes + + * `name` (*type:* `String.t`, *default:* `nil`) - Name of the property for the custom output. + * `valueExpression` (*type:* `GoogleApi.SecurityCenter.V1.Model.Expr.t`, *default:* `nil`) - The CEL expression for the custom output. A resource property can be specified to return the value of the property or a text string enclosed in quotation marks. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :name => String.t() | nil, + :valueExpression => GoogleApi.SecurityCenter.V1.Model.Expr.t() | nil + } + + field(:name) + field(:valueExpression, as: GoogleApi.SecurityCenter.V1.Model.Expr) +end + +defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1Property do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1Property.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1Property do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v1_resource_selector.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v1_resource_selector.ex new file mode 100644 index 0000000000..9540be7fb2 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v1_resource_selector.ex @@ -0,0 +1,51 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1ResourceSelector do + @moduledoc """ + Resource for selecting resource type. + + ## Attributes + + * `resourceTypes` (*type:* `list(String.t)`, *default:* `nil`) - The resource types to run the detector on. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :resourceTypes => list(String.t()) | nil + } + + field(:resourceTypes, type: :list) +end + +defimpl Poison.Decoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1ResourceSelector do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1ResourceSelector.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1ResourceSelector do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v1_resource_value_config.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v1_resource_value_config.ex index b3d602d101..837dfc328b 100644 --- a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v1_resource_value_config.ex +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v1_resource_value_config.ex @@ -17,32 +17,54 @@ defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1ResourceValueConfig do @moduledoc """ - A resource value config is a mapping configuration of user's tag values to resource values. Used by the attack path simulation. + A resource value config (RVC) is a mapping configuration of user's resources to resource values. Used in Attack path simulations. ## Attributes + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Timestamp this resource value config was created. + * `description` (*type:* `String.t`, *default:* `nil`) - Description of the resource value config. * `name` (*type:* `String.t`, *default:* `nil`) - Name for the resource value config + * `resourceLabelsSelector` (*type:* `map()`, *default:* `nil`) - List of resource labels to search for, evaluated with AND. E.g. "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 * `resourceType` (*type:* `String.t`, *default:* `nil`) - Apply resource_value only to resources that match resource_type. resource_type will be checked with "AND" of other resources. E.g. "storage.googleapis.com/Bucket" with resource_value "HIGH" will apply "HIGH" value only to "storage.googleapis.com/Bucket" resources. * `resourceValue` (*type:* `String.t`, *default:* `nil`) - Required. Resource value level this expression represents * `scope` (*type:* `String.t`, *default:* `nil`) - Project or folder to scope this config to. For example, "project/456" would apply this config only to resources in "project/456" scope will be checked with "AND" of other resources. + * `sensitiveDataProtectionMapping` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1SensitiveDataProtectionMapping.t`, *default:* `nil`) - 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". * `tagValues` (*type:* `list(String.t)`, *default:* `nil`) - Required. Tag values combined with AND to check against. Values in the form "tagValues/123" E.g. [ "tagValues/123", "tagValues/456", "tagValues/789" ] https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Timestamp this resource value config was last updated. """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :description => String.t() | nil, :name => String.t() | nil, + :resourceLabelsSelector => map() | nil, :resourceType => String.t() | nil, :resourceValue => String.t() | nil, :scope => String.t() | nil, - :tagValues => list(String.t()) | nil + :sensitiveDataProtectionMapping => + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1SensitiveDataProtectionMapping.t() + | nil, + :tagValues => list(String.t()) | nil, + :updateTime => DateTime.t() | nil } + field(:createTime, as: DateTime) + field(:description) field(:name) + field(:resourceLabelsSelector, type: :map) field(:resourceType) field(:resourceValue) field(:scope) + + field(:sensitiveDataProtectionMapping, + as: + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1SensitiveDataProtectionMapping + ) + field(:tagValues, type: :list) + field(:updateTime, as: DateTime) end defimpl Poison.Decoder, diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v1_security_health_analytics_custom_module.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v1_security_health_analytics_custom_module.ex new file mode 100644 index 0000000000..0503aa18cb --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v1_security_health_analytics_custom_module.ex @@ -0,0 +1,76 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule do + @moduledoc """ + Represents an instance of a Security Health Analytics custom module, including its full module name, display name, enablement state, and last updated time. You can create a custom module at the organization, folder, or project level. Custom modules that you create at the organization or folder level are inherited by the child folders and projects. + + ## Attributes + + * `ancestorModule` (*type:* `String.t`, *default:* `nil`) - Output only. If empty, indicates that the custom module was created in the organization, folder, or project in which you are viewing the custom module. Otherwise, `ancestor_module` specifies the organization or folder from which the custom module is inherited. + * `customConfig` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1CustomConfig.t`, *default:* `nil`) - The user specified custom configuration for the module. + * `displayName` (*type:* `String.t`, *default:* `nil`) - The display name of the Security Health Analytics custom module. This display name becomes the finding category for all findings that are returned by this custom module. The display name must be between 1 and 128 characters, start with a lowercase letter, and contain alphanumeric characters or underscores only. + * `enablementState` (*type:* `String.t`, *default:* `nil`) - The enablement state of the custom module. + * `lastEditor` (*type:* `String.t`, *default:* `nil`) - Output only. The editor that last updated the custom module. + * `name` (*type:* `String.t`, *default:* `nil`) - Immutable. The resource name of the custom module. Its format is "organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}", or "folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}", or "projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}" The id {customModule} is server-generated and is not user settable. It will be a numeric id containing 1-20 digits. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time at which the custom module was last updated. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :ancestorModule => String.t() | nil, + :customConfig => + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1CustomConfig.t() | nil, + :displayName => String.t() | nil, + :enablementState => String.t() | nil, + :lastEditor => String.t() | nil, + :name => String.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:ancestorModule) + + field(:customConfig, + as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1CustomConfig + ) + + field(:displayName) + field(:enablementState) + field(:lastEditor) + field(:name) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v1_sensitive_data_protection_mapping.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v1_sensitive_data_protection_mapping.ex new file mode 100644 index 0000000000..8a03a78f39 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v1_sensitive_data_protection_mapping.ex @@ -0,0 +1,54 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1SensitiveDataProtectionMapping do + @moduledoc """ + 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. + + ## Attributes + + * `highSensitivityMapping` (*type:* `String.t`, *default:* `nil`) - Resource value mapping for high-sensitivity Sensitive Data Protection findings + * `mediumSensitivityMapping` (*type:* `String.t`, *default:* `nil`) - Resource value mapping for medium-sensitivity Sensitive Data Protection findings + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :highSensitivityMapping => String.t() | nil, + :mediumSensitivityMapping => String.t() | nil + } + + field(:highSensitivityMapping) + field(:mediumSensitivityMapping) +end + +defimpl Poison.Decoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1SensitiveDataProtectionMapping do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1SensitiveDataProtectionMapping.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1SensitiveDataProtectionMapping do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_access.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_access.ex new file mode 100644 index 0000000000..a2a266a233 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_access.ex @@ -0,0 +1,88 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Access do + @moduledoc """ + Represents an access event. + + ## Attributes + + * `callerIp` (*type:* `String.t`, *default:* `nil`) - Caller's IP address, such as "1.1.1.1". + * `callerIpGeo` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Geolocation.t`, *default:* `nil`) - The caller IP's geolocation, which identifies where the call came from. + * `methodName` (*type:* `String.t`, *default:* `nil`) - The method that the service account called, e.g. "SetIamPolicy". + * `principalEmail` (*type:* `String.t`, *default:* `nil`) - 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). + * `principalSubject` (*type:* `String.t`, *default:* `nil`) - 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}]`. + * `serviceAccountDelegationInfo` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2ServiceAccountDelegationInfo.t)`, *default:* `nil`) - 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. + * `serviceAccountKeyName` (*type:* `String.t`, *default:* `nil`) - 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}". + * `serviceName` (*type:* `String.t`, *default:* `nil`) - This is the API service that the service account made a call to, e.g. "iam.googleapis.com" + * `userAgent` (*type:* `String.t`, *default:* `nil`) - The caller's user agent string associated with the finding. + * `userAgentFamily` (*type:* `String.t`, *default:* `nil`) - Type of user agent associated with the finding. For example, an operating system shell or an embedded or standalone application. + * `userName` (*type:* `String.t`, *default:* `nil`) - 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. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :callerIp => String.t() | nil, + :callerIpGeo => + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Geolocation.t() | nil, + :methodName => String.t() | nil, + :principalEmail => String.t() | nil, + :principalSubject => String.t() | nil, + :serviceAccountDelegationInfo => + list( + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2ServiceAccountDelegationInfo.t() + ) + | nil, + :serviceAccountKeyName => String.t() | nil, + :serviceName => String.t() | nil, + :userAgent => String.t() | nil, + :userAgentFamily => String.t() | nil, + :userName => String.t() | nil + } + + field(:callerIp) + + field(:callerIpGeo, as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Geolocation) + + field(:methodName) + field(:principalEmail) + field(:principalSubject) + + field(:serviceAccountDelegationInfo, + as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2ServiceAccountDelegationInfo, + type: :list + ) + + field(:serviceAccountKeyName) + field(:serviceName) + field(:userAgent) + field(:userAgentFamily) + field(:userName) +end + +defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Access do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Access.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Access do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_access_review.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_access_review.ex new file mode 100644 index 0000000000..783d22ea30 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_access_review.ex @@ -0,0 +1,69 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2AccessReview do + @moduledoc """ + 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. + + ## Attributes + + * `group` (*type:* `String.t`, *default:* `nil`) - The API group of the resource. "*" means all. + * `name` (*type:* `String.t`, *default:* `nil`) - The name of the resource being requested. Empty means all. + * `ns` (*type:* `String.t`, *default:* `nil`) - Namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces. Both are represented by "" (empty). + * `resource` (*type:* `String.t`, *default:* `nil`) - The optional resource type requested. "*" means all. + * `subresource` (*type:* `String.t`, *default:* `nil`) - The optional subresource type. + * `verb` (*type:* `String.t`, *default:* `nil`) - A Kubernetes resource API verb, like get, list, watch, create, update, delete, proxy. "*" means all. + * `version` (*type:* `String.t`, *default:* `nil`) - The API version of the resource. "*" means all. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :group => String.t() | nil, + :name => String.t() | nil, + :ns => String.t() | nil, + :resource => String.t() | nil, + :subresource => String.t() | nil, + :verb => String.t() | nil, + :version => String.t() | nil + } + + field(:group) + field(:name) + field(:ns) + field(:resource) + field(:subresource) + field(:verb) + field(:version) +end + +defimpl Poison.Decoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2AccessReview do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2AccessReview.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2AccessReview do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_application.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_application.ex new file mode 100644 index 0000000000..7256ab246d --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_application.ex @@ -0,0 +1,54 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Application do + @moduledoc """ + Represents an application associated with a finding. + + ## Attributes + + * `baseUri` (*type:* `String.t`, *default:* `nil`) - The base URI that identifies the network location of the application in which the vulnerability was detected. For example, `http://example.com`. + * `fullUri` (*type:* `String.t`, *default:* `nil`) - The full URI with payload that could be used to reproduce the vulnerability. For example, `http://example.com?p=aMmYgI6H`. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :baseUri => String.t() | nil, + :fullUri => String.t() | nil + } + + field(:baseUri) + field(:fullUri) +end + +defimpl Poison.Decoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Application do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Application.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Application do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_attack_exposure.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_attack_exposure.ex new file mode 100644 index 0000000000..96f87942d5 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_attack_exposure.ex @@ -0,0 +1,69 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2AttackExposure do + @moduledoc """ + An attack exposure contains the results of an attack path simulation run. + + ## Attributes + + * `attackExposureResult` (*type:* `String.t`, *default:* `nil`) - 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 + * `exposedHighValueResourcesCount` (*type:* `integer()`, *default:* `nil`) - The number of high value resources that are exposed as a result of this finding. + * `exposedLowValueResourcesCount` (*type:* `integer()`, *default:* `nil`) - The number of high value resources that are exposed as a result of this finding. + * `exposedMediumValueResourcesCount` (*type:* `integer()`, *default:* `nil`) - The number of medium value resources that are exposed as a result of this finding. + * `latestCalculationTime` (*type:* `DateTime.t`, *default:* `nil`) - The most recent time the attack exposure was updated on this finding. + * `score` (*type:* `float()`, *default:* `nil`) - 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. + * `state` (*type:* `String.t`, *default:* `nil`) - Output only. What state this AttackExposure is in. This captures whether or not an attack exposure has been calculated or not. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :attackExposureResult => String.t() | nil, + :exposedHighValueResourcesCount => integer() | nil, + :exposedLowValueResourcesCount => integer() | nil, + :exposedMediumValueResourcesCount => integer() | nil, + :latestCalculationTime => DateTime.t() | nil, + :score => float() | nil, + :state => String.t() | nil + } + + field(:attackExposureResult) + field(:exposedHighValueResourcesCount) + field(:exposedLowValueResourcesCount) + field(:exposedMediumValueResourcesCount) + field(:latestCalculationTime, as: DateTime) + field(:score) + field(:state) +end + +defimpl Poison.Decoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2AttackExposure do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2AttackExposure.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2AttackExposure do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_backup_disaster_recovery.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_backup_disaster_recovery.ex new file mode 100644 index 0000000000..d4ea04f73b --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_backup_disaster_recovery.ex @@ -0,0 +1,78 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2BackupDisasterRecovery do + @moduledoc """ + Information related to Google Cloud Backup and DR Service findings. + + ## Attributes + + * `appliance` (*type:* `String.t`, *default:* `nil`) - The name of the Backup and DR appliance that captures, moves, and manages the lifecycle of backup data. For example, `backup-server-57137`. + * `applications` (*type:* `list(String.t)`, *default:* `nil`) - 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`. + * `backupCreateTime` (*type:* `DateTime.t`, *default:* `nil`) - The timestamp at which the Backup and DR backup was created. + * `backupTemplate` (*type:* `String.t`, *default:* `nil`) - 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`. + * `backupType` (*type:* `String.t`, *default:* `nil`) - The backup type of the Backup and DR image. For example, `Snapshot`, `Remote Snapshot`, `OnVault`. + * `host` (*type:* `String.t`, *default:* `nil`) - 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`. + * `policies` (*type:* `list(String.t)`, *default:* `nil`) - 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`. + * `policyOptions` (*type:* `list(String.t)`, *default:* `nil`) - 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`. + * `profile` (*type:* `String.t`, *default:* `nil`) - 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`. + * `storagePool` (*type:* `String.t`, *default:* `nil`) - 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`. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :appliance => String.t() | nil, + :applications => list(String.t()) | nil, + :backupCreateTime => DateTime.t() | nil, + :backupTemplate => String.t() | nil, + :backupType => String.t() | nil, + :host => String.t() | nil, + :policies => list(String.t()) | nil, + :policyOptions => list(String.t()) | nil, + :profile => String.t() | nil, + :storagePool => String.t() | nil + } + + field(:appliance) + field(:applications, type: :list) + field(:backupCreateTime, as: DateTime) + field(:backupTemplate) + field(:backupType) + field(:host) + field(:policies, type: :list) + field(:policyOptions, type: :list) + field(:profile) + field(:storagePool) +end + +defimpl Poison.Decoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2BackupDisasterRecovery do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2BackupDisasterRecovery.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2BackupDisasterRecovery do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_big_query_export.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_big_query_export.ex new file mode 100644 index 0000000000..aa2f15ae98 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_big_query_export.ex @@ -0,0 +1,72 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2BigQueryExport do + @moduledoc """ + Configures how to deliver Findings to BigQuery Instance. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - 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. + * `dataset` (*type:* `String.t`, *default:* `nil`) - 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 (_). + * `description` (*type:* `String.t`, *default:* `nil`) - The description of the export (max of 1024 characters). + * `filter` (*type:* `String.t`, *default:* `nil`) - 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. + * `mostRecentEditor` (*type:* `String.t`, *default:* `nil`) - 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. + * `name` (*type:* `String.t`, *default:* `nil`) - 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. + * `principal` (*type:* `String.t`, *default:* `nil`) - Output only. The service account that needs permission to create table and upload data to the BigQuery dataset. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - 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. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :dataset => String.t() | nil, + :description => String.t() | nil, + :filter => String.t() | nil, + :mostRecentEditor => String.t() | nil, + :name => String.t() | nil, + :principal => String.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:dataset) + field(:description) + field(:filter) + field(:mostRecentEditor) + field(:name) + field(:principal) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2BigQueryExport do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2BigQueryExport.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2BigQueryExport do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_binding.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_binding.ex new file mode 100644 index 0000000000..7c30847bc3 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_binding.ex @@ -0,0 +1,60 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Binding do + @moduledoc """ + Represents a Kubernetes RoleBinding or ClusterRoleBinding. + + ## Attributes + + * `name` (*type:* `String.t`, *default:* `nil`) - Name for the binding. + * `ns` (*type:* `String.t`, *default:* `nil`) - Namespace for the binding. + * `role` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Role.t`, *default:* `nil`) - The Role or ClusterRole referenced by the binding. + * `subjects` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Subject.t)`, *default:* `nil`) - Represents one or more subjects that are bound to the role. Not always available for PATCH requests. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :name => String.t() | nil, + :ns => String.t() | nil, + :role => GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Role.t() | nil, + :subjects => + list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Subject.t()) | nil + } + + field(:name) + field(:ns) + field(:role, as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Role) + + field(:subjects, + as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Subject, + type: :list + ) +end + +defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Binding do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Binding.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Binding do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_bulk_mute_findings_response.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_bulk_mute_findings_response.ex new file mode 100644 index 0000000000..958c913cd2 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_bulk_mute_findings_response.ex @@ -0,0 +1,46 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2BulkMuteFindingsResponse do + @moduledoc """ + The response to a BulkMute request. Contains the LRO information. + + ## Attributes + + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{} +end + +defimpl Poison.Decoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2BulkMuteFindingsResponse do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2BulkMuteFindingsResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2BulkMuteFindingsResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_cloud_dlp_data_profile.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_cloud_dlp_data_profile.ex new file mode 100644 index 0000000000..3c0aa45dab --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_cloud_dlp_data_profile.ex @@ -0,0 +1,54 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2CloudDlpDataProfile do + @moduledoc """ + The [data profile](https://cloud.google.com/dlp/docs/data-profiles) associated with the finding. + + ## Attributes + + * `dataProfile` (*type:* `String.t`, *default:* `nil`) - Name of the data profile, for example, `projects/123/locations/europe/tableProfiles/8383929`. + * `parentType` (*type:* `String.t`, *default:* `nil`) - The resource hierarchy level at which the data profile was generated. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :dataProfile => String.t() | nil, + :parentType => String.t() | nil + } + + field(:dataProfile) + field(:parentType) +end + +defimpl Poison.Decoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2CloudDlpDataProfile do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2CloudDlpDataProfile.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2CloudDlpDataProfile do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_cloud_dlp_inspection.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_cloud_dlp_inspection.ex new file mode 100644 index 0000000000..0ea6a16340 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_cloud_dlp_inspection.ex @@ -0,0 +1,60 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2CloudDlpInspection do + @moduledoc """ + Details about the Cloud Data Loss Prevention (Cloud DLP) [inspection job](https://cloud.google.com/dlp/docs/concepts-job-triggers) that produced the finding. + + ## Attributes + + * `fullScan` (*type:* `boolean()`, *default:* `nil`) - Whether Cloud DLP scanned the complete resource or a sampled subset. + * `infoType` (*type:* `String.t`, *default:* `nil`) - The type of information (or *[infoType](https://cloud.google.com/dlp/docs/infotypes-reference)*) found, for example, `EMAIL_ADDRESS` or `STREET_ADDRESS`. + * `infoTypeCount` (*type:* `String.t`, *default:* `nil`) - The number of times Cloud DLP found this infoType within this job and resource. + * `inspectJob` (*type:* `String.t`, *default:* `nil`) - Name of the inspection job, for example, `projects/123/locations/europe/dlpJobs/i-8383929`. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :fullScan => boolean() | nil, + :infoType => String.t() | nil, + :infoTypeCount => String.t() | nil, + :inspectJob => String.t() | nil + } + + field(:fullScan) + field(:infoType) + field(:infoTypeCount) + field(:inspectJob) +end + +defimpl Poison.Decoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2CloudDlpInspection do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2CloudDlpInspection.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2CloudDlpInspection do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_cloud_logging_entry.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_cloud_logging_entry.ex new file mode 100644 index 0000000000..2711c3e0aa --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_cloud_logging_entry.ex @@ -0,0 +1,60 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2CloudLoggingEntry do + @moduledoc """ + Metadata taken from a [Cloud Logging LogEntry](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry) + + ## Attributes + + * `insertId` (*type:* `String.t`, *default:* `nil`) - A unique identifier for the log entry. + * `logId` (*type:* `String.t`, *default:* `nil`) - 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`. + * `resourceContainer` (*type:* `String.t`, *default:* `nil`) - The organization, folder, or project of the monitored resource that produced this log entry. + * `timestamp` (*type:* `DateTime.t`, *default:* `nil`) - The time the event described by the log entry occurred. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :insertId => String.t() | nil, + :logId => String.t() | nil, + :resourceContainer => String.t() | nil, + :timestamp => DateTime.t() | nil + } + + field(:insertId) + field(:logId) + field(:resourceContainer) + field(:timestamp, as: DateTime) +end + +defimpl Poison.Decoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2CloudLoggingEntry do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2CloudLoggingEntry.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2CloudLoggingEntry do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_compliance.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_compliance.ex new file mode 100644 index 0000000000..c02e7ab846 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_compliance.ex @@ -0,0 +1,54 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Compliance do + @moduledoc """ + Contains compliance information about a security standard indicating unmet recommendations. + + ## Attributes + + * `ids` (*type:* `list(String.t)`, *default:* `nil`) - Policies within the standard or benchmark, for example, A.12.4.1 + * `standard` (*type:* `String.t`, *default:* `nil`) - Industry-wide compliance standards or benchmarks, such as CIS, PCI, and OWASP. + * `version` (*type:* `String.t`, *default:* `nil`) - Version of the standard or benchmark, for example, 1.1 + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :ids => list(String.t()) | nil, + :standard => String.t() | nil, + :version => String.t() | nil + } + + field(:ids, type: :list) + field(:standard) + field(:version) +end + +defimpl Poison.Decoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Compliance do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Compliance.decode(value, options) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Compliance do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_connection.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_connection.ex new file mode 100644 index 0000000000..2baea8494d --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_connection.ex @@ -0,0 +1,60 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Connection do + @moduledoc """ + Contains information about the IP connection associated with the finding. + + ## Attributes + + * `destinationIp` (*type:* `String.t`, *default:* `nil`) - Destination IP address. Not present for sockets that are listening and not connected. + * `destinationPort` (*type:* `integer()`, *default:* `nil`) - Destination port. Not present for sockets that are listening and not connected. + * `protocol` (*type:* `String.t`, *default:* `nil`) - IANA Internet Protocol Number such as TCP(6) and UDP(17). + * `sourceIp` (*type:* `String.t`, *default:* `nil`) - Source IP address. + * `sourcePort` (*type:* `integer()`, *default:* `nil`) - Source port. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :destinationIp => String.t() | nil, + :destinationPort => integer() | nil, + :protocol => String.t() | nil, + :sourceIp => String.t() | nil, + :sourcePort => integer() | nil + } + + field(:destinationIp) + field(:destinationPort) + field(:protocol) + field(:sourceIp) + field(:sourcePort) +end + +defimpl Poison.Decoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Connection do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Connection.decode(value, options) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Connection do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_contact.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_contact.ex new file mode 100644 index 0000000000..da7c63a5b3 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_contact.ex @@ -0,0 +1,46 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Contact do + @moduledoc """ + The email address of a contact. + + ## Attributes + + * `email` (*type:* `String.t`, *default:* `nil`) - An email address. For example, "`person123@company.com`". + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :email => String.t() | nil + } + + field(:email) +end + +defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Contact do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Contact.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Contact do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_contact_details.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_contact_details.ex new file mode 100644 index 0000000000..17457e73fd --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_contact_details.ex @@ -0,0 +1,55 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2ContactDetails do + @moduledoc """ + Details about specific contacts + + ## Attributes + + * `contacts` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Contact.t)`, *default:* `nil`) - A list of contacts + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :contacts => + list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Contact.t()) | nil + } + + field(:contacts, + as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Contact, + type: :list + ) +end + +defimpl Poison.Decoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2ContactDetails do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2ContactDetails.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2ContactDetails do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_container.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_container.ex new file mode 100644 index 0000000000..4f8b3af54d --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_container.ex @@ -0,0 +1,66 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Container do + @moduledoc """ + Container associated with the finding. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - The time that the container was created. + * `imageId` (*type:* `String.t`, *default:* `nil`) - Optional container image ID, if provided by the container runtime. Uniquely identifies the container image launched using a container image digest. + * `labels` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Label.t)`, *default:* `nil`) - Container labels, as provided by the container runtime. + * `name` (*type:* `String.t`, *default:* `nil`) - Name of the container. + * `uri` (*type:* `String.t`, *default:* `nil`) - Container image URI provided when configuring a pod or container. This string can identify a container image version using mutable tags. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :imageId => String.t() | nil, + :labels => + list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Label.t()) | nil, + :name => String.t() | nil, + :uri => String.t() | nil + } + + field(:createTime, as: DateTime) + field(:imageId) + + field(:labels, + as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Label, + type: :list + ) + + field(:name) + field(:uri) +end + +defimpl Poison.Decoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Container do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Container.decode(value, options) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Container do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_cve.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_cve.ex new file mode 100644 index 0000000000..a5488e5816 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_cve.ex @@ -0,0 +1,74 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Cve do + @moduledoc """ + CVE stands for Common Vulnerabilities and Exposures. Information from the [CVE record](https://www.cve.org/ResourcesSupport/Glossary) that describes this vulnerability. + + ## Attributes + + * `cvssv3` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Cvssv3.t`, *default:* `nil`) - Describe Common Vulnerability Scoring System specified at https://www.first.org/cvss/v3.1/specification-document + * `exploitationActivity` (*type:* `String.t`, *default:* `nil`) - The exploitation activity of the vulnerability in the wild. + * `id` (*type:* `String.t`, *default:* `nil`) - The unique identifier for the vulnerability. e.g. CVE-2021-34527 + * `impact` (*type:* `String.t`, *default:* `nil`) - The potential impact of the vulnerability if it was to be exploited. + * `observedInTheWild` (*type:* `boolean()`, *default:* `nil`) - Whether or not the vulnerability has been observed in the wild. + * `references` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Reference.t)`, *default:* `nil`) - Additional information about the CVE. e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527 + * `upstreamFixAvailable` (*type:* `boolean()`, *default:* `nil`) - Whether upstream fix is available for the CVE. + * `zeroDay` (*type:* `boolean()`, *default:* `nil`) - Whether or not the vulnerability was zero day when the finding was published. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :cvssv3 => + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Cvssv3.t() | nil, + :exploitationActivity => String.t() | nil, + :id => String.t() | nil, + :impact => String.t() | nil, + :observedInTheWild => boolean() | nil, + :references => + list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Reference.t()) | nil, + :upstreamFixAvailable => boolean() | nil, + :zeroDay => boolean() | nil + } + + field(:cvssv3, as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Cvssv3) + field(:exploitationActivity) + field(:id) + field(:impact) + field(:observedInTheWild) + + field(:references, + as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Reference, + type: :list + ) + + field(:upstreamFixAvailable) + field(:zeroDay) +end + +defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Cve do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Cve.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Cve do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_cvssv3.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_cvssv3.ex new file mode 100644 index 0000000000..cfe3b29762 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_cvssv3.ex @@ -0,0 +1,70 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Cvssv3 do + @moduledoc """ + Common Vulnerability Scoring System version 3. + + ## Attributes + + * `attackComplexity` (*type:* `String.t`, *default:* `nil`) - This metric describes the conditions beyond the attacker's control that must exist in order to exploit the vulnerability. + * `attackVector` (*type:* `String.t`, *default:* `nil`) - 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. + * `availabilityImpact` (*type:* `String.t`, *default:* `nil`) - This metric measures the impact to the availability of the impacted component resulting from a successfully exploited vulnerability. + * `baseScore` (*type:* `float()`, *default:* `nil`) - The base score is a function of the base metric scores. + * `confidentialityImpact` (*type:* `String.t`, *default:* `nil`) - This metric measures the impact to the confidentiality of the information resources managed by a software component due to a successfully exploited vulnerability. + * `integrityImpact` (*type:* `String.t`, *default:* `nil`) - This metric measures the impact to integrity of a successfully exploited vulnerability. + * `privilegesRequired` (*type:* `String.t`, *default:* `nil`) - This metric describes the level of privileges an attacker must possess before successfully exploiting the vulnerability. + * `scope` (*type:* `String.t`, *default:* `nil`) - The Scope metric captures whether a vulnerability in one vulnerable component impacts resources in components beyond its security scope. + * `userInteraction` (*type:* `String.t`, *default:* `nil`) - This metric captures the requirement for a human user, other than the attacker, to participate in the successful compromise of the vulnerable component. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :attackComplexity => String.t() | nil, + :attackVector => String.t() | nil, + :availabilityImpact => String.t() | nil, + :baseScore => float() | nil, + :confidentialityImpact => String.t() | nil, + :integrityImpact => String.t() | nil, + :privilegesRequired => String.t() | nil, + :scope => String.t() | nil, + :userInteraction => String.t() | nil + } + + field(:attackComplexity) + field(:attackVector) + field(:availabilityImpact) + field(:baseScore) + field(:confidentialityImpact) + field(:integrityImpact) + field(:privilegesRequired) + field(:scope) + field(:userInteraction) +end + +defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Cvssv3 do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Cvssv3.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Cvssv3 do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_database.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_database.ex new file mode 100644 index 0000000000..8baaf0184b --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_database.ex @@ -0,0 +1,61 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Database do + @moduledoc """ + 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. + + ## Attributes + + * `displayName` (*type:* `String.t`, *default:* `nil`) - The human-readable name of the database that the user connected to. + * `grantees` (*type:* `list(String.t)`, *default:* `nil`) - The target usernames, roles, or groups of an SQL privilege grant, which is not an IAM policy change. + * `name` (*type:* `String.t`, *default:* `nil`) - 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. + * `query` (*type:* `String.t`, *default:* `nil`) - The SQL statement that is associated with the database access. + * `userName` (*type:* `String.t`, *default:* `nil`) - The username used to connect to the database. The username might not be an IAM principal and does not have a set format. + * `version` (*type:* `String.t`, *default:* `nil`) - 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). + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :displayName => String.t() | nil, + :grantees => list(String.t()) | nil, + :name => String.t() | nil, + :query => String.t() | nil, + :userName => String.t() | nil, + :version => String.t() | nil + } + + field(:displayName) + field(:grantees, type: :list) + field(:name) + field(:query) + field(:userName) + field(:version) +end + +defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Database do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Database.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Database do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_detection.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_detection.ex new file mode 100644 index 0000000000..5fba7a2e0d --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_detection.ex @@ -0,0 +1,51 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Detection do + @moduledoc """ + Memory hash detection contributing to the binary family match. + + ## Attributes + + * `binary` (*type:* `String.t`, *default:* `nil`) - The name of the binary associated with the memory hash signature detection. + * `percentPagesMatched` (*type:* `float()`, *default:* `nil`) - The percentage of memory page hashes in the signature that were matched. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :binary => String.t() | nil, + :percentPagesMatched => float() | nil + } + + field(:binary) + field(:percentPagesMatched) +end + +defimpl Poison.Decoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Detection do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Detection.decode(value, options) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Detection do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_disk_path.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_disk_path.ex new file mode 100644 index 0000000000..31ecba87ad --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_disk_path.ex @@ -0,0 +1,49 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2DiskPath do + @moduledoc """ + Path of the file in terms of underlying disk/partition identifiers. + + ## Attributes + + * `partitionUuid` (*type:* `String.t`, *default:* `nil`) - UUID of the partition (format https://wiki.archlinux.org/title/persistent_block_device_naming#by-uuid) + * `relativePath` (*type:* `String.t`, *default:* `nil`) - Relative path of the file in the partition as a JSON encoded string. Example: /home/user1/executable_file.sh + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :partitionUuid => String.t() | nil, + :relativePath => String.t() | nil + } + + field(:partitionUuid) + field(:relativePath) +end + +defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2DiskPath do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2DiskPath.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2DiskPath do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_environment_variable.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_environment_variable.ex new file mode 100644 index 0000000000..4cfac4ad1d --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_environment_variable.ex @@ -0,0 +1,54 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2EnvironmentVariable do + @moduledoc """ + A name-value pair representing an environment variable used in an operating system process. + + ## Attributes + + * `name` (*type:* `String.t`, *default:* `nil`) - Environment variable name as a JSON encoded string. + * `val` (*type:* `String.t`, *default:* `nil`) - Environment variable value as a JSON encoded string. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :name => String.t() | nil, + :val => String.t() | nil + } + + field(:name) + field(:val) +end + +defimpl Poison.Decoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2EnvironmentVariable do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2EnvironmentVariable.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2EnvironmentVariable do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_exfil_resource.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_exfil_resource.ex new file mode 100644 index 0000000000..bc11111bf1 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_exfil_resource.ex @@ -0,0 +1,54 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2ExfilResource do + @moduledoc """ + Resource where data was exfiltrated from or exfiltrated to. + + ## Attributes + + * `components` (*type:* `list(String.t)`, *default:* `nil`) - 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. + * `name` (*type:* `String.t`, *default:* `nil`) - The resource's [full resource name](https://cloud.google.com/apis/design/resource_names#full_resource_name). + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :components => list(String.t()) | nil, + :name => String.t() | nil + } + + field(:components, type: :list) + field(:name) +end + +defimpl Poison.Decoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2ExfilResource do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2ExfilResource.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2ExfilResource do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_exfiltration.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_exfiltration.ex new file mode 100644 index 0000000000..1c2c16597c --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_exfiltration.ex @@ -0,0 +1,69 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Exfiltration do + @moduledoc """ + 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. + + ## Attributes + + * `sources` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2ExfilResource.t)`, *default:* `nil`) - 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. + * `targets` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2ExfilResource.t)`, *default:* `nil`) - If there are multiple targets, each target would get a complete copy of the "joined" source data. + * `totalExfiltratedBytes` (*type:* `String.t`, *default:* `nil`) - Total exfiltrated bytes processed for the entire job. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :sources => + list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2ExfilResource.t()) + | nil, + :targets => + list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2ExfilResource.t()) + | nil, + :totalExfiltratedBytes => String.t() | nil + } + + field(:sources, + as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2ExfilResource, + type: :list + ) + + field(:targets, + as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2ExfilResource, + type: :list + ) + + field(:totalExfiltratedBytes) +end + +defimpl Poison.Decoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Exfiltration do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Exfiltration.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Exfiltration do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_external_system.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_external_system.ex new file mode 100644 index 0000000000..e780fd97dc --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_external_system.ex @@ -0,0 +1,82 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2ExternalSystem do + @moduledoc """ + Representation of third party SIEM/SOAR fields within SCC. + + ## Attributes + + * `assignees` (*type:* `list(String.t)`, *default:* `nil`) - References primary/secondary etc assignees in the external system. + * `caseCloseTime` (*type:* `DateTime.t`, *default:* `nil`) - The time when the case was closed, as reported by the external system. + * `caseCreateTime` (*type:* `DateTime.t`, *default:* `nil`) - The time when the case was created, as reported by the external system. + * `casePriority` (*type:* `String.t`, *default:* `nil`) - The priority of the finding's corresponding case in the external system. + * `caseSla` (*type:* `DateTime.t`, *default:* `nil`) - The SLA of the finding's corresponding case in the external system. + * `caseUri` (*type:* `String.t`, *default:* `nil`) - The link to the finding's corresponding case in the external system. + * `externalSystemUpdateTime` (*type:* `DateTime.t`, *default:* `nil`) - The time when the case was last updated, as reported by the external system. + * `externalUid` (*type:* `String.t`, *default:* `nil`) - The identifier that's used to track the finding's corresponding case in the external system. + * `name` (*type:* `String.t`, *default:* `nil`) - 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` + * `status` (*type:* `String.t`, *default:* `nil`) - The most recent status of the finding's corresponding case, as reported by the external system. + * `ticketInfo` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2TicketInfo.t`, *default:* `nil`) - Information about the ticket, if any, that is being used to track the resolution of the issue that is identified by this finding. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :assignees => list(String.t()) | nil, + :caseCloseTime => DateTime.t() | nil, + :caseCreateTime => DateTime.t() | nil, + :casePriority => String.t() | nil, + :caseSla => DateTime.t() | nil, + :caseUri => String.t() | nil, + :externalSystemUpdateTime => DateTime.t() | nil, + :externalUid => String.t() | nil, + :name => String.t() | nil, + :status => String.t() | nil, + :ticketInfo => + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2TicketInfo.t() | nil + } + + field(:assignees, type: :list) + field(:caseCloseTime, as: DateTime) + field(:caseCreateTime, as: DateTime) + field(:casePriority) + field(:caseSla, as: DateTime) + field(:caseUri) + field(:externalSystemUpdateTime, as: DateTime) + field(:externalUid) + field(:name) + field(:status) + field(:ticketInfo, as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2TicketInfo) +end + +defimpl Poison.Decoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2ExternalSystem do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2ExternalSystem.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2ExternalSystem do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_file.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_file.ex new file mode 100644 index 0000000000..15198b3a52 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_file.ex @@ -0,0 +1,65 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2File do + @moduledoc """ + File information about the related binary/library used by an executable, or the script used by a script interpreter + + ## Attributes + + * `contents` (*type:* `String.t`, *default:* `nil`) - Prefix of the file contents as a JSON-encoded string. + * `diskPath` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2DiskPath.t`, *default:* `nil`) - Path of the file in terms of underlying disk/partition identifiers. + * `hashedSize` (*type:* `String.t`, *default:* `nil`) - The length in bytes of the file prefix that was hashed. If hashed_size == size, any hashes reported represent the entire file. + * `partiallyHashed` (*type:* `boolean()`, *default:* `nil`) - True when the hash covers only a prefix of the file. + * `path` (*type:* `String.t`, *default:* `nil`) - Absolute path of the file as a JSON encoded string. + * `sha256` (*type:* `String.t`, *default:* `nil`) - 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. + * `size` (*type:* `String.t`, *default:* `nil`) - Size of the file in bytes. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :contents => String.t() | nil, + :diskPath => + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2DiskPath.t() | nil, + :hashedSize => String.t() | nil, + :partiallyHashed => boolean() | nil, + :path => String.t() | nil, + :sha256 => String.t() | nil, + :size => String.t() | nil + } + + field(:contents) + field(:diskPath, as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2DiskPath) + field(:hashedSize) + field(:partiallyHashed) + field(:path) + field(:sha256) + field(:size) +end + +defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2File do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2File.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2File do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_finding.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_finding.ex new file mode 100644 index 0000000000..e306fbf656 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_finding.ex @@ -0,0 +1,300 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Finding do + @moduledoc """ + 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. + + ## Attributes + + * `eventTime` (*type:* `DateTime.t`, *default:* `nil`) - 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. + * `externalSystems` (*type:* `%{optional(String.t) => GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2ExternalSystem.t}`, *default:* `nil`) - Output only. Third party SIEM/SOAR fields within SCC, contains external system information and external system finding fields. + * `muteInitiator` (*type:* `String.t`, *default:* `nil`) - 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. + * `moduleName` (*type:* `String.t`, *default:* `nil`) - Unique identifier of the module which generated the finding. Example: folders/598186756061/securityHealthAnalyticsSettings/customModules/56799441161885 + * `cloudDlpInspection` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2CloudDlpInspection.t`, *default:* `nil`) - Cloud Data Loss Prevention (Cloud DLP) inspection results that are associated with the finding. + * `securityPosture` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2SecurityPosture.t`, *default:* `nil`) - The security posture associated with the finding. + * `kubernetes` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Kubernetes.t`, *default:* `nil`) - Kubernetes resources associated with the finding. + * `mute` (*type:* `String.t`, *default:* `nil`) - 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. + * `sourceProperties` (*type:* `map()`, *default:* `nil`) - 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. + * `backupDisasterRecovery` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2BackupDisasterRecovery.t`, *default:* `nil`) - Fields related to Backup and DR findings. + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time at which the finding was created in Security Command Center. + * `vulnerability` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Vulnerability.t`, *default:* `nil`) - Represents vulnerability-specific fields like CVE and CVSS scores. CVE stands for Common Vulnerabilities and Exposures (https://cve.mitre.org/about/) + * `processes` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Process.t)`, *default:* `nil`) - Represents operating system processes associated with the Finding. + * `description` (*type:* `String.t`, *default:* `nil`) - Contains more details about the finding. + * `files` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2File.t)`, *default:* `nil`) - File associated with the finding. + * `nextSteps` (*type:* `String.t`, *default:* `nil`) - Steps to address the finding. + * `findingClass` (*type:* `String.t`, *default:* `nil`) - The class of the finding. + * `cloudDlpDataProfile` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2CloudDlpDataProfile.t`, *default:* `nil`) - Cloud DLP data profile that is associated with the finding. + * `securityMarks` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2SecurityMarks.t`, *default:* `nil`) - 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. + * `name` (*type:* `String.t`, *default:* `nil`) - 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}` + * `state` (*type:* `String.t`, *default:* `nil`) - Output only. The state of the finding. + * `canonicalName` (*type:* `String.t`, *default:* `nil`) - 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. + * `muteUpdateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The most recent time this finding was muted or unmuted. + * `access` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Access.t`, *default:* `nil`) - Access details associated with the finding, such as more information on the caller, which method was accessed, and from where. + * `compliances` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Compliance.t)`, *default:* `nil`) - Contains compliance information for security standards associated to the finding. + * `loadBalancers` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2LoadBalancer.t)`, *default:* `nil`) - The load balancers associated with the finding. + * `externalUri` (*type:* `String.t`, *default:* `nil`) - 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. + * `iamBindings` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IamBinding.t)`, *default:* `nil`) - Represents IAM bindings associated with the finding. + * `indicator` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Indicator.t`, *default:* `nil`) - 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). + * `mitreAttack` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2MitreAttack.t`, *default:* `nil`) - MITRE ATT&CK tactics and techniques related to this finding. See: https://attack.mitre.org + * `contacts` (*type:* `%{optional(String.t) => GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2ContactDetails.t}`, *default:* `nil`) - 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" } ] } } + * `logEntries` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2LogEntry.t)`, *default:* `nil`) - Log entries that are relevant to the finding. + * `connections` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Connection.t)`, *default:* `nil`) - Contains information about the IP connection associated with the finding. + * `orgPolicies` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2OrgPolicy.t)`, *default:* `nil`) - Contains information about the org policies associated with the finding. + * `exfiltration` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Exfiltration.t`, *default:* `nil`) - Represents exfiltrations associated with the finding. + * `containers` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Container.t)`, *default:* `nil`) - Containers associated with the finding. This field provides information for both Kubernetes and non-Kubernetes containers. + * `attackExposure` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2AttackExposure.t`, *default:* `nil`) - The results of an attack path simulation relevant to this finding. + * `parentDisplayName` (*type:* `String.t`, *default:* `nil`) - Output only. The human readable display name of the finding source such as "Event Threat Detection" or "Security Health Analytics". + * `parent` (*type:* `String.t`, *default:* `nil`) - 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}` + * `category` (*type:* `String.t`, *default:* `nil`) - Immutable. The additional taxonomy group within findings from a given source. Example: "XSS_FLASH_INJECTION" + * `resourceName` (*type:* `String.t`, *default:* `nil`) - 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. + * `kernelRootkit` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2KernelRootkit.t`, *default:* `nil`) - Signature of the kernel rootkit. + * `database` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Database.t`, *default:* `nil`) - Database associated with the finding. + * `application` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Application.t`, *default:* `nil`) - Represents an application associated with the finding. + * `severity` (*type:* `String.t`, *default:* `nil`) - The severity of the finding. This field is managed by the source that writes the finding. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :eventTime => DateTime.t() | nil, + :externalSystems => + %{ + optional(String.t()) => + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2ExternalSystem.t() + } + | nil, + :muteInitiator => String.t() | nil, + :moduleName => String.t() | nil, + :cloudDlpInspection => + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2CloudDlpInspection.t() + | nil, + :securityPosture => + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2SecurityPosture.t() | nil, + :kubernetes => + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Kubernetes.t() | nil, + :mute => String.t() | nil, + :sourceProperties => map() | nil, + :backupDisasterRecovery => + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2BackupDisasterRecovery.t() + | nil, + :createTime => DateTime.t() | nil, + :vulnerability => + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Vulnerability.t() | nil, + :processes => + list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Process.t()) | nil, + :description => String.t() | nil, + :files => + list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2File.t()) | nil, + :nextSteps => String.t() | nil, + :findingClass => String.t() | nil, + :cloudDlpDataProfile => + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2CloudDlpDataProfile.t() + | nil, + :securityMarks => + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2SecurityMarks.t() | nil, + :name => String.t() | nil, + :state => String.t() | nil, + :canonicalName => String.t() | nil, + :muteUpdateTime => DateTime.t() | nil, + :access => + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Access.t() | nil, + :compliances => + list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Compliance.t()) + | nil, + :loadBalancers => + list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2LoadBalancer.t()) + | nil, + :externalUri => String.t() | nil, + :iamBindings => + list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IamBinding.t()) + | nil, + :indicator => + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Indicator.t() | nil, + :mitreAttack => + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2MitreAttack.t() | nil, + :contacts => + %{ + optional(String.t()) => + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2ContactDetails.t() + } + | nil, + :logEntries => + list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2LogEntry.t()) | nil, + :connections => + list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Connection.t()) + | nil, + :orgPolicies => + list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2OrgPolicy.t()) | nil, + :exfiltration => + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Exfiltration.t() | nil, + :containers => + list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Container.t()) | nil, + :attackExposure => + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2AttackExposure.t() | nil, + :parentDisplayName => String.t() | nil, + :parent => String.t() | nil, + :category => String.t() | nil, + :resourceName => String.t() | nil, + :kernelRootkit => + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2KernelRootkit.t() | nil, + :database => + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Database.t() | nil, + :application => + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Application.t() | nil, + :severity => String.t() | nil + } + + field(:eventTime, as: DateTime) + + field(:externalSystems, + as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2ExternalSystem, + type: :map + ) + + field(:muteInitiator) + field(:moduleName) + + field(:cloudDlpInspection, + as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2CloudDlpInspection + ) + + field(:securityPosture, + as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2SecurityPosture + ) + + field(:kubernetes, as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Kubernetes) + field(:mute) + field(:sourceProperties, type: :map) + + field(:backupDisasterRecovery, + as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2BackupDisasterRecovery + ) + + field(:createTime, as: DateTime) + + field(:vulnerability, + as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Vulnerability + ) + + field(:processes, + as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Process, + type: :list + ) + + field(:description) + + field(:files, as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2File, type: :list) + + field(:nextSteps) + field(:findingClass) + + field(:cloudDlpDataProfile, + as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2CloudDlpDataProfile + ) + + field(:securityMarks, + as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2SecurityMarks + ) + + field(:name) + field(:state) + field(:canonicalName) + field(:muteUpdateTime, as: DateTime) + field(:access, as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Access) + + field(:compliances, + as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Compliance, + type: :list + ) + + field(:loadBalancers, + as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2LoadBalancer, + type: :list + ) + + field(:externalUri) + + field(:iamBindings, + as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IamBinding, + type: :list + ) + + field(:indicator, as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Indicator) + + field(:mitreAttack, as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2MitreAttack) + + field(:contacts, + as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2ContactDetails, + type: :map + ) + + field(:logEntries, + as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2LogEntry, + type: :list + ) + + field(:connections, + as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Connection, + type: :list + ) + + field(:orgPolicies, + as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2OrgPolicy, + type: :list + ) + + field(:exfiltration, + as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Exfiltration + ) + + field(:containers, + as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Container, + type: :list + ) + + field(:attackExposure, + as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2AttackExposure + ) + + field(:parentDisplayName) + field(:parent) + field(:category) + field(:resourceName) + + field(:kernelRootkit, + as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2KernelRootkit + ) + + field(:database, as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Database) + + field(:application, as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Application) + + field(:severity) +end + +defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Finding do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Finding.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Finding do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_geolocation.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_geolocation.ex new file mode 100644 index 0000000000..809eb9f603 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_geolocation.ex @@ -0,0 +1,51 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Geolocation do + @moduledoc """ + Represents a geographical location for a given access. + + ## Attributes + + * `regionCode` (*type:* `String.t`, *default:* `nil`) - A CLDR. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :regionCode => String.t() | nil + } + + field(:regionCode) +end + +defimpl Poison.Decoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Geolocation do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Geolocation.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Geolocation do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_iam_binding.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_iam_binding.ex new file mode 100644 index 0000000000..a1c703c163 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_iam_binding.ex @@ -0,0 +1,54 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IamBinding do + @moduledoc """ + Represents a particular IAM binding, which captures a member's role addition, removal, or state. + + ## Attributes + + * `action` (*type:* `String.t`, *default:* `nil`) - The action that was performed on a Binding. + * `member` (*type:* `String.t`, *default:* `nil`) - A single identity requesting access for a Cloud Platform resource, for example, "foo@google.com". + * `role` (*type:* `String.t`, *default:* `nil`) - Role that is assigned to "members". For example, "roles/viewer", "roles/editor", or "roles/owner". + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :action => String.t() | nil, + :member => String.t() | nil, + :role => String.t() | nil + } + + field(:action) + field(:member) + field(:role) +end + +defimpl Poison.Decoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IamBinding do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IamBinding.decode(value, options) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2IamBinding do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_indicator.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_indicator.ex new file mode 100644 index 0000000000..591c2c63bc --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_indicator.ex @@ -0,0 +1,66 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Indicator do + @moduledoc """ + 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). + + ## Attributes + + * `domains` (*type:* `list(String.t)`, *default:* `nil`) - List of domains associated to the Finding. + * `ipAddresses` (*type:* `list(String.t)`, *default:* `nil`) - The list of IP addresses that are associated with the finding. + * `signatures` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2ProcessSignature.t)`, *default:* `nil`) - The list of matched signatures indicating that the given process is present in the environment. + * `uris` (*type:* `list(String.t)`, *default:* `nil`) - The list of URIs associated to the Findings. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :domains => list(String.t()) | nil, + :ipAddresses => list(String.t()) | nil, + :signatures => + list( + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2ProcessSignature.t() + ) + | nil, + :uris => list(String.t()) | nil + } + + field(:domains, type: :list) + field(:ipAddresses, type: :list) + + field(:signatures, + as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2ProcessSignature, + type: :list + ) + + field(:uris, type: :list) +end + +defimpl Poison.Decoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Indicator do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Indicator.decode(value, options) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Indicator do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_kernel_rootkit.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_kernel_rootkit.ex new file mode 100644 index 0000000000..f46f4b2a04 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_kernel_rootkit.ex @@ -0,0 +1,75 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2KernelRootkit do + @moduledoc """ + Kernel mode rootkit signatures. + + ## Attributes + + * `name` (*type:* `String.t`, *default:* `nil`) - Rootkit name, when available. + * `unexpectedCodeModification` (*type:* `boolean()`, *default:* `nil`) - True if unexpected modifications of kernel code memory are present. + * `unexpectedFtraceHandler` (*type:* `boolean()`, *default:* `nil`) - True if `ftrace` points are present with callbacks pointing to regions that are not in the expected kernel or module code range. + * `unexpectedInterruptHandler` (*type:* `boolean()`, *default:* `nil`) - True if interrupt handlers that are are not in the expected kernel or module code regions are present. + * `unexpectedKernelCodePages` (*type:* `boolean()`, *default:* `nil`) - True if kernel code pages that are not in the expected kernel or module code regions are present. + * `unexpectedKprobeHandler` (*type:* `boolean()`, *default:* `nil`) - True if `kprobe` points are present with callbacks pointing to regions that are not in the expected kernel or module code range. + * `unexpectedProcessesInRunqueue` (*type:* `boolean()`, *default:* `nil`) - 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. + * `unexpectedReadOnlyDataModification` (*type:* `boolean()`, *default:* `nil`) - True if unexpected modifications of kernel read-only data memory are present. + * `unexpectedSystemCallHandler` (*type:* `boolean()`, *default:* `nil`) - True if system call handlers that are are not in the expected kernel or module code regions are present. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :name => String.t() | nil, + :unexpectedCodeModification => boolean() | nil, + :unexpectedFtraceHandler => boolean() | nil, + :unexpectedInterruptHandler => boolean() | nil, + :unexpectedKernelCodePages => boolean() | nil, + :unexpectedKprobeHandler => boolean() | nil, + :unexpectedProcessesInRunqueue => boolean() | nil, + :unexpectedReadOnlyDataModification => boolean() | nil, + :unexpectedSystemCallHandler => boolean() | nil + } + + field(:name) + field(:unexpectedCodeModification) + field(:unexpectedFtraceHandler) + field(:unexpectedInterruptHandler) + field(:unexpectedKernelCodePages) + field(:unexpectedKprobeHandler) + field(:unexpectedProcessesInRunqueue) + field(:unexpectedReadOnlyDataModification) + field(:unexpectedSystemCallHandler) +end + +defimpl Poison.Decoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2KernelRootkit do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2KernelRootkit.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2KernelRootkit do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_kubernetes.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_kubernetes.ex new file mode 100644 index 0000000000..a3d73e2627 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_kubernetes.ex @@ -0,0 +1,92 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Kubernetes do + @moduledoc """ + Kubernetes-related attributes. + + ## Attributes + + * `accessReviews` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2AccessReview.t)`, *default:* `nil`) - Provides information on any Kubernetes access reviews (privilege checks) relevant to the finding. + * `bindings` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Binding.t)`, *default:* `nil`) - 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). + * `nodePools` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2NodePool.t)`, *default:* `nil`) - 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. + * `nodes` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Node.t)`, *default:* `nil`) - Provides Kubernetes [node](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture#nodes) information. + * `objects` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Object.t)`, *default:* `nil`) - Kubernetes objects related to the finding. + * `pods` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Pod.t)`, *default:* `nil`) - 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. + * `roles` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Role.t)`, *default:* `nil`) - Provides Kubernetes role information for findings that involve [Roles or ClusterRoles](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control). + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :accessReviews => + list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2AccessReview.t()) + | nil, + :bindings => + list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Binding.t()) | nil, + :nodePools => + list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2NodePool.t()) | nil, + :nodes => + list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Node.t()) | nil, + :objects => + list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Object.t()) | nil, + :pods => + list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Pod.t()) | nil, + :roles => + list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Role.t()) | nil + } + + field(:accessReviews, + as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2AccessReview, + type: :list + ) + + field(:bindings, + as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Binding, + type: :list + ) + + field(:nodePools, + as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2NodePool, + type: :list + ) + + field(:nodes, as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Node, type: :list) + + field(:objects, + as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Object, + type: :list + ) + + field(:pods, as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Pod, type: :list) + + field(:roles, as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Role, type: :list) +end + +defimpl Poison.Decoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Kubernetes do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Kubernetes.decode(value, options) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Kubernetes do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_label.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_label.ex new file mode 100644 index 0000000000..1cccccc1a9 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_label.ex @@ -0,0 +1,49 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Label do + @moduledoc """ + 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). + + ## Attributes + + * `name` (*type:* `String.t`, *default:* `nil`) - Name of the label. + * `value` (*type:* `String.t`, *default:* `nil`) - Value that corresponds to the label's name. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :name => String.t() | nil, + :value => String.t() | nil + } + + field(:name) + field(:value) +end + +defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Label do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Label.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Label do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_load_balancer.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_load_balancer.ex new file mode 100644 index 0000000000..23c0f6392f --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_load_balancer.ex @@ -0,0 +1,51 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2LoadBalancer do + @moduledoc """ + Contains information related to the load balancer associated with the finding. + + ## Attributes + + * `name` (*type:* `String.t`, *default:* `nil`) - The name of the load balancer associated with the finding. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :name => String.t() | nil + } + + field(:name) +end + +defimpl Poison.Decoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2LoadBalancer do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2LoadBalancer.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2LoadBalancer do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_log_entry.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_log_entry.ex new file mode 100644 index 0000000000..fc80975219 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_log_entry.ex @@ -0,0 +1,50 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2LogEntry do + @moduledoc """ + An individual entry in a log. + + ## Attributes + + * `cloudLoggingEntry` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2CloudLoggingEntry.t`, *default:* `nil`) - An individual entry in a log stored in Cloud Logging. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :cloudLoggingEntry => + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2CloudLoggingEntry.t() + | nil + } + + field(:cloudLoggingEntry, + as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2CloudLoggingEntry + ) +end + +defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2LogEntry do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2LogEntry.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2LogEntry do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_memory_hash_signature.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_memory_hash_signature.ex new file mode 100644 index 0000000000..86170bf86f --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_memory_hash_signature.ex @@ -0,0 +1,59 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2MemoryHashSignature do + @moduledoc """ + A signature corresponding to memory page hashes. + + ## Attributes + + * `binaryFamily` (*type:* `String.t`, *default:* `nil`) - The binary family. + * `detections` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Detection.t)`, *default:* `nil`) - The list of memory hash detections contributing to the binary family match. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :binaryFamily => String.t() | nil, + :detections => + list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Detection.t()) | nil + } + + field(:binaryFamily) + + field(:detections, + as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Detection, + type: :list + ) +end + +defimpl Poison.Decoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2MemoryHashSignature do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2MemoryHashSignature.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2MemoryHashSignature do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_mitre_attack.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_mitre_attack.ex new file mode 100644 index 0000000000..096d32f281 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_mitre_attack.ex @@ -0,0 +1,63 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2MitreAttack do + @moduledoc """ + MITRE ATT&CK tactics and techniques related to this finding. See: https://attack.mitre.org + + ## Attributes + + * `additionalTactics` (*type:* `list(String.t)`, *default:* `nil`) - Additional MITRE ATT&CK tactics related to this finding, if any. + * `additionalTechniques` (*type:* `list(String.t)`, *default:* `nil`) - Additional MITRE ATT&CK techniques related to this finding, if any, along with any of their respective parent techniques. + * `primaryTactic` (*type:* `String.t`, *default:* `nil`) - The MITRE ATT&CK tactic most closely represented by this finding, if any. + * `primaryTechniques` (*type:* `list(String.t)`, *default:* `nil`) - 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`). + * `version` (*type:* `String.t`, *default:* `nil`) - The MITRE ATT&CK version referenced by the above fields. E.g. "8". + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :additionalTactics => list(String.t()) | nil, + :additionalTechniques => list(String.t()) | nil, + :primaryTactic => String.t() | nil, + :primaryTechniques => list(String.t()) | nil, + :version => String.t() | nil + } + + field(:additionalTactics, type: :list) + field(:additionalTechniques, type: :list) + field(:primaryTactic) + field(:primaryTechniques, type: :list) + field(:version) +end + +defimpl Poison.Decoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2MitreAttack do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2MitreAttack.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2MitreAttack do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_mute_config.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_mute_config.ex new file mode 100644 index 0000000000..6ce97cbd6e --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_mute_config.ex @@ -0,0 +1,66 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2MuteConfig do + @moduledoc """ + A mute config is a Cloud SCC resource that contains the configuration to mute create/update events of findings. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - 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. + * `description` (*type:* `String.t`, *default:* `nil`) - A description of the mute config. + * `filter` (*type:* `String.t`, *default:* `nil`) - 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: `=`, `:` + * `mostRecentEditor` (*type:* `String.t`, *default:* `nil`) - 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. + * `name` (*type:* `String.t`, *default:* `nil`) - 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}` + * `type` (*type:* `String.t`, *default:* `nil`) - Required. The type of the mute config, which determines what type of mute state the config affects. Immutable after creation. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - 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. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :description => String.t() | nil, + :filter => String.t() | nil, + :mostRecentEditor => String.t() | nil, + :name => String.t() | nil, + :type => String.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:description) + field(:filter) + field(:mostRecentEditor) + field(:name) + field(:type) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2MuteConfig do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2MuteConfig.decode(value, options) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2MuteConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_node.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_node.ex new file mode 100644 index 0000000000..d08ed573aa --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_node.ex @@ -0,0 +1,46 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Node do + @moduledoc """ + Kubernetes nodes associated with the finding. + + ## Attributes + + * `name` (*type:* `String.t`, *default:* `nil`) - [Full resource name](https://google.aip.dev/122#full-resource-names) of the Compute Engine VM running the cluster node. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :name => String.t() | nil + } + + field(:name) +end + +defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Node do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Node.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Node do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_node_pool.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_node_pool.ex new file mode 100644 index 0000000000..823f5d8bda --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_node_pool.ex @@ -0,0 +1,51 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2NodePool do + @moduledoc """ + Provides GKE node pool information. + + ## Attributes + + * `name` (*type:* `String.t`, *default:* `nil`) - Kubernetes node pool name. + * `nodes` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Node.t)`, *default:* `nil`) - Nodes associated with the finding. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :name => String.t() | nil, + :nodes => + list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Node.t()) | nil + } + + field(:name) + + field(:nodes, as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Node, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2NodePool do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2NodePool.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2NodePool do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_notification_message.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_notification_message.ex new file mode 100644 index 0000000000..036ba9a2e4 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_notification_message.ex @@ -0,0 +1,59 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2NotificationMessage do + @moduledoc """ + Cloud SCC's Notification + + ## Attributes + + * `finding` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Finding.t`, *default:* `nil`) - If it's a Finding based notification config, this field will be populated. + * `notificationConfigName` (*type:* `String.t`, *default:* `nil`) - Name of the notification config that generated current notification. + * `resource` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Resource.t`, *default:* `nil`) - The Cloud resource tied to this notification's Finding. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :finding => + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Finding.t() | nil, + :notificationConfigName => String.t() | nil, + :resource => + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Resource.t() | nil + } + + field(:finding, as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Finding) + field(:notificationConfigName) + field(:resource, as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Resource) +end + +defimpl Poison.Decoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2NotificationMessage do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2NotificationMessage.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2NotificationMessage do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_object.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_object.ex new file mode 100644 index 0000000000..ee72e8d8bd --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_object.ex @@ -0,0 +1,63 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Object do + @moduledoc """ + 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. + + ## Attributes + + * `containers` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Container.t)`, *default:* `nil`) - Pod containers associated with this finding, if any. + * `group` (*type:* `String.t`, *default:* `nil`) - Kubernetes object group, such as "policy.k8s.io/v1". + * `kind` (*type:* `String.t`, *default:* `nil`) - Kubernetes object kind, such as "Namespace". + * `name` (*type:* `String.t`, *default:* `nil`) - Kubernetes object name. For details see https://kubernetes.io/docs/concepts/overview/working-with-objects/names/. + * `ns` (*type:* `String.t`, *default:* `nil`) - 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/. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :containers => + list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Container.t()) | nil, + :group => String.t() | nil, + :kind => String.t() | nil, + :name => String.t() | nil, + :ns => String.t() | nil + } + + field(:containers, + as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Container, + type: :list + ) + + field(:group) + field(:kind) + field(:name) + field(:ns) +end + +defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Object do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Object.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Object do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_org_policy.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_org_policy.ex new file mode 100644 index 0000000000..cdc43f1e38 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_org_policy.ex @@ -0,0 +1,48 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2OrgPolicy do + @moduledoc """ + Contains information about the org policies associated with the finding. + + ## Attributes + + * `name` (*type:* `String.t`, *default:* `nil`) - The resource name of the org policy. Example: "organizations/{organization_id}/policies/{constraint_name}" + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :name => String.t() | nil + } + + field(:name) +end + +defimpl Poison.Decoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2OrgPolicy do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2OrgPolicy.decode(value, options) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2OrgPolicy do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_package.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_package.ex new file mode 100644 index 0000000000..6207663e8c --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_package.ex @@ -0,0 +1,55 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Package do + @moduledoc """ + Package is a generic definition of a package. + + ## Attributes + + * `cpeUri` (*type:* `String.t`, *default:* `nil`) - The CPE URI where the vulnerability was detected. + * `packageName` (*type:* `String.t`, *default:* `nil`) - The name of the package where the vulnerability was detected. + * `packageType` (*type:* `String.t`, *default:* `nil`) - Type of package, for example, os, maven, or go. + * `packageVersion` (*type:* `String.t`, *default:* `nil`) - The version of the package. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :cpeUri => String.t() | nil, + :packageName => String.t() | nil, + :packageType => String.t() | nil, + :packageVersion => String.t() | nil + } + + field(:cpeUri) + field(:packageName) + field(:packageType) + field(:packageVersion) +end + +defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Package do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Package.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Package do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_pod.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_pod.ex new file mode 100644 index 0000000000..f8bebcce67 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_pod.ex @@ -0,0 +1,65 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Pod do + @moduledoc """ + A Kubernetes Pod. + + ## Attributes + + * `containers` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Container.t)`, *default:* `nil`) - Pod containers associated with this finding, if any. + * `labels` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Label.t)`, *default:* `nil`) - Pod labels. For Kubernetes containers, these are applied to the container. + * `name` (*type:* `String.t`, *default:* `nil`) - Kubernetes Pod name. + * `ns` (*type:* `String.t`, *default:* `nil`) - Kubernetes Pod namespace. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :containers => + list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Container.t()) | nil, + :labels => + list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Label.t()) | nil, + :name => String.t() | nil, + :ns => String.t() | nil + } + + field(:containers, + as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Container, + type: :list + ) + + field(:labels, + as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Label, + type: :list + ) + + field(:name) + field(:ns) +end + +defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Pod do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Pod.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Pod do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_policy_drift_details.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_policy_drift_details.ex new file mode 100644 index 0000000000..c6ff3648d3 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_policy_drift_details.ex @@ -0,0 +1,57 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2PolicyDriftDetails do + @moduledoc """ + The policy field that violates the deployed posture and its expected and detected values. + + ## Attributes + + * `detectedValue` (*type:* `String.t`, *default:* `nil`) - The detected value that violates the deployed posture, for example, `false` or `allowed_values={"projects/22831892"}`. + * `expectedValue` (*type:* `String.t`, *default:* `nil`) - The value of this field that was configured in a posture, for example, `true` or `allowed_values={"projects/29831892"}`. + * `field` (*type:* `String.t`, *default:* `nil`) - The name of the updated field, for example constraint.implementation.policy_rules[0].enforce + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :detectedValue => String.t() | nil, + :expectedValue => String.t() | nil, + :field => String.t() | nil + } + + field(:detectedValue) + field(:expectedValue) + field(:field) +end + +defimpl Poison.Decoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2PolicyDriftDetails do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2PolicyDriftDetails.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2PolicyDriftDetails do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_process.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_process.ex new file mode 100644 index 0000000000..42c067bb58 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_process.ex @@ -0,0 +1,88 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Process do + @moduledoc """ + Represents an operating system process. + + ## Attributes + + * `args` (*type:* `list(String.t)`, *default:* `nil`) - Process arguments as JSON encoded strings. + * `argumentsTruncated` (*type:* `boolean()`, *default:* `nil`) - True if `args` is incomplete. + * `binary` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2File.t`, *default:* `nil`) - File information for the process executable. + * `envVariables` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2EnvironmentVariable.t)`, *default:* `nil`) - Process environment variables. + * `envVariablesTruncated` (*type:* `boolean()`, *default:* `nil`) - True if `env_variables` is incomplete. + * `libraries` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2File.t)`, *default:* `nil`) - File information for libraries loaded by the process. + * `name` (*type:* `String.t`, *default:* `nil`) - 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)`. + * `parentPid` (*type:* `String.t`, *default:* `nil`) - The parent process ID. + * `pid` (*type:* `String.t`, *default:* `nil`) - The process ID. + * `script` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2File.t`, *default:* `nil`) - 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. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :args => list(String.t()) | nil, + :argumentsTruncated => boolean() | nil, + :binary => GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2File.t() | nil, + :envVariables => + list( + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2EnvironmentVariable.t() + ) + | nil, + :envVariablesTruncated => boolean() | nil, + :libraries => + list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2File.t()) | nil, + :name => String.t() | nil, + :parentPid => String.t() | nil, + :pid => String.t() | nil, + :script => GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2File.t() | nil + } + + field(:args, type: :list) + field(:argumentsTruncated) + field(:binary, as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2File) + + field(:envVariables, + as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2EnvironmentVariable, + type: :list + ) + + field(:envVariablesTruncated) + + field(:libraries, + as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2File, + type: :list + ) + + field(:name) + field(:parentPid) + field(:pid) + field(:script, as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2File) +end + +defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Process do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Process.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Process do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v1_exposure_path.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_process_signature.ex similarity index 53% rename from clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v1_exposure_path.ex rename to clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_process_signature.ex index c3ba314cd9..a25bc94c65 100644 --- a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v1_exposure_path.ex +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_process_signature.ex @@ -15,42 +15,44 @@ # NOTE: This file is auto generated by the elixir code generator program. # Do not edit this file manually. -defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1ExposurePath do +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2ProcessSignature do @moduledoc """ - A path that an attacker could take to reach an exposed resource. + Indicates what signature matched this process. ## Attributes - * `edges` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.Edge.t)`, *default:* `nil`) - A list of the edges between nodes in this exposure path. - * `exposedResource` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1ExposedResource.t`, *default:* `nil`) - The leaf node of this exposure path. - * `name` (*type:* `String.t`, *default:* `nil`) - Exposure Path Name e.g.: `organizations/123/attackExposureResults/456/exposurePaths/789` - * `pathNodes` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.PathNode.t)`, *default:* `nil`) - A list of nodes that exist in this exposure path. + * `memoryHashSignature` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2MemoryHashSignature.t`, *default:* `nil`) - Signature indicating that a binary family was matched. + * `signatureType` (*type:* `String.t`, *default:* `nil`) - Describes the type of resource associated with the signature. + * `yaraRuleSignature` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2YaraRuleSignature.t`, *default:* `nil`) - Signature indicating that a YARA rule was matched. """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ - :edges => list(GoogleApi.SecurityCenter.V1.Model.Edge.t()) | nil, - :exposedResource => - GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1ExposedResource.t() | nil, - :name => String.t() | nil, - :pathNodes => list(GoogleApi.SecurityCenter.V1.Model.PathNode.t()) | nil + :memoryHashSignature => + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2MemoryHashSignature.t() + | nil, + :signatureType => String.t() | nil, + :yaraRuleSignature => + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2YaraRuleSignature.t() + | nil } - field(:edges, as: GoogleApi.SecurityCenter.V1.Model.Edge, type: :list) - - field(:exposedResource, - as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1ExposedResource + field(:memoryHashSignature, + as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2MemoryHashSignature ) - field(:name) - field(:pathNodes, as: GoogleApi.SecurityCenter.V1.Model.PathNode, type: :list) + field(:signatureType) + + field(:yaraRuleSignature, + as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2YaraRuleSignature + ) end defimpl Poison.Decoder, - for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1ExposurePath do + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2ProcessSignature do def decode(value, options) do - GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1ExposurePath.decode( + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2ProcessSignature.decode( value, options ) @@ -58,7 +60,7 @@ defimpl Poison.Decoder, end defimpl Poison.Encoder, - for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1ExposurePath do + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2ProcessSignature do def encode(value, options) do GoogleApi.Gax.ModelBase.encode(value, options) end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_reference.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_reference.ex new file mode 100644 index 0000000000..62e48b8f4d --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_reference.ex @@ -0,0 +1,51 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Reference do + @moduledoc """ + Additional Links + + ## Attributes + + * `source` (*type:* `String.t`, *default:* `nil`) - Source of the reference e.g. NVD + * `uri` (*type:* `String.t`, *default:* `nil`) - Uri for the mentioned source e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :source => String.t() | nil, + :uri => String.t() | nil + } + + field(:source) + field(:uri) +end + +defimpl Poison.Decoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Reference do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Reference.decode(value, options) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Reference do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_resource.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_resource.ex new file mode 100644 index 0000000000..2241e3dbd9 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_resource.ex @@ -0,0 +1,52 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Resource do + @moduledoc """ + Information related to the Google Cloud resource. + + ## Attributes + + * `displayName` (*type:* `String.t`, *default:* `nil`) - The human readable name of the resource. + * `name` (*type:* `String.t`, *default:* `nil`) - The full resource name of the resource. See: https://cloud.google.com/apis/design/resource_names#full_resource_name + * `type` (*type:* `String.t`, *default:* `nil`) - The full resource type of the resource. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :displayName => String.t() | nil, + :name => String.t() | nil, + :type => String.t() | nil + } + + field(:displayName) + field(:name) + field(:type) +end + +defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Resource do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Resource.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Resource do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_resource_value_config.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_resource_value_config.ex new file mode 100644 index 0000000000..7822bb497e --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_resource_value_config.ex @@ -0,0 +1,85 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2ResourceValueConfig do + @moduledoc """ + A resource value config (RVC) is a mapping configuration of user's resources to resource values. Used in Attack path simulations. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Timestamp this resource value config was created. + * `description` (*type:* `String.t`, *default:* `nil`) - Description of the resource value config. + * `name` (*type:* `String.t`, *default:* `nil`) - Name for the resource value config + * `resourceLabelsSelector` (*type:* `map()`, *default:* `nil`) - List of resource labels to search for, evaluated with AND. E.g. "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 + * `resourceType` (*type:* `String.t`, *default:* `nil`) - Apply resource_value only to resources that match resource_type. resource_type will be checked with "AND" of other resources. E.g. "storage.googleapis.com/Bucket" with resource_value "HIGH" will apply "HIGH" value only to "storage.googleapis.com/Bucket" resources. + * `resourceValue` (*type:* `String.t`, *default:* `nil`) - Resource value level this expression represents Only required when there is no SDP mapping in the request + * `scope` (*type:* `String.t`, *default:* `nil`) - Project or folder to scope this config to. For example, "project/456" would apply this config only to resources in "project/456" scope will be checked with "AND" of other resources. + * `sensitiveDataProtectionMapping` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2SensitiveDataProtectionMapping.t`, *default:* `nil`) - 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". + * `tagValues` (*type:* `list(String.t)`, *default:* `nil`) - Required. Tag values combined with AND to check against. Values in the form "tagValues/123" E.g. [ "tagValues/123", "tagValues/456", "tagValues/789" ] https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Timestamp this resource value config was last updated. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :description => String.t() | nil, + :name => String.t() | nil, + :resourceLabelsSelector => map() | nil, + :resourceType => String.t() | nil, + :resourceValue => String.t() | nil, + :scope => String.t() | nil, + :sensitiveDataProtectionMapping => + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2SensitiveDataProtectionMapping.t() + | nil, + :tagValues => list(String.t()) | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:description) + field(:name) + field(:resourceLabelsSelector, type: :map) + field(:resourceType) + field(:resourceValue) + field(:scope) + + field(:sensitiveDataProtectionMapping, + as: + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2SensitiveDataProtectionMapping + ) + + field(:tagValues, type: :list) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2ResourceValueConfig do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2ResourceValueConfig.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2ResourceValueConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_role.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_role.ex new file mode 100644 index 0000000000..a8a66ae798 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_role.ex @@ -0,0 +1,52 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Role do + @moduledoc """ + Kubernetes Role or ClusterRole. + + ## Attributes + + * `kind` (*type:* `String.t`, *default:* `nil`) - Role type. + * `name` (*type:* `String.t`, *default:* `nil`) - Role name. + * `ns` (*type:* `String.t`, *default:* `nil`) - Role namespace. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :kind => String.t() | nil, + :name => String.t() | nil, + :ns => String.t() | nil + } + + field(:kind) + field(:name) + field(:ns) +end + +defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Role do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Role.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Role do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_security_bulletin.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_security_bulletin.ex new file mode 100644 index 0000000000..b9c3df37ae --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_security_bulletin.ex @@ -0,0 +1,57 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2SecurityBulletin do + @moduledoc """ + SecurityBulletin are notifications of vulnerabilities of Google products. + + ## Attributes + + * `bulletinId` (*type:* `String.t`, *default:* `nil`) - ID of the bulletin corresponding to the vulnerability. + * `submissionTime` (*type:* `DateTime.t`, *default:* `nil`) - Submission time of this Security Bulletin. + * `suggestedUpgradeVersion` (*type:* `String.t`, *default:* `nil`) - This represents a version that the cluster receiving this notification should be upgraded to, based on its current version. For example, 1.15.0 + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :bulletinId => String.t() | nil, + :submissionTime => DateTime.t() | nil, + :suggestedUpgradeVersion => String.t() | nil + } + + field(:bulletinId) + field(:submissionTime, as: DateTime) + field(:suggestedUpgradeVersion) +end + +defimpl Poison.Decoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2SecurityBulletin do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2SecurityBulletin.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2SecurityBulletin do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_security_marks.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_security_marks.ex new file mode 100644 index 0000000000..c1596bc1f5 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_security_marks.ex @@ -0,0 +1,57 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2SecurityMarks do + @moduledoc """ + 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. + + ## Attributes + + * `canonicalName` (*type:* `String.t`, *default:* `nil`) - 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" + * `marks` (*type:* `map()`, *default:* `nil`) - 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) + * `name` (*type:* `String.t`, *default:* `nil`) - 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` + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :canonicalName => String.t() | nil, + :marks => map() | nil, + :name => String.t() | nil + } + + field(:canonicalName) + field(:marks, type: :map) + field(:name) +end + +defimpl Poison.Decoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2SecurityMarks do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2SecurityMarks.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2SecurityMarks do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_security_posture.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_security_posture.ex new file mode 100644 index 0000000000..9daa7939e7 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_security_posture.ex @@ -0,0 +1,81 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2SecurityPosture do + @moduledoc """ + 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. + + ## Attributes + + * `changedPolicy` (*type:* `String.t`, *default:* `nil`) - The name of the updated policy, for example, `projects/{project_id}/policies/{constraint_name}`. + * `name` (*type:* `String.t`, *default:* `nil`) - Name of the posture, for example, `CIS-Posture`. + * `policy` (*type:* `String.t`, *default:* `nil`) - The ID of the updated policy, for example, `compute-policy-1`. + * `policyDriftDetails` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2PolicyDriftDetails.t)`, *default:* `nil`) - The details about a change in an updated policy that violates the deployed posture. + * `policySet` (*type:* `String.t`, *default:* `nil`) - The name of the updated policy set, for example, `cis-policyset`. + * `postureDeployment` (*type:* `String.t`, *default:* `nil`) - The name of the posture deployment, for example, `organizations/{org_id}/posturedeployments/{posture_deployment_id}`. + * `postureDeploymentResource` (*type:* `String.t`, *default:* `nil`) - The project, folder, or organization on which the posture is deployed, for example, `projects/{project_number}`. + * `revisionId` (*type:* `String.t`, *default:* `nil`) - The version of the posture, for example, `c7cfa2a8`. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :changedPolicy => String.t() | nil, + :name => String.t() | nil, + :policy => String.t() | nil, + :policyDriftDetails => + list( + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2PolicyDriftDetails.t() + ) + | nil, + :policySet => String.t() | nil, + :postureDeployment => String.t() | nil, + :postureDeploymentResource => String.t() | nil, + :revisionId => String.t() | nil + } + + field(:changedPolicy) + field(:name) + field(:policy) + + field(:policyDriftDetails, + as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2PolicyDriftDetails, + type: :list + ) + + field(:policySet) + field(:postureDeployment) + field(:postureDeploymentResource) + field(:revisionId) +end + +defimpl Poison.Decoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2SecurityPosture do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2SecurityPosture.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2SecurityPosture do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_sensitive_data_protection_mapping.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_sensitive_data_protection_mapping.ex new file mode 100644 index 0000000000..789db82247 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_sensitive_data_protection_mapping.ex @@ -0,0 +1,54 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2SensitiveDataProtectionMapping do + @moduledoc """ + 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. + + ## Attributes + + * `highSensitivityMapping` (*type:* `String.t`, *default:* `nil`) - Resource value mapping for high-sensitivity Sensitive Data Protection findings + * `mediumSensitivityMapping` (*type:* `String.t`, *default:* `nil`) - Resource value mapping for medium-sensitivity Sensitive Data Protection findings + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :highSensitivityMapping => String.t() | nil, + :mediumSensitivityMapping => String.t() | nil + } + + field(:highSensitivityMapping) + field(:mediumSensitivityMapping) +end + +defimpl Poison.Decoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2SensitiveDataProtectionMapping do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2SensitiveDataProtectionMapping.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2SensitiveDataProtectionMapping do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_service_account_delegation_info.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_service_account_delegation_info.ex new file mode 100644 index 0000000000..fedfc1d2e3 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_service_account_delegation_info.ex @@ -0,0 +1,54 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2ServiceAccountDelegationInfo do + @moduledoc """ + Identity delegation history of an authenticated service account. + + ## Attributes + + * `principalEmail` (*type:* `String.t`, *default:* `nil`) - The email address of a Google account. + * `principalSubject` (*type:* `String.t`, *default:* `nil`) - 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}]` + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :principalEmail => String.t() | nil, + :principalSubject => String.t() | nil + } + + field(:principalEmail) + field(:principalSubject) +end + +defimpl Poison.Decoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2ServiceAccountDelegationInfo do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2ServiceAccountDelegationInfo.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2ServiceAccountDelegationInfo do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_subject.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_subject.ex new file mode 100644 index 0000000000..ba65d60580 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_subject.ex @@ -0,0 +1,52 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Subject do + @moduledoc """ + Represents a Kubernetes subject. + + ## Attributes + + * `kind` (*type:* `String.t`, *default:* `nil`) - Authentication type for the subject. + * `name` (*type:* `String.t`, *default:* `nil`) - Name for the subject. + * `ns` (*type:* `String.t`, *default:* `nil`) - Namespace for the subject. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :kind => String.t() | nil, + :name => String.t() | nil, + :ns => String.t() | nil + } + + field(:kind) + field(:name) + field(:ns) +end + +defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Subject do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Subject.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Subject do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_ticket_info.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_ticket_info.ex new file mode 100644 index 0000000000..8ffd31a623 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_ticket_info.ex @@ -0,0 +1,63 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2TicketInfo do + @moduledoc """ + Information about the ticket, if any, that is being used to track the resolution of the issue that is identified by this finding. + + ## Attributes + + * `assignee` (*type:* `String.t`, *default:* `nil`) - The assignee of the ticket in the ticket system. + * `description` (*type:* `String.t`, *default:* `nil`) - The description of the ticket in the ticket system. + * `id` (*type:* `String.t`, *default:* `nil`) - The identifier of the ticket in the ticket system. + * `status` (*type:* `String.t`, *default:* `nil`) - The latest status of the ticket, as reported by the ticket system. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - The time when the ticket was last updated, as reported by the ticket system. + * `uri` (*type:* `String.t`, *default:* `nil`) - The link to the ticket in the ticket system. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :assignee => String.t() | nil, + :description => String.t() | nil, + :id => String.t() | nil, + :status => String.t() | nil, + :updateTime => DateTime.t() | nil, + :uri => String.t() | nil + } + + field(:assignee) + field(:description) + field(:id) + field(:status) + field(:updateTime, as: DateTime) + field(:uri) +end + +defimpl Poison.Decoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2TicketInfo do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2TicketInfo.decode(value, options) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2TicketInfo do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_vulnerability.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_vulnerability.ex new file mode 100644 index 0000000000..a19c36a278 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_vulnerability.ex @@ -0,0 +1,70 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Vulnerability do + @moduledoc """ + Refers to common vulnerability fields e.g. cve, cvss, cwe etc. + + ## Attributes + + * `cve` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Cve.t`, *default:* `nil`) - CVE stands for Common Vulnerabilities and Exposures (https://cve.mitre.org/about/) + * `fixedPackage` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Package.t`, *default:* `nil`) - The fixed package is relevant to the finding. + * `offendingPackage` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Package.t`, *default:* `nil`) - The offending package is relevant to the finding. + * `securityBulletin` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2SecurityBulletin.t`, *default:* `nil`) - The security bulletin is relevant to this finding. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :cve => GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Cve.t() | nil, + :fixedPackage => + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Package.t() | nil, + :offendingPackage => + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Package.t() | nil, + :securityBulletin => + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2SecurityBulletin.t() + | nil + } + + field(:cve, as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Cve) + field(:fixedPackage, as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Package) + + field(:offendingPackage, + as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Package + ) + + field(:securityBulletin, + as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2SecurityBulletin + ) +end + +defimpl Poison.Decoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Vulnerability do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Vulnerability.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2Vulnerability do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_yara_rule_signature.ex b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_yara_rule_signature.ex new file mode 100644 index 0000000000..f280934646 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/google_cloud_securitycenter_v2_yara_rule_signature.ex @@ -0,0 +1,51 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2YaraRuleSignature do + @moduledoc """ + A signature corresponding to a YARA rule. + + ## Attributes + + * `yaraRule` (*type:* `String.t`, *default:* `nil`) - The name of the YARA rule. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :yaraRule => String.t() | nil + } + + field(:yaraRule) +end + +defimpl Poison.Decoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2YaraRuleSignature do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2YaraRuleSignature.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV2YaraRuleSignature do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/iam_binding.ex b/clients/security_center/lib/google_api/security_center/v1/model/iam_binding.ex index cc8db6d8fd..03271ab271 100644 --- a/clients/security_center/lib/google_api/security_center/v1/model/iam_binding.ex +++ b/clients/security_center/lib/google_api/security_center/v1/model/iam_binding.ex @@ -22,7 +22,7 @@ defmodule GoogleApi.SecurityCenter.V1.Model.IamBinding do ## Attributes * `action` (*type:* `String.t`, *default:* `nil`) - The action that was performed on a Binding. - * `member` (*type:* `String.t`, *default:* `nil`) - A single identity requesting access for a Cloud Platform resource, e.g. "foo@google.com". + * `member` (*type:* `String.t`, *default:* `nil`) - A single identity requesting access for a Cloud Platform resource, for example, "foo@google.com". * `role` (*type:* `String.t`, *default:* `nil`) - Role that is assigned to "members". For example, "roles/viewer", "roles/editor", or "roles/owner". """ diff --git a/clients/security_center/lib/google_api/security_center/v1/model/indicator.ex b/clients/security_center/lib/google_api/security_center/v1/model/indicator.ex index 45da6ee088..1efbb7add6 100644 --- a/clients/security_center/lib/google_api/security_center/v1/model/indicator.ex +++ b/clients/security_center/lib/google_api/security_center/v1/model/indicator.ex @@ -17,12 +17,12 @@ defmodule GoogleApi.SecurityCenter.V1.Model.Indicator do @moduledoc """ - 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. Reference: https://en.wikipedia.org/wiki/Indicator_of_compromise + 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). ## Attributes * `domains` (*type:* `list(String.t)`, *default:* `nil`) - List of domains associated to the Finding. - * `ipAddresses` (*type:* `list(String.t)`, *default:* `nil`) - List of ip addresses associated to the Finding. + * `ipAddresses` (*type:* `list(String.t)`, *default:* `nil`) - The list of IP addresses that are associated with the finding. * `signatures` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.ProcessSignature.t)`, *default:* `nil`) - The list of matched signatures indicating that the given process is present in the environment. * `uris` (*type:* `list(String.t)`, *default:* `nil`) - The list of URIs associated to the Findings. """ diff --git a/clients/security_center/lib/google_api/security_center/v1/model/kernel_rootkit.ex b/clients/security_center/lib/google_api/security_center/v1/model/kernel_rootkit.ex new file mode 100644 index 0000000000..14a36b13cb --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/kernel_rootkit.ex @@ -0,0 +1,70 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.KernelRootkit do + @moduledoc """ + Kernel mode rootkit signatures. + + ## Attributes + + * `name` (*type:* `String.t`, *default:* `nil`) - Rootkit name, when available. + * `unexpectedCodeModification` (*type:* `boolean()`, *default:* `nil`) - True if unexpected modifications of kernel code memory are present. + * `unexpectedFtraceHandler` (*type:* `boolean()`, *default:* `nil`) - True if `ftrace` points are present with callbacks pointing to regions that are not in the expected kernel or module code range. + * `unexpectedInterruptHandler` (*type:* `boolean()`, *default:* `nil`) - True if interrupt handlers that are are not in the expected kernel or module code regions are present. + * `unexpectedKernelCodePages` (*type:* `boolean()`, *default:* `nil`) - True if kernel code pages that are not in the expected kernel or module code regions are present. + * `unexpectedKprobeHandler` (*type:* `boolean()`, *default:* `nil`) - True if `kprobe` points are present with callbacks pointing to regions that are not in the expected kernel or module code range. + * `unexpectedProcessesInRunqueue` (*type:* `boolean()`, *default:* `nil`) - 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. + * `unexpectedReadOnlyDataModification` (*type:* `boolean()`, *default:* `nil`) - True if unexpected modifications of kernel read-only data memory are present. + * `unexpectedSystemCallHandler` (*type:* `boolean()`, *default:* `nil`) - True if system call handlers that are are not in the expected kernel or module code regions are present. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :name => String.t() | nil, + :unexpectedCodeModification => boolean() | nil, + :unexpectedFtraceHandler => boolean() | nil, + :unexpectedInterruptHandler => boolean() | nil, + :unexpectedKernelCodePages => boolean() | nil, + :unexpectedKprobeHandler => boolean() | nil, + :unexpectedProcessesInRunqueue => boolean() | nil, + :unexpectedReadOnlyDataModification => boolean() | nil, + :unexpectedSystemCallHandler => boolean() | nil + } + + field(:name) + field(:unexpectedCodeModification) + field(:unexpectedFtraceHandler) + field(:unexpectedInterruptHandler) + field(:unexpectedKernelCodePages) + field(:unexpectedKprobeHandler) + field(:unexpectedProcessesInRunqueue) + field(:unexpectedReadOnlyDataModification) + field(:unexpectedSystemCallHandler) +end + +defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.KernelRootkit do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.KernelRootkit.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.SecurityCenter.V1.Model.KernelRootkit do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/kubernetes.ex b/clients/security_center/lib/google_api/security_center/v1/model/kubernetes.ex index fc856df34b..e11d6a75d4 100644 --- a/clients/security_center/lib/google_api/security_center/v1/model/kubernetes.ex +++ b/clients/security_center/lib/google_api/security_center/v1/model/kubernetes.ex @@ -17,16 +17,17 @@ defmodule GoogleApi.SecurityCenter.V1.Model.Kubernetes do @moduledoc """ - Kubernetes related attributes. + Kubernetes-related attributes. ## Attributes - * `accessReviews` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.AccessReview.t)`, *default:* `nil`) - Provides information on any Kubernetes access reviews (i.e. privilege checks) relevant to the finding. - * `bindings` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1Binding.t)`, *default:* `nil`) - Provides Kubernetes role binding information for findings that involve RoleBindings or ClusterRoleBindings. - * `nodePools` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.NodePool.t)`, *default:* `nil`) - GKE Node Pools associated with the finding. This field will contain NodePool information for each Node, when it is available. - * `nodes` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.Node.t)`, *default:* `nil`) - Provides Kubernetes Node information. - * `pods` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.Pod.t)`, *default:* `nil`) - Kubernetes Pods associated with the finding. This field will contain Pod records for each container that is owned by a Pod. - * `roles` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.Role.t)`, *default:* `nil`) - Provides Kubernetes role information for findings that involve Roles or ClusterRoles. + * `accessReviews` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.AccessReview.t)`, *default:* `nil`) - Provides information on any Kubernetes access reviews (privilege checks) relevant to the finding. + * `bindings` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1Binding.t)`, *default:* `nil`) - 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). + * `nodePools` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.NodePool.t)`, *default:* `nil`) - 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. + * `nodes` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.Node.t)`, *default:* `nil`) - Provides Kubernetes [node](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture#nodes) information. + * `objects` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.Object.t)`, *default:* `nil`) - Kubernetes objects related to the finding. + * `pods` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.Pod.t)`, *default:* `nil`) - 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. + * `roles` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.Role.t)`, *default:* `nil`) - Provides Kubernetes role information for findings that involve [Roles or ClusterRoles](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control). """ use GoogleApi.Gax.ModelBase @@ -37,6 +38,7 @@ defmodule GoogleApi.SecurityCenter.V1.Model.Kubernetes do list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1Binding.t()) | nil, :nodePools => list(GoogleApi.SecurityCenter.V1.Model.NodePool.t()) | nil, :nodes => list(GoogleApi.SecurityCenter.V1.Model.Node.t()) | nil, + :objects => list(GoogleApi.SecurityCenter.V1.Model.Object.t()) | nil, :pods => list(GoogleApi.SecurityCenter.V1.Model.Pod.t()) | nil, :roles => list(GoogleApi.SecurityCenter.V1.Model.Role.t()) | nil } @@ -50,6 +52,7 @@ defmodule GoogleApi.SecurityCenter.V1.Model.Kubernetes do field(:nodePools, as: GoogleApi.SecurityCenter.V1.Model.NodePool, type: :list) field(:nodes, as: GoogleApi.SecurityCenter.V1.Model.Node, type: :list) + field(:objects, as: GoogleApi.SecurityCenter.V1.Model.Object, type: :list) field(:pods, as: GoogleApi.SecurityCenter.V1.Model.Pod, type: :list) field(:roles, as: GoogleApi.SecurityCenter.V1.Model.Role, type: :list) end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/label.ex b/clients/security_center/lib/google_api/security_center/v1/model/label.ex index 8413f227cc..9bcf2f1aa0 100644 --- a/clients/security_center/lib/google_api/security_center/v1/model/label.ex +++ b/clients/security_center/lib/google_api/security_center/v1/model/label.ex @@ -17,12 +17,12 @@ defmodule GoogleApi.SecurityCenter.V1.Model.Label do @moduledoc """ - Label represents a generic name=value label. Label has separate name and value fields to support filtering with contains(). + 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). ## Attributes - * `name` (*type:* `String.t`, *default:* `nil`) - Label name. - * `value` (*type:* `String.t`, *default:* `nil`) - Label value. + * `name` (*type:* `String.t`, *default:* `nil`) - Name of the label. + * `value` (*type:* `String.t`, *default:* `nil`) - Value that corresponds to the label's name. """ use GoogleApi.Gax.ModelBase diff --git a/clients/security_center/lib/google_api/security_center/v1/model/list_attack_paths_response.ex b/clients/security_center/lib/google_api/security_center/v1/model/list_attack_paths_response.ex new file mode 100644 index 0000000000..8d0af35fb3 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/list_attack_paths_response.ex @@ -0,0 +1,49 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.ListAttackPathsResponse do + @moduledoc """ + Response message for listing the attack paths for a given simulation or valued resource. + + ## Attributes + + * `attackPaths` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.AttackPath.t)`, *default:* `nil`) - The attack paths that the attack path simulation identified. + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - Token to retrieve the next page of results, or empty if there are no more results. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :attackPaths => list(GoogleApi.SecurityCenter.V1.Model.AttackPath.t()) | nil, + :nextPageToken => String.t() | nil + } + + field(:attackPaths, as: GoogleApi.SecurityCenter.V1.Model.AttackPath, type: :list) + field(:nextPageToken) +end + +defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.ListAttackPathsResponse do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.ListAttackPathsResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.SecurityCenter.V1.Model.ListAttackPathsResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/list_descendant_event_threat_detection_custom_modules_response.ex b/clients/security_center/lib/google_api/security_center/v1/model/list_descendant_event_threat_detection_custom_modules_response.ex new file mode 100644 index 0000000000..fa5ee66209 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/list_descendant_event_threat_detection_custom_modules_response.ex @@ -0,0 +1,59 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.ListDescendantEventThreatDetectionCustomModulesResponse do + @moduledoc """ + Response for listing current and descendant resident Event Threat Detection custom modules. + + ## Attributes + + * `eventThreatDetectionCustomModules` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.EventThreatDetectionCustomModule.t)`, *default:* `nil`) - Custom modules belonging to the requested parent. + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :eventThreatDetectionCustomModules => + list(GoogleApi.SecurityCenter.V1.Model.EventThreatDetectionCustomModule.t()) | nil, + :nextPageToken => String.t() | nil + } + + field(:eventThreatDetectionCustomModules, + as: GoogleApi.SecurityCenter.V1.Model.EventThreatDetectionCustomModule, + type: :list + ) + + field(:nextPageToken) +end + +defimpl Poison.Decoder, + for: GoogleApi.SecurityCenter.V1.Model.ListDescendantEventThreatDetectionCustomModulesResponse do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.ListDescendantEventThreatDetectionCustomModulesResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.SecurityCenter.V1.Model.ListDescendantEventThreatDetectionCustomModulesResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/list_descendant_security_health_analytics_custom_modules_response.ex b/clients/security_center/lib/google_api/security_center/v1/model/list_descendant_security_health_analytics_custom_modules_response.ex new file mode 100644 index 0000000000..1b75aff344 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/list_descendant_security_health_analytics_custom_modules_response.ex @@ -0,0 +1,65 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.ListDescendantSecurityHealthAnalyticsCustomModulesResponse do + @moduledoc """ + Response message for listing descendant Security Health Analytics custom modules. + + ## Attributes + + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - If not empty, indicates that there may be more custom modules to be returned. + * `securityHealthAnalyticsCustomModules` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule.t)`, *default:* `nil`) - Custom modules belonging to the requested parent and its descendants. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :nextPageToken => String.t() | nil, + :securityHealthAnalyticsCustomModules => + list( + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule.t() + ) + | nil + } + + field(:nextPageToken) + + field(:securityHealthAnalyticsCustomModules, + as: + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule, + type: :list + ) +end + +defimpl Poison.Decoder, + for: + GoogleApi.SecurityCenter.V1.Model.ListDescendantSecurityHealthAnalyticsCustomModulesResponse do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.ListDescendantSecurityHealthAnalyticsCustomModulesResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: + GoogleApi.SecurityCenter.V1.Model.ListDescendantSecurityHealthAnalyticsCustomModulesResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/list_effective_event_threat_detection_custom_modules_response.ex b/clients/security_center/lib/google_api/security_center/v1/model/list_effective_event_threat_detection_custom_modules_response.ex new file mode 100644 index 0000000000..1645fa1bd0 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/list_effective_event_threat_detection_custom_modules_response.ex @@ -0,0 +1,60 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.ListEffectiveEventThreatDetectionCustomModulesResponse do + @moduledoc """ + Response for listing EffectiveEventThreatDetectionCustomModules. + + ## Attributes + + * `effectiveEventThreatDetectionCustomModules` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.EffectiveEventThreatDetectionCustomModule.t)`, *default:* `nil`) - Effective custom modules belonging to the requested parent. + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :effectiveEventThreatDetectionCustomModules => + list(GoogleApi.SecurityCenter.V1.Model.EffectiveEventThreatDetectionCustomModule.t()) + | nil, + :nextPageToken => String.t() | nil + } + + field(:effectiveEventThreatDetectionCustomModules, + as: GoogleApi.SecurityCenter.V1.Model.EffectiveEventThreatDetectionCustomModule, + type: :list + ) + + field(:nextPageToken) +end + +defimpl Poison.Decoder, + for: GoogleApi.SecurityCenter.V1.Model.ListEffectiveEventThreatDetectionCustomModulesResponse do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.ListEffectiveEventThreatDetectionCustomModulesResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.SecurityCenter.V1.Model.ListEffectiveEventThreatDetectionCustomModulesResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/list_effective_security_health_analytics_custom_modules_response.ex b/clients/security_center/lib/google_api/security_center/v1/model/list_effective_security_health_analytics_custom_modules_response.ex new file mode 100644 index 0000000000..7904377a21 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/list_effective_security_health_analytics_custom_modules_response.ex @@ -0,0 +1,63 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse do + @moduledoc """ + Response message for listing effective Security Health Analytics custom modules. + + ## Attributes + + * `effectiveSecurityHealthAnalyticsCustomModules` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1EffectiveSecurityHealthAnalyticsCustomModule.t)`, *default:* `nil`) - Effective custom modules belonging to the requested parent. + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - If not empty, indicates that there may be more effective custom modules to be returned. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :effectiveSecurityHealthAnalyticsCustomModules => + list( + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1EffectiveSecurityHealthAnalyticsCustomModule.t() + ) + | nil, + :nextPageToken => String.t() | nil + } + + field(:effectiveSecurityHealthAnalyticsCustomModules, + as: + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1EffectiveSecurityHealthAnalyticsCustomModule, + type: :list + ) + + field(:nextPageToken) +end + +defimpl Poison.Decoder, + for: GoogleApi.SecurityCenter.V1.Model.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.SecurityCenter.V1.Model.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/list_event_threat_detection_custom_modules_response.ex b/clients/security_center/lib/google_api/security_center/v1/model/list_event_threat_detection_custom_modules_response.ex new file mode 100644 index 0000000000..72a44c3c30 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/list_event_threat_detection_custom_modules_response.ex @@ -0,0 +1,59 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.ListEventThreatDetectionCustomModulesResponse do + @moduledoc """ + Response for listing Event Threat Detection custom modules. + + ## Attributes + + * `eventThreatDetectionCustomModules` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.EventThreatDetectionCustomModule.t)`, *default:* `nil`) - Custom modules belonging to the requested parent. + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :eventThreatDetectionCustomModules => + list(GoogleApi.SecurityCenter.V1.Model.EventThreatDetectionCustomModule.t()) | nil, + :nextPageToken => String.t() | nil + } + + field(:eventThreatDetectionCustomModules, + as: GoogleApi.SecurityCenter.V1.Model.EventThreatDetectionCustomModule, + type: :list + ) + + field(:nextPageToken) +end + +defimpl Poison.Decoder, + for: GoogleApi.SecurityCenter.V1.Model.ListEventThreatDetectionCustomModulesResponse do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.ListEventThreatDetectionCustomModulesResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.SecurityCenter.V1.Model.ListEventThreatDetectionCustomModulesResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/list_resource_value_configs_response.ex b/clients/security_center/lib/google_api/security_center/v1/model/list_resource_value_configs_response.ex new file mode 100644 index 0000000000..7332e8032a --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/list_resource_value_configs_response.ex @@ -0,0 +1,57 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.ListResourceValueConfigsResponse do + @moduledoc """ + Response message to list resource value configs + + ## Attributes + + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - A token, which can be sent as `page_token` to retrieve the next page. If this field is empty, there are no subsequent pages. + * `resourceValueConfigs` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1ResourceValueConfig.t)`, *default:* `nil`) - The resource value configs from the specified parent. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :nextPageToken => String.t() | nil, + :resourceValueConfigs => + list( + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1ResourceValueConfig.t() + ) + | nil + } + + field(:nextPageToken) + + field(:resourceValueConfigs, + as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1ResourceValueConfig, + type: :list + ) +end + +defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.ListResourceValueConfigsResponse do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.ListResourceValueConfigsResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.SecurityCenter.V1.Model.ListResourceValueConfigsResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/list_security_health_analytics_custom_modules_response.ex b/clients/security_center/lib/google_api/security_center/v1/model/list_security_health_analytics_custom_modules_response.ex new file mode 100644 index 0000000000..9cfd3e5f9e --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/list_security_health_analytics_custom_modules_response.ex @@ -0,0 +1,63 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.ListSecurityHealthAnalyticsCustomModulesResponse do + @moduledoc """ + Response message for listing Security Health Analytics custom modules. + + ## Attributes + + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - If not empty, indicates that there may be more custom modules to be returned. + * `securityHealthAnalyticsCustomModules` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule.t)`, *default:* `nil`) - Custom modules belonging to the requested parent. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :nextPageToken => String.t() | nil, + :securityHealthAnalyticsCustomModules => + list( + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule.t() + ) + | nil + } + + field(:nextPageToken) + + field(:securityHealthAnalyticsCustomModules, + as: + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule, + type: :list + ) +end + +defimpl Poison.Decoder, + for: GoogleApi.SecurityCenter.V1.Model.ListSecurityHealthAnalyticsCustomModulesResponse do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.ListSecurityHealthAnalyticsCustomModulesResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.SecurityCenter.V1.Model.ListSecurityHealthAnalyticsCustomModulesResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/list_valued_resources_response.ex b/clients/security_center/lib/google_api/security_center/v1/model/list_valued_resources_response.ex new file mode 100644 index 0000000000..24fec35966 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/list_valued_resources_response.ex @@ -0,0 +1,52 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.ListValuedResourcesResponse do + @moduledoc """ + Response message for listing the valued resources for a given simulation. + + ## Attributes + + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - Token to retrieve the next page of results, or empty if there are no more results. + * `totalSize` (*type:* `integer()`, *default:* `nil`) - The estimated total number of results matching the query. + * `valuedResources` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.ValuedResource.t)`, *default:* `nil`) - The valued resources that the attack path simulation identified. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :nextPageToken => String.t() | nil, + :totalSize => integer() | nil, + :valuedResources => list(GoogleApi.SecurityCenter.V1.Model.ValuedResource.t()) | nil + } + + field(:nextPageToken) + field(:totalSize) + field(:valuedResources, as: GoogleApi.SecurityCenter.V1.Model.ValuedResource, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.ListValuedResourcesResponse do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.ListValuedResourcesResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.SecurityCenter.V1.Model.ListValuedResourcesResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/load_balancer.ex b/clients/security_center/lib/google_api/security_center/v1/model/load_balancer.ex new file mode 100644 index 0000000000..fe9364524b --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/load_balancer.ex @@ -0,0 +1,46 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.LoadBalancer do + @moduledoc """ + Contains information related to the load balancer associated with the finding. + + ## Attributes + + * `name` (*type:* `String.t`, *default:* `nil`) - The name of the load balancer associated with the finding. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :name => String.t() | nil + } + + field(:name) +end + +defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.LoadBalancer do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.LoadBalancer.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.SecurityCenter.V1.Model.LoadBalancer do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/log_entry.ex b/clients/security_center/lib/google_api/security_center/v1/model/log_entry.ex new file mode 100644 index 0000000000..394408f577 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/log_entry.ex @@ -0,0 +1,46 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.LogEntry do + @moduledoc """ + An individual entry in a log. + + ## Attributes + + * `cloudLoggingEntry` (*type:* `GoogleApi.SecurityCenter.V1.Model.CloudLoggingEntry.t`, *default:* `nil`) - An individual entry in a log stored in Cloud Logging. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :cloudLoggingEntry => GoogleApi.SecurityCenter.V1.Model.CloudLoggingEntry.t() | nil + } + + field(:cloudLoggingEntry, as: GoogleApi.SecurityCenter.V1.Model.CloudLoggingEntry) +end + +defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.LogEntry do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.LogEntry.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.SecurityCenter.V1.Model.LogEntry do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/node.ex b/clients/security_center/lib/google_api/security_center/v1/model/node.ex index 0fbb232946..26756d9c38 100644 --- a/clients/security_center/lib/google_api/security_center/v1/model/node.ex +++ b/clients/security_center/lib/google_api/security_center/v1/model/node.ex @@ -17,11 +17,11 @@ defmodule GoogleApi.SecurityCenter.V1.Model.Node do @moduledoc """ - Kubernetes Nodes associated with the finding. + Kubernetes nodes associated with the finding. ## Attributes - * `name` (*type:* `String.t`, *default:* `nil`) - Full Resource name of the Compute Engine VM running the cluster node. + * `name` (*type:* `String.t`, *default:* `nil`) - [Full resource name](https://google.aip.dev/122#full-resource-names) of the Compute Engine VM running the cluster node. """ use GoogleApi.Gax.ModelBase diff --git a/clients/security_center/lib/google_api/security_center/v1/model/node_pool.ex b/clients/security_center/lib/google_api/security_center/v1/model/node_pool.ex index 0bc7b82a85..77a9256521 100644 --- a/clients/security_center/lib/google_api/security_center/v1/model/node_pool.ex +++ b/clients/security_center/lib/google_api/security_center/v1/model/node_pool.ex @@ -17,11 +17,11 @@ defmodule GoogleApi.SecurityCenter.V1.Model.NodePool do @moduledoc """ - Provides GKE Node Pool information. + Provides GKE node pool information. ## Attributes - * `name` (*type:* `String.t`, *default:* `nil`) - Kubernetes Node pool name. + * `name` (*type:* `String.t`, *default:* `nil`) - Kubernetes node pool name. * `nodes` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.Node.t)`, *default:* `nil`) - Nodes associated with the finding. """ diff --git a/clients/security_center/lib/google_api/security_center/v1/model/notification_config.ex b/clients/security_center/lib/google_api/security_center/v1/model/notification_config.ex index 4341106c82..ed5003caf7 100644 --- a/clients/security_center/lib/google_api/security_center/v1/model/notification_config.ex +++ b/clients/security_center/lib/google_api/security_center/v1/model/notification_config.ex @@ -22,7 +22,7 @@ defmodule GoogleApi.SecurityCenter.V1.Model.NotificationConfig do ## Attributes * `description` (*type:* `String.t`, *default:* `nil`) - The description of the notification config (max of 1024 characters). - * `name` (*type:* `String.t`, *default:* `nil`) - The relative resource name of this notification config. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: "organizations/{organization_id}/notificationConfigs/notify_public_bucket". + * `name` (*type:* `String.t`, *default:* `nil`) - The relative resource name of this notification config. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: "organizations/{organization_id}/notificationConfigs/notify_public_bucket", "folders/{folder_id}/notificationConfigs/notify_public_bucket", or "projects/{project_id}/notificationConfigs/notify_public_bucket". * `pubsubTopic` (*type:* `String.t`, *default:* `nil`) - The Pub/Sub topic to send notifications to. Its format is "projects/[project_id]/topics/[topic]". * `serviceAccount` (*type:* `String.t`, *default:* `nil`) - Output only. The service account that needs "pubsub.topics.publish" permission to publish to the Pub/Sub topic. * `streamingConfig` (*type:* `GoogleApi.SecurityCenter.V1.Model.StreamingConfig.t`, *default:* `nil`) - The config for triggering streaming-based notifications. diff --git a/clients/security_center/lib/google_api/security_center/v1/model/object.ex b/clients/security_center/lib/google_api/security_center/v1/model/object.ex new file mode 100644 index 0000000000..aa49b81fe6 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/object.ex @@ -0,0 +1,58 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.Object do + @moduledoc """ + 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. + + ## Attributes + + * `containers` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.Container.t)`, *default:* `nil`) - Pod containers associated with this finding, if any. + * `group` (*type:* `String.t`, *default:* `nil`) - Kubernetes object group, such as "policy.k8s.io/v1". + * `kind` (*type:* `String.t`, *default:* `nil`) - Kubernetes object kind, such as "Namespace". + * `name` (*type:* `String.t`, *default:* `nil`) - Kubernetes object name. For details see https://kubernetes.io/docs/concepts/overview/working-with-objects/names/. + * `ns` (*type:* `String.t`, *default:* `nil`) - 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/. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :containers => list(GoogleApi.SecurityCenter.V1.Model.Container.t()) | nil, + :group => String.t() | nil, + :kind => String.t() | nil, + :name => String.t() | nil, + :ns => String.t() | nil + } + + field(:containers, as: GoogleApi.SecurityCenter.V1.Model.Container, type: :list) + field(:group) + field(:kind) + field(:name) + field(:ns) +end + +defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.Object do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.Object.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.SecurityCenter.V1.Model.Object do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/operation.ex b/clients/security_center/lib/google_api/security_center/v1/model/operation.ex index 1949869ce8..5d3be82eff 100644 --- a/clients/security_center/lib/google_api/security_center/v1/model/operation.ex +++ b/clients/security_center/lib/google_api/security_center/v1/model/operation.ex @@ -25,7 +25,7 @@ defmodule GoogleApi.SecurityCenter.V1.Model.Operation do * `error` (*type:* `GoogleApi.SecurityCenter.V1.Model.Status.t`, *default:* `nil`) - The error result of the operation in case of failure or cancellation. * `metadata` (*type:* `map()`, *default:* `nil`) - 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. * `name` (*type:* `String.t`, *default:* `nil`) - 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}`. - * `response` (*type:* `map()`, *default:* `nil`) - The normal response of the operation in case of success. 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`. + * `response` (*type:* `map()`, *default:* `nil`) - 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`. """ use GoogleApi.Gax.ModelBase diff --git a/clients/security_center/lib/google_api/security_center/v1/model/org_policy.ex b/clients/security_center/lib/google_api/security_center/v1/model/org_policy.ex new file mode 100644 index 0000000000..56af01889c --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/org_policy.ex @@ -0,0 +1,46 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.OrgPolicy do + @moduledoc """ + Contains information about the org policies associated with the finding. + + ## Attributes + + * `name` (*type:* `String.t`, *default:* `nil`) - The resource name of the org policy. Example: "organizations/{organization_id}/policies/{constraint_name}" + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :name => String.t() | nil + } + + field(:name) +end + +defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.OrgPolicy do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.OrgPolicy.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.SecurityCenter.V1.Model.OrgPolicy do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/organization_settings.ex b/clients/security_center/lib/google_api/security_center/v1/model/organization_settings.ex index c2c8886555..225f29faec 100644 --- a/clients/security_center/lib/google_api/security_center/v1/model/organization_settings.ex +++ b/clients/security_center/lib/google_api/security_center/v1/model/organization_settings.ex @@ -22,7 +22,7 @@ defmodule GoogleApi.SecurityCenter.V1.Model.OrganizationSettings do ## Attributes * `assetDiscoveryConfig` (*type:* `GoogleApi.SecurityCenter.V1.Model.AssetDiscoveryConfig.t`, *default:* `nil`) - The configuration used for Asset Discovery runs. - * `enableAssetDiscovery` (*type:* `boolean()`, *default:* `nil`) - A flag that indicates if Asset Discovery should be enabled. If the flag is set to `true`, then discovery of assets will occur. If it is set to `false, all historical assets will remain, but discovery of future assets will not occur. + * `enableAssetDiscovery` (*type:* `boolean()`, *default:* `nil`) - A flag that indicates if Asset Discovery should be enabled. If the flag is set to `true`, then discovery of assets will occur. If it is set to `false`, all historical assets will remain, but discovery of future assets will not occur. * `name` (*type:* `String.t`, *default:* `nil`) - The relative resource name of the settings. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: "organizations/{organization_id}/organizationSettings". """ diff --git a/clients/security_center/lib/google_api/security_center/v1/model/package.ex b/clients/security_center/lib/google_api/security_center/v1/model/package.ex new file mode 100644 index 0000000000..c942e462db --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/package.ex @@ -0,0 +1,55 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.Package do + @moduledoc """ + Package is a generic definition of a package. + + ## Attributes + + * `cpeUri` (*type:* `String.t`, *default:* `nil`) - The CPE URI where the vulnerability was detected. + * `packageName` (*type:* `String.t`, *default:* `nil`) - The name of the package where the vulnerability was detected. + * `packageType` (*type:* `String.t`, *default:* `nil`) - Type of package, for example, os, maven, or go. + * `packageVersion` (*type:* `String.t`, *default:* `nil`) - The version of the package. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :cpeUri => String.t() | nil, + :packageName => String.t() | nil, + :packageType => String.t() | nil, + :packageVersion => String.t() | nil + } + + field(:cpeUri) + field(:packageName) + field(:packageType) + field(:packageVersion) +end + +defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.Package do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.Package.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.SecurityCenter.V1.Model.Package do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/path_node.ex b/clients/security_center/lib/google_api/security_center/v1/model/path_node.ex deleted file mode 100644 index 745f35d89e..0000000000 --- a/clients/security_center/lib/google_api/security_center/v1/model/path_node.ex +++ /dev/null @@ -1,56 +0,0 @@ -# Copyright 2019 Google LLC -# -# Licensed under the Apache License, Version 2.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. - -# NOTE: This file is auto generated by the elixir code generator program. -# Do not edit this file manually. - -defmodule GoogleApi.SecurityCenter.V1.Model.PathNode do - @moduledoc """ - Represents one point that an attacker passes through in this exposure path. - - ## Attributes - - * `associatedFindings` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.AssociatedFinding.t)`, *default:* `nil`) - The findings associated with this node in the exposure path. - * `displayName` (*type:* `String.t`, *default:* `nil`) - Human readable name of this resource. - * `resource` (*type:* `String.t`, *default:* `nil`) - The name of the resource at this point in the exposure path. The format of the name is: https://cloud.google.com/apis/design/resource_names#full_resource_name - * `resourceType` (*type:* `String.t`, *default:* `nil`) - The resource type of this resource. See: https://cloud.google.com/asset-inventory/docs/supported-asset-types - """ - - use GoogleApi.Gax.ModelBase - - @type t :: %__MODULE__{ - :associatedFindings => - list(GoogleApi.SecurityCenter.V1.Model.AssociatedFinding.t()) | nil, - :displayName => String.t() | nil, - :resource => String.t() | nil, - :resourceType => String.t() | nil - } - - field(:associatedFindings, as: GoogleApi.SecurityCenter.V1.Model.AssociatedFinding, type: :list) - field(:displayName) - field(:resource) - field(:resourceType) -end - -defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.PathNode do - def decode(value, options) do - GoogleApi.SecurityCenter.V1.Model.PathNode.decode(value, options) - end -end - -defimpl Poison.Encoder, for: GoogleApi.SecurityCenter.V1.Model.PathNode do - def encode(value, options) do - GoogleApi.Gax.ModelBase.encode(value, options) - end -end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/associated_finding.ex b/clients/security_center/lib/google_api/security_center/v1/model/path_node_associated_finding.ex similarity index 66% rename from clients/security_center/lib/google_api/security_center/v1/model/associated_finding.ex rename to clients/security_center/lib/google_api/security_center/v1/model/path_node_associated_finding.ex index f37927f9c1..94e80dd149 100644 --- a/clients/security_center/lib/google_api/security_center/v1/model/associated_finding.ex +++ b/clients/security_center/lib/google_api/security_center/v1/model/path_node_associated_finding.ex @@ -15,13 +15,13 @@ # NOTE: This file is auto generated by the elixir code generator program. # Do not edit this file manually. -defmodule GoogleApi.SecurityCenter.V1.Model.AssociatedFinding do +defmodule GoogleApi.SecurityCenter.V1.Model.PathNodeAssociatedFinding do @moduledoc """ - A finding that is associated with this node in the exposure path. + A finding that is associated with this node in the attack path. ## Attributes - * `canonicalFindingName` (*type:* `String.t`, *default:* `nil`) - Canonical name of the associated findings. Example: organizations/123/sources/456/findings/789 + * `canonicalFinding` (*type:* `String.t`, *default:* `nil`) - Canonical name of the associated findings. Example: organizations/123/sources/456/findings/789 * `findingCategory` (*type:* `String.t`, *default:* `nil`) - The additional taxonomy group within findings from a given source. * `name` (*type:* `String.t`, *default:* `nil`) - Full resource name of the finding. """ @@ -29,23 +29,23 @@ defmodule GoogleApi.SecurityCenter.V1.Model.AssociatedFinding do use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ - :canonicalFindingName => String.t() | nil, + :canonicalFinding => String.t() | nil, :findingCategory => String.t() | nil, :name => String.t() | nil } - field(:canonicalFindingName) + field(:canonicalFinding) field(:findingCategory) field(:name) end -defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.AssociatedFinding do +defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.PathNodeAssociatedFinding do def decode(value, options) do - GoogleApi.SecurityCenter.V1.Model.AssociatedFinding.decode(value, options) + GoogleApi.SecurityCenter.V1.Model.PathNodeAssociatedFinding.decode(value, options) end end -defimpl Poison.Encoder, for: GoogleApi.SecurityCenter.V1.Model.AssociatedFinding do +defimpl Poison.Encoder, for: GoogleApi.SecurityCenter.V1.Model.PathNodeAssociatedFinding do def encode(value, options) do GoogleApi.Gax.ModelBase.encode(value, options) end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/pod.ex b/clients/security_center/lib/google_api/security_center/v1/model/pod.ex index b49b81c5f5..4f1d9faa1c 100644 --- a/clients/security_center/lib/google_api/security_center/v1/model/pod.ex +++ b/clients/security_center/lib/google_api/security_center/v1/model/pod.ex @@ -17,7 +17,7 @@ defmodule GoogleApi.SecurityCenter.V1.Model.Pod do @moduledoc """ - Kubernetes Pod. + A Kubernetes Pod. ## Attributes diff --git a/clients/security_center/lib/google_api/security_center/v1/model/policy.ex b/clients/security_center/lib/google_api/security_center/v1/model/policy.ex index fb789e0e4a..1c2bc2e38a 100644 --- a/clients/security_center/lib/google_api/security_center/v1/model/policy.ex +++ b/clients/security_center/lib/google_api/security_center/v1/model/policy.ex @@ -17,7 +17,7 @@ defmodule GoogleApi.SecurityCenter.V1.Model.Policy do @moduledoc """ - 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/). + 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/). ## Attributes diff --git a/clients/security_center/lib/google_api/security_center/v1/model/policy_drift_details.ex b/clients/security_center/lib/google_api/security_center/v1/model/policy_drift_details.ex new file mode 100644 index 0000000000..21df19e5fa --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/policy_drift_details.ex @@ -0,0 +1,52 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.PolicyDriftDetails do + @moduledoc """ + The policy field that violates the deployed posture and its expected and detected values. + + ## Attributes + + * `detectedValue` (*type:* `String.t`, *default:* `nil`) - The detected value that violates the deployed posture, for example, `false` or `allowed_values={"projects/22831892"}`. + * `expectedValue` (*type:* `String.t`, *default:* `nil`) - The value of this field that was configured in a posture, for example, `true` or `allowed_values={"projects/29831892"}`. + * `field` (*type:* `String.t`, *default:* `nil`) - The name of the updated field, for example constraint.implementation.policy_rules[0].enforce + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :detectedValue => String.t() | nil, + :expectedValue => String.t() | nil, + :field => String.t() | nil + } + + field(:detectedValue) + field(:expectedValue) + field(:field) +end + +defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.PolicyDriftDetails do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.PolicyDriftDetails.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.SecurityCenter.V1.Model.PolicyDriftDetails do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/position.ex b/clients/security_center/lib/google_api/security_center/v1/model/position.ex new file mode 100644 index 0000000000..3d1b831fd4 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/position.ex @@ -0,0 +1,49 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.Position do + @moduledoc """ + A position in the uploaded text version of a module. + + ## Attributes + + * `columnNumber` (*type:* `integer()`, *default:* `nil`) - + * `lineNumber` (*type:* `integer()`, *default:* `nil`) - + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :columnNumber => integer() | nil, + :lineNumber => integer() | nil + } + + field(:columnNumber) + field(:lineNumber) +end + +defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.Position do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.Position.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.SecurityCenter.V1.Model.Position do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/process.ex b/clients/security_center/lib/google_api/security_center/v1/model/process.ex index fdc7d88411..0fa8d645ef 100644 --- a/clients/security_center/lib/google_api/security_center/v1/model/process.ex +++ b/clients/security_center/lib/google_api/security_center/v1/model/process.ex @@ -27,10 +27,10 @@ defmodule GoogleApi.SecurityCenter.V1.Model.Process do * `envVariables` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.EnvironmentVariable.t)`, *default:* `nil`) - Process environment variables. * `envVariablesTruncated` (*type:* `boolean()`, *default:* `nil`) - True if `env_variables` is incomplete. * `libraries` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.File.t)`, *default:* `nil`) - File information for libraries loaded by the process. - * `name` (*type:* `String.t`, *default:* `nil`) - The process name visible in utilities like `top` and `ps`; it can be accessed via `/proc/[pid]/comm` and changed with `prctl(PR_SET_NAME)`. - * `parentPid` (*type:* `String.t`, *default:* `nil`) - The parent process id. - * `pid` (*type:* `String.t`, *default:* `nil`) - The process id. - * `script` (*type:* `GoogleApi.SecurityCenter.V1.Model.File.t`, *default:* `nil`) - 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. + * `name` (*type:* `String.t`, *default:* `nil`) - 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)`. + * `parentPid` (*type:* `String.t`, *default:* `nil`) - The parent process ID. + * `pid` (*type:* `String.t`, *default:* `nil`) - The process ID. + * `script` (*type:* `GoogleApi.SecurityCenter.V1.Model.File.t`, *default:* `nil`) - 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. """ use GoogleApi.Gax.ModelBase diff --git a/clients/security_center/lib/google_api/security_center/v1/model/process_signature.ex b/clients/security_center/lib/google_api/security_center/v1/model/process_signature.ex index 751a9caab6..fffb018b5a 100644 --- a/clients/security_center/lib/google_api/security_center/v1/model/process_signature.ex +++ b/clients/security_center/lib/google_api/security_center/v1/model/process_signature.ex @@ -22,6 +22,7 @@ defmodule GoogleApi.SecurityCenter.V1.Model.ProcessSignature do ## Attributes * `memoryHashSignature` (*type:* `GoogleApi.SecurityCenter.V1.Model.MemoryHashSignature.t`, *default:* `nil`) - Signature indicating that a binary family was matched. + * `signatureType` (*type:* `String.t`, *default:* `nil`) - Describes the type of resource associated with the signature. * `yaraRuleSignature` (*type:* `GoogleApi.SecurityCenter.V1.Model.YaraRuleSignature.t`, *default:* `nil`) - Signature indicating that a YARA rule was matched. """ @@ -29,10 +30,12 @@ defmodule GoogleApi.SecurityCenter.V1.Model.ProcessSignature do @type t :: %__MODULE__{ :memoryHashSignature => GoogleApi.SecurityCenter.V1.Model.MemoryHashSignature.t() | nil, + :signatureType => String.t() | nil, :yaraRuleSignature => GoogleApi.SecurityCenter.V1.Model.YaraRuleSignature.t() | nil } field(:memoryHashSignature, as: GoogleApi.SecurityCenter.V1.Model.MemoryHashSignature) + field(:signatureType) field(:yaraRuleSignature, as: GoogleApi.SecurityCenter.V1.Model.YaraRuleSignature) end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/resource_value_config_metadata.ex b/clients/security_center/lib/google_api/security_center/v1/model/resource_value_config_metadata.ex new file mode 100644 index 0000000000..33c9ee77fd --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/resource_value_config_metadata.ex @@ -0,0 +1,46 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.ResourceValueConfigMetadata do + @moduledoc """ + Metadata about a ResourceValueConfig. For example, id and name. + + ## Attributes + + * `name` (*type:* `String.t`, *default:* `nil`) - Resource value config name + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :name => String.t() | nil + } + + field(:name) +end + +defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.ResourceValueConfigMetadata do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.ResourceValueConfigMetadata.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.SecurityCenter.V1.Model.ResourceValueConfigMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/security_bulletin.ex b/clients/security_center/lib/google_api/security_center/v1/model/security_bulletin.ex new file mode 100644 index 0000000000..cf2b889a05 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/security_bulletin.ex @@ -0,0 +1,52 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.SecurityBulletin do + @moduledoc """ + SecurityBulletin are notifications of vulnerabilities of Google products. + + ## Attributes + + * `bulletinId` (*type:* `String.t`, *default:* `nil`) - ID of the bulletin corresponding to the vulnerability. + * `submissionTime` (*type:* `DateTime.t`, *default:* `nil`) - Submission time of this Security Bulletin. + * `suggestedUpgradeVersion` (*type:* `String.t`, *default:* `nil`) - This represents a version that the cluster receiving this notification should be upgraded to, based on its current version. For example, 1.15.0 + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :bulletinId => String.t() | nil, + :submissionTime => DateTime.t() | nil, + :suggestedUpgradeVersion => String.t() | nil + } + + field(:bulletinId) + field(:submissionTime, as: DateTime) + field(:suggestedUpgradeVersion) +end + +defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.SecurityBulletin do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.SecurityBulletin.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.SecurityCenter.V1.Model.SecurityBulletin do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/security_posture.ex b/clients/security_center/lib/google_api/security_center/v1/model/security_posture.ex new file mode 100644 index 0000000000..36bbd44fa6 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/security_posture.ex @@ -0,0 +1,70 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.SecurityPosture do + @moduledoc """ + 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. + + ## Attributes + + * `changedPolicy` (*type:* `String.t`, *default:* `nil`) - The name of the updated policy, for example, `projects/{project_id}/policies/{constraint_name}`. + * `name` (*type:* `String.t`, *default:* `nil`) - Name of the posture, for example, `CIS-Posture`. + * `policy` (*type:* `String.t`, *default:* `nil`) - The ID of the updated policy, for example, `compute-policy-1`. + * `policyDriftDetails` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.PolicyDriftDetails.t)`, *default:* `nil`) - The details about a change in an updated policy that violates the deployed posture. + * `policySet` (*type:* `String.t`, *default:* `nil`) - The name of the updated policyset, for example, `cis-policyset`. + * `postureDeployment` (*type:* `String.t`, *default:* `nil`) - The name of the posture deployment, for example, `organizations/{org_id}/posturedeployments/{posture_deployment_id}`. + * `postureDeploymentResource` (*type:* `String.t`, *default:* `nil`) - The project, folder, or organization on which the posture is deployed, for example, `projects/{project_number}`. + * `revisionId` (*type:* `String.t`, *default:* `nil`) - The version of the posture, for example, `c7cfa2a8`. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :changedPolicy => String.t() | nil, + :name => String.t() | nil, + :policy => String.t() | nil, + :policyDriftDetails => + list(GoogleApi.SecurityCenter.V1.Model.PolicyDriftDetails.t()) | nil, + :policySet => String.t() | nil, + :postureDeployment => String.t() | nil, + :postureDeploymentResource => String.t() | nil, + :revisionId => String.t() | nil + } + + field(:changedPolicy) + field(:name) + field(:policy) + + field(:policyDriftDetails, as: GoogleApi.SecurityCenter.V1.Model.PolicyDriftDetails, type: :list) + + field(:policySet) + field(:postureDeployment) + field(:postureDeploymentResource) + field(:revisionId) +end + +defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.SecurityPosture do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.SecurityPosture.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.SecurityCenter.V1.Model.SecurityPosture do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/simulate_security_health_analytics_custom_module_request.ex b/clients/security_center/lib/google_api/security_center/v1/model/simulate_security_health_analytics_custom_module_request.ex new file mode 100644 index 0000000000..2d23e078c0 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/simulate_security_health_analytics_custom_module_request.ex @@ -0,0 +1,58 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.SimulateSecurityHealthAnalyticsCustomModuleRequest do + @moduledoc """ + Request message to simulate a CustomConfig against a given test resource. Maximum size of the request is 4 MB by default. + + ## Attributes + + * `customConfig` (*type:* `GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1CustomConfig.t`, *default:* `nil`) - Required. The custom configuration that you need to test. + * `resource` (*type:* `GoogleApi.SecurityCenter.V1.Model.SimulatedResource.t`, *default:* `nil`) - Required. Resource data to simulate custom module against. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :customConfig => + GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1CustomConfig.t() | nil, + :resource => GoogleApi.SecurityCenter.V1.Model.SimulatedResource.t() | nil + } + + field(:customConfig, + as: GoogleApi.SecurityCenter.V1.Model.GoogleCloudSecuritycenterV1CustomConfig + ) + + field(:resource, as: GoogleApi.SecurityCenter.V1.Model.SimulatedResource) +end + +defimpl Poison.Decoder, + for: GoogleApi.SecurityCenter.V1.Model.SimulateSecurityHealthAnalyticsCustomModuleRequest do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.SimulateSecurityHealthAnalyticsCustomModuleRequest.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.SecurityCenter.V1.Model.SimulateSecurityHealthAnalyticsCustomModuleRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/simulate_security_health_analytics_custom_module_response.ex b/clients/security_center/lib/google_api/security_center/v1/model/simulate_security_health_analytics_custom_module_response.ex new file mode 100644 index 0000000000..c5e87fdb1f --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/simulate_security_health_analytics_custom_module_response.ex @@ -0,0 +1,51 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.SimulateSecurityHealthAnalyticsCustomModuleResponse do + @moduledoc """ + Response message for simulating a `SecurityHealthAnalyticsCustomModule` against a given resource. + + ## Attributes + + * `result` (*type:* `GoogleApi.SecurityCenter.V1.Model.SimulatedResult.t`, *default:* `nil`) - Result for test case in the corresponding request. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :result => GoogleApi.SecurityCenter.V1.Model.SimulatedResult.t() | nil + } + + field(:result, as: GoogleApi.SecurityCenter.V1.Model.SimulatedResult) +end + +defimpl Poison.Decoder, + for: GoogleApi.SecurityCenter.V1.Model.SimulateSecurityHealthAnalyticsCustomModuleResponse do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.SimulateSecurityHealthAnalyticsCustomModuleResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.SecurityCenter.V1.Model.SimulateSecurityHealthAnalyticsCustomModuleResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/simulated_resource.ex b/clients/security_center/lib/google_api/security_center/v1/model/simulated_resource.ex new file mode 100644 index 0000000000..4c2ac25780 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/simulated_resource.ex @@ -0,0 +1,52 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.SimulatedResource do + @moduledoc """ + Manually constructed resource name. If the custom module evaluates against only the resource data, you can omit the `iam_policy_data` field. If it evaluates only the `iam_policy_data` field, you can omit the resource data. + + ## Attributes + + * `iamPolicyData` (*type:* `GoogleApi.SecurityCenter.V1.Model.Policy.t`, *default:* `nil`) - Optional. A representation of the IAM policy. + * `resourceData` (*type:* `map()`, *default:* `nil`) - Optional. A representation of the Google Cloud resource. Should match the Google Cloud resource JSON format. + * `resourceType` (*type:* `String.t`, *default:* `nil`) - Required. The type of the resource, for example, `compute.googleapis.com/Disk`. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :iamPolicyData => GoogleApi.SecurityCenter.V1.Model.Policy.t() | nil, + :resourceData => map() | nil, + :resourceType => String.t() | nil + } + + field(:iamPolicyData, as: GoogleApi.SecurityCenter.V1.Model.Policy) + field(:resourceData, type: :map) + field(:resourceType) +end + +defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.SimulatedResource do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.SimulatedResource.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.SecurityCenter.V1.Model.SimulatedResource do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/simulated_result.ex b/clients/security_center/lib/google_api/security_center/v1/model/simulated_result.ex new file mode 100644 index 0000000000..4f69912a12 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/simulated_result.ex @@ -0,0 +1,52 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.SimulatedResult do + @moduledoc """ + Possible test result. + + ## Attributes + + * `error` (*type:* `GoogleApi.SecurityCenter.V1.Model.Status.t`, *default:* `nil`) - Error encountered during the test. + * `finding` (*type:* `GoogleApi.SecurityCenter.V1.Model.Finding.t`, *default:* `nil`) - Finding that would be published for the test case, if a violation is detected. + * `noViolation` (*type:* `GoogleApi.SecurityCenter.V1.Model.Empty.t`, *default:* `nil`) - Indicates that the test case does not trigger any violation. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :error => GoogleApi.SecurityCenter.V1.Model.Status.t() | nil, + :finding => GoogleApi.SecurityCenter.V1.Model.Finding.t() | nil, + :noViolation => GoogleApi.SecurityCenter.V1.Model.Empty.t() | nil + } + + field(:error, as: GoogleApi.SecurityCenter.V1.Model.Status) + field(:finding, as: GoogleApi.SecurityCenter.V1.Model.Finding) + field(:noViolation, as: GoogleApi.SecurityCenter.V1.Model.Empty) +end + +defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.SimulatedResult do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.SimulatedResult.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.SecurityCenter.V1.Model.SimulatedResult do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/simulation.ex b/clients/security_center/lib/google_api/security_center/v1/model/simulation.ex new file mode 100644 index 0000000000..900eb6b4d2 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/simulation.ex @@ -0,0 +1,57 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.Simulation do + @moduledoc """ + Attack path simulation + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Time simulation was created + * `name` (*type:* `String.t`, *default:* `nil`) - Full resource name of the Simulation: organizations/123/simulations/456 + * `resourceValueConfigsMetadata` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.ResourceValueConfigMetadata.t)`, *default:* `nil`) - Resource value configurations' metadata used in this simulation. Maximum of 100. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :name => String.t() | nil, + :resourceValueConfigsMetadata => + list(GoogleApi.SecurityCenter.V1.Model.ResourceValueConfigMetadata.t()) | nil + } + + field(:createTime, as: DateTime) + field(:name) + + field(:resourceValueConfigsMetadata, + as: GoogleApi.SecurityCenter.V1.Model.ResourceValueConfigMetadata, + type: :list + ) +end + +defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.Simulation do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.Simulation.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.SecurityCenter.V1.Model.Simulation do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/source.ex b/clients/security_center/lib/google_api/security_center/v1/model/source.ex index bfd1d19fb7..a2413938df 100644 --- a/clients/security_center/lib/google_api/security_center/v1/model/source.ex +++ b/clients/security_center/lib/google_api/security_center/v1/model/source.ex @@ -21,7 +21,7 @@ defmodule GoogleApi.SecurityCenter.V1.Model.Source do ## Attributes - * `canonicalName` (*type:* `String.t`, *default:* `nil`) - The canonical name of the finding. 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. + * `canonicalName` (*type:* `String.t`, *default:* `nil`) - 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. * `description` (*type:* `String.t`, *default:* `nil`) - 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." * `displayName` (*type:* `String.t`, *default:* `nil`) - 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). * `name` (*type:* `String.t`, *default:* `nil`) - 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}" diff --git a/clients/security_center/lib/google_api/security_center/v1/model/subject.ex b/clients/security_center/lib/google_api/security_center/v1/model/subject.ex index 27ae405baa..77e0966d49 100644 --- a/clients/security_center/lib/google_api/security_center/v1/model/subject.ex +++ b/clients/security_center/lib/google_api/security_center/v1/model/subject.ex @@ -17,13 +17,13 @@ defmodule GoogleApi.SecurityCenter.V1.Model.Subject do @moduledoc """ - Represents a Kubernetes Subject. + Represents a Kubernetes subject. ## Attributes - * `kind` (*type:* `String.t`, *default:* `nil`) - Authentication type for subject. - * `name` (*type:* `String.t`, *default:* `nil`) - Name for subject. - * `ns` (*type:* `String.t`, *default:* `nil`) - Namespace for subject. + * `kind` (*type:* `String.t`, *default:* `nil`) - Authentication type for the subject. + * `name` (*type:* `String.t`, *default:* `nil`) - Name for the subject. + * `ns` (*type:* `String.t`, *default:* `nil`) - Namespace for the subject. """ use GoogleApi.Gax.ModelBase diff --git a/clients/security_center/lib/google_api/security_center/v1/model/ticket_info.ex b/clients/security_center/lib/google_api/security_center/v1/model/ticket_info.ex new file mode 100644 index 0000000000..ee9207900e --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/ticket_info.ex @@ -0,0 +1,61 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.TicketInfo do + @moduledoc """ + Information about the ticket, if any, that is being used to track the resolution of the issue that is identified by this finding. + + ## Attributes + + * `assignee` (*type:* `String.t`, *default:* `nil`) - The assignee of the ticket in the ticket system. + * `description` (*type:* `String.t`, *default:* `nil`) - The description of the ticket in the ticket system. + * `id` (*type:* `String.t`, *default:* `nil`) - The identifier of the ticket in the ticket system. + * `status` (*type:* `String.t`, *default:* `nil`) - The latest status of the ticket, as reported by the ticket system. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - The time when the ticket was last updated, as reported by the ticket system. + * `uri` (*type:* `String.t`, *default:* `nil`) - The link to the ticket in the ticket system. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :assignee => String.t() | nil, + :description => String.t() | nil, + :id => String.t() | nil, + :status => String.t() | nil, + :updateTime => DateTime.t() | nil, + :uri => String.t() | nil + } + + field(:assignee) + field(:description) + field(:id) + field(:status) + field(:updateTime, as: DateTime) + field(:uri) +end + +defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.TicketInfo do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.TicketInfo.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.SecurityCenter.V1.Model.TicketInfo do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/validate_event_threat_detection_custom_module_request.ex b/clients/security_center/lib/google_api/security_center/v1/model/validate_event_threat_detection_custom_module_request.ex new file mode 100644 index 0000000000..55775e1d74 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/validate_event_threat_detection_custom_module_request.ex @@ -0,0 +1,54 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.ValidateEventThreatDetectionCustomModuleRequest do + @moduledoc """ + Request to validate an Event Threat Detection custom module. + + ## Attributes + + * `rawText` (*type:* `String.t`, *default:* `nil`) - Required. The raw text of the module's contents. Used to generate error messages. + * `type` (*type:* `String.t`, *default:* `nil`) - Required. The type of the module (e.g. CONFIGURABLE_BAD_IP). + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :rawText => String.t() | nil, + :type => String.t() | nil + } + + field(:rawText) + field(:type) +end + +defimpl Poison.Decoder, + for: GoogleApi.SecurityCenter.V1.Model.ValidateEventThreatDetectionCustomModuleRequest do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.ValidateEventThreatDetectionCustomModuleRequest.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.SecurityCenter.V1.Model.ValidateEventThreatDetectionCustomModuleRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/validate_event_threat_detection_custom_module_response.ex b/clients/security_center/lib/google_api/security_center/v1/model/validate_event_threat_detection_custom_module_response.ex new file mode 100644 index 0000000000..6f979f205f --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/validate_event_threat_detection_custom_module_response.ex @@ -0,0 +1,51 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.ValidateEventThreatDetectionCustomModuleResponse do + @moduledoc """ + Response to validating an Event Threat Detection custom module. + + ## Attributes + + * `errors` (*type:* `GoogleApi.SecurityCenter.V1.Model.CustomModuleValidationErrors.t`, *default:* `nil`) - A list of errors returned by the validator. If the list is empty, there were no errors. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :errors => GoogleApi.SecurityCenter.V1.Model.CustomModuleValidationErrors.t() | nil + } + + field(:errors, as: GoogleApi.SecurityCenter.V1.Model.CustomModuleValidationErrors) +end + +defimpl Poison.Decoder, + for: GoogleApi.SecurityCenter.V1.Model.ValidateEventThreatDetectionCustomModuleResponse do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.ValidateEventThreatDetectionCustomModuleResponse.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.SecurityCenter.V1.Model.ValidateEventThreatDetectionCustomModuleResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/valued_resource.ex b/clients/security_center/lib/google_api/security_center/v1/model/valued_resource.ex new file mode 100644 index 0000000000..8278fb4483 --- /dev/null +++ b/clients/security_center/lib/google_api/security_center/v1/model/valued_resource.ex @@ -0,0 +1,69 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.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. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.SecurityCenter.V1.Model.ValuedResource do + @moduledoc """ + A resource that is determined to have value to a user's system + + ## Attributes + + * `displayName` (*type:* `String.t`, *default:* `nil`) - Human-readable name of the valued resource. + * `exposedScore` (*type:* `float()`, *default:* `nil`) - Exposed score for this valued resource. A value of 0 means no exposure was detected exposure. + * `name` (*type:* `String.t`, *default:* `nil`) - Valued resource name, for example, e.g.: `organizations/123/simulations/456/valuedResources/789` + * `resource` (*type:* `String.t`, *default:* `nil`) - The [full resource name](https://cloud.google.com/apis/design/resource_names#full_resource_name) of the valued resource. + * `resourceType` (*type:* `String.t`, *default:* `nil`) - The [resource type](https://cloud.google.com/asset-inventory/docs/supported-asset-types) of the valued resource. + * `resourceValue` (*type:* `String.t`, *default:* `nil`) - How valuable this resource is. + * `resourceValueConfigsUsed` (*type:* `list(GoogleApi.SecurityCenter.V1.Model.ResourceValueConfigMetadata.t)`, *default:* `nil`) - List of resource value configurations' metadata used to determine the value of this resource. Maximum of 100. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :displayName => String.t() | nil, + :exposedScore => float() | nil, + :name => String.t() | nil, + :resource => String.t() | nil, + :resourceType => String.t() | nil, + :resourceValue => String.t() | nil, + :resourceValueConfigsUsed => + list(GoogleApi.SecurityCenter.V1.Model.ResourceValueConfigMetadata.t()) | nil + } + + field(:displayName) + field(:exposedScore) + field(:name) + field(:resource) + field(:resourceType) + field(:resourceValue) + + field(:resourceValueConfigsUsed, + as: GoogleApi.SecurityCenter.V1.Model.ResourceValueConfigMetadata, + type: :list + ) +end + +defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.ValuedResource do + def decode(value, options) do + GoogleApi.SecurityCenter.V1.Model.ValuedResource.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.SecurityCenter.V1.Model.ValuedResource do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/security_center/lib/google_api/security_center/v1/model/vulnerability.ex b/clients/security_center/lib/google_api/security_center/v1/model/vulnerability.ex index 69becb9a8b..e06a42c80a 100644 --- a/clients/security_center/lib/google_api/security_center/v1/model/vulnerability.ex +++ b/clients/security_center/lib/google_api/security_center/v1/model/vulnerability.ex @@ -22,15 +22,24 @@ defmodule GoogleApi.SecurityCenter.V1.Model.Vulnerability do ## Attributes * `cve` (*type:* `GoogleApi.SecurityCenter.V1.Model.Cve.t`, *default:* `nil`) - CVE stands for Common Vulnerabilities and Exposures (https://cve.mitre.org/about/) + * `fixedPackage` (*type:* `GoogleApi.SecurityCenter.V1.Model.Package.t`, *default:* `nil`) - The fixed package is relevant to the finding. + * `offendingPackage` (*type:* `GoogleApi.SecurityCenter.V1.Model.Package.t`, *default:* `nil`) - The offending package is relevant to the finding. + * `securityBulletin` (*type:* `GoogleApi.SecurityCenter.V1.Model.SecurityBulletin.t`, *default:* `nil`) - The security bulletin is relevant to this finding. """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ - :cve => GoogleApi.SecurityCenter.V1.Model.Cve.t() | nil + :cve => GoogleApi.SecurityCenter.V1.Model.Cve.t() | nil, + :fixedPackage => GoogleApi.SecurityCenter.V1.Model.Package.t() | nil, + :offendingPackage => GoogleApi.SecurityCenter.V1.Model.Package.t() | nil, + :securityBulletin => GoogleApi.SecurityCenter.V1.Model.SecurityBulletin.t() | nil } field(:cve, as: GoogleApi.SecurityCenter.V1.Model.Cve) + field(:fixedPackage, as: GoogleApi.SecurityCenter.V1.Model.Package) + field(:offendingPackage, as: GoogleApi.SecurityCenter.V1.Model.Package) + field(:securityBulletin, as: GoogleApi.SecurityCenter.V1.Model.SecurityBulletin) end defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.Vulnerability do