From c7b34accff00fde34dd8c7fd962d5fc57c2e5b84 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Wed, 22 Apr 2026 09:03:10 +0000 Subject: [PATCH 1/2] docs: Updated docs for the APIs feat: Adding client libraries for Deployment API Compliance Manager Service PiperOrigin-RevId: 903655636 Source-Link: https://github.com/googleapis/googleapis/commit/e9975a386360bc96d03ef289c7fc2cc20b7b5f8b Source-Link: https://github.com/googleapis/googleapis-gen/commit/8a09aece0a3cd48ce8db0159887fe00b2f9583ac Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWNsb3VkX3NlY3VyaXR5X2NvbXBsaWFuY2UtdjEvLk93bEJvdC55YW1sIiwiaCI6IjhhMDlhZWNlMGEzY2Q0OGNlOGRiMDE1OTg4N2ZlMDBiMmY5NTgzYWMifQ== --- .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 ++ .../CHANGELOG.md | 2 + .../Gemfile | 14 + .../LICENSE.md | 201 +++ .../README.md | 154 ++ .../Rakefile | 169 ++ .../gapic_metadata.json | 189 ++ ...cloud-cloud_security_compliance-v1.gemspec | 29 + ...ogle-cloud-cloud_security_compliance-v1.rb | 21 + .../cloud/cloud_security_compliance/v1.rb | 49 + .../cloud_security_compliance/v1/audit.rb | 56 + .../v1/audit/client.rb | 859 ++++++++++ .../v1/audit/credentials.rb | 47 + .../v1/audit/operations.rb | 841 +++++++++ .../v1/audit/paths.rb | 110 ++ .../v1/audit/rest.rb | 54 + .../v1/audit/rest/client.rb | 796 +++++++++ .../v1/audit/rest/operations.rb | 954 +++++++++++ .../v1/audit/rest/service_stub.rb | 387 +++++ .../v1/bindings_override.rb | 91 + .../v1/cm_enrollment_service.rb | 56 + .../v1/cm_enrollment_service/client.rb | 608 +++++++ .../v1/cm_enrollment_service/credentials.rb | 47 + .../v1/cm_enrollment_service/paths.rb | 72 + .../v1/cm_enrollment_service/rest.rb | 54 + .../v1/cm_enrollment_service/rest/client.rb | 559 ++++++ .../rest/service_stub.rb | 234 +++ .../cloud_security_compliance/v1/config.rb | 56 + .../v1/config/client.rb | 1521 +++++++++++++++++ .../v1/config/credentials.rb | 47 + .../v1/config/paths.rb | 153 ++ .../v1/config/rest.rb | 54 + .../v1/config/rest/client.rb | 1416 +++++++++++++++ .../v1/config/rest/service_stub.rb | 769 +++++++++ .../v1/deployment.rb | 57 + .../v1/deployment/client.rb | 1097 ++++++++++++ .../v1/deployment/credentials.rb | 47 + .../v1/deployment/operations.rb | 841 +++++++++ .../v1/deployment/paths.rb | 196 +++ .../v1/deployment/rest.rb | 55 + .../v1/deployment/rest/client.rb | 1020 +++++++++++ .../v1/deployment/rest/operations.rb | 954 +++++++++++ .../v1/deployment/rest/service_stub.rb | 491 ++++++ .../v1/monitoring.rb | 55 + .../v1/monitoring/client.rb | 944 ++++++++++ .../v1/monitoring/credentials.rb | 47 + .../v1/monitoring/paths.rb | 142 ++ .../v1/monitoring/rest.rb | 53 + .../v1/monitoring/rest/client.rb | 874 ++++++++++ .../v1/monitoring/rest/service_stub.rb | 456 +++++ .../cloud_security_compliance/v1/rest.rb | 42 + .../cloud_security_compliance/v1/version.rb | 28 + .../cloudsecuritycompliance/v1/audit_pb.rb | 47 + .../v1/audit_services_pb.rb | 51 + .../v1/cm_enrollment_service_pb.rb | 32 + .../v1/cm_enrollment_service_services_pb.rb | 54 + .../cloudsecuritycompliance/v1/common_pb.rb | 56 + .../cloudsecuritycompliance/v1/config_pb.rb | 40 + .../v1/config_services_pb.rb | 120 ++ .../v1/deployment_pb.rb | 47 + .../v1/deployment_services_pb.rb | 59 + .../v1/monitoring_pb.rb | 53 + .../v1/monitoring_services_pb.rb | 53 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 +++++++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 +++ .../cloud/cloudsecuritycompliance/v1/audit.rb | 413 +++++ .../v1/cm_enrollment_service.rb | 108 ++ .../cloudsecuritycompliance/v1/common.rb | 808 +++++++++ .../cloudsecuritycompliance/v1/config.rb | 258 +++ .../cloudsecuritycompliance/v1/deployment.rb | 492 ++++++ .../cloudsecuritycompliance/v1/monitoring.rb | 569 ++++++ .../google/longrunning/operations.rb | 191 +++ .../proto_docs/google/protobuf/any.rb | 145 ++ .../proto_docs/google/protobuf/duration.rb | 98 ++ .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 +++ .../proto_docs/google/protobuf/timestamp.rb | 127 ++ .../proto_docs/google/rpc/status.rb | 48 + .../proto_docs/google/type/interval.rb | 45 + .../snippets/Gemfile | 32 + .../snippets/audit/create_framework_audit.rb | 54 + .../generate_framework_audit_scope_report.rb | 47 + .../snippets/audit/get_framework_audit.rb | 47 + .../snippets/audit/list_framework_audits.rb | 51 + .../calculate_effective_cm_enrollment.rb | 47 + .../update_cm_enrollment.rb | 47 + .../snippets/config/create_cloud_control.rb | 47 + .../snippets/config/create_framework.rb | 47 + .../snippets/config/delete_cloud_control.rb | 47 + .../snippets/config/delete_framework.rb | 47 + .../snippets/config/get_cloud_control.rb | 47 + .../snippets/config/get_framework.rb | 47 + .../snippets/config/list_cloud_controls.rb | 51 + .../snippets/config/list_frameworks.rb | 51 + .../snippets/config/update_cloud_control.rb | 47 + .../snippets/config/update_framework.rb | 47 + .../deployment/create_framework_deployment.rb | 54 + .../deployment/delete_framework_deployment.rb | 54 + .../get_cloud_control_deployment.rb | 47 + .../deployment/get_framework_deployment.rb | 47 + .../list_cloud_control_deployments.rb | 51 + .../deployment/list_framework_deployments.rb | 51 + .../aggregate_framework_compliance_report.rb | 47 + .../fetch_framework_compliance_report.rb | 47 + .../list_control_compliance_summaries.rb | 51 + .../monitoring/list_finding_summaries.rb | 51 + .../list_framework_compliance_summaries.rb | 51 + ...ogle.cloud.cloudsecuritycompliance.v1.json | 1095 ++++++++++++ .../v1/audit_operations_test.rb | 400 +++++ .../v1/audit_paths_test.rb | 82 + .../v1/audit_rest_test.rb | 322 ++++ .../v1/audit_test.rb | 374 ++++ .../v1/cm_enrollment_service_paths_test.rb | 58 + .../v1/cm_enrollment_service_rest_test.rb | 208 +++ .../v1/cm_enrollment_service_test.rb | 222 +++ .../v1/config_paths_test.rb | 97 ++ .../v1/config_rest_test.rb | 652 +++++++ .../v1/config_test.rb | 720 ++++++++ .../v1/deployment_operations_test.rb | 400 +++++ .../v1/deployment_paths_test.rb | 112 ++ .../v1/deployment_rest_test.rb | 434 +++++ .../v1/deployment_test.rb | 508 ++++++ .../v1/monitoring_paths_test.rb | 97 ++ .../v1/monitoring_rest_test.rb | 385 +++++ .../v1/monitoring_test.rb | 441 +++++ .../test/helper.rb | 26 + 134 files changed, 31446 insertions(+) create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/README.md create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/google-cloud-cloud_security_compliance-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google-cloud-cloud_security_compliance-v1.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/client.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/credentials.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/operations.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/paths.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/rest.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/bindings_override.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/cm_enrollment_service.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/cm_enrollment_service/client.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/cm_enrollment_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/cm_enrollment_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/cm_enrollment_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/cm_enrollment_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/cm_enrollment_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config/client.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config/credentials.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config/paths.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config/rest.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/client.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/credentials.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/operations.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/paths.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/rest.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/monitoring.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/monitoring/client.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/monitoring/credentials.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/monitoring/paths.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/monitoring/rest.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/monitoring/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/monitoring/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/audit_pb.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/audit_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/cm_enrollment_service_pb.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/cm_enrollment_service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/common_pb.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/config_pb.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/config_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/deployment_pb.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/deployment_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/monitoring_pb.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/monitoring_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/cloud/cloudsecuritycompliance/v1/audit.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/cloud/cloudsecuritycompliance/v1/cm_enrollment_service.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/cloud/cloudsecuritycompliance/v1/common.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/cloud/cloudsecuritycompliance/v1/config.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/cloud/cloudsecuritycompliance/v1/deployment.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/cloud/cloudsecuritycompliance/v1/monitoring.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/type/interval.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/audit/create_framework_audit.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/audit/generate_framework_audit_scope_report.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/audit/get_framework_audit.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/audit/list_framework_audits.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/cm_enrollment_service/calculate_effective_cm_enrollment.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/cm_enrollment_service/update_cm_enrollment.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/create_cloud_control.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/create_framework.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/delete_cloud_control.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/delete_framework.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/get_cloud_control.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/get_framework.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/list_cloud_controls.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/list_frameworks.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/update_cloud_control.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/update_framework.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/deployment/create_framework_deployment.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/deployment/delete_framework_deployment.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/deployment/get_cloud_control_deployment.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/deployment/get_framework_deployment.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/deployment/list_cloud_control_deployments.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/deployment/list_framework_deployments.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/monitoring/aggregate_framework_compliance_report.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/monitoring/fetch_framework_compliance_report.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/monitoring/list_control_compliance_summaries.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/monitoring/list_finding_summaries.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/monitoring/list_framework_compliance_summaries.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/snippet_metadata_google.cloud.cloudsecuritycompliance.v1.json create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/audit_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/audit_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/audit_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/audit_test.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/cm_enrollment_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/cm_enrollment_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/cm_enrollment_service_test.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/config_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/config_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/config_test.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/deployment_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/deployment_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/deployment_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/deployment_test.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/monitoring_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/monitoring_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/monitoring_test.rb create mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/helper.rb diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/.gitignore b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/.repo-metadata.json new file mode 100644 index 000000000000..b81573b51d64 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "cloudsecuritycompliance.googleapis.com", + "api_shortname": "cloudsecuritycompliance", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-cloud_security_compliance-v1/latest", + "distribution_name": "google-cloud-cloud_security_compliance-v1", + "is_cloud": true, + "language": "ruby", + "name": "cloudsecuritycompliance", + "name_pretty": "Cloud Security Compliance V1 API", + "product_documentation": "https://cloud.google.com/security-command-center/docs/compliance-manager-overview", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "google-cloud-cloud_security_compliance-v1 is the official client library for the Cloud Security Compliance V1 API. Note that google-cloud-cloud_security_compliance-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-cloud_security_compliance instead. See the readme for more details.", + "ruby-cloud-product-url": "https://cloud.google.com/security-command-center/docs/compliance-manager-overview", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/.rubocop.yml b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/.rubocop.yml new file mode 100644 index 000000000000..16ae582e9c51 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-cloud_security_compliance-v1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-cloud-cloud_security_compliance-v1.rb" diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/.toys.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/.yardopts b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/.yardopts new file mode 100644 index 000000000000..656b6b310703 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Cloud Security Compliance V1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..151c89ed0b9a --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-cloud_security_compliance-v1 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-cloud-cloud_security_compliance-v1 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/cloud/cloud_security_compliance/v1" + +client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/cloud_security_compliance/v1" + +::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client.new +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-cloud-cloud_security_compliance-v1 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/cloud/cloud_security_compliance/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client.new +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/Gemfile b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/Gemfile @@ -0,0 +1,14 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/LICENSE.md b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/README.md b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/README.md new file mode 100644 index 000000000000..89c2e7decfb0 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Cloud Security Compliance V1 API + +API Client library for the Cloud Security Compliance V1 API + +google-cloud-cloud_security_compliance-v1 is the official client library for the Cloud Security Compliance V1 API. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Cloud Security Compliance V1 API. Most users should consider using +the main client gem, +[google-cloud-cloud_security_compliance](https://rubygems.org/gems/google-cloud-cloud_security_compliance). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-cloud_security_compliance-v1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/cloudsecuritycompliance.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/cloud_security_compliance/v1" + +client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client.new +request = ::Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportRequest.new # (request fields as keyword arguments...) +response = client.generate_framework_audit_scope_report request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-cloud_security_compliance-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/security-command-center/docs/compliance-manager-overview) +for general usage information. + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +You can customize logging by modifying the `logger` configuration when +constructing a client object. For example: + +```ruby +require "google/cloud/cloud_security_compliance/v1" +require "logger" + +client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.0+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-cloud_security_compliance`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-cloud_security_compliance-v1`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-cloud-cloud_security_compliance`. +The main client is recommended because it will embody the best practices for +accessing the service, and may also provide more convenient interfaces or +tighter integration into frameworks and third-party libraries. In addition, the +documentation and samples published by Google will generally demonstrate use of +the main client. + +### Why would I want to use a versioned client? + +You can use a versioned client if you are content with a possibly lower-level +class interface, you explicitly want to avoid features provided by the main +client, or you want to access a specific service version not be covered by the +main client. You can identify versioned client gems because the service version +is part of the name, e.g. `google-cloud-cloud_security_compliance-v1`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/Rakefile b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/Rakefile new file mode 100644 index 000000000000..14af38bc5501 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-cloud_security_compliance-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["GOOGLE_CLOUD_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || + ENV["GCLOUD_TEST_KEYFILE_JSON"] + end + if project.nil? || keyfile.nil? + fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/cloud_security_compliance/v1/audit/credentials" + ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["GOOGLE_CLOUD_PROJECT"] = project + ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project + ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile + + Rake::Task["acceptance:run"].invoke +end + +namespace :acceptance do + task :run do + if File.directory? "acceptance" + Rake::Task[:smoke_test].invoke + else + puts "The google-cloud-cloud_security_compliance-v1 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-cloud_security_compliance-v1 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-cloud_security_compliance-v1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-cloud_security_compliance-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-cloud_security_compliance-v1" + header "google-cloud-cloud_security_compliance-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-cloud_security_compliance-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-cloud_security_compliance-v1 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-cloud-cloud_security_compliance-v1 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-cloud-cloud_security_compliance-v1 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/gapic_metadata.json new file mode 100644 index 000000000000..a789695493ca --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/gapic_metadata.json @@ -0,0 +1,189 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.cloudsecuritycompliance.v1", + "libraryPackage": "::Google::Cloud::CloudSecurityCompliance::V1", + "services": { + "Audit": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client", + "rpcs": { + "GenerateFrameworkAuditScopeReport": { + "methods": [ + "generate_framework_audit_scope_report" + ] + }, + "CreateFrameworkAudit": { + "methods": [ + "create_framework_audit" + ] + }, + "ListFrameworkAudits": { + "methods": [ + "list_framework_audits" + ] + }, + "GetFrameworkAudit": { + "methods": [ + "get_framework_audit" + ] + } + } + } + } + }, + "CmEnrollmentService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Client", + "rpcs": { + "UpdateCmEnrollment": { + "methods": [ + "update_cm_enrollment" + ] + }, + "CalculateEffectiveCmEnrollment": { + "methods": [ + "calculate_effective_cm_enrollment" + ] + } + } + } + } + }, + "Config": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::CloudSecurityCompliance::V1::Config::Client", + "rpcs": { + "ListFrameworks": { + "methods": [ + "list_frameworks" + ] + }, + "GetFramework": { + "methods": [ + "get_framework" + ] + }, + "CreateFramework": { + "methods": [ + "create_framework" + ] + }, + "UpdateFramework": { + "methods": [ + "update_framework" + ] + }, + "DeleteFramework": { + "methods": [ + "delete_framework" + ] + }, + "ListCloudControls": { + "methods": [ + "list_cloud_controls" + ] + }, + "GetCloudControl": { + "methods": [ + "get_cloud_control" + ] + }, + "CreateCloudControl": { + "methods": [ + "create_cloud_control" + ] + }, + "UpdateCloudControl": { + "methods": [ + "update_cloud_control" + ] + }, + "DeleteCloudControl": { + "methods": [ + "delete_cloud_control" + ] + } + } + } + } + }, + "Deployment": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client", + "rpcs": { + "CreateFrameworkDeployment": { + "methods": [ + "create_framework_deployment" + ] + }, + "DeleteFrameworkDeployment": { + "methods": [ + "delete_framework_deployment" + ] + }, + "GetFrameworkDeployment": { + "methods": [ + "get_framework_deployment" + ] + }, + "ListFrameworkDeployments": { + "methods": [ + "list_framework_deployments" + ] + }, + "GetCloudControlDeployment": { + "methods": [ + "get_cloud_control_deployment" + ] + }, + "ListCloudControlDeployments": { + "methods": [ + "list_cloud_control_deployments" + ] + } + } + } + } + }, + "Monitoring": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client", + "rpcs": { + "ListFrameworkComplianceSummaries": { + "methods": [ + "list_framework_compliance_summaries" + ] + }, + "ListFindingSummaries": { + "methods": [ + "list_finding_summaries" + ] + }, + "FetchFrameworkComplianceReport": { + "methods": [ + "fetch_framework_compliance_report" + ] + }, + "ListControlComplianceSummaries": { + "methods": [ + "list_control_compliance_summaries" + ] + }, + "AggregateFrameworkComplianceReport": { + "methods": [ + "aggregate_framework_compliance_report" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/google-cloud-cloud_security_compliance-v1.gemspec b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/google-cloud-cloud_security_compliance-v1.gemspec new file mode 100644 index 000000000000..a61c2d1d8302 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/google-cloud-cloud_security_compliance-v1.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/cloud_security_compliance/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-cloud_security_compliance-v1" + gem.version = Google::Cloud::CloudSecurityCompliance::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "google-cloud-cloud_security_compliance-v1 is the official client library for the Cloud Security Compliance V1 API. Note that google-cloud-cloud_security_compliance-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-cloud_security_compliance instead. See the readme for more details." + gem.summary = "API Client library for the Cloud Security Compliance V1 API" + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-cloud-location", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google-cloud-cloud_security_compliance-v1.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google-cloud-cloud_security_compliance-v1.rb new file mode 100644 index 000000000000..5e2696da56de --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google-cloud-cloud_security_compliance-v1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/cloud/cloud_security_compliance/v1" diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1.rb new file mode 100644 index 000000000000..76b0323f5e7e --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/cloud_security_compliance/v1/audit" +require "google/cloud/cloud_security_compliance/v1/cm_enrollment_service" +require "google/cloud/cloud_security_compliance/v1/config" +require "google/cloud/cloud_security_compliance/v1/deployment" +require "google/cloud/cloud_security_compliance/v1/monitoring" +require "google/cloud/cloud_security_compliance/v1/version" + +module Google + module Cloud + module CloudSecurityCompliance + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/cloud_security_compliance/v1" + # client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/cloud_security_compliance/v1" + # client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/cloud_security_compliance/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit.rb new file mode 100644 index 000000000000..c4e93d3c03ba --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/cloud_security_compliance/v1/version" + +require "google/cloud/cloud_security_compliance/v1/audit/credentials" +require "google/cloud/cloud_security_compliance/v1/audit/paths" +require "google/cloud/cloud_security_compliance/v1/audit/operations" +require "google/cloud/cloud_security_compliance/v1/audit/client" +require "google/cloud/cloud_security_compliance/v1/audit/rest" + +module Google + module Cloud + module CloudSecurityCompliance + module V1 + ## + # Service describing handlers for resources + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/cloud_security_compliance/v1/audit" + # client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/cloud_security_compliance/v1/audit/rest" + # client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Rest::Client.new + # + module Audit + end + end + end + end +end + +helper_path = ::File.join __dir__, "audit", "helpers.rb" +require "google/cloud/cloud_security_compliance/v1/audit/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/client.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/client.rb new file mode 100644 index 000000000000..a7742a3b55c3 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/client.rb @@ -0,0 +1,859 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/cloudsecuritycompliance/v1/audit_pb" +require "google/cloud/location" + +module Google + module Cloud + module CloudSecurityCompliance + module V1 + module Audit + ## + # Client for the Audit service. + # + # Service describing handlers for resources + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudsecuritycompliance.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :audit_stub + + ## + # Configure the Audit Client class. + # + # See {::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all Audit clients + # ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "CloudSecurityCompliance", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.generate_framework_audit_scope_report.timeout = 60.0 + + default_config.rpcs.create_framework_audit.timeout = 60.0 + + default_config.rpcs.list_framework_audits.timeout = 60.0 + default_config.rpcs.list_framework_audits.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_framework_audit.timeout = 60.0 + default_config.rpcs.get_framework_audit.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the Audit Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @audit_stub.universe_domain + end + + ## + # Create a new Audit client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Audit client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/cloudsecuritycompliance/v1/audit_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @audit_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @audit_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @audit_stub.endpoint + config.universe_domain = @audit_stub.universe_domain + config.logger = @audit_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::CloudSecurityCompliance::V1::Audit::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @audit_stub.logger + end + + # Service calls + + ## + # Generates an audit scope report for a framework. + # + # @overload generate_framework_audit_scope_report(request, options = nil) + # Pass arguments to `generate_framework_audit_scope_report` via a request object, either of type + # {::Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload generate_framework_audit_scope_report(scope: nil, report_format: nil, compliance_framework: nil) + # Pass arguments to `generate_framework_audit_scope_report` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param scope [::String] + # Required. The organization, folder or project for the audit report. + # + # Supported formats are the following: + # + # * `projects/{project_id}/locations/{location}` + # * `folders/{folder_id}/locations/{location}` + # * `organizations/{organization_id}/locations/{location}` + # @param report_format [::Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportRequest::Format] + # Required. The format that the scope report bytes is returned in. + # @param compliance_framework [::String] + # Required. The compliance framework that the scope report is generated for. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/cloud_security_compliance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudSecurityCompliance::V1::Audit::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportRequest.new + # + # # Call the generate_framework_audit_scope_report method. + # result = client.generate_framework_audit_scope_report request + # + # # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportResponse. + # p result + # + def generate_framework_audit_scope_report request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.generate_framework_audit_scope_report.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.scope + header_params["scope"] = request.scope + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.generate_framework_audit_scope_report.timeout, + metadata: metadata, + retry_policy: @config.rpcs.generate_framework_audit_scope_report.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @audit_stub.call_rpc :generate_framework_audit_scope_report, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an audit scope report for a framework. + # + # @overload create_framework_audit(request, options = nil) + # Pass arguments to `create_framework_audit` via a request object, either of type + # {::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkAuditRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkAuditRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_framework_audit(parent: nil, framework_audit_id: nil, framework_audit: nil) + # Pass arguments to `create_framework_audit` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource where this framework audit is created. + # + # Supported formats are the following: + # + # * `organizations/{organization_id}/locations/{location}` + # * `folders/{folder_id}/locations/{location}` + # * `projects/{project_id}/locations/{location}` + # @param framework_audit_id [::String] + # Optional. The ID to use for the framework audit. The ID becomes the final + # component of the framework audit's full resource name. + # + # The ID must be between 4-63 characters, and valid characters + # are `\[a-z][0-9]-\`. + # @param framework_audit [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkAudit, ::Hash] + # Required. The framework audit to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/cloud_security_compliance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudSecurityCompliance::V1::Audit::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkAuditRequest.new + # + # # Call the create_framework_audit method. + # result = client.create_framework_audit request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_framework_audit request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkAuditRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_framework_audit.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_framework_audit.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_framework_audit.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @audit_stub.call_rpc :create_framework_audit, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the framework audits for a given organization, folder, or project. + # + # @overload list_framework_audits(request, options = nil) + # Pass arguments to `list_framework_audits` via a request object, either of type + # {::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkAuditsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkAuditsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_framework_audits(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_framework_audits` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource where the framework audits are listed. + # + # Supported formats are the following: + # + # * `organizations/{organization_id}/locations/{location}` + # * `folders/{folder_id}/locations/{location}` + # * `projects/{project_id}/locations/{location}` + # @param page_size [::Integer] + # Optional. The maximum number of framework audits to return. The service + # might return fewer audits than this value. If unspecified, a maximum of 10 + # framework audits are returned. The maximum value is 50; values above 50 are + # limited to 50. + # @param page_token [::String] + # Optional. The `next_page_token` value that's returned from a previous list + # request, if any. + # @param filter [::String] + # Optional. The filters to apply to the framework audits. + # Supported filters are `compliance_framework`, `compliance_state`, + # `create_time,` and `framework_audit_name`. If the filter is invalid, an + # invalid argument error is returned. + # For syntax details, see [AIP-160][https://google.aip.dev/160]. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::FrameworkAudit>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::FrameworkAudit>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/cloud_security_compliance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudSecurityCompliance::V1::Audit::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkAuditsRequest.new + # + # # Call the list_framework_audits method. + # result = client.list_framework_audits request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::CloudSecurityCompliance::V1::FrameworkAudit. + # p item + # end + # + def list_framework_audits request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkAuditsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_framework_audits.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_framework_audits.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_framework_audits.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @audit_stub.call_rpc :list_framework_audits, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @audit_stub, :list_framework_audits, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the details for a framework audit. + # + # @overload get_framework_audit(request, options = nil) + # Pass arguments to `get_framework_audit` via a request object, either of type + # {::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkAuditRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkAuditRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_framework_audit(name: nil) + # Pass arguments to `get_framework_audit` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the framework audit to retrieve. + # + # Supported formats are the following: + # + # * `organizations/{organization_id}/locations/{location}/frameworkAudits/{frameworkAuditName}` + # * `folders/{folder_id}/locations/{location}/frameworkAudits/{frameworkAuditName}` + # * `projects/{project_id}/locations/{location}/frameworkAudits/{frameworkAuditName}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkAudit] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkAudit] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/cloud_security_compliance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudSecurityCompliance::V1::Audit::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkAuditRequest.new + # + # # Call the get_framework_audit method. + # result = client.get_framework_audit request + # + # # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::FrameworkAudit. + # p result + # + def get_framework_audit request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkAuditRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_framework_audit.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_framework_audit.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_framework_audit.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @audit_stub.call_rpc :get_framework_audit, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Audit API. + # + # This class represents the configuration for Audit, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # generate_framework_audit_scope_report to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.generate_framework_audit_scope_report.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.generate_framework_audit_scope_report.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "cloudsecuritycompliance.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Audit API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `generate_framework_audit_scope_report` + # @return [::Gapic::Config::Method] + # + attr_reader :generate_framework_audit_scope_report + ## + # RPC-specific configuration for `create_framework_audit` + # @return [::Gapic::Config::Method] + # + attr_reader :create_framework_audit + ## + # RPC-specific configuration for `list_framework_audits` + # @return [::Gapic::Config::Method] + # + attr_reader :list_framework_audits + ## + # RPC-specific configuration for `get_framework_audit` + # @return [::Gapic::Config::Method] + # + attr_reader :get_framework_audit + + # @private + def initialize parent_rpcs = nil + generate_framework_audit_scope_report_config = parent_rpcs.generate_framework_audit_scope_report if parent_rpcs.respond_to? :generate_framework_audit_scope_report + @generate_framework_audit_scope_report = ::Gapic::Config::Method.new generate_framework_audit_scope_report_config + create_framework_audit_config = parent_rpcs.create_framework_audit if parent_rpcs.respond_to? :create_framework_audit + @create_framework_audit = ::Gapic::Config::Method.new create_framework_audit_config + list_framework_audits_config = parent_rpcs.list_framework_audits if parent_rpcs.respond_to? :list_framework_audits + @list_framework_audits = ::Gapic::Config::Method.new list_framework_audits_config + get_framework_audit_config = parent_rpcs.get_framework_audit if parent_rpcs.respond_to? :get_framework_audit + @get_framework_audit = ::Gapic::Config::Method.new get_framework_audit_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/credentials.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/credentials.rb new file mode 100644 index 000000000000..81bf2d420b1f --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module CloudSecurityCompliance + module V1 + module Audit + # Credentials for the Audit API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/operations.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/operations.rb new file mode 100644 index 000000000000..92f86c503b05 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/operations.rb @@ -0,0 +1,841 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module CloudSecurityCompliance + module V1 + module Audit + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudsecuritycompliance.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the Audit Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the Audit Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.wait_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "cloudsecuritycompliance.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/paths.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/paths.rb new file mode 100644 index 000000000000..6df27ab421be --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/paths.rb @@ -0,0 +1,110 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module CloudSecurityCompliance + module V1 + module Audit + # Path helper methods for the Audit API. + module Paths + ## + # Create a fully-qualified FrameworkAudit resource string. + # + # @overload framework_audit_path(project:, location:, framework_audit:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/frameworkAudits/{framework_audit}` + # + # @param project [String] + # @param location [String] + # @param framework_audit [String] + # + # @overload framework_audit_path(organization:, location:, framework_audit:) + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/frameworkAudits/{framework_audit}` + # + # @param organization [String] + # @param location [String] + # @param framework_audit [String] + # + # @return [::String] + def framework_audit_path **args + resources = { + "framework_audit:location:project" => (proc do |project:, location:, framework_audit:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/frameworkAudits/#{framework_audit}" + end), + "framework_audit:location:organization" => (proc do |organization:, location:, framework_audit:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/frameworkAudits/#{framework_audit}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + ## + # Create a fully-qualified OrganizationLocation resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}` + # + # @param organization [String] + # @param location [String] + # + # @return [::String] + def organization_location_path organization:, location: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/rest.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/rest.rb new file mode 100644 index 000000000000..f4f350e0fbd7 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/rest.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/cloud_security_compliance/v1/version" +require "google/cloud/cloud_security_compliance/v1/bindings_override" + +require "google/cloud/cloud_security_compliance/v1/audit/credentials" +require "google/cloud/cloud_security_compliance/v1/audit/paths" +require "google/cloud/cloud_security_compliance/v1/audit/rest/operations" +require "google/cloud/cloud_security_compliance/v1/audit/rest/client" + +module Google + module Cloud + module CloudSecurityCompliance + module V1 + ## + # Service describing handlers for resources + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/cloud_security_compliance/v1/audit/rest" + # client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Rest::Client.new + # + module Audit + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/cloud_security_compliance/v1/audit/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/rest/client.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/rest/client.rb new file mode 100644 index 000000000000..10a21a6f2e15 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/rest/client.rb @@ -0,0 +1,796 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/cloudsecuritycompliance/v1/audit_pb" +require "google/cloud/cloud_security_compliance/v1/audit/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Cloud + module CloudSecurityCompliance + module V1 + module Audit + module Rest + ## + # REST client for the Audit service. + # + # Service describing handlers for resources + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudsecuritycompliance.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :audit_stub + + ## + # Configure the Audit Client class. + # + # See {::Google::Cloud::CloudSecurityCompliance::V1::Audit::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all Audit clients + # ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "CloudSecurityCompliance", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.generate_framework_audit_scope_report.timeout = 60.0 + + default_config.rpcs.create_framework_audit.timeout = 60.0 + + default_config.rpcs.list_framework_audits.timeout = 60.0 + default_config.rpcs.list_framework_audits.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_framework_audit.timeout = 60.0 + default_config.rpcs.get_framework_audit.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the Audit Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::CloudSecurityCompliance::V1::Audit::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @audit_stub.universe_domain + end + + ## + # Create a new Audit REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Audit client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Rest::Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @audit_stub = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @audit_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @audit_stub.endpoint + config.universe_domain = @audit_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @audit_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::CloudSecurityCompliance::V1::Audit::Rest::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @audit_stub.logger + end + + # Service calls + + ## + # Generates an audit scope report for a framework. + # + # @overload generate_framework_audit_scope_report(request, options = nil) + # Pass arguments to `generate_framework_audit_scope_report` via a request object, either of type + # {::Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload generate_framework_audit_scope_report(scope: nil, report_format: nil, compliance_framework: nil) + # Pass arguments to `generate_framework_audit_scope_report` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param scope [::String] + # Required. The organization, folder or project for the audit report. + # + # Supported formats are the following: + # + # * `projects/{project_id}/locations/{location}` + # * `folders/{folder_id}/locations/{location}` + # * `organizations/{organization_id}/locations/{location}` + # @param report_format [::Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportRequest::Format] + # Required. The format that the scope report bytes is returned in. + # @param compliance_framework [::String] + # Required. The compliance framework that the scope report is generated for. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/cloud_security_compliance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudSecurityCompliance::V1::Audit::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportRequest.new + # + # # Call the generate_framework_audit_scope_report method. + # result = client.generate_framework_audit_scope_report request + # + # # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportResponse. + # p result + # + def generate_framework_audit_scope_report request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.generate_framework_audit_scope_report.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.generate_framework_audit_scope_report.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.generate_framework_audit_scope_report.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @audit_stub.generate_framework_audit_scope_report request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an audit scope report for a framework. + # + # @overload create_framework_audit(request, options = nil) + # Pass arguments to `create_framework_audit` via a request object, either of type + # {::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkAuditRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkAuditRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_framework_audit(parent: nil, framework_audit_id: nil, framework_audit: nil) + # Pass arguments to `create_framework_audit` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource where this framework audit is created. + # + # Supported formats are the following: + # + # * `organizations/{organization_id}/locations/{location}` + # * `folders/{folder_id}/locations/{location}` + # * `projects/{project_id}/locations/{location}` + # @param framework_audit_id [::String] + # Optional. The ID to use for the framework audit. The ID becomes the final + # component of the framework audit's full resource name. + # + # The ID must be between 4-63 characters, and valid characters + # are `\[a-z][0-9]-\`. + # @param framework_audit [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkAudit, ::Hash] + # Required. The framework audit to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/cloud_security_compliance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudSecurityCompliance::V1::Audit::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkAuditRequest.new + # + # # Call the create_framework_audit method. + # result = client.create_framework_audit request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_framework_audit request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkAuditRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_framework_audit.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_framework_audit.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_framework_audit.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @audit_stub.create_framework_audit request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the framework audits for a given organization, folder, or project. + # + # @overload list_framework_audits(request, options = nil) + # Pass arguments to `list_framework_audits` via a request object, either of type + # {::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkAuditsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkAuditsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_framework_audits(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_framework_audits` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource where the framework audits are listed. + # + # Supported formats are the following: + # + # * `organizations/{organization_id}/locations/{location}` + # * `folders/{folder_id}/locations/{location}` + # * `projects/{project_id}/locations/{location}` + # @param page_size [::Integer] + # Optional. The maximum number of framework audits to return. The service + # might return fewer audits than this value. If unspecified, a maximum of 10 + # framework audits are returned. The maximum value is 50; values above 50 are + # limited to 50. + # @param page_token [::String] + # Optional. The `next_page_token` value that's returned from a previous list + # request, if any. + # @param filter [::String] + # Optional. The filters to apply to the framework audits. + # Supported filters are `compliance_framework`, `compliance_state`, + # `create_time,` and `framework_audit_name`. If the filter is invalid, an + # invalid argument error is returned. + # For syntax details, see [AIP-160][https://google.aip.dev/160]. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::FrameworkAudit>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::FrameworkAudit>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/cloud_security_compliance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudSecurityCompliance::V1::Audit::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkAuditsRequest.new + # + # # Call the list_framework_audits method. + # result = client.list_framework_audits request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::CloudSecurityCompliance::V1::FrameworkAudit. + # p item + # end + # + def list_framework_audits request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkAuditsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_framework_audits.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_framework_audits.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_framework_audits.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @audit_stub.list_framework_audits request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @audit_stub, :list_framework_audits, "framework_audits", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the details for a framework audit. + # + # @overload get_framework_audit(request, options = nil) + # Pass arguments to `get_framework_audit` via a request object, either of type + # {::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkAuditRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkAuditRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_framework_audit(name: nil) + # Pass arguments to `get_framework_audit` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the framework audit to retrieve. + # + # Supported formats are the following: + # + # * `organizations/{organization_id}/locations/{location}/frameworkAudits/{frameworkAuditName}` + # * `folders/{folder_id}/locations/{location}/frameworkAudits/{frameworkAuditName}` + # * `projects/{project_id}/locations/{location}/frameworkAudits/{frameworkAuditName}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkAudit] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkAudit] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/cloud_security_compliance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudSecurityCompliance::V1::Audit::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkAuditRequest.new + # + # # Call the get_framework_audit method. + # result = client.get_framework_audit request + # + # # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::FrameworkAudit. + # p result + # + def get_framework_audit request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkAuditRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_framework_audit.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_framework_audit.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_framework_audit.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @audit_stub.get_framework_audit request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Audit REST API. + # + # This class represents the configuration for Audit REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::CloudSecurityCompliance::V1::Audit::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # generate_framework_audit_scope_report to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.generate_framework_audit_scope_report.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.generate_framework_audit_scope_report.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "cloudsecuritycompliance.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + # Overrides for http bindings for the RPCs of this service + # are only used when this service is used as mixin, and only + # by the host service. + # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] + config_attr :bindings_override, {}, ::Hash, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Audit API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `generate_framework_audit_scope_report` + # @return [::Gapic::Config::Method] + # + attr_reader :generate_framework_audit_scope_report + ## + # RPC-specific configuration for `create_framework_audit` + # @return [::Gapic::Config::Method] + # + attr_reader :create_framework_audit + ## + # RPC-specific configuration for `list_framework_audits` + # @return [::Gapic::Config::Method] + # + attr_reader :list_framework_audits + ## + # RPC-specific configuration for `get_framework_audit` + # @return [::Gapic::Config::Method] + # + attr_reader :get_framework_audit + + # @private + def initialize parent_rpcs = nil + generate_framework_audit_scope_report_config = parent_rpcs.generate_framework_audit_scope_report if parent_rpcs.respond_to? :generate_framework_audit_scope_report + @generate_framework_audit_scope_report = ::Gapic::Config::Method.new generate_framework_audit_scope_report_config + create_framework_audit_config = parent_rpcs.create_framework_audit if parent_rpcs.respond_to? :create_framework_audit + @create_framework_audit = ::Gapic::Config::Method.new create_framework_audit_config + list_framework_audits_config = parent_rpcs.list_framework_audits if parent_rpcs.respond_to? :list_framework_audits + @list_framework_audits = ::Gapic::Config::Method.new list_framework_audits_config + get_framework_audit_config = parent_rpcs.get_framework_audit if parent_rpcs.respond_to? :get_framework_audit + @get_framework_audit = ::Gapic::Config::Method.new get_framework_audit_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/rest/operations.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/rest/operations.rb new file mode 100644 index 000000000000..c0e447f12d53 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/rest/operations.rb @@ -0,0 +1,954 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" + +module Google + module Cloud + module CloudSecurityCompliance + module V1 + module Audit + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudsecuritycompliance.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the Audit Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the Audit Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = OperationsServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.list_operations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.get_operation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.delete_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "cloudsecuritycompliance.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/rest/service_stub.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/rest/service_stub.rb new file mode 100644 index 000000000000..093f7a5208b3 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/rest/service_stub.rb @@ -0,0 +1,387 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/cloudsecuritycompliance/v1/audit_pb" + +module Google + module Cloud + module CloudSecurityCompliance + module V1 + module Audit + module Rest + ## + # REST service stub for the Audit service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the generate_framework_audit_scope_report REST call + # + # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportResponse] + # A result object deserialized from the server's reply + def generate_framework_audit_scope_report request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_generate_framework_audit_scope_report_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "generate_framework_audit_scope_report", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_framework_audit REST call + # + # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkAuditRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_framework_audit request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_framework_audit_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_framework_audit", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_framework_audits REST call + # + # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkAuditsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkAuditsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkAuditsResponse] + # A result object deserialized from the server's reply + def list_framework_audits request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_framework_audits_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_framework_audits", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkAuditsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_framework_audit REST call + # + # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkAuditRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkAudit] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkAudit] + # A result object deserialized from the server's reply + def get_framework_audit request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_framework_audit_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_framework_audit", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CloudSecurityCompliance::V1::FrameworkAudit.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the generate_framework_audit_scope_report REST call + # + # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_generate_framework_audit_scope_report_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{scope}/frameworkAuditScopeReports:generateFrameworkAuditScopeReport", + body: "*", + matches: [ + ["scope", %r{^folders/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{scope}/frameworkAuditScopeReports:generateFrameworkAuditScopeReport", + body: "*", + matches: [ + ["scope", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{scope}/frameworkAuditScopeReports:generateFrameworkAuditScopeReport", + body: "*", + matches: [ + ["scope", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_framework_audit REST call + # + # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkAuditRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_framework_audit_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/frameworkAudits", + body: "framework_audit", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/frameworkAudits", + body: "framework_audit", + matches: [ + ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/frameworkAudits", + body: "framework_audit", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_framework_audits REST call + # + # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkAuditsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_framework_audits_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/frameworkAudits", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/frameworkAudits", + matches: [ + ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/frameworkAudits", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_framework_audit REST call + # + # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkAuditRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_framework_audit_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/frameworkAudits/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^folders/[^/]+/locations/[^/]+/frameworkAudits/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/frameworkAudits/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/bindings_override.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/bindings_override.rb new file mode 100644 index 000000000000..a417a8b9df1f --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/bindings_override.rb @@ -0,0 +1,91 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" + +module Google + module Cloud + module CloudSecurityCompliance + ## + # @example Loading just the REST part of this package, including all its services, and instantiating a REST client + # + # require "google/cloud/cloud_security_compliance/v1/rest" + # client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Rest::Client.new + # + module V1 + ## + # @private + # Initialize the mixin bindings configuration + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "CloudSecurityCompliance"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config + default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{name}/locations", + matches: [ + ["name", %r{^organizations/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{name}/locations", + matches: [ + ["name", %r{^projects/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config + end + yield @configure if block_given? + @configure + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/cm_enrollment_service.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/cm_enrollment_service.rb new file mode 100644 index 000000000000..28b1c5c5639c --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/cm_enrollment_service.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/cloud_security_compliance/v1/version" + +require "google/cloud/cloud_security_compliance/v1/cm_enrollment_service/credentials" +require "google/cloud/cloud_security_compliance/v1/cm_enrollment_service/paths" +require "google/cloud/cloud_security_compliance/v1/cm_enrollment_service/client" +require "google/cloud/cloud_security_compliance/v1/cm_enrollment_service/rest" + +module Google + module Cloud + module CloudSecurityCompliance + module V1 + ## + # Service describing CmEnrollment related RPCs for + # complianceManager. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/cloud_security_compliance/v1/cm_enrollment_service" + # client = ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/cloud_security_compliance/v1/cm_enrollment_service/rest" + # client = ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Rest::Client.new + # + module CmEnrollmentService + end + end + end + end +end + +helper_path = ::File.join __dir__, "cm_enrollment_service", "helpers.rb" +require "google/cloud/cloud_security_compliance/v1/cm_enrollment_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/cm_enrollment_service/client.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/cm_enrollment_service/client.rb new file mode 100644 index 000000000000..abf743faabce --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/cm_enrollment_service/client.rb @@ -0,0 +1,608 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/cloudsecuritycompliance/v1/cm_enrollment_service_pb" +require "google/cloud/location" + +module Google + module Cloud + module CloudSecurityCompliance + module V1 + module CmEnrollmentService + ## + # Client for the CmEnrollmentService service. + # + # Service describing CmEnrollment related RPCs for + # complianceManager. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudsecuritycompliance.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :cm_enrollment_service_stub + + ## + # Configure the CmEnrollmentService Client class. + # + # See {::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CmEnrollmentService clients + # ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "CloudSecurityCompliance", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.update_cm_enrollment.timeout = 60.0 + default_config.rpcs.update_cm_enrollment.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.calculate_effective_cm_enrollment.timeout = 60.0 + default_config.rpcs.calculate_effective_cm_enrollment.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CmEnrollmentService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @cm_enrollment_service_stub.universe_domain + end + + ## + # Create a new CmEnrollmentService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CmEnrollmentService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/cloudsecuritycompliance/v1/cm_enrollment_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @cm_enrollment_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @cm_enrollment_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @cm_enrollment_service_stub.endpoint + config.universe_domain = @cm_enrollment_service_stub.universe_domain + config.logger = @cm_enrollment_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @cm_enrollment_service_stub.logger + end + + # Service calls + + ## + # Updates the Compliance Manager enrollment for a resource to facilitate + # an audit. + # Use this method to enroll a resource in Compliance Manager or to + # create or update feature-specific configurations. + # + # @overload update_cm_enrollment(request, options = nil) + # Pass arguments to `update_cm_enrollment` via a request object, either of type + # {::Google::Cloud::CloudSecurityCompliance::V1::UpdateCmEnrollmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudSecurityCompliance::V1::UpdateCmEnrollmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_cm_enrollment(cm_enrollment: nil, update_mask: nil) + # Pass arguments to `update_cm_enrollment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param cm_enrollment [::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollment, ::Hash] + # Required. The Compliance Manager enrollment to update. + # The `name` field is used to identify the settings that you want to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of fields that you want to update. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollment] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollment] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/cloud_security_compliance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudSecurityCompliance::V1::UpdateCmEnrollmentRequest.new + # + # # Call the update_cm_enrollment method. + # result = client.update_cm_enrollment request + # + # # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::CmEnrollment. + # p result + # + def update_cm_enrollment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::UpdateCmEnrollmentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_cm_enrollment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.cm_enrollment&.name + header_params["cm_enrollment.name"] = request.cm_enrollment.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_cm_enrollment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_cm_enrollment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cm_enrollment_service_stub.call_rpc :update_cm_enrollment, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Calculates the effective Compliance Manager enrollment for a resource. + # An effective enrollment is either a direct enrollment of a + # resource (if it exists), or an enrollment of the closest parent of a + # resource that's enrolled in Compliance Manager. + # + # @overload calculate_effective_cm_enrollment(request, options = nil) + # Pass arguments to `calculate_effective_cm_enrollment` via a request object, either of type + # {::Google::Cloud::CloudSecurityCompliance::V1::CalculateEffectiveCmEnrollmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudSecurityCompliance::V1::CalculateEffectiveCmEnrollmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload calculate_effective_cm_enrollment(name: nil) + # Pass arguments to `calculate_effective_cm_enrollment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the Compliance Manager enrollment to calculate. + # + # Supported formats are the following: + # + # * `organizations/{organization_id}/locations/{location}/cmEnrollment` + # * `folders/{folder_id}/locations/{location}/cmEnrollment` + # * `projects/{project_id}/locations/{location}/cmEnrollment` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::CloudSecurityCompliance::V1::CalculateEffectiveCmEnrollmentResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::CloudSecurityCompliance::V1::CalculateEffectiveCmEnrollmentResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/cloud_security_compliance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudSecurityCompliance::V1::CalculateEffectiveCmEnrollmentRequest.new + # + # # Call the calculate_effective_cm_enrollment method. + # result = client.calculate_effective_cm_enrollment request + # + # # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::CalculateEffectiveCmEnrollmentResponse. + # p result + # + def calculate_effective_cm_enrollment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::CalculateEffectiveCmEnrollmentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.calculate_effective_cm_enrollment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.calculate_effective_cm_enrollment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.calculate_effective_cm_enrollment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cm_enrollment_service_stub.call_rpc :calculate_effective_cm_enrollment, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the CmEnrollmentService API. + # + # This class represents the configuration for CmEnrollmentService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # update_cm_enrollment to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.update_cm_enrollment.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.update_cm_enrollment.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "cloudsecuritycompliance.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the CmEnrollmentService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `update_cm_enrollment` + # @return [::Gapic::Config::Method] + # + attr_reader :update_cm_enrollment + ## + # RPC-specific configuration for `calculate_effective_cm_enrollment` + # @return [::Gapic::Config::Method] + # + attr_reader :calculate_effective_cm_enrollment + + # @private + def initialize parent_rpcs = nil + update_cm_enrollment_config = parent_rpcs.update_cm_enrollment if parent_rpcs.respond_to? :update_cm_enrollment + @update_cm_enrollment = ::Gapic::Config::Method.new update_cm_enrollment_config + calculate_effective_cm_enrollment_config = parent_rpcs.calculate_effective_cm_enrollment if parent_rpcs.respond_to? :calculate_effective_cm_enrollment + @calculate_effective_cm_enrollment = ::Gapic::Config::Method.new calculate_effective_cm_enrollment_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/cm_enrollment_service/credentials.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/cm_enrollment_service/credentials.rb new file mode 100644 index 000000000000..a90c60f1296a --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/cm_enrollment_service/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module CloudSecurityCompliance + module V1 + module CmEnrollmentService + # Credentials for the CmEnrollmentService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/cm_enrollment_service/paths.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/cm_enrollment_service/paths.rb new file mode 100644 index 000000000000..4bea24069860 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/cm_enrollment_service/paths.rb @@ -0,0 +1,72 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module CloudSecurityCompliance + module V1 + module CmEnrollmentService + # Path helper methods for the CmEnrollmentService API. + module Paths + ## + # Create a fully-qualified CmEnrollment resource string. + # + # @overload cm_enrollment_path(organization:, location:) + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/cmEnrollment` + # + # @param organization [String] + # @param location [String] + # + # @overload cm_enrollment_path(project:, location:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/cmEnrollment` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def cm_enrollment_path **args + resources = { + "location:organization" => (proc do |organization:, location:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/cmEnrollment" + end), + "location:project" => (proc do |project:, location:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}/cmEnrollment" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/cm_enrollment_service/rest.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/cm_enrollment_service/rest.rb new file mode 100644 index 000000000000..5a342cc1a8b3 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/cm_enrollment_service/rest.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/cloud_security_compliance/v1/version" +require "google/cloud/cloud_security_compliance/v1/bindings_override" + +require "google/cloud/cloud_security_compliance/v1/cm_enrollment_service/credentials" +require "google/cloud/cloud_security_compliance/v1/cm_enrollment_service/paths" +require "google/cloud/cloud_security_compliance/v1/cm_enrollment_service/rest/client" + +module Google + module Cloud + module CloudSecurityCompliance + module V1 + ## + # Service describing CmEnrollment related RPCs for + # complianceManager. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/cloud_security_compliance/v1/cm_enrollment_service/rest" + # client = ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Rest::Client.new + # + module CmEnrollmentService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/cloud_security_compliance/v1/cm_enrollment_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/cm_enrollment_service/rest/client.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/cm_enrollment_service/rest/client.rb new file mode 100644 index 000000000000..f09623f4d643 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/cm_enrollment_service/rest/client.rb @@ -0,0 +1,559 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/cloudsecuritycompliance/v1/cm_enrollment_service_pb" +require "google/cloud/cloud_security_compliance/v1/cm_enrollment_service/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Cloud + module CloudSecurityCompliance + module V1 + module CmEnrollmentService + module Rest + ## + # REST client for the CmEnrollmentService service. + # + # Service describing CmEnrollment related RPCs for + # complianceManager. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudsecuritycompliance.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :cm_enrollment_service_stub + + ## + # Configure the CmEnrollmentService Client class. + # + # See {::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CmEnrollmentService clients + # ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "CloudSecurityCompliance", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.update_cm_enrollment.timeout = 60.0 + default_config.rpcs.update_cm_enrollment.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.calculate_effective_cm_enrollment.timeout = 60.0 + default_config.rpcs.calculate_effective_cm_enrollment.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CmEnrollmentService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @cm_enrollment_service_stub.universe_domain + end + + ## + # Create a new CmEnrollmentService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CmEnrollmentService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @cm_enrollment_service_stub = ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @cm_enrollment_service_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @cm_enrollment_service_stub.endpoint + config.universe_domain = @cm_enrollment_service_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @cm_enrollment_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @cm_enrollment_service_stub.logger + end + + # Service calls + + ## + # Updates the Compliance Manager enrollment for a resource to facilitate + # an audit. + # Use this method to enroll a resource in Compliance Manager or to + # create or update feature-specific configurations. + # + # @overload update_cm_enrollment(request, options = nil) + # Pass arguments to `update_cm_enrollment` via a request object, either of type + # {::Google::Cloud::CloudSecurityCompliance::V1::UpdateCmEnrollmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudSecurityCompliance::V1::UpdateCmEnrollmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_cm_enrollment(cm_enrollment: nil, update_mask: nil) + # Pass arguments to `update_cm_enrollment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param cm_enrollment [::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollment, ::Hash] + # Required. The Compliance Manager enrollment to update. + # The `name` field is used to identify the settings that you want to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of fields that you want to update. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollment] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/cloud_security_compliance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudSecurityCompliance::V1::UpdateCmEnrollmentRequest.new + # + # # Call the update_cm_enrollment method. + # result = client.update_cm_enrollment request + # + # # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::CmEnrollment. + # p result + # + def update_cm_enrollment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::UpdateCmEnrollmentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_cm_enrollment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_cm_enrollment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_cm_enrollment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cm_enrollment_service_stub.update_cm_enrollment request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Calculates the effective Compliance Manager enrollment for a resource. + # An effective enrollment is either a direct enrollment of a + # resource (if it exists), or an enrollment of the closest parent of a + # resource that's enrolled in Compliance Manager. + # + # @overload calculate_effective_cm_enrollment(request, options = nil) + # Pass arguments to `calculate_effective_cm_enrollment` via a request object, either of type + # {::Google::Cloud::CloudSecurityCompliance::V1::CalculateEffectiveCmEnrollmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudSecurityCompliance::V1::CalculateEffectiveCmEnrollmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload calculate_effective_cm_enrollment(name: nil) + # Pass arguments to `calculate_effective_cm_enrollment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the Compliance Manager enrollment to calculate. + # + # Supported formats are the following: + # + # * `organizations/{organization_id}/locations/{location}/cmEnrollment` + # * `folders/{folder_id}/locations/{location}/cmEnrollment` + # * `projects/{project_id}/locations/{location}/cmEnrollment` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::CalculateEffectiveCmEnrollmentResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudSecurityCompliance::V1::CalculateEffectiveCmEnrollmentResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/cloud_security_compliance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudSecurityCompliance::V1::CalculateEffectiveCmEnrollmentRequest.new + # + # # Call the calculate_effective_cm_enrollment method. + # result = client.calculate_effective_cm_enrollment request + # + # # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::CalculateEffectiveCmEnrollmentResponse. + # p result + # + def calculate_effective_cm_enrollment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::CalculateEffectiveCmEnrollmentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.calculate_effective_cm_enrollment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.calculate_effective_cm_enrollment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.calculate_effective_cm_enrollment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cm_enrollment_service_stub.calculate_effective_cm_enrollment request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the CmEnrollmentService REST API. + # + # This class represents the configuration for CmEnrollmentService REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # update_cm_enrollment to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.update_cm_enrollment.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.update_cm_enrollment.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "cloudsecuritycompliance.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + # Overrides for http bindings for the RPCs of this service + # are only used when this service is used as mixin, and only + # by the host service. + # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] + config_attr :bindings_override, {}, ::Hash, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the CmEnrollmentService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `update_cm_enrollment` + # @return [::Gapic::Config::Method] + # + attr_reader :update_cm_enrollment + ## + # RPC-specific configuration for `calculate_effective_cm_enrollment` + # @return [::Gapic::Config::Method] + # + attr_reader :calculate_effective_cm_enrollment + + # @private + def initialize parent_rpcs = nil + update_cm_enrollment_config = parent_rpcs.update_cm_enrollment if parent_rpcs.respond_to? :update_cm_enrollment + @update_cm_enrollment = ::Gapic::Config::Method.new update_cm_enrollment_config + calculate_effective_cm_enrollment_config = parent_rpcs.calculate_effective_cm_enrollment if parent_rpcs.respond_to? :calculate_effective_cm_enrollment + @calculate_effective_cm_enrollment = ::Gapic::Config::Method.new calculate_effective_cm_enrollment_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/cm_enrollment_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/cm_enrollment_service/rest/service_stub.rb new file mode 100644 index 000000000000..a28e2c1c8efd --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/cm_enrollment_service/rest/service_stub.rb @@ -0,0 +1,234 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/cloudsecuritycompliance/v1/cm_enrollment_service_pb" + +module Google + module Cloud + module CloudSecurityCompliance + module V1 + module CmEnrollmentService + module Rest + ## + # REST service stub for the CmEnrollmentService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the update_cm_enrollment REST call + # + # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::UpdateCmEnrollmentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollment] + # A result object deserialized from the server's reply + def update_cm_enrollment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_cm_enrollment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_cm_enrollment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollment.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the calculate_effective_cm_enrollment REST call + # + # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::CalculateEffectiveCmEnrollmentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::CalculateEffectiveCmEnrollmentResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudSecurityCompliance::V1::CalculateEffectiveCmEnrollmentResponse] + # A result object deserialized from the server's reply + def calculate_effective_cm_enrollment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_calculate_effective_cm_enrollment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "calculate_effective_cm_enrollment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CloudSecurityCompliance::V1::CalculateEffectiveCmEnrollmentResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the update_cm_enrollment REST call + # + # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::UpdateCmEnrollmentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_cm_enrollment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{cm_enrollment.name}", + body: "cm_enrollment", + matches: [ + ["cm_enrollment.name", %r{^organizations/[^/]+/locations/[^/]+/cmEnrollment/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{cm_enrollment.name}", + body: "cm_enrollment", + matches: [ + ["cm_enrollment.name", %r{^folders/[^/]+/locations/[^/]+/cmEnrollment/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{cm_enrollment.name}", + body: "cm_enrollment", + matches: [ + ["cm_enrollment.name", %r{^projects/[^/]+/locations/[^/]+/cmEnrollment/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the calculate_effective_cm_enrollment REST call + # + # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::CalculateEffectiveCmEnrollmentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_calculate_effective_cm_enrollment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}:calculate", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/cmEnrollment/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}:calculate", + matches: [ + ["name", %r{^folders/[^/]+/locations/[^/]+/cmEnrollment/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}:calculate", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/cmEnrollment/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config.rb new file mode 100644 index 000000000000..e8244bceeddf --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/cloud_security_compliance/v1/version" + +require "google/cloud/cloud_security_compliance/v1/config/credentials" +require "google/cloud/cloud_security_compliance/v1/config/paths" +require "google/cloud/cloud_security_compliance/v1/config/client" +require "google/cloud/cloud_security_compliance/v1/config/rest" + +module Google + module Cloud + module CloudSecurityCompliance + module V1 + ## + # Config Service manages compliance frameworks, cloud controls, and their + # configurations. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/cloud_security_compliance/v1/config" + # client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/cloud_security_compliance/v1/config/rest" + # client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::Client.new + # + module Config + end + end + end + end +end + +helper_path = ::File.join __dir__, "config", "helpers.rb" +require "google/cloud/cloud_security_compliance/v1/config/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config/client.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config/client.rb new file mode 100644 index 000000000000..8db42b376383 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config/client.rb @@ -0,0 +1,1521 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/cloudsecuritycompliance/v1/config_pb" +require "google/cloud/location" + +module Google + module Cloud + module CloudSecurityCompliance + module V1 + module Config + ## + # Client for the Config service. + # + # Config Service manages compliance frameworks, cloud controls, and their + # configurations. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudsecuritycompliance.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :config_stub + + ## + # Configure the Config Client class. + # + # See {::Google::Cloud::CloudSecurityCompliance::V1::Config::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all Config clients + # ::Google::Cloud::CloudSecurityCompliance::V1::Config::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "CloudSecurityCompliance", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.list_frameworks.timeout = 60.0 + default_config.rpcs.list_frameworks.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_framework.timeout = 60.0 + default_config.rpcs.get_framework.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_framework.timeout = 60.0 + + default_config.rpcs.update_framework.timeout = 60.0 + + default_config.rpcs.delete_framework.timeout = 60.0 + + default_config.rpcs.list_cloud_controls.timeout = 60.0 + default_config.rpcs.list_cloud_controls.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_cloud_control.timeout = 60.0 + default_config.rpcs.get_cloud_control.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_cloud_control.timeout = 60.0 + + default_config.rpcs.update_cloud_control.timeout = 60.0 + + default_config.rpcs.delete_cloud_control.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the Config Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::CloudSecurityCompliance::V1::Config::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @config_stub.universe_domain + end + + ## + # Create a new Config client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Config client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/cloudsecuritycompliance/v1/config_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @config_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::CloudSecurityCompliance::V1::Config::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @config_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config_stub.endpoint + config.universe_domain = @config_stub.universe_domain + config.logger = @config_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @config_stub.logger + end + + # Service calls + + ## + # Lists the frameworks (both built-in and custom) that are available within + # the parent resource. The latest major version of each framework is + # returned. + # This method supports pagination. + # + # @overload list_frameworks(request, options = nil) + # Pass arguments to `list_frameworks` via a request object, either of type + # {::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworksRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworksRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_frameworks(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_frameworks` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource name, in one of the following formats: + # - `organizations/{organization}/locations/{location}` + # - `projects/{project}/locations/{location}`. + # + # The only supported location is `global`. + # @param page_size [::Integer] + # Optional. The maximum number of frameworks to return. The default value is + # `500`. + # + # If you exceed the maximum value of `1000`, then the service uses the + # maximum value. + # @param page_token [::String] + # Optional. A pagination token returned from a previous request to list + # frameworks. Provide this token to retrieve the next page of results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::Framework>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::Framework>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/cloud_security_compliance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudSecurityCompliance::V1::ListFrameworksRequest.new + # + # # Call the list_frameworks method. + # result = client.list_frameworks request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::CloudSecurityCompliance::V1::Framework. + # p item + # end + # + def list_frameworks request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworksRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_frameworks.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_frameworks.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_frameworks.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_stub.call_rpc :list_frameworks, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @config_stub, :list_frameworks, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details about a framework. + # This method retrieves the latest major version of the framework. + # + # To retrieve a specific major version, include `major_revision_id` in + # the request. + # + # @overload get_framework(request, options = nil) + # Pass arguments to `get_framework` via a request object, either of type + # {::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_framework(name: nil, major_revision_id: nil) + # Pass arguments to `get_framework` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the framework to retrieve, in one of the following + # formats: + # `organizations/{organization}/locations/{location}/frameworks/{framework}` + # or + # `projects/{project}/locations/{location}/frameworks/{framework}`. + # + # The only supported location is `global`. + # @param major_revision_id [::Integer] + # Optional. The framework major version to retrieve. If not specified, the + # most recently updated `revision_id` is retrieved. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::CloudSecurityCompliance::V1::Framework] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::CloudSecurityCompliance::V1::Framework] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/cloud_security_compliance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkRequest.new + # + # # Call the get_framework method. + # result = client.get_framework request + # + # # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::Framework. + # p result + # + def get_framework request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_framework.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_framework.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_framework.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_stub.call_rpc :get_framework, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a custom framework in a given parent resource. + # You can't create built-in frameworks because those are managed by + # Google. + # + # @overload create_framework(request, options = nil) + # Pass arguments to `create_framework` via a request object, either of type + # {::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_framework(parent: nil, framework_id: nil, framework: nil) + # Pass arguments to `create_framework` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource name, in one of the following formats: + # - `organizations/{organization}/locations/{location}` + # - `projects/{project}/locations/{location}`. + # + # The only supported location is `global`. + # @param framework_id [::String] + # Required. The identifier (ID) of the framework. The ID is not the full name + # of the framework; it's the last part of the full name of the framework. + # @param framework [::Google::Cloud::CloudSecurityCompliance::V1::Framework, ::Hash] + # Required. The resource being created. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::CloudSecurityCompliance::V1::Framework] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::CloudSecurityCompliance::V1::Framework] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/cloud_security_compliance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkRequest.new + # + # # Call the create_framework method. + # result = client.create_framework request + # + # # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::Framework. + # p result + # + def create_framework request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_framework.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_framework.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_framework.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_stub.call_rpc :create_framework, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a custom framework. + # This method allows for partial updates of a framework. Use the + # `update_mask` to specify which fields to update. Consider the following: + # + # - If you provide an `update_mask`, only the fields that are specified + # in the mask are updated. + # - If you don't provide an `update_mask`, all the fields that are present + # in the request's `framework` body are used to overwrite the existing + # resource. + # + # You can only update frameworks with the `CUSTOM` type. + # A successful update creates a new version of the framework. + # + # @overload update_framework(request, options = nil) + # Pass arguments to `update_framework` via a request object, either of type + # {::Google::Cloud::CloudSecurityCompliance::V1::UpdateFrameworkRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudSecurityCompliance::V1::UpdateFrameworkRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_framework(update_mask: nil, framework: nil, major_revision_id: nil) + # Pass arguments to `update_framework` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. A field mask is used to specify the fields to be overwritten in + # the framework resource by the update. The fields specified in the + # `update_mask` are relative to the resource, not the full request. A field + # is overwritten if it is in the mask. If you don't provide a mask then all + # fields present in the request will be overwritten. + # @param framework [::Google::Cloud::CloudSecurityCompliance::V1::Framework, ::Hash] + # Required. The resource that is being updated. + # @param major_revision_id [::Integer] + # Optional. The major version ID of the framework to update. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::CloudSecurityCompliance::V1::Framework] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::CloudSecurityCompliance::V1::Framework] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/cloud_security_compliance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudSecurityCompliance::V1::UpdateFrameworkRequest.new + # + # # Call the update_framework method. + # result = client.update_framework request + # + # # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::Framework. + # p result + # + def update_framework request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::UpdateFrameworkRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_framework.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.framework&.name + header_params["framework.name"] = request.framework.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_framework.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_framework.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_stub.call_rpc :update_framework, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a custom framework, including all its major and + # minor revisions. Consider the following: + # + # - You can't delete built-in frameworks. You can only delete frameworks + # with type `CUSTOM`. + # - You can't delete frameworks that are deployed to a resource. + # - You can't restore a deleted framework. This action is permanent. + # + # @overload delete_framework(request, options = nil) + # Pass arguments to `delete_framework` via a request object, either of type + # {::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_framework(name: nil) + # Pass arguments to `delete_framework` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the resource, in one of the following formats: + # `organizations/{organization}/locations/{location}/frameworks/{framework}` + # or + # `projects/{project}/locations/{location}/frameworks/{framework}`. + # + # The only supported location is `global`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/cloud_security_compliance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkRequest.new + # + # # Call the delete_framework method. + # result = client.delete_framework request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_framework request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_framework.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_framework.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_framework.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_stub.call_rpc :delete_framework, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the cloud controls (both built-in and custom) that are available + # in a given parent resource. The latest major version of each cloud control + # is returned. + # This method supports pagination. + # + # @overload list_cloud_controls(request, options = nil) + # Pass arguments to `list_cloud_controls` via a request object, either of type + # {::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_cloud_controls(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_cloud_controls` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource name, in one of the following formats: + # - `organizations/{organization}/locations/{location}` + # - `projects/{project}/locations/{location}`. + # + # The only supported location is `global`. + # @param page_size [::Integer] + # Optional. The maximum number of cloud controls to return. The default value + # is `500`. + # + # If you exceed the maximum value of `1000`, then the service uses the + # maximum value. + # @param page_token [::String] + # Optional. A pagination token that's returned from a previous request to + # list cloud controls. Provide this token to retrieve the next page of + # results. + # + # When paginating, the parent that you provide to the + # {::Google::Cloud::CloudSecurityCompliance::V1::Config::Client#list_cloud_controls ListCloudControls} + # request must match the call that provided the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::CloudControl>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::CloudControl>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/cloud_security_compliance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlsRequest.new + # + # # Call the list_cloud_controls method. + # result = client.list_cloud_controls request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::CloudSecurityCompliance::V1::CloudControl. + # p item + # end + # + def list_cloud_controls request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_cloud_controls.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_cloud_controls.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_cloud_controls.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_stub.call_rpc :list_cloud_controls, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @config_stub, :list_cloud_controls, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details about a cloud control. + # This method retrieves the latest major version of a cloud control that + # you identify by name. + # + # By default, the latest major version of the cloud control is returned. + # To retrieve a specific major version, include `major_revision_id` in + # the request. + # + # @overload get_cloud_control(request, options = nil) + # Pass arguments to `get_cloud_control` via a request object, either of type + # {::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_cloud_control(name: nil, major_revision_id: nil) + # Pass arguments to `get_cloud_control` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the cloud control to retrieve, in one of the + # following formats: + # `organizations/{organization}/locations/{location}/cloudControls/{cloud_control}` + # or + # `projects/{project}/locations/{location}/cloudControls/{cloud_control}`. + # + # The only supported location is `global`. + # @param major_revision_id [::Integer] + # Optional. The major version of the cloud control to retrieve. If not + # specified, the most recently updated `revision_id` is retrieved. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::CloudSecurityCompliance::V1::CloudControl] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::CloudSecurityCompliance::V1::CloudControl] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/cloud_security_compliance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlRequest.new + # + # # Call the get_cloud_control method. + # result = client.get_cloud_control request + # + # # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::CloudControl. + # p result + # + def get_cloud_control request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_cloud_control.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_cloud_control.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_cloud_control.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_stub.call_rpc :get_cloud_control, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a custom cloud control in a given parent + # resource. + # You can't create built-in cloud controls because those are managed by + # Google. + # + # @overload create_cloud_control(request, options = nil) + # Pass arguments to `create_cloud_control` via a request object, either of type + # {::Google::Cloud::CloudSecurityCompliance::V1::CreateCloudControlRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudSecurityCompliance::V1::CreateCloudControlRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_cloud_control(parent: nil, cloud_control_id: nil, cloud_control: nil) + # Pass arguments to `create_cloud_control` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource name, in one of the following formats: + # - `organizations/{organization}/locations/{location}`. + # - `projects/{project}/locations/{location}`. + # + # The only supported location is `global`. + # @param cloud_control_id [::String] + # Required. The identifier for the cloud control, which is the last segment + # of the cloud control name. The format is + # `^[a-zA-Z][a-zA-Z0-9-]{0,61}[a-zA-Z0-9]$`. + # @param cloud_control [::Google::Cloud::CloudSecurityCompliance::V1::CloudControl, ::Hash] + # Required. The cloud control that's being created. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::CloudSecurityCompliance::V1::CloudControl] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::CloudSecurityCompliance::V1::CloudControl] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/cloud_security_compliance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudSecurityCompliance::V1::CreateCloudControlRequest.new + # + # # Call the create_cloud_control method. + # result = client.create_cloud_control request + # + # # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::CloudControl. + # p result + # + def create_cloud_control request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::CreateCloudControlRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_cloud_control.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_cloud_control.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_cloud_control.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_stub.call_rpc :create_cloud_control, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a custom cloud control. + # This method allows for partial updates of a cloud control. Use the + # `update_mask` to specify which fields to update. Consider the following: + # + # - If you provide an `update_mask`, only the fields that are specified + # in the mask are updated. + # - If you don't provide an `update_mask`, all the fields that are present + # in the request's `cloud_control` body are used to overwrite the existing + # resource. + # + # You can only update cloud controls with the `CUSTOM` type. + # A successful update creates a new version of the cloud control. + # + # @overload update_cloud_control(request, options = nil) + # Pass arguments to `update_cloud_control` via a request object, either of type + # {::Google::Cloud::CloudSecurityCompliance::V1::UpdateCloudControlRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudSecurityCompliance::V1::UpdateCloudControlRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_cloud_control(update_mask: nil, cloud_control: nil) + # Pass arguments to `update_cloud_control` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Use a field mask to specify the fields to be overwritten in the + # cloud control during the update. + # The fields that you specify in the `update_mask` are relative to the + # cloud control, not the full request. A field is overwritten if it is in + # the mask. If you don't provide a mask, all fields in the request + # are updated. + # + # You can update the following fields: + # + # - Display name + # - Description + # - Parameters + # - Rules + # - Parameter specification + # @param cloud_control [::Google::Cloud::CloudSecurityCompliance::V1::CloudControl, ::Hash] + # Required. The cloud control that you're updating. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::CloudSecurityCompliance::V1::CloudControl] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::CloudSecurityCompliance::V1::CloudControl] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/cloud_security_compliance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudSecurityCompliance::V1::UpdateCloudControlRequest.new + # + # # Call the update_cloud_control method. + # result = client.update_cloud_control request + # + # # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::CloudControl. + # p result + # + def update_cloud_control request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::UpdateCloudControlRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_cloud_control.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.cloud_control&.name + header_params["cloud_control.name"] = request.cloud_control.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_cloud_control.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_cloud_control.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_stub.call_rpc :update_cloud_control, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a custom cloud control, including all its + # major and minor revisions. Consider the following: + # + # - You can't delete built-in cloud controls. You can only delete cloud + # controls with type `CUSTOM`. + # - You can't delete cloud controls if any of the versions are referenced + # by a framework. + # - You can't restore a deleted cloud control. This action is permanent. + # + # @overload delete_cloud_control(request, options = nil) + # Pass arguments to `delete_cloud_control` via a request object, either of type + # {::Google::Cloud::CloudSecurityCompliance::V1::DeleteCloudControlRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudSecurityCompliance::V1::DeleteCloudControlRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_cloud_control(name: nil) + # Pass arguments to `delete_cloud_control` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the cloud control to delete, in one of the following + # formats: + # `organizations/{organization}/locations/{location}/CloudControls/{CloudControl}` + # or + # `projects/{project}/locations/{location}/CloudControls/{CloudControl}`. + # + # The only supported location is `global`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/cloud_security_compliance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudSecurityCompliance::V1::DeleteCloudControlRequest.new + # + # # Call the delete_cloud_control method. + # result = client.delete_cloud_control request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_cloud_control request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::DeleteCloudControlRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_cloud_control.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_cloud_control.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_cloud_control.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_stub.call_rpc :delete_cloud_control, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Config API. + # + # This class represents the configuration for Config, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::CloudSecurityCompliance::V1::Config::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_frameworks to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::CloudSecurityCompliance::V1::Config::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_frameworks.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_frameworks.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "cloudsecuritycompliance.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Config API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_frameworks` + # @return [::Gapic::Config::Method] + # + attr_reader :list_frameworks + ## + # RPC-specific configuration for `get_framework` + # @return [::Gapic::Config::Method] + # + attr_reader :get_framework + ## + # RPC-specific configuration for `create_framework` + # @return [::Gapic::Config::Method] + # + attr_reader :create_framework + ## + # RPC-specific configuration for `update_framework` + # @return [::Gapic::Config::Method] + # + attr_reader :update_framework + ## + # RPC-specific configuration for `delete_framework` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_framework + ## + # RPC-specific configuration for `list_cloud_controls` + # @return [::Gapic::Config::Method] + # + attr_reader :list_cloud_controls + ## + # RPC-specific configuration for `get_cloud_control` + # @return [::Gapic::Config::Method] + # + attr_reader :get_cloud_control + ## + # RPC-specific configuration for `create_cloud_control` + # @return [::Gapic::Config::Method] + # + attr_reader :create_cloud_control + ## + # RPC-specific configuration for `update_cloud_control` + # @return [::Gapic::Config::Method] + # + attr_reader :update_cloud_control + ## + # RPC-specific configuration for `delete_cloud_control` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_cloud_control + + # @private + def initialize parent_rpcs = nil + list_frameworks_config = parent_rpcs.list_frameworks if parent_rpcs.respond_to? :list_frameworks + @list_frameworks = ::Gapic::Config::Method.new list_frameworks_config + get_framework_config = parent_rpcs.get_framework if parent_rpcs.respond_to? :get_framework + @get_framework = ::Gapic::Config::Method.new get_framework_config + create_framework_config = parent_rpcs.create_framework if parent_rpcs.respond_to? :create_framework + @create_framework = ::Gapic::Config::Method.new create_framework_config + update_framework_config = parent_rpcs.update_framework if parent_rpcs.respond_to? :update_framework + @update_framework = ::Gapic::Config::Method.new update_framework_config + delete_framework_config = parent_rpcs.delete_framework if parent_rpcs.respond_to? :delete_framework + @delete_framework = ::Gapic::Config::Method.new delete_framework_config + list_cloud_controls_config = parent_rpcs.list_cloud_controls if parent_rpcs.respond_to? :list_cloud_controls + @list_cloud_controls = ::Gapic::Config::Method.new list_cloud_controls_config + get_cloud_control_config = parent_rpcs.get_cloud_control if parent_rpcs.respond_to? :get_cloud_control + @get_cloud_control = ::Gapic::Config::Method.new get_cloud_control_config + create_cloud_control_config = parent_rpcs.create_cloud_control if parent_rpcs.respond_to? :create_cloud_control + @create_cloud_control = ::Gapic::Config::Method.new create_cloud_control_config + update_cloud_control_config = parent_rpcs.update_cloud_control if parent_rpcs.respond_to? :update_cloud_control + @update_cloud_control = ::Gapic::Config::Method.new update_cloud_control_config + delete_cloud_control_config = parent_rpcs.delete_cloud_control if parent_rpcs.respond_to? :delete_cloud_control + @delete_cloud_control = ::Gapic::Config::Method.new delete_cloud_control_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config/credentials.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config/credentials.rb new file mode 100644 index 000000000000..d15759154580 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module CloudSecurityCompliance + module V1 + module Config + # Credentials for the Config API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config/paths.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config/paths.rb new file mode 100644 index 000000000000..eec9d1315b06 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config/paths.rb @@ -0,0 +1,153 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module CloudSecurityCompliance + module V1 + module Config + # Path helper methods for the Config API. + module Paths + ## + # Create a fully-qualified CloudControl resource string. + # + # @overload cloud_control_path(organization:, location:, cloud_control:) + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/cloudControls/{cloud_control}` + # + # @param organization [String] + # @param location [String] + # @param cloud_control [String] + # + # @overload cloud_control_path(project:, location:, cloud_control:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/cloudControls/{cloud_control}` + # + # @param project [String] + # @param location [String] + # @param cloud_control [String] + # + # @return [::String] + def cloud_control_path **args + resources = { + "cloud_control:location:organization" => (proc do |organization:, location:, cloud_control:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/cloudControls/#{cloud_control}" + end), + "cloud_control:location:project" => (proc do |project:, location:, cloud_control:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/cloudControls/#{cloud_control}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified Framework resource string. + # + # @overload framework_path(organization:, location:, framework:) + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/frameworks/{framework}` + # + # @param organization [String] + # @param location [String] + # @param framework [String] + # + # @overload framework_path(project:, location:, framework:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/frameworks/{framework}` + # + # @param project [String] + # @param location [String] + # @param framework [String] + # + # @return [::String] + def framework_path **args + resources = { + "framework:location:organization" => (proc do |organization:, location:, framework:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/frameworks/#{framework}" + end), + "framework:location:project" => (proc do |project:, location:, framework:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/frameworks/#{framework}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + ## + # Create a fully-qualified OrganizationLocation resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}` + # + # @param organization [String] + # @param location [String] + # + # @return [::String] + def organization_location_path organization:, location: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config/rest.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config/rest.rb new file mode 100644 index 000000000000..aaf601c08fe2 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config/rest.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/cloud_security_compliance/v1/version" +require "google/cloud/cloud_security_compliance/v1/bindings_override" + +require "google/cloud/cloud_security_compliance/v1/config/credentials" +require "google/cloud/cloud_security_compliance/v1/config/paths" +require "google/cloud/cloud_security_compliance/v1/config/rest/client" + +module Google + module Cloud + module CloudSecurityCompliance + module V1 + ## + # Config Service manages compliance frameworks, cloud controls, and their + # configurations. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/cloud_security_compliance/v1/config/rest" + # client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::Client.new + # + module Config + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/cloud_security_compliance/v1/config/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config/rest/client.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config/rest/client.rb new file mode 100644 index 000000000000..a0bf7f60d36e --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config/rest/client.rb @@ -0,0 +1,1416 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/cloudsecuritycompliance/v1/config_pb" +require "google/cloud/cloud_security_compliance/v1/config/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Cloud + module CloudSecurityCompliance + module V1 + module Config + module Rest + ## + # REST client for the Config service. + # + # Config Service manages compliance frameworks, cloud controls, and their + # configurations. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudsecuritycompliance.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :config_stub + + ## + # Configure the Config Client class. + # + # See {::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all Config clients + # ::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "CloudSecurityCompliance", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.list_frameworks.timeout = 60.0 + default_config.rpcs.list_frameworks.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_framework.timeout = 60.0 + default_config.rpcs.get_framework.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_framework.timeout = 60.0 + + default_config.rpcs.update_framework.timeout = 60.0 + + default_config.rpcs.delete_framework.timeout = 60.0 + + default_config.rpcs.list_cloud_controls.timeout = 60.0 + default_config.rpcs.list_cloud_controls.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_cloud_control.timeout = 60.0 + default_config.rpcs.get_cloud_control.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_cloud_control.timeout = 60.0 + + default_config.rpcs.update_cloud_control.timeout = 60.0 + + default_config.rpcs.delete_cloud_control.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the Config Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @config_stub.universe_domain + end + + ## + # Create a new Config REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Config client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @config_stub = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @config_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config_stub.endpoint + config.universe_domain = @config_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @config_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @config_stub.logger + end + + # Service calls + + ## + # Lists the frameworks (both built-in and custom) that are available within + # the parent resource. The latest major version of each framework is + # returned. + # This method supports pagination. + # + # @overload list_frameworks(request, options = nil) + # Pass arguments to `list_frameworks` via a request object, either of type + # {::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworksRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworksRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_frameworks(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_frameworks` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource name, in one of the following formats: + # - `organizations/{organization}/locations/{location}` + # - `projects/{project}/locations/{location}`. + # + # The only supported location is `global`. + # @param page_size [::Integer] + # Optional. The maximum number of frameworks to return. The default value is + # `500`. + # + # If you exceed the maximum value of `1000`, then the service uses the + # maximum value. + # @param page_token [::String] + # Optional. A pagination token returned from a previous request to list + # frameworks. Provide this token to retrieve the next page of results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::Framework>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::Framework>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/cloud_security_compliance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudSecurityCompliance::V1::ListFrameworksRequest.new + # + # # Call the list_frameworks method. + # result = client.list_frameworks request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::CloudSecurityCompliance::V1::Framework. + # p item + # end + # + def list_frameworks request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworksRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_frameworks.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_frameworks.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_frameworks.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_stub.list_frameworks request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @config_stub, :list_frameworks, "frameworks", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details about a framework. + # This method retrieves the latest major version of the framework. + # + # To retrieve a specific major version, include `major_revision_id` in + # the request. + # + # @overload get_framework(request, options = nil) + # Pass arguments to `get_framework` via a request object, either of type + # {::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_framework(name: nil, major_revision_id: nil) + # Pass arguments to `get_framework` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the framework to retrieve, in one of the following + # formats: + # `organizations/{organization}/locations/{location}/frameworks/{framework}` + # or + # `projects/{project}/locations/{location}/frameworks/{framework}`. + # + # The only supported location is `global`. + # @param major_revision_id [::Integer] + # Optional. The framework major version to retrieve. If not specified, the + # most recently updated `revision_id` is retrieved. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::Framework] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudSecurityCompliance::V1::Framework] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/cloud_security_compliance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkRequest.new + # + # # Call the get_framework method. + # result = client.get_framework request + # + # # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::Framework. + # p result + # + def get_framework request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_framework.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_framework.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_framework.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_stub.get_framework request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a custom framework in a given parent resource. + # You can't create built-in frameworks because those are managed by + # Google. + # + # @overload create_framework(request, options = nil) + # Pass arguments to `create_framework` via a request object, either of type + # {::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_framework(parent: nil, framework_id: nil, framework: nil) + # Pass arguments to `create_framework` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource name, in one of the following formats: + # - `organizations/{organization}/locations/{location}` + # - `projects/{project}/locations/{location}`. + # + # The only supported location is `global`. + # @param framework_id [::String] + # Required. The identifier (ID) of the framework. The ID is not the full name + # of the framework; it's the last part of the full name of the framework. + # @param framework [::Google::Cloud::CloudSecurityCompliance::V1::Framework, ::Hash] + # Required. The resource being created. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::Framework] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudSecurityCompliance::V1::Framework] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/cloud_security_compliance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkRequest.new + # + # # Call the create_framework method. + # result = client.create_framework request + # + # # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::Framework. + # p result + # + def create_framework request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_framework.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_framework.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_framework.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_stub.create_framework request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a custom framework. + # This method allows for partial updates of a framework. Use the + # `update_mask` to specify which fields to update. Consider the following: + # + # - If you provide an `update_mask`, only the fields that are specified + # in the mask are updated. + # - If you don't provide an `update_mask`, all the fields that are present + # in the request's `framework` body are used to overwrite the existing + # resource. + # + # You can only update frameworks with the `CUSTOM` type. + # A successful update creates a new version of the framework. + # + # @overload update_framework(request, options = nil) + # Pass arguments to `update_framework` via a request object, either of type + # {::Google::Cloud::CloudSecurityCompliance::V1::UpdateFrameworkRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudSecurityCompliance::V1::UpdateFrameworkRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_framework(update_mask: nil, framework: nil, major_revision_id: nil) + # Pass arguments to `update_framework` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. A field mask is used to specify the fields to be overwritten in + # the framework resource by the update. The fields specified in the + # `update_mask` are relative to the resource, not the full request. A field + # is overwritten if it is in the mask. If you don't provide a mask then all + # fields present in the request will be overwritten. + # @param framework [::Google::Cloud::CloudSecurityCompliance::V1::Framework, ::Hash] + # Required. The resource that is being updated. + # @param major_revision_id [::Integer] + # Optional. The major version ID of the framework to update. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::Framework] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudSecurityCompliance::V1::Framework] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/cloud_security_compliance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudSecurityCompliance::V1::UpdateFrameworkRequest.new + # + # # Call the update_framework method. + # result = client.update_framework request + # + # # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::Framework. + # p result + # + def update_framework request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::UpdateFrameworkRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_framework.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_framework.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_framework.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_stub.update_framework request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a custom framework, including all its major and + # minor revisions. Consider the following: + # + # - You can't delete built-in frameworks. You can only delete frameworks + # with type `CUSTOM`. + # - You can't delete frameworks that are deployed to a resource. + # - You can't restore a deleted framework. This action is permanent. + # + # @overload delete_framework(request, options = nil) + # Pass arguments to `delete_framework` via a request object, either of type + # {::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_framework(name: nil) + # Pass arguments to `delete_framework` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the resource, in one of the following formats: + # `organizations/{organization}/locations/{location}/frameworks/{framework}` + # or + # `projects/{project}/locations/{location}/frameworks/{framework}`. + # + # The only supported location is `global`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/cloud_security_compliance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkRequest.new + # + # # Call the delete_framework method. + # result = client.delete_framework request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_framework request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_framework.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_framework.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_framework.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_stub.delete_framework request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the cloud controls (both built-in and custom) that are available + # in a given parent resource. The latest major version of each cloud control + # is returned. + # This method supports pagination. + # + # @overload list_cloud_controls(request, options = nil) + # Pass arguments to `list_cloud_controls` via a request object, either of type + # {::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_cloud_controls(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_cloud_controls` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource name, in one of the following formats: + # - `organizations/{organization}/locations/{location}` + # - `projects/{project}/locations/{location}`. + # + # The only supported location is `global`. + # @param page_size [::Integer] + # Optional. The maximum number of cloud controls to return. The default value + # is `500`. + # + # If you exceed the maximum value of `1000`, then the service uses the + # maximum value. + # @param page_token [::String] + # Optional. A pagination token that's returned from a previous request to + # list cloud controls. Provide this token to retrieve the next page of + # results. + # + # When paginating, the parent that you provide to the + # {::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::Client#list_cloud_controls ListCloudControls} + # request must match the call that provided the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::CloudControl>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::CloudControl>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/cloud_security_compliance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlsRequest.new + # + # # Call the list_cloud_controls method. + # result = client.list_cloud_controls request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::CloudSecurityCompliance::V1::CloudControl. + # p item + # end + # + def list_cloud_controls request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_cloud_controls.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_cloud_controls.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_cloud_controls.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_stub.list_cloud_controls request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @config_stub, :list_cloud_controls, "cloud_controls", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details about a cloud control. + # This method retrieves the latest major version of a cloud control that + # you identify by name. + # + # By default, the latest major version of the cloud control is returned. + # To retrieve a specific major version, include `major_revision_id` in + # the request. + # + # @overload get_cloud_control(request, options = nil) + # Pass arguments to `get_cloud_control` via a request object, either of type + # {::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_cloud_control(name: nil, major_revision_id: nil) + # Pass arguments to `get_cloud_control` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the cloud control to retrieve, in one of the + # following formats: + # `organizations/{organization}/locations/{location}/cloudControls/{cloud_control}` + # or + # `projects/{project}/locations/{location}/cloudControls/{cloud_control}`. + # + # The only supported location is `global`. + # @param major_revision_id [::Integer] + # Optional. The major version of the cloud control to retrieve. If not + # specified, the most recently updated `revision_id` is retrieved. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::CloudControl] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudSecurityCompliance::V1::CloudControl] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/cloud_security_compliance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlRequest.new + # + # # Call the get_cloud_control method. + # result = client.get_cloud_control request + # + # # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::CloudControl. + # p result + # + def get_cloud_control request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_cloud_control.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_cloud_control.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_cloud_control.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_stub.get_cloud_control request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a custom cloud control in a given parent + # resource. + # You can't create built-in cloud controls because those are managed by + # Google. + # + # @overload create_cloud_control(request, options = nil) + # Pass arguments to `create_cloud_control` via a request object, either of type + # {::Google::Cloud::CloudSecurityCompliance::V1::CreateCloudControlRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudSecurityCompliance::V1::CreateCloudControlRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_cloud_control(parent: nil, cloud_control_id: nil, cloud_control: nil) + # Pass arguments to `create_cloud_control` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource name, in one of the following formats: + # - `organizations/{organization}/locations/{location}`. + # - `projects/{project}/locations/{location}`. + # + # The only supported location is `global`. + # @param cloud_control_id [::String] + # Required. The identifier for the cloud control, which is the last segment + # of the cloud control name. The format is + # `^[a-zA-Z][a-zA-Z0-9-]{0,61}[a-zA-Z0-9]$`. + # @param cloud_control [::Google::Cloud::CloudSecurityCompliance::V1::CloudControl, ::Hash] + # Required. The cloud control that's being created. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::CloudControl] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudSecurityCompliance::V1::CloudControl] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/cloud_security_compliance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudSecurityCompliance::V1::CreateCloudControlRequest.new + # + # # Call the create_cloud_control method. + # result = client.create_cloud_control request + # + # # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::CloudControl. + # p result + # + def create_cloud_control request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::CreateCloudControlRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_cloud_control.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_cloud_control.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_cloud_control.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_stub.create_cloud_control request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a custom cloud control. + # This method allows for partial updates of a cloud control. Use the + # `update_mask` to specify which fields to update. Consider the following: + # + # - If you provide an `update_mask`, only the fields that are specified + # in the mask are updated. + # - If you don't provide an `update_mask`, all the fields that are present + # in the request's `cloud_control` body are used to overwrite the existing + # resource. + # + # You can only update cloud controls with the `CUSTOM` type. + # A successful update creates a new version of the cloud control. + # + # @overload update_cloud_control(request, options = nil) + # Pass arguments to `update_cloud_control` via a request object, either of type + # {::Google::Cloud::CloudSecurityCompliance::V1::UpdateCloudControlRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudSecurityCompliance::V1::UpdateCloudControlRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_cloud_control(update_mask: nil, cloud_control: nil) + # Pass arguments to `update_cloud_control` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Use a field mask to specify the fields to be overwritten in the + # cloud control during the update. + # The fields that you specify in the `update_mask` are relative to the + # cloud control, not the full request. A field is overwritten if it is in + # the mask. If you don't provide a mask, all fields in the request + # are updated. + # + # You can update the following fields: + # + # - Display name + # - Description + # - Parameters + # - Rules + # - Parameter specification + # @param cloud_control [::Google::Cloud::CloudSecurityCompliance::V1::CloudControl, ::Hash] + # Required. The cloud control that you're updating. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::CloudControl] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudSecurityCompliance::V1::CloudControl] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/cloud_security_compliance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudSecurityCompliance::V1::UpdateCloudControlRequest.new + # + # # Call the update_cloud_control method. + # result = client.update_cloud_control request + # + # # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::CloudControl. + # p result + # + def update_cloud_control request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::UpdateCloudControlRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_cloud_control.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_cloud_control.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_cloud_control.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_stub.update_cloud_control request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a custom cloud control, including all its + # major and minor revisions. Consider the following: + # + # - You can't delete built-in cloud controls. You can only delete cloud + # controls with type `CUSTOM`. + # - You can't delete cloud controls if any of the versions are referenced + # by a framework. + # - You can't restore a deleted cloud control. This action is permanent. + # + # @overload delete_cloud_control(request, options = nil) + # Pass arguments to `delete_cloud_control` via a request object, either of type + # {::Google::Cloud::CloudSecurityCompliance::V1::DeleteCloudControlRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudSecurityCompliance::V1::DeleteCloudControlRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_cloud_control(name: nil) + # Pass arguments to `delete_cloud_control` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the cloud control to delete, in one of the following + # formats: + # `organizations/{organization}/locations/{location}/CloudControls/{CloudControl}` + # or + # `projects/{project}/locations/{location}/CloudControls/{CloudControl}`. + # + # The only supported location is `global`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/cloud_security_compliance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudSecurityCompliance::V1::DeleteCloudControlRequest.new + # + # # Call the delete_cloud_control method. + # result = client.delete_cloud_control request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_cloud_control request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::DeleteCloudControlRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_cloud_control.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_cloud_control.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_cloud_control.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @config_stub.delete_cloud_control request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Config REST API. + # + # This class represents the configuration for Config REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_frameworks to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_frameworks.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_frameworks.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "cloudsecuritycompliance.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + # Overrides for http bindings for the RPCs of this service + # are only used when this service is used as mixin, and only + # by the host service. + # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] + config_attr :bindings_override, {}, ::Hash, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Config API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_frameworks` + # @return [::Gapic::Config::Method] + # + attr_reader :list_frameworks + ## + # RPC-specific configuration for `get_framework` + # @return [::Gapic::Config::Method] + # + attr_reader :get_framework + ## + # RPC-specific configuration for `create_framework` + # @return [::Gapic::Config::Method] + # + attr_reader :create_framework + ## + # RPC-specific configuration for `update_framework` + # @return [::Gapic::Config::Method] + # + attr_reader :update_framework + ## + # RPC-specific configuration for `delete_framework` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_framework + ## + # RPC-specific configuration for `list_cloud_controls` + # @return [::Gapic::Config::Method] + # + attr_reader :list_cloud_controls + ## + # RPC-specific configuration for `get_cloud_control` + # @return [::Gapic::Config::Method] + # + attr_reader :get_cloud_control + ## + # RPC-specific configuration for `create_cloud_control` + # @return [::Gapic::Config::Method] + # + attr_reader :create_cloud_control + ## + # RPC-specific configuration for `update_cloud_control` + # @return [::Gapic::Config::Method] + # + attr_reader :update_cloud_control + ## + # RPC-specific configuration for `delete_cloud_control` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_cloud_control + + # @private + def initialize parent_rpcs = nil + list_frameworks_config = parent_rpcs.list_frameworks if parent_rpcs.respond_to? :list_frameworks + @list_frameworks = ::Gapic::Config::Method.new list_frameworks_config + get_framework_config = parent_rpcs.get_framework if parent_rpcs.respond_to? :get_framework + @get_framework = ::Gapic::Config::Method.new get_framework_config + create_framework_config = parent_rpcs.create_framework if parent_rpcs.respond_to? :create_framework + @create_framework = ::Gapic::Config::Method.new create_framework_config + update_framework_config = parent_rpcs.update_framework if parent_rpcs.respond_to? :update_framework + @update_framework = ::Gapic::Config::Method.new update_framework_config + delete_framework_config = parent_rpcs.delete_framework if parent_rpcs.respond_to? :delete_framework + @delete_framework = ::Gapic::Config::Method.new delete_framework_config + list_cloud_controls_config = parent_rpcs.list_cloud_controls if parent_rpcs.respond_to? :list_cloud_controls + @list_cloud_controls = ::Gapic::Config::Method.new list_cloud_controls_config + get_cloud_control_config = parent_rpcs.get_cloud_control if parent_rpcs.respond_to? :get_cloud_control + @get_cloud_control = ::Gapic::Config::Method.new get_cloud_control_config + create_cloud_control_config = parent_rpcs.create_cloud_control if parent_rpcs.respond_to? :create_cloud_control + @create_cloud_control = ::Gapic::Config::Method.new create_cloud_control_config + update_cloud_control_config = parent_rpcs.update_cloud_control if parent_rpcs.respond_to? :update_cloud_control + @update_cloud_control = ::Gapic::Config::Method.new update_cloud_control_config + delete_cloud_control_config = parent_rpcs.delete_cloud_control if parent_rpcs.respond_to? :delete_cloud_control + @delete_cloud_control = ::Gapic::Config::Method.new delete_cloud_control_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config/rest/service_stub.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config/rest/service_stub.rb new file mode 100644 index 000000000000..c7621f189d3a --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config/rest/service_stub.rb @@ -0,0 +1,769 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/cloudsecuritycompliance/v1/config_pb" + +module Google + module Cloud + module CloudSecurityCompliance + module V1 + module Config + module Rest + ## + # REST service stub for the Config service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the list_frameworks REST call + # + # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworksRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworksResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworksResponse] + # A result object deserialized from the server's reply + def list_frameworks request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_frameworks_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_frameworks", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworksResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_framework REST call + # + # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::Framework] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudSecurityCompliance::V1::Framework] + # A result object deserialized from the server's reply + def get_framework request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_framework_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_framework", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CloudSecurityCompliance::V1::Framework.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_framework REST call + # + # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::Framework] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudSecurityCompliance::V1::Framework] + # A result object deserialized from the server's reply + def create_framework request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_framework_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_framework", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CloudSecurityCompliance::V1::Framework.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_framework REST call + # + # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::UpdateFrameworkRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::Framework] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudSecurityCompliance::V1::Framework] + # A result object deserialized from the server's reply + def update_framework request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_framework_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_framework", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CloudSecurityCompliance::V1::Framework.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_framework REST call + # + # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_framework request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_framework_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_framework", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_cloud_controls REST call + # + # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlsResponse] + # A result object deserialized from the server's reply + def list_cloud_controls request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_cloud_controls_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_cloud_controls", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_cloud_control REST call + # + # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::CloudControl] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudSecurityCompliance::V1::CloudControl] + # A result object deserialized from the server's reply + def get_cloud_control request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_cloud_control_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_cloud_control", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CloudSecurityCompliance::V1::CloudControl.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_cloud_control REST call + # + # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::CreateCloudControlRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::CloudControl] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudSecurityCompliance::V1::CloudControl] + # A result object deserialized from the server's reply + def create_cloud_control request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_cloud_control_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_cloud_control", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CloudSecurityCompliance::V1::CloudControl.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_cloud_control REST call + # + # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::UpdateCloudControlRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::CloudControl] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudSecurityCompliance::V1::CloudControl] + # A result object deserialized from the server's reply + def update_cloud_control request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_cloud_control_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_cloud_control", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CloudSecurityCompliance::V1::CloudControl.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_cloud_control REST call + # + # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::DeleteCloudControlRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_cloud_control request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_cloud_control_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_cloud_control", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_frameworks REST call + # + # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworksRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_frameworks_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/frameworks", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/frameworks", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_framework REST call + # + # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_framework_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/frameworks/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/frameworks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_framework REST call + # + # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_framework_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/frameworks", + body: "framework", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/frameworks", + body: "framework", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_framework REST call + # + # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::UpdateFrameworkRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_framework_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{framework.name}", + body: "framework", + matches: [ + ["framework.name", %r{^organizations/[^/]+/locations/[^/]+/frameworks/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{framework.name}", + body: "framework", + matches: [ + ["framework.name", %r{^projects/[^/]+/locations/[^/]+/frameworks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_framework REST call + # + # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_framework_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/frameworks/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/frameworks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_cloud_controls REST call + # + # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_cloud_controls_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/cloudControls", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/cloudControls", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_cloud_control REST call + # + # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_cloud_control_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/cloudControls/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/cloudControls/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_cloud_control REST call + # + # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::CreateCloudControlRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_cloud_control_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/cloudControls", + body: "cloud_control", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/cloudControls", + body: "cloud_control", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_cloud_control REST call + # + # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::UpdateCloudControlRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_cloud_control_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{cloud_control.name}", + body: "cloud_control", + matches: [ + ["cloud_control.name", %r{^organizations/[^/]+/locations/[^/]+/cloudControls/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{cloud_control.name}", + body: "cloud_control", + matches: [ + ["cloud_control.name", %r{^projects/[^/]+/locations/[^/]+/cloudControls/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_cloud_control REST call + # + # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::DeleteCloudControlRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_cloud_control_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/cloudControls/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/cloudControls/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment.rb new file mode 100644 index 000000000000..38b0b5a7331a --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/cloud_security_compliance/v1/version" + +require "google/cloud/cloud_security_compliance/v1/deployment/credentials" +require "google/cloud/cloud_security_compliance/v1/deployment/paths" +require "google/cloud/cloud_security_compliance/v1/deployment/operations" +require "google/cloud/cloud_security_compliance/v1/deployment/client" +require "google/cloud/cloud_security_compliance/v1/deployment/rest" + +module Google + module Cloud + module CloudSecurityCompliance + module V1 + ## + # Deployment service allows users to manage deployments of Frameworks and + # Cloud Controls on a target resource. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/cloud_security_compliance/v1/deployment" + # client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/cloud_security_compliance/v1/deployment/rest" + # client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Client.new + # + module Deployment + end + end + end + end +end + +helper_path = ::File.join __dir__, "deployment", "helpers.rb" +require "google/cloud/cloud_security_compliance/v1/deployment/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/client.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/client.rb new file mode 100644 index 000000000000..5eb510a30421 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/client.rb @@ -0,0 +1,1097 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/cloudsecuritycompliance/v1/deployment_pb" +require "google/cloud/location" + +module Google + module Cloud + module CloudSecurityCompliance + module V1 + module Deployment + ## + # Client for the Deployment service. + # + # Deployment service allows users to manage deployments of Frameworks and + # Cloud Controls on a target resource. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudsecuritycompliance.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :deployment_stub + + ## + # Configure the Deployment Client class. + # + # See {::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all Deployment clients + # ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "CloudSecurityCompliance", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.create_framework_deployment.timeout = 60.0 + + default_config.rpcs.delete_framework_deployment.timeout = 60.0 + + default_config.rpcs.get_framework_deployment.timeout = 60.0 + default_config.rpcs.get_framework_deployment.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_framework_deployments.timeout = 60.0 + default_config.rpcs.list_framework_deployments.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_cloud_control_deployment.timeout = 60.0 + default_config.rpcs.get_cloud_control_deployment.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_cloud_control_deployments.timeout = 60.0 + default_config.rpcs.list_cloud_control_deployments.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the Deployment Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @deployment_stub.universe_domain + end + + ## + # Create a new Deployment client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Deployment client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/cloudsecuritycompliance/v1/deployment_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @deployment_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @deployment_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @deployment_stub.endpoint + config.universe_domain = @deployment_stub.universe_domain + config.logger = @deployment_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @deployment_stub.logger + end + + # Service calls + + ## + # Creates a framework deployment in a given parent resource. A + # framework deployment lets you assign a particular framework version to an + # organization, folder, or project so that you can control and monitor + # those resources using the framework's cloud controls. + # + # @overload create_framework_deployment(request, options = nil) + # Pass arguments to `create_framework_deployment` via a request object, either of type + # {::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkDeploymentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkDeploymentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_framework_deployment(parent: nil, framework_deployment_id: nil, framework_deployment: nil) + # Pass arguments to `create_framework_deployment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource of the framework deployment in the format + # `organizations/{organization}/locations/{location}` + # or + # `projects/{project}/locations/{location}`. + # Only the global location is supported. + # @param framework_deployment_id [::String] + # Optional. An identifier for the framework deployment that's unique in scope + # of the parent. If you don't specify a value, then a random UUID is + # generated. + # @param framework_deployment [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment, ::Hash] + # Required. The framework deployment that you're creating. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/cloud_security_compliance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkDeploymentRequest.new + # + # # Call the create_framework_deployment method. + # result = client.create_framework_deployment request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_framework_deployment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkDeploymentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_framework_deployment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_framework_deployment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_framework_deployment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @deployment_stub.call_rpc :create_framework_deployment, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a framework deployment. + # + # @overload delete_framework_deployment(request, options = nil) + # Pass arguments to `delete_framework_deployment` via a request object, either of type + # {::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkDeploymentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkDeploymentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_framework_deployment(name: nil, etag: nil) + # Pass arguments to `delete_framework_deployment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the framework deployment that you want to delete, + # in the format + # `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}` + # or + # `projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}`. + # The only supported location is `global`. + # @param etag [::String] + # Optional. An opaque identifier for the current version of the resource. + # + # If you provide this value, then it must match the existing value. If the + # values don't match, then the request fails with an + # [`ABORTED`][google.rpc.Code.ABORTED] error. + # + # If you omit this value, then the resource is deleted regardless of its + # current `etag` value. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/cloud_security_compliance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkDeploymentRequest.new + # + # # Call the delete_framework_deployment method. + # result = client.delete_framework_deployment request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_framework_deployment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkDeploymentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_framework_deployment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_framework_deployment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_framework_deployment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @deployment_stub.call_rpc :delete_framework_deployment, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details about a framework deployment. + # + # @overload get_framework_deployment(request, options = nil) + # Pass arguments to `get_framework_deployment` via a request object, either of type + # {::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkDeploymentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkDeploymentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_framework_deployment(name: nil) + # Pass arguments to `get_framework_deployment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the framework deployment, in the format + # `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}` + # or + # `projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}`. + # The only supported location is `global`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/cloud_security_compliance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkDeploymentRequest.new + # + # # Call the get_framework_deployment method. + # result = client.get_framework_deployment request + # + # # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment. + # p result + # + def get_framework_deployment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkDeploymentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_framework_deployment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_framework_deployment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_framework_deployment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @deployment_stub.call_rpc :get_framework_deployment, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the framework deployments in a given parent resource. + # + # @overload list_framework_deployments(request, options = nil) + # Pass arguments to `list_framework_deployments` via a request object, either of type + # {::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkDeploymentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkDeploymentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_framework_deployments(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_framework_deployments` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource of the framework deployment, in the format + # `organizations/{organization}/locations/{location}` + # or + # `projects/{project}/locations/{location}`. + # The only supported location is `global`. + # @param page_size [::Integer] + # Optional. The requested page size. The server might return fewer items than + # requested. + # If unspecified, the server picks an appropriate default. + # @param page_token [::String] + # Optional. A token that identifies a page of results the server should + # return. + # @param filter [::String] + # Optional. The filter to be applied on the resource, as defined by + # [AIP-160: Filtering](https://google.aip.dev/160). + # @param order_by [::String] + # Optional. The sort order for the results. The following values are + # supported: + # + # * `name` + # * `name desc` + # + # If you do not specify a value, then the results are not sorted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/cloud_security_compliance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkDeploymentsRequest.new + # + # # Call the list_framework_deployments method. + # result = client.list_framework_deployments request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment. + # p item + # end + # + def list_framework_deployments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkDeploymentsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_framework_deployments.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_framework_deployments.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_framework_deployments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @deployment_stub.call_rpc :list_framework_deployments, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @deployment_stub, :list_framework_deployments, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details about a cloud control deployment. + # + # @overload get_cloud_control_deployment(request, options = nil) + # Pass arguments to `get_cloud_control_deployment` via a request object, either of type + # {::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlDeploymentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlDeploymentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_cloud_control_deployment(name: nil) + # Pass arguments to `get_cloud_control_deployment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name for the cloud control deployment, in the format + # `organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}` + # or + # `projects/{project}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}`. + # The only supported location is `global`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/cloud_security_compliance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlDeploymentRequest.new + # + # # Call the get_cloud_control_deployment method. + # result = client.get_cloud_control_deployment request + # + # # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment. + # p result + # + def get_cloud_control_deployment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlDeploymentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_cloud_control_deployment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_cloud_control_deployment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_cloud_control_deployment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @deployment_stub.call_rpc :get_cloud_control_deployment, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the cloud conrol deployments in a given parent resource. + # + # @overload list_cloud_control_deployments(request, options = nil) + # Pass arguments to `list_cloud_control_deployments` via a request object, either of type + # {::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlDeploymentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlDeploymentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_cloud_control_deployments(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_cloud_control_deployments` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource for the cloud control deployment, in the + # format `organizations/{organization}/locations/{location}` or + # `projects/{project}/locations/{location}`. + # The only supported location is `global`. + # @param page_size [::Integer] + # Optional. The requested page size. The server might return fewer items than + # you requested. + # If unspecified, the server picks an appropriate default. + # @param page_token [::String] + # Optional. A token that identifies the page of results that the server + # should return. + # @param filter [::String] + # Optional. The filter to apply on the resource, as defined by + # [AIP-160: Filtering](https://google.aip.dev/160). + # @param order_by [::String] + # Optional. The sort order for the results. The following values are + # supported: + # + # * `name` + # * `name desc` + # + # If you do not specify a value, then the results are not sorted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/cloud_security_compliance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlDeploymentsRequest.new + # + # # Call the list_cloud_control_deployments method. + # result = client.list_cloud_control_deployments request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment. + # p item + # end + # + def list_cloud_control_deployments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlDeploymentsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_cloud_control_deployments.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_cloud_control_deployments.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_cloud_control_deployments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @deployment_stub.call_rpc :list_cloud_control_deployments, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @deployment_stub, :list_cloud_control_deployments, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Deployment API. + # + # This class represents the configuration for Deployment, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_framework_deployment to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_framework_deployment.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_framework_deployment.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "cloudsecuritycompliance.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Deployment API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_framework_deployment` + # @return [::Gapic::Config::Method] + # + attr_reader :create_framework_deployment + ## + # RPC-specific configuration for `delete_framework_deployment` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_framework_deployment + ## + # RPC-specific configuration for `get_framework_deployment` + # @return [::Gapic::Config::Method] + # + attr_reader :get_framework_deployment + ## + # RPC-specific configuration for `list_framework_deployments` + # @return [::Gapic::Config::Method] + # + attr_reader :list_framework_deployments + ## + # RPC-specific configuration for `get_cloud_control_deployment` + # @return [::Gapic::Config::Method] + # + attr_reader :get_cloud_control_deployment + ## + # RPC-specific configuration for `list_cloud_control_deployments` + # @return [::Gapic::Config::Method] + # + attr_reader :list_cloud_control_deployments + + # @private + def initialize parent_rpcs = nil + create_framework_deployment_config = parent_rpcs.create_framework_deployment if parent_rpcs.respond_to? :create_framework_deployment + @create_framework_deployment = ::Gapic::Config::Method.new create_framework_deployment_config + delete_framework_deployment_config = parent_rpcs.delete_framework_deployment if parent_rpcs.respond_to? :delete_framework_deployment + @delete_framework_deployment = ::Gapic::Config::Method.new delete_framework_deployment_config + get_framework_deployment_config = parent_rpcs.get_framework_deployment if parent_rpcs.respond_to? :get_framework_deployment + @get_framework_deployment = ::Gapic::Config::Method.new get_framework_deployment_config + list_framework_deployments_config = parent_rpcs.list_framework_deployments if parent_rpcs.respond_to? :list_framework_deployments + @list_framework_deployments = ::Gapic::Config::Method.new list_framework_deployments_config + get_cloud_control_deployment_config = parent_rpcs.get_cloud_control_deployment if parent_rpcs.respond_to? :get_cloud_control_deployment + @get_cloud_control_deployment = ::Gapic::Config::Method.new get_cloud_control_deployment_config + list_cloud_control_deployments_config = parent_rpcs.list_cloud_control_deployments if parent_rpcs.respond_to? :list_cloud_control_deployments + @list_cloud_control_deployments = ::Gapic::Config::Method.new list_cloud_control_deployments_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/credentials.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/credentials.rb new file mode 100644 index 000000000000..ce65a7e45eff --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module CloudSecurityCompliance + module V1 + module Deployment + # Credentials for the Deployment API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/operations.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/operations.rb new file mode 100644 index 000000000000..43490de85224 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/operations.rb @@ -0,0 +1,841 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module CloudSecurityCompliance + module V1 + module Deployment + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudsecuritycompliance.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the Deployment Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the Deployment Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.wait_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "cloudsecuritycompliance.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/paths.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/paths.rb new file mode 100644 index 000000000000..ab4f2f405023 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/paths.rb @@ -0,0 +1,196 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module CloudSecurityCompliance + module V1 + module Deployment + # Path helper methods for the Deployment API. + module Paths + ## + # Create a fully-qualified CloudControlDeployment resource string. + # + # @overload cloud_control_deployment_path(organization:, location:, cloud_control_deployment:) + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}` + # + # @param organization [String] + # @param location [String] + # @param cloud_control_deployment [String] + # + # @overload cloud_control_deployment_path(project:, location:, cloud_control_deployment:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}` + # + # @param project [String] + # @param location [String] + # @param cloud_control_deployment [String] + # + # @return [::String] + def cloud_control_deployment_path **args + resources = { + "cloud_control_deployment:location:organization" => (proc do |organization:, location:, cloud_control_deployment:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/cloudControlDeployments/#{cloud_control_deployment}" + end), + "cloud_control_deployment:location:project" => (proc do |project:, location:, cloud_control_deployment:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/cloudControlDeployments/#{cloud_control_deployment}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified Framework resource string. + # + # @overload framework_path(organization:, location:, framework:) + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/frameworks/{framework}` + # + # @param organization [String] + # @param location [String] + # @param framework [String] + # + # @overload framework_path(project:, location:, framework:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/frameworks/{framework}` + # + # @param project [String] + # @param location [String] + # @param framework [String] + # + # @return [::String] + def framework_path **args + resources = { + "framework:location:organization" => (proc do |organization:, location:, framework:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/frameworks/#{framework}" + end), + "framework:location:project" => (proc do |project:, location:, framework:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/frameworks/#{framework}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified FrameworkDeployment resource string. + # + # @overload framework_deployment_path(organization:, location:, framework_deployment:) + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}` + # + # @param organization [String] + # @param location [String] + # @param framework_deployment [String] + # + # @overload framework_deployment_path(project:, location:, framework_deployment:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}` + # + # @param project [String] + # @param location [String] + # @param framework_deployment [String] + # + # @return [::String] + def framework_deployment_path **args + resources = { + "framework_deployment:location:organization" => (proc do |organization:, location:, framework_deployment:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/frameworkDeployments/#{framework_deployment}" + end), + "framework_deployment:location:project" => (proc do |project:, location:, framework_deployment:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/frameworkDeployments/#{framework_deployment}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + ## + # Create a fully-qualified OrganizationLocation resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}` + # + # @param organization [String] + # @param location [String] + # + # @return [::String] + def organization_location_path organization:, location: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/rest.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/rest.rb new file mode 100644 index 000000000000..c434c71ce036 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/rest.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/cloud_security_compliance/v1/version" +require "google/cloud/cloud_security_compliance/v1/bindings_override" + +require "google/cloud/cloud_security_compliance/v1/deployment/credentials" +require "google/cloud/cloud_security_compliance/v1/deployment/paths" +require "google/cloud/cloud_security_compliance/v1/deployment/rest/operations" +require "google/cloud/cloud_security_compliance/v1/deployment/rest/client" + +module Google + module Cloud + module CloudSecurityCompliance + module V1 + ## + # Deployment service allows users to manage deployments of Frameworks and + # Cloud Controls on a target resource. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/cloud_security_compliance/v1/deployment/rest" + # client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Client.new + # + module Deployment + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/cloud_security_compliance/v1/deployment/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/rest/client.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/rest/client.rb new file mode 100644 index 000000000000..0ab786c1d369 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/rest/client.rb @@ -0,0 +1,1020 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/cloudsecuritycompliance/v1/deployment_pb" +require "google/cloud/cloud_security_compliance/v1/deployment/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Cloud + module CloudSecurityCompliance + module V1 + module Deployment + module Rest + ## + # REST client for the Deployment service. + # + # Deployment service allows users to manage deployments of Frameworks and + # Cloud Controls on a target resource. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudsecuritycompliance.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :deployment_stub + + ## + # Configure the Deployment Client class. + # + # See {::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all Deployment clients + # ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "CloudSecurityCompliance", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.create_framework_deployment.timeout = 60.0 + + default_config.rpcs.delete_framework_deployment.timeout = 60.0 + + default_config.rpcs.get_framework_deployment.timeout = 60.0 + default_config.rpcs.get_framework_deployment.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_framework_deployments.timeout = 60.0 + default_config.rpcs.list_framework_deployments.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_cloud_control_deployment.timeout = 60.0 + default_config.rpcs.get_cloud_control_deployment.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_cloud_control_deployments.timeout = 60.0 + default_config.rpcs.list_cloud_control_deployments.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the Deployment Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @deployment_stub.universe_domain + end + + ## + # Create a new Deployment REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Deployment client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @deployment_stub = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @deployment_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @deployment_stub.endpoint + config.universe_domain = @deployment_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @deployment_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @deployment_stub.logger + end + + # Service calls + + ## + # Creates a framework deployment in a given parent resource. A + # framework deployment lets you assign a particular framework version to an + # organization, folder, or project so that you can control and monitor + # those resources using the framework's cloud controls. + # + # @overload create_framework_deployment(request, options = nil) + # Pass arguments to `create_framework_deployment` via a request object, either of type + # {::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkDeploymentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkDeploymentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_framework_deployment(parent: nil, framework_deployment_id: nil, framework_deployment: nil) + # Pass arguments to `create_framework_deployment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource of the framework deployment in the format + # `organizations/{organization}/locations/{location}` + # or + # `projects/{project}/locations/{location}`. + # Only the global location is supported. + # @param framework_deployment_id [::String] + # Optional. An identifier for the framework deployment that's unique in scope + # of the parent. If you don't specify a value, then a random UUID is + # generated. + # @param framework_deployment [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment, ::Hash] + # Required. The framework deployment that you're creating. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/cloud_security_compliance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkDeploymentRequest.new + # + # # Call the create_framework_deployment method. + # result = client.create_framework_deployment request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_framework_deployment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkDeploymentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_framework_deployment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_framework_deployment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_framework_deployment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @deployment_stub.create_framework_deployment request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a framework deployment. + # + # @overload delete_framework_deployment(request, options = nil) + # Pass arguments to `delete_framework_deployment` via a request object, either of type + # {::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkDeploymentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkDeploymentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_framework_deployment(name: nil, etag: nil) + # Pass arguments to `delete_framework_deployment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the framework deployment that you want to delete, + # in the format + # `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}` + # or + # `projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}`. + # The only supported location is `global`. + # @param etag [::String] + # Optional. An opaque identifier for the current version of the resource. + # + # If you provide this value, then it must match the existing value. If the + # values don't match, then the request fails with an + # [`ABORTED`][google.rpc.Code.ABORTED] error. + # + # If you omit this value, then the resource is deleted regardless of its + # current `etag` value. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/cloud_security_compliance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkDeploymentRequest.new + # + # # Call the delete_framework_deployment method. + # result = client.delete_framework_deployment request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_framework_deployment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkDeploymentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_framework_deployment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_framework_deployment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_framework_deployment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @deployment_stub.delete_framework_deployment request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details about a framework deployment. + # + # @overload get_framework_deployment(request, options = nil) + # Pass arguments to `get_framework_deployment` via a request object, either of type + # {::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkDeploymentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkDeploymentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_framework_deployment(name: nil) + # Pass arguments to `get_framework_deployment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the framework deployment, in the format + # `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}` + # or + # `projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}`. + # The only supported location is `global`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/cloud_security_compliance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkDeploymentRequest.new + # + # # Call the get_framework_deployment method. + # result = client.get_framework_deployment request + # + # # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment. + # p result + # + def get_framework_deployment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkDeploymentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_framework_deployment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_framework_deployment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_framework_deployment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @deployment_stub.get_framework_deployment request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the framework deployments in a given parent resource. + # + # @overload list_framework_deployments(request, options = nil) + # Pass arguments to `list_framework_deployments` via a request object, either of type + # {::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkDeploymentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkDeploymentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_framework_deployments(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_framework_deployments` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource of the framework deployment, in the format + # `organizations/{organization}/locations/{location}` + # or + # `projects/{project}/locations/{location}`. + # The only supported location is `global`. + # @param page_size [::Integer] + # Optional. The requested page size. The server might return fewer items than + # requested. + # If unspecified, the server picks an appropriate default. + # @param page_token [::String] + # Optional. A token that identifies a page of results the server should + # return. + # @param filter [::String] + # Optional. The filter to be applied on the resource, as defined by + # [AIP-160: Filtering](https://google.aip.dev/160). + # @param order_by [::String] + # Optional. The sort order for the results. The following values are + # supported: + # + # * `name` + # * `name desc` + # + # If you do not specify a value, then the results are not sorted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/cloud_security_compliance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkDeploymentsRequest.new + # + # # Call the list_framework_deployments method. + # result = client.list_framework_deployments request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment. + # p item + # end + # + def list_framework_deployments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkDeploymentsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_framework_deployments.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_framework_deployments.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_framework_deployments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @deployment_stub.list_framework_deployments request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @deployment_stub, :list_framework_deployments, "framework_deployments", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details about a cloud control deployment. + # + # @overload get_cloud_control_deployment(request, options = nil) + # Pass arguments to `get_cloud_control_deployment` via a request object, either of type + # {::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlDeploymentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlDeploymentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_cloud_control_deployment(name: nil) + # Pass arguments to `get_cloud_control_deployment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name for the cloud control deployment, in the format + # `organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}` + # or + # `projects/{project}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}`. + # The only supported location is `global`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/cloud_security_compliance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlDeploymentRequest.new + # + # # Call the get_cloud_control_deployment method. + # result = client.get_cloud_control_deployment request + # + # # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment. + # p result + # + def get_cloud_control_deployment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlDeploymentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_cloud_control_deployment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_cloud_control_deployment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_cloud_control_deployment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @deployment_stub.get_cloud_control_deployment request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the cloud conrol deployments in a given parent resource. + # + # @overload list_cloud_control_deployments(request, options = nil) + # Pass arguments to `list_cloud_control_deployments` via a request object, either of type + # {::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlDeploymentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlDeploymentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_cloud_control_deployments(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_cloud_control_deployments` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource for the cloud control deployment, in the + # format `organizations/{organization}/locations/{location}` or + # `projects/{project}/locations/{location}`. + # The only supported location is `global`. + # @param page_size [::Integer] + # Optional. The requested page size. The server might return fewer items than + # you requested. + # If unspecified, the server picks an appropriate default. + # @param page_token [::String] + # Optional. A token that identifies the page of results that the server + # should return. + # @param filter [::String] + # Optional. The filter to apply on the resource, as defined by + # [AIP-160: Filtering](https://google.aip.dev/160). + # @param order_by [::String] + # Optional. The sort order for the results. The following values are + # supported: + # + # * `name` + # * `name desc` + # + # If you do not specify a value, then the results are not sorted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/cloud_security_compliance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlDeploymentsRequest.new + # + # # Call the list_cloud_control_deployments method. + # result = client.list_cloud_control_deployments request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment. + # p item + # end + # + def list_cloud_control_deployments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlDeploymentsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_cloud_control_deployments.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_cloud_control_deployments.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_cloud_control_deployments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @deployment_stub.list_cloud_control_deployments request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @deployment_stub, :list_cloud_control_deployments, "cloud_control_deployments", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Deployment REST API. + # + # This class represents the configuration for Deployment REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_framework_deployment to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_framework_deployment.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_framework_deployment.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "cloudsecuritycompliance.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + # Overrides for http bindings for the RPCs of this service + # are only used when this service is used as mixin, and only + # by the host service. + # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] + config_attr :bindings_override, {}, ::Hash, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Deployment API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_framework_deployment` + # @return [::Gapic::Config::Method] + # + attr_reader :create_framework_deployment + ## + # RPC-specific configuration for `delete_framework_deployment` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_framework_deployment + ## + # RPC-specific configuration for `get_framework_deployment` + # @return [::Gapic::Config::Method] + # + attr_reader :get_framework_deployment + ## + # RPC-specific configuration for `list_framework_deployments` + # @return [::Gapic::Config::Method] + # + attr_reader :list_framework_deployments + ## + # RPC-specific configuration for `get_cloud_control_deployment` + # @return [::Gapic::Config::Method] + # + attr_reader :get_cloud_control_deployment + ## + # RPC-specific configuration for `list_cloud_control_deployments` + # @return [::Gapic::Config::Method] + # + attr_reader :list_cloud_control_deployments + + # @private + def initialize parent_rpcs = nil + create_framework_deployment_config = parent_rpcs.create_framework_deployment if parent_rpcs.respond_to? :create_framework_deployment + @create_framework_deployment = ::Gapic::Config::Method.new create_framework_deployment_config + delete_framework_deployment_config = parent_rpcs.delete_framework_deployment if parent_rpcs.respond_to? :delete_framework_deployment + @delete_framework_deployment = ::Gapic::Config::Method.new delete_framework_deployment_config + get_framework_deployment_config = parent_rpcs.get_framework_deployment if parent_rpcs.respond_to? :get_framework_deployment + @get_framework_deployment = ::Gapic::Config::Method.new get_framework_deployment_config + list_framework_deployments_config = parent_rpcs.list_framework_deployments if parent_rpcs.respond_to? :list_framework_deployments + @list_framework_deployments = ::Gapic::Config::Method.new list_framework_deployments_config + get_cloud_control_deployment_config = parent_rpcs.get_cloud_control_deployment if parent_rpcs.respond_to? :get_cloud_control_deployment + @get_cloud_control_deployment = ::Gapic::Config::Method.new get_cloud_control_deployment_config + list_cloud_control_deployments_config = parent_rpcs.list_cloud_control_deployments if parent_rpcs.respond_to? :list_cloud_control_deployments + @list_cloud_control_deployments = ::Gapic::Config::Method.new list_cloud_control_deployments_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/rest/operations.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/rest/operations.rb new file mode 100644 index 000000000000..31dabb00f199 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/rest/operations.rb @@ -0,0 +1,954 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" + +module Google + module Cloud + module CloudSecurityCompliance + module V1 + module Deployment + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudsecuritycompliance.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the Deployment Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the Deployment Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = OperationsServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.list_operations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.get_operation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.delete_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "cloudsecuritycompliance.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/rest/service_stub.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/rest/service_stub.rb new file mode 100644 index 000000000000..e9fdc8b8a918 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/rest/service_stub.rb @@ -0,0 +1,491 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/cloudsecuritycompliance/v1/deployment_pb" + +module Google + module Cloud + module CloudSecurityCompliance + module V1 + module Deployment + module Rest + ## + # REST service stub for the Deployment service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the create_framework_deployment REST call + # + # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkDeploymentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_framework_deployment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_framework_deployment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_framework_deployment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_framework_deployment REST call + # + # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkDeploymentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_framework_deployment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_framework_deployment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_framework_deployment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_framework_deployment REST call + # + # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkDeploymentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment] + # A result object deserialized from the server's reply + def get_framework_deployment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_framework_deployment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_framework_deployment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_framework_deployments REST call + # + # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkDeploymentsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkDeploymentsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkDeploymentsResponse] + # A result object deserialized from the server's reply + def list_framework_deployments request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_framework_deployments_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_framework_deployments", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkDeploymentsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_cloud_control_deployment REST call + # + # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlDeploymentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment] + # A result object deserialized from the server's reply + def get_cloud_control_deployment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_cloud_control_deployment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_cloud_control_deployment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_cloud_control_deployments REST call + # + # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlDeploymentsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlDeploymentsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlDeploymentsResponse] + # A result object deserialized from the server's reply + def list_cloud_control_deployments request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_cloud_control_deployments_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_cloud_control_deployments", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlDeploymentsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the create_framework_deployment REST call + # + # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkDeploymentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_framework_deployment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/frameworkDeployments", + body: "framework_deployment", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/frameworkDeployments", + body: "framework_deployment", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_framework_deployment REST call + # + # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkDeploymentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_framework_deployment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/frameworkDeployments/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/frameworkDeployments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_framework_deployment REST call + # + # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkDeploymentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_framework_deployment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/frameworkDeployments/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/frameworkDeployments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_framework_deployments REST call + # + # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkDeploymentsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_framework_deployments_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/frameworkDeployments", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/frameworkDeployments", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_cloud_control_deployment REST call + # + # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlDeploymentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_cloud_control_deployment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/cloudControlDeployments/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/cloudControlDeployments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_cloud_control_deployments REST call + # + # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlDeploymentsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_cloud_control_deployments_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/cloudControlDeployments", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/cloudControlDeployments", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/monitoring.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/monitoring.rb new file mode 100644 index 000000000000..f173f4219c50 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/monitoring.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/cloud_security_compliance/v1/version" + +require "google/cloud/cloud_security_compliance/v1/monitoring/credentials" +require "google/cloud/cloud_security_compliance/v1/monitoring/paths" +require "google/cloud/cloud_security_compliance/v1/monitoring/client" +require "google/cloud/cloud_security_compliance/v1/monitoring/rest" + +module Google + module Cloud + module CloudSecurityCompliance + module V1 + ## + # Service describing handlers for resources + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/cloud_security_compliance/v1/monitoring" + # client = ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/cloud_security_compliance/v1/monitoring/rest" + # client = ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Rest::Client.new + # + module Monitoring + end + end + end + end +end + +helper_path = ::File.join __dir__, "monitoring", "helpers.rb" +require "google/cloud/cloud_security_compliance/v1/monitoring/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/monitoring/client.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/monitoring/client.rb new file mode 100644 index 000000000000..b7889ad22a77 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/monitoring/client.rb @@ -0,0 +1,944 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/cloudsecuritycompliance/v1/monitoring_pb" +require "google/cloud/location" + +module Google + module Cloud + module CloudSecurityCompliance + module V1 + module Monitoring + ## + # Client for the Monitoring service. + # + # Service describing handlers for resources + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudsecuritycompliance.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :monitoring_stub + + ## + # Configure the Monitoring Client class. + # + # See {::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all Monitoring clients + # ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "CloudSecurityCompliance", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.list_framework_compliance_summaries.timeout = 60.0 + default_config.rpcs.list_framework_compliance_summaries.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_finding_summaries.timeout = 60.0 + default_config.rpcs.list_finding_summaries.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.fetch_framework_compliance_report.timeout = 60.0 + default_config.rpcs.fetch_framework_compliance_report.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_control_compliance_summaries.timeout = 60.0 + default_config.rpcs.list_control_compliance_summaries.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.aggregate_framework_compliance_report.timeout = 60.0 + default_config.rpcs.aggregate_framework_compliance_report.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the Monitoring Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @monitoring_stub.universe_domain + end + + ## + # Create a new Monitoring client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Monitoring client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/cloudsecuritycompliance/v1/monitoring_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @monitoring_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @monitoring_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @monitoring_stub.endpoint + config.universe_domain = @monitoring_stub.universe_domain + config.logger = @monitoring_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @monitoring_stub.logger + end + + # Service calls + + ## + # Lists the framework compliance summary for a given scope. + # + # @overload list_framework_compliance_summaries(request, options = nil) + # Pass arguments to `list_framework_compliance_summaries` via a request object, either of type + # {::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkComplianceSummariesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkComplianceSummariesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_framework_compliance_summaries(parent: nil, page_size: nil, page_token: nil, filter: nil, view: nil) + # Pass arguments to `list_framework_compliance_summaries` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent scope for the framework compliance summary. + # @param page_size [::Integer] + # Optional. The requested page size. The server might return fewer items than + # requested. If unspecified, the server picks an appropriate default. + # @param page_token [::String] + # Optional. A token that identifies the page of results that the server + # should return. + # @param filter [::String] + # Optional. The filtering results. + # @param view [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkComplianceSummaryView] + # Optional. Specifies the level of detail to return in the response. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::FrameworkComplianceSummary>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::FrameworkComplianceSummary>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/cloud_security_compliance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkComplianceSummariesRequest.new + # + # # Call the list_framework_compliance_summaries method. + # result = client.list_framework_compliance_summaries request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::CloudSecurityCompliance::V1::FrameworkComplianceSummary. + # p item + # end + # + def list_framework_compliance_summaries request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkComplianceSummariesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_framework_compliance_summaries.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_framework_compliance_summaries.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_framework_compliance_summaries.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @monitoring_stub.call_rpc :list_framework_compliance_summaries, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @monitoring_stub, :list_framework_compliance_summaries, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the finding summary by category for a given scope. + # + # @overload list_finding_summaries(request, options = nil) + # Pass arguments to `list_finding_summaries` via a request object, either of type + # {::Google::Cloud::CloudSecurityCompliance::V1::ListFindingSummariesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudSecurityCompliance::V1::ListFindingSummariesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_finding_summaries(parent: nil, page_size: nil, page_token: nil, filter: nil, end_time: nil) + # Pass arguments to `list_finding_summaries` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent scope for the framework overview page. + # @param page_size [::Integer] + # Optional. The requested page size. The server might return fewer items than + # requested. If unspecified, the server picks an appropriate default. + # @param page_token [::String] + # Optional. A token that identifies the page of results that the server + # should return. + # @param filter [::String] + # Optional. The filtering results. + # @param end_time [::Google::Protobuf::Timestamp, ::Hash] + # Optional. The end time of the finding summary. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::FindingSummary>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::FindingSummary>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/cloud_security_compliance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudSecurityCompliance::V1::ListFindingSummariesRequest.new + # + # # Call the list_finding_summaries method. + # result = client.list_finding_summaries request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::CloudSecurityCompliance::V1::FindingSummary. + # p item + # end + # + def list_finding_summaries request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::ListFindingSummariesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_finding_summaries.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_finding_summaries.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_finding_summaries.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @monitoring_stub.call_rpc :list_finding_summaries, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @monitoring_stub, :list_finding_summaries, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Fetches the framework compliance report for a given scope. + # + # @overload fetch_framework_compliance_report(request, options = nil) + # Pass arguments to `fetch_framework_compliance_report` via a request object, either of type + # {::Google::Cloud::CloudSecurityCompliance::V1::FetchFrameworkComplianceReportRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudSecurityCompliance::V1::FetchFrameworkComplianceReportRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload fetch_framework_compliance_report(name: nil, end_time: nil, filter: nil) + # Pass arguments to `fetch_framework_compliance_report` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the framework compliance report to retrieve. + # @param end_time [::Google::Protobuf::Timestamp, ::Hash] + # Optional. The end time of the report. + # @param filter [::String] + # Optional. The filtering results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkComplianceReport] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkComplianceReport] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/cloud_security_compliance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudSecurityCompliance::V1::FetchFrameworkComplianceReportRequest.new + # + # # Call the fetch_framework_compliance_report method. + # result = client.fetch_framework_compliance_report request + # + # # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::FrameworkComplianceReport. + # p result + # + def fetch_framework_compliance_report request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::FetchFrameworkComplianceReportRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.fetch_framework_compliance_report.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.fetch_framework_compliance_report.timeout, + metadata: metadata, + retry_policy: @config.rpcs.fetch_framework_compliance_report.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @monitoring_stub.call_rpc :fetch_framework_compliance_report, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the control compliance summary for a given scope. + # + # @overload list_control_compliance_summaries(request, options = nil) + # Pass arguments to `list_control_compliance_summaries` via a request object, either of type + # {::Google::Cloud::CloudSecurityCompliance::V1::ListControlComplianceSummariesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudSecurityCompliance::V1::ListControlComplianceSummariesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_control_compliance_summaries(parent: nil, end_time: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_control_compliance_summaries` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent scope for the framework overview page. + # @param end_time [::Google::Protobuf::Timestamp, ::Hash] + # Optional. The end time of the control compliance summary. + # @param page_size [::Integer] + # Optional. The requested page size. The server might return fewer items than + # requested. If unspecified, the server picks an appropriate default. + # @param page_token [::String] + # Optional. A token that identifies the page of results that the server + # should return. + # @param filter [::String] + # Optional. The filtering results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::ControlComplianceSummary>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::ControlComplianceSummary>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/cloud_security_compliance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudSecurityCompliance::V1::ListControlComplianceSummariesRequest.new + # + # # Call the list_control_compliance_summaries method. + # result = client.list_control_compliance_summaries request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::CloudSecurityCompliance::V1::ControlComplianceSummary. + # p item + # end + # + def list_control_compliance_summaries request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::ListControlComplianceSummariesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_control_compliance_summaries.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_control_compliance_summaries.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_control_compliance_summaries.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @monitoring_stub.call_rpc :list_control_compliance_summaries, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @monitoring_stub, :list_control_compliance_summaries, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the aggregated compliance report over time for a given scope. + # + # @overload aggregate_framework_compliance_report(request, options = nil) + # Pass arguments to `aggregate_framework_compliance_report` via a request object, either of type + # {::Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload aggregate_framework_compliance_report(name: nil, interval: nil, filter: nil) + # Pass arguments to `aggregate_framework_compliance_report` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the aggregated compliance report over time to + # retrieve. + # + # The supported format is: + # `organizations/{organization_id}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}` + # @param interval [::Google::Type::Interval, ::Hash] + # Optional. The start and end time range for the aggregated compliance + # report. + # @param filter [::String] + # Optional. The filtering results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/cloud_security_compliance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportRequest.new + # + # # Call the aggregate_framework_compliance_report method. + # result = client.aggregate_framework_compliance_report request + # + # # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportResponse. + # p result + # + def aggregate_framework_compliance_report request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.aggregate_framework_compliance_report.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.aggregate_framework_compliance_report.timeout, + metadata: metadata, + retry_policy: @config.rpcs.aggregate_framework_compliance_report.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @monitoring_stub.call_rpc :aggregate_framework_compliance_report, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Monitoring API. + # + # This class represents the configuration for Monitoring, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_framework_compliance_summaries to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_framework_compliance_summaries.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_framework_compliance_summaries.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "cloudsecuritycompliance.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Monitoring API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_framework_compliance_summaries` + # @return [::Gapic::Config::Method] + # + attr_reader :list_framework_compliance_summaries + ## + # RPC-specific configuration for `list_finding_summaries` + # @return [::Gapic::Config::Method] + # + attr_reader :list_finding_summaries + ## + # RPC-specific configuration for `fetch_framework_compliance_report` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_framework_compliance_report + ## + # RPC-specific configuration for `list_control_compliance_summaries` + # @return [::Gapic::Config::Method] + # + attr_reader :list_control_compliance_summaries + ## + # RPC-specific configuration for `aggregate_framework_compliance_report` + # @return [::Gapic::Config::Method] + # + attr_reader :aggregate_framework_compliance_report + + # @private + def initialize parent_rpcs = nil + list_framework_compliance_summaries_config = parent_rpcs.list_framework_compliance_summaries if parent_rpcs.respond_to? :list_framework_compliance_summaries + @list_framework_compliance_summaries = ::Gapic::Config::Method.new list_framework_compliance_summaries_config + list_finding_summaries_config = parent_rpcs.list_finding_summaries if parent_rpcs.respond_to? :list_finding_summaries + @list_finding_summaries = ::Gapic::Config::Method.new list_finding_summaries_config + fetch_framework_compliance_report_config = parent_rpcs.fetch_framework_compliance_report if parent_rpcs.respond_to? :fetch_framework_compliance_report + @fetch_framework_compliance_report = ::Gapic::Config::Method.new fetch_framework_compliance_report_config + list_control_compliance_summaries_config = parent_rpcs.list_control_compliance_summaries if parent_rpcs.respond_to? :list_control_compliance_summaries + @list_control_compliance_summaries = ::Gapic::Config::Method.new list_control_compliance_summaries_config + aggregate_framework_compliance_report_config = parent_rpcs.aggregate_framework_compliance_report if parent_rpcs.respond_to? :aggregate_framework_compliance_report + @aggregate_framework_compliance_report = ::Gapic::Config::Method.new aggregate_framework_compliance_report_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/monitoring/credentials.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/monitoring/credentials.rb new file mode 100644 index 000000000000..20e7aa8aed39 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/monitoring/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module CloudSecurityCompliance + module V1 + module Monitoring + # Credentials for the Monitoring API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/monitoring/paths.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/monitoring/paths.rb new file mode 100644 index 000000000000..fddc55378b2f --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/monitoring/paths.rb @@ -0,0 +1,142 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module CloudSecurityCompliance + module V1 + module Monitoring + # Path helper methods for the Monitoring API. + module Paths + ## + # Create a fully-qualified FolderLocation resource string. + # + # The resource will be in the following format: + # + # `folders/{folder}/locations/{location}` + # + # @param folder [String] + # @param location [String] + # + # @return [::String] + def folder_location_path folder:, location: + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + + "folders/#{folder}/locations/#{location}" + end + + ## + # Create a fully-qualified FrameworkComplianceReport resource string. + # + # @overload framework_compliance_report_path(project:, location:, framework_compliance_report:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}` + # + # @param project [String] + # @param location [String] + # @param framework_compliance_report [String] + # + # @overload framework_compliance_report_path(folder:, location:, framework_compliance_report:) + # The resource will be in the following format: + # + # `folders/{folder}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}` + # + # @param folder [String] + # @param location [String] + # @param framework_compliance_report [String] + # + # @overload framework_compliance_report_path(organization:, location:, framework_compliance_report:) + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}` + # + # @param organization [String] + # @param location [String] + # @param framework_compliance_report [String] + # + # @return [::String] + def framework_compliance_report_path **args + resources = { + "framework_compliance_report:location:project" => (proc do |project:, location:, framework_compliance_report:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/frameworkComplianceReports/#{framework_compliance_report}" + end), + "folder:framework_compliance_report:location" => (proc do |folder:, location:, framework_compliance_report:| + raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "folders/#{folder}/locations/#{location}/frameworkComplianceReports/#{framework_compliance_report}" + end), + "framework_compliance_report:location:organization" => (proc do |organization:, location:, framework_compliance_report:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/frameworkComplianceReports/#{framework_compliance_report}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + ## + # Create a fully-qualified OrganizationLocation resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}` + # + # @param organization [String] + # @param location [String] + # + # @return [::String] + def organization_location_path organization:, location: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/monitoring/rest.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/monitoring/rest.rb new file mode 100644 index 000000000000..6b61e4e1c9c6 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/monitoring/rest.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/cloud_security_compliance/v1/version" +require "google/cloud/cloud_security_compliance/v1/bindings_override" + +require "google/cloud/cloud_security_compliance/v1/monitoring/credentials" +require "google/cloud/cloud_security_compliance/v1/monitoring/paths" +require "google/cloud/cloud_security_compliance/v1/monitoring/rest/client" + +module Google + module Cloud + module CloudSecurityCompliance + module V1 + ## + # Service describing handlers for resources + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/cloud_security_compliance/v1/monitoring/rest" + # client = ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Rest::Client.new + # + module Monitoring + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/cloud_security_compliance/v1/monitoring/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/monitoring/rest/client.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/monitoring/rest/client.rb new file mode 100644 index 000000000000..51b390c36f9a --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/monitoring/rest/client.rb @@ -0,0 +1,874 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/cloudsecuritycompliance/v1/monitoring_pb" +require "google/cloud/cloud_security_compliance/v1/monitoring/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Cloud + module CloudSecurityCompliance + module V1 + module Monitoring + module Rest + ## + # REST client for the Monitoring service. + # + # Service describing handlers for resources + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudsecuritycompliance.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :monitoring_stub + + ## + # Configure the Monitoring Client class. + # + # See {::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all Monitoring clients + # ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "CloudSecurityCompliance", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.list_framework_compliance_summaries.timeout = 60.0 + default_config.rpcs.list_framework_compliance_summaries.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_finding_summaries.timeout = 60.0 + default_config.rpcs.list_finding_summaries.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.fetch_framework_compliance_report.timeout = 60.0 + default_config.rpcs.fetch_framework_compliance_report.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_control_compliance_summaries.timeout = 60.0 + default_config.rpcs.list_control_compliance_summaries.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.aggregate_framework_compliance_report.timeout = 60.0 + default_config.rpcs.aggregate_framework_compliance_report.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the Monitoring Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @monitoring_stub.universe_domain + end + + ## + # Create a new Monitoring REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Monitoring client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @monitoring_stub = ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @monitoring_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @monitoring_stub.endpoint + config.universe_domain = @monitoring_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @monitoring_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @monitoring_stub.logger + end + + # Service calls + + ## + # Lists the framework compliance summary for a given scope. + # + # @overload list_framework_compliance_summaries(request, options = nil) + # Pass arguments to `list_framework_compliance_summaries` via a request object, either of type + # {::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkComplianceSummariesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkComplianceSummariesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_framework_compliance_summaries(parent: nil, page_size: nil, page_token: nil, filter: nil, view: nil) + # Pass arguments to `list_framework_compliance_summaries` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent scope for the framework compliance summary. + # @param page_size [::Integer] + # Optional. The requested page size. The server might return fewer items than + # requested. If unspecified, the server picks an appropriate default. + # @param page_token [::String] + # Optional. A token that identifies the page of results that the server + # should return. + # @param filter [::String] + # Optional. The filtering results. + # @param view [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkComplianceSummaryView] + # Optional. Specifies the level of detail to return in the response. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::FrameworkComplianceSummary>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::FrameworkComplianceSummary>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/cloud_security_compliance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkComplianceSummariesRequest.new + # + # # Call the list_framework_compliance_summaries method. + # result = client.list_framework_compliance_summaries request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::CloudSecurityCompliance::V1::FrameworkComplianceSummary. + # p item + # end + # + def list_framework_compliance_summaries request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkComplianceSummariesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_framework_compliance_summaries.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_framework_compliance_summaries.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_framework_compliance_summaries.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @monitoring_stub.list_framework_compliance_summaries request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @monitoring_stub, :list_framework_compliance_summaries, "framework_compliance_summaries", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the finding summary by category for a given scope. + # + # @overload list_finding_summaries(request, options = nil) + # Pass arguments to `list_finding_summaries` via a request object, either of type + # {::Google::Cloud::CloudSecurityCompliance::V1::ListFindingSummariesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudSecurityCompliance::V1::ListFindingSummariesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_finding_summaries(parent: nil, page_size: nil, page_token: nil, filter: nil, end_time: nil) + # Pass arguments to `list_finding_summaries` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent scope for the framework overview page. + # @param page_size [::Integer] + # Optional. The requested page size. The server might return fewer items than + # requested. If unspecified, the server picks an appropriate default. + # @param page_token [::String] + # Optional. A token that identifies the page of results that the server + # should return. + # @param filter [::String] + # Optional. The filtering results. + # @param end_time [::Google::Protobuf::Timestamp, ::Hash] + # Optional. The end time of the finding summary. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::FindingSummary>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::FindingSummary>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/cloud_security_compliance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudSecurityCompliance::V1::ListFindingSummariesRequest.new + # + # # Call the list_finding_summaries method. + # result = client.list_finding_summaries request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::CloudSecurityCompliance::V1::FindingSummary. + # p item + # end + # + def list_finding_summaries request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::ListFindingSummariesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_finding_summaries.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_finding_summaries.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_finding_summaries.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @monitoring_stub.list_finding_summaries request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @monitoring_stub, :list_finding_summaries, "finding_summaries", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Fetches the framework compliance report for a given scope. + # + # @overload fetch_framework_compliance_report(request, options = nil) + # Pass arguments to `fetch_framework_compliance_report` via a request object, either of type + # {::Google::Cloud::CloudSecurityCompliance::V1::FetchFrameworkComplianceReportRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudSecurityCompliance::V1::FetchFrameworkComplianceReportRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload fetch_framework_compliance_report(name: nil, end_time: nil, filter: nil) + # Pass arguments to `fetch_framework_compliance_report` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the framework compliance report to retrieve. + # @param end_time [::Google::Protobuf::Timestamp, ::Hash] + # Optional. The end time of the report. + # @param filter [::String] + # Optional. The filtering results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkComplianceReport] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkComplianceReport] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/cloud_security_compliance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudSecurityCompliance::V1::FetchFrameworkComplianceReportRequest.new + # + # # Call the fetch_framework_compliance_report method. + # result = client.fetch_framework_compliance_report request + # + # # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::FrameworkComplianceReport. + # p result + # + def fetch_framework_compliance_report request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::FetchFrameworkComplianceReportRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.fetch_framework_compliance_report.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.fetch_framework_compliance_report.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.fetch_framework_compliance_report.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @monitoring_stub.fetch_framework_compliance_report request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the control compliance summary for a given scope. + # + # @overload list_control_compliance_summaries(request, options = nil) + # Pass arguments to `list_control_compliance_summaries` via a request object, either of type + # {::Google::Cloud::CloudSecurityCompliance::V1::ListControlComplianceSummariesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudSecurityCompliance::V1::ListControlComplianceSummariesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_control_compliance_summaries(parent: nil, end_time: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_control_compliance_summaries` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent scope for the framework overview page. + # @param end_time [::Google::Protobuf::Timestamp, ::Hash] + # Optional. The end time of the control compliance summary. + # @param page_size [::Integer] + # Optional. The requested page size. The server might return fewer items than + # requested. If unspecified, the server picks an appropriate default. + # @param page_token [::String] + # Optional. A token that identifies the page of results that the server + # should return. + # @param filter [::String] + # Optional. The filtering results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::ControlComplianceSummary>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::ControlComplianceSummary>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/cloud_security_compliance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudSecurityCompliance::V1::ListControlComplianceSummariesRequest.new + # + # # Call the list_control_compliance_summaries method. + # result = client.list_control_compliance_summaries request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::CloudSecurityCompliance::V1::ControlComplianceSummary. + # p item + # end + # + def list_control_compliance_summaries request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::ListControlComplianceSummariesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_control_compliance_summaries.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_control_compliance_summaries.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_control_compliance_summaries.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @monitoring_stub.list_control_compliance_summaries request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @monitoring_stub, :list_control_compliance_summaries, "control_compliance_summaries", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the aggregated compliance report over time for a given scope. + # + # @overload aggregate_framework_compliance_report(request, options = nil) + # Pass arguments to `aggregate_framework_compliance_report` via a request object, either of type + # {::Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload aggregate_framework_compliance_report(name: nil, interval: nil, filter: nil) + # Pass arguments to `aggregate_framework_compliance_report` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the aggregated compliance report over time to + # retrieve. + # + # The supported format is: + # `organizations/{organization_id}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}` + # @param interval [::Google::Type::Interval, ::Hash] + # Optional. The start and end time range for the aggregated compliance + # report. + # @param filter [::String] + # Optional. The filtering results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/cloud_security_compliance/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportRequest.new + # + # # Call the aggregate_framework_compliance_report method. + # result = client.aggregate_framework_compliance_report request + # + # # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportResponse. + # p result + # + def aggregate_framework_compliance_report request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.aggregate_framework_compliance_report.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.aggregate_framework_compliance_report.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.aggregate_framework_compliance_report.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @monitoring_stub.aggregate_framework_compliance_report request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Monitoring REST API. + # + # This class represents the configuration for Monitoring REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_framework_compliance_summaries to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_framework_compliance_summaries.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_framework_compliance_summaries.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "cloudsecuritycompliance.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + # Overrides for http bindings for the RPCs of this service + # are only used when this service is used as mixin, and only + # by the host service. + # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] + config_attr :bindings_override, {}, ::Hash, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Monitoring API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_framework_compliance_summaries` + # @return [::Gapic::Config::Method] + # + attr_reader :list_framework_compliance_summaries + ## + # RPC-specific configuration for `list_finding_summaries` + # @return [::Gapic::Config::Method] + # + attr_reader :list_finding_summaries + ## + # RPC-specific configuration for `fetch_framework_compliance_report` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_framework_compliance_report + ## + # RPC-specific configuration for `list_control_compliance_summaries` + # @return [::Gapic::Config::Method] + # + attr_reader :list_control_compliance_summaries + ## + # RPC-specific configuration for `aggregate_framework_compliance_report` + # @return [::Gapic::Config::Method] + # + attr_reader :aggregate_framework_compliance_report + + # @private + def initialize parent_rpcs = nil + list_framework_compliance_summaries_config = parent_rpcs.list_framework_compliance_summaries if parent_rpcs.respond_to? :list_framework_compliance_summaries + @list_framework_compliance_summaries = ::Gapic::Config::Method.new list_framework_compliance_summaries_config + list_finding_summaries_config = parent_rpcs.list_finding_summaries if parent_rpcs.respond_to? :list_finding_summaries + @list_finding_summaries = ::Gapic::Config::Method.new list_finding_summaries_config + fetch_framework_compliance_report_config = parent_rpcs.fetch_framework_compliance_report if parent_rpcs.respond_to? :fetch_framework_compliance_report + @fetch_framework_compliance_report = ::Gapic::Config::Method.new fetch_framework_compliance_report_config + list_control_compliance_summaries_config = parent_rpcs.list_control_compliance_summaries if parent_rpcs.respond_to? :list_control_compliance_summaries + @list_control_compliance_summaries = ::Gapic::Config::Method.new list_control_compliance_summaries_config + aggregate_framework_compliance_report_config = parent_rpcs.aggregate_framework_compliance_report if parent_rpcs.respond_to? :aggregate_framework_compliance_report + @aggregate_framework_compliance_report = ::Gapic::Config::Method.new aggregate_framework_compliance_report_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/monitoring/rest/service_stub.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/monitoring/rest/service_stub.rb new file mode 100644 index 000000000000..197c9a4a37b6 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/monitoring/rest/service_stub.rb @@ -0,0 +1,456 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/cloudsecuritycompliance/v1/monitoring_pb" + +module Google + module Cloud + module CloudSecurityCompliance + module V1 + module Monitoring + module Rest + ## + # REST service stub for the Monitoring service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the list_framework_compliance_summaries REST call + # + # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkComplianceSummariesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkComplianceSummariesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkComplianceSummariesResponse] + # A result object deserialized from the server's reply + def list_framework_compliance_summaries request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_framework_compliance_summaries_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_framework_compliance_summaries", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkComplianceSummariesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_finding_summaries REST call + # + # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::ListFindingSummariesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::ListFindingSummariesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudSecurityCompliance::V1::ListFindingSummariesResponse] + # A result object deserialized from the server's reply + def list_finding_summaries request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_finding_summaries_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_finding_summaries", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CloudSecurityCompliance::V1::ListFindingSummariesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the fetch_framework_compliance_report REST call + # + # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::FetchFrameworkComplianceReportRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkComplianceReport] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkComplianceReport] + # A result object deserialized from the server's reply + def fetch_framework_compliance_report request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_fetch_framework_compliance_report_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "fetch_framework_compliance_report", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CloudSecurityCompliance::V1::FrameworkComplianceReport.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_control_compliance_summaries REST call + # + # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::ListControlComplianceSummariesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::ListControlComplianceSummariesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudSecurityCompliance::V1::ListControlComplianceSummariesResponse] + # A result object deserialized from the server's reply + def list_control_compliance_summaries request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_control_compliance_summaries_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_control_compliance_summaries", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CloudSecurityCompliance::V1::ListControlComplianceSummariesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the aggregate_framework_compliance_report REST call + # + # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportResponse] + # A result object deserialized from the server's reply + def aggregate_framework_compliance_report request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_aggregate_framework_compliance_report_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "aggregate_framework_compliance_report", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_framework_compliance_summaries REST call + # + # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkComplianceSummariesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_framework_compliance_summaries_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/frameworkComplianceSummaries", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/frameworkComplianceSummaries", + matches: [ + ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/frameworkComplianceSummaries", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_finding_summaries REST call + # + # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::ListFindingSummariesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_finding_summaries_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/findingSummaries", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/findingSummaries", + matches: [ + ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/findingSummaries", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the fetch_framework_compliance_report REST call + # + # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::FetchFrameworkComplianceReportRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_fetch_framework_compliance_report_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}:fetch", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/frameworkComplianceReports/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}:fetch", + matches: [ + ["name", %r{^folders/[^/]+/locations/[^/]+/frameworkComplianceReports/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}:fetch", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/frameworkComplianceReports/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_control_compliance_summaries REST call + # + # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::ListControlComplianceSummariesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_control_compliance_summaries_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/controlComplianceSummaries", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/frameworkComplianceReports/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/controlComplianceSummaries", + matches: [ + ["parent", %r{^folders/[^/]+/locations/[^/]+/frameworkComplianceReports/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/controlComplianceSummaries", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/frameworkComplianceReports/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the aggregate_framework_compliance_report REST call + # + # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_aggregate_framework_compliance_report_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}:aggregate", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/frameworkComplianceReports/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}:aggregate", + matches: [ + ["name", %r{^folders/[^/]+/locations/[^/]+/frameworkComplianceReports/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}:aggregate", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/frameworkComplianceReports/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/rest.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/rest.rb new file mode 100644 index 000000000000..809bb57c867e --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/rest.rb @@ -0,0 +1,42 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/cloud_security_compliance/v1/audit/rest" +require "google/cloud/cloud_security_compliance/v1/cm_enrollment_service/rest" +require "google/cloud/cloud_security_compliance/v1/config/rest" +require "google/cloud/cloud_security_compliance/v1/deployment/rest" +require "google/cloud/cloud_security_compliance/v1/monitoring/rest" +require "google/cloud/cloud_security_compliance/v1/bindings_override" +require "google/cloud/cloud_security_compliance/v1/version" + +module Google + module Cloud + module CloudSecurityCompliance + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/cloud_security_compliance/v1/rest" + # client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/version.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/version.rb new file mode 100644 index 000000000000..5a4e38466009 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/version.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module CloudSecurityCompliance + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/audit_pb.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/audit_pb.rb new file mode 100644 index 000000000000..3d3636b3ccea --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/audit_pb.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/cloudsecuritycompliance/v1/audit.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/cloudsecuritycompliance/v1/common_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n3google/cloud/cloudsecuritycompliance/v1/audit.proto\x12\'google.cloud.cloudsecuritycompliance.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x34google/cloud/cloudsecuritycompliance/v1/common.proto\x1a#google/longrunning/operations.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x82\x02\n(GenerateFrameworkAuditScopeReportRequest\x12\x12\n\x05scope\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12t\n\rreport_format\x18\x02 \x01(\x0e\x32X.google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest.FormatB\x03\xe0\x41\x02\x12!\n\x14\x63ompliance_framework\x18\x03 \x01(\tB\x03\xe0\x41\x02\")\n\x06\x46ormat\x12\x16\n\x12\x46ORMAT_UNSPECIFIED\x10\x00\x12\x07\n\x03ODF\x10\x01\"\xa6\x04\n)GenerateFrameworkAuditScopeReportResponse\x12\x1f\n\x15scope_report_contents\x18\x03 \x01(\x0cH\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12!\n\x14\x63ompliance_framework\x18\x02 \x01(\tB\x03\xe0\x41\x02:\x91\x03\xea\x41\x8d\x03\nPcloudsecuritycompliance.googleapis.com/GenerateFrameworkAuditScopeReportResponse\x12sprojects/{project}/locations/{location}/frameworkAuditScopeReports/{generate_framework_audit_scope_report_response}\x12}organizations/{organization}/locations/{location}/frameworkAuditScopeReports/{generate_framework_audit_scope_report_response}*\x1a\x66rameworkAuditScopeReports2)generateFrameworkAuditScopeReportResponseB\x0e\n\x0c\x61udit_report\"\xa8\x01\n\rReportSummary\x12\x18\n\x0btotal_count\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12\x1c\n\x0f\x63ompliant_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03\x12\x1c\n\x0fviolation_count\x18\x03 \x01(\x05\x42\x03\xe0\x41\x03\x12\'\n\x1amanual_review_needed_count\x18\x04 \x01(\x05\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x65rror_count\x18\x05 \x01(\x05\x42\x03\xe0\x41\x03\"\xe4\x01\n\x1b\x43reateFrameworkAuditRequest\x12M\n\x06parent\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\x12\x35\x63loudsecuritycompliance.googleapis.com/FrameworkAudit\x12\x1f\n\x12\x66ramework_audit_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12U\n\x0f\x66ramework_audit\x18\x03 \x01(\x0b\x32\x37.google.cloud.cloudsecuritycompliance.v1.FrameworkAuditB\x03\xe0\x41\x02\"}\n\x19\x46rameworkAuditDestination\x12L\n\x06\x62ucket\x18\x01 \x01(\x0b\x32:.google.cloud.cloudsecuritycompliance.v1.BucketDestinationH\x00\x42\x12\n\x10\x64\x65stination_type\"\xbf\x01\n\x11\x42ucketDestination\x12\x17\n\nbucket_uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x66\n\x16\x66ramework_audit_format\x18\x03 \x01(\x0e\x32\x41.google.cloud.cloudsecuritycompliance.v1.BucketDestination.FormatB\x03\xe0\x41\x01\")\n\x06\x46ormat\x12\x16\n\x12\x46ORMAT_UNSPECIFIED\x10\x00\x12\x07\n\x03ODF\x10\x01\"\xbd\t\n\x0e\x46rameworkAudit\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x08\xe0\x41\x03\x12\x1f\n\x12\x66ramework_audit_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12!\n\x14\x63ompliance_framework\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x12\n\x05scope\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12l\n\x1b\x66ramework_audit_destination\x18\x05 \x01(\x0b\x32\x42.google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestinationB\x03\xe0\x41\x02\x12\x33\n\nstart_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x66inish_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12W\n\x10\x63ompliance_state\x18\x08 \x01(\x0e\x32\x38.google.cloud.cloudsecuritycompliance.v1.ComplianceStateB\x03\xe0\x41\x03\x12S\n\x0ereport_summary\x18\t \x01(\x0b\x32\x36.google.cloud.cloudsecuritycompliance.v1.ReportSummaryB\x03\xe0\x41\x03\x12v\n!cloud_control_group_audit_details\x18\n \x03(\x0b\x32\x46.google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetailsB\x03\xe0\x41\x01\x12k\n\x1b\x63loud_control_audit_details\x18\x0b \x03(\x0b\x32\x41.google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetailsB\x03\xe0\x41\x01\x12\x19\n\x0coperation_id\x18\x0c \x01(\tB\x03\xe0\x41\x03\x12Q\n\x05state\x18\r \x01(\x0e\x32=.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.StateB\x03\xe0\x41\x03\"d\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\r\n\tSCHEDULED\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\r\n\tUPLOADING\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\x12\r\n\tSUCCEEDED\x10\x05:\xfc\x01\xea\x41\xf8\x01\n5cloudsecuritycompliance.googleapis.com/FrameworkAudit\x12Iprojects/{project}/locations/{location}/frameworkAudits/{framework_audit}\x12Sorganizations/{organization}/locations/{location}/frameworkAudits/{framework_audit}*\x0f\x66rameworkAudits2\x0e\x66rameworkAudit\"\xb1\x01\n\x1aListFrameworkAuditsRequest\x12M\n\x06parent\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\x12\x35\x63loudsecuritycompliance.googleapis.com/FrameworkAudit\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x89\x01\n\x1bListFrameworkAuditsResponse\x12Q\n\x10\x66ramework_audits\x18\x01 \x03(\x0b\x32\x37.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"g\n\x18GetFrameworkAuditRequest\x12K\n\x04name\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\n5cloudsecuritycompliance.googleapis.com/FrameworkAudit\"\xe8\x05\n\x1d\x43loudControlGroupAuditDetails\x12#\n\x16\x63loud_control_group_id\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12 \n\x13responsibility_type\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12.\n!google_responsibility_description\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x31\n$google_responsibility_implementation\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x30\n#customer_responsibility_description\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x33\n&customer_responsibility_implementation\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12W\n\x10\x63ompliance_state\x18\t \x01(\x0e\x32\x38.google.cloud.cloudsecuritycompliance.v1.ComplianceStateB\x03\xe0\x41\x03\x12\x17\n\ncontrol_id\x18\n \x01(\tB\x03\xe0\x41\x03\x12S\n\x0e\x63ontrol_family\x18\x0b \x01(\x0b\x32\x36.google.cloud.cloudsecuritycompliance.v1.ControlFamilyB\x03\xe0\x41\x03\x12\x65\n\x15\x63loud_control_details\x18\x0c \x03(\x0b\x32\x41.google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetailsB\x03\xe0\x41\x03\x12S\n\x0ereport_summary\x18\r \x01(\x0b\x32\x36.google.cloud.cloudsecuritycompliance.v1.ReportSummaryB\x03\xe0\x41\x03\"\xa4\x02\n\x0e\x46indingDetails\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12W\n\x10\x63ompliance_state\x18\x02 \x01(\x0e\x32\x38.google.cloud.cloudsecuritycompliance.v1.ComplianceStateB\x03\xe0\x41\x03\x12U\n\x0bobservation\x18\x03 \x01(\x0b\x32;.google.cloud.cloudsecuritycompliance.v1.ObservationDetailsB\x03\xe0\x41\x03\x12O\n\x08\x65vidence\x18\x04 \x01(\x0b\x32\x38.google.cloud.cloudsecuritycompliance.v1.EvidenceDetailsB\x03\xe0\x41\x03\"d\n\x12ObservationDetails\x12\x1a\n\rcurrent_value\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0e\x65xpected_value\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08guidance\x18\x03 \x01(\tB\x03\xe0\x41\x03\"Z\n\x0f\x45videnceDetails\x12\x15\n\x08resource\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07service\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\revidence_path\x18\x03 \x01(\tB\x03\xe0\x41\x03\"\xfb\x02\n\x18\x43loudControlAuditDetails\x12\x1a\n\rcloud_control\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10\x63loud_control_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12&\n\x19\x63loud_control_description\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12W\n\x10\x63ompliance_state\x18\x04 \x01(\x0e\x32\x38.google.cloud.cloudsecuritycompliance.v1.ComplianceStateB\x03\xe0\x41\x03\x12S\n\x0ereport_summary\x18\x05 \x01(\x0b\x32\x36.google.cloud.cloudsecuritycompliance.v1.ReportSummaryB\x03\xe0\x41\x03\x12N\n\x08\x66indings\x18\x06 \x03(\x0b\x32\x37.google.cloud.cloudsecuritycompliance.v1.FindingDetailsB\x03\xe0\x41\x03*\x8f\x01\n\x0f\x43omplianceState\x12 \n\x1c\x43OMPLIANCE_STATE_UNSPECIFIED\x10\x00\x12\r\n\tCOMPLIANT\x10\x01\x12\r\n\tVIOLATION\x10\x02\x12\x18\n\x14MANUAL_REVIEW_NEEDED\x10\x03\x12\t\n\x05\x45RROR\x10\x04\x12\x17\n\x13\x41UDIT_NOT_SUPPORTED\x10\x05\x32\x9c\x0e\n\x05\x41udit\x12\xb3\x04\n!GenerateFrameworkAuditScopeReport\x12Q.google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest\x1aR.google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse\"\xe6\x02\xda\x41(scope,report_format,compliance_framework\x82\xd3\xe4\x93\x02\xb4\x02\"^/v1/{scope=folders/*/locations/*}/frameworkAuditScopeReports:generateFrameworkAuditScopeReport:\x01*Zd\"_/v1/{scope=projects/*/locations/*}/frameworkAuditScopeReports:generateFrameworkAuditScopeReport:\x01*Zi\"d/v1/{scope=organizations/*/locations/*}/frameworkAuditScopeReports:generateFrameworkAuditScopeReport:\x01*\x12\xd9\x03\n\x14\x43reateFrameworkAudit\x12\x44.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest\x1a\x1d.google.longrunning.Operation\"\xdb\x02\xca\x41K\n\x0e\x46rameworkAudit\x12\x39google.cloud.cloudsecuritycompliance.v1.OperationMetadata\xda\x41)parent,framework_audit,framework_audit_id\x82\xd3\xe4\x93\x02\xda\x01\"8/v1/{parent=organizations/*/locations/*}/frameworkAudits:\x0f\x66ramework_auditZE\"2/v1/{parent=folders/*/locations/*}/frameworkAudits:\x0f\x66ramework_auditZF\"3/v1/{parent=projects/*/locations/*}/frameworkAudits:\x0f\x66ramework_audit\x12\xda\x02\n\x13ListFrameworkAudits\x12\x43.google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest\x1a\x44.google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse\"\xb7\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xa7\x01\x12\x38/v1/{parent=organizations/*/locations/*}/frameworkAuditsZ4\x12\x32/v1/{parent=folders/*/locations/*}/frameworkAuditsZ5\x12\x33/v1/{parent=projects/*/locations/*}/frameworkAudits\x12\xc7\x02\n\x11GetFrameworkAudit\x12\x41.google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest\x1a\x37.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit\"\xb5\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xa7\x01\x12\x38/v1/{name=organizations/*/locations/*/frameworkAudits/*}Z4\x12\x32/v1/{name=folders/*/locations/*/frameworkAudits/*}Z5\x12\x33/v1/{name=projects/*/locations/*/frameworkAudits/*}\x1aZ\xca\x41&cloudsecuritycompliance.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xa3\x02\n+com.google.cloud.cloudsecuritycompliance.v1B\nAuditProtoP\x01Zecloud.google.com/go/cloudsecuritycompliance/apiv1/cloudsecuritycompliancepb;cloudsecuritycompliancepb\xaa\x02\'Google.Cloud.CloudSecurityCompliance.V1\xca\x02\'Google\\Cloud\\CloudSecurityCompliance\\V1\xea\x02*Google::Cloud::CloudSecurityCompliance::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module CloudSecurityCompliance + module V1 + GenerateFrameworkAuditScopeReportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest").msgclass + GenerateFrameworkAuditScopeReportRequest::Format = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest.Format").enummodule + GenerateFrameworkAuditScopeReportResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse").msgclass + ReportSummary = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.ReportSummary").msgclass + CreateFrameworkAuditRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest").msgclass + FrameworkAuditDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination").msgclass + BucketDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.BucketDestination").msgclass + BucketDestination::Format = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.BucketDestination.Format").enummodule + FrameworkAudit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.FrameworkAudit").msgclass + FrameworkAudit::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.State").enummodule + ListFrameworkAuditsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest").msgclass + ListFrameworkAuditsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse").msgclass + GetFrameworkAuditRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest").msgclass + CloudControlGroupAuditDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails").msgclass + FindingDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.FindingDetails").msgclass + ObservationDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.ObservationDetails").msgclass + EvidenceDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.EvidenceDetails").msgclass + CloudControlAuditDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails").msgclass + ComplianceState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.ComplianceState").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/audit_services_pb.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/audit_services_pb.rb new file mode 100644 index 000000000000..06e75518fc61 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/audit_services_pb.rb @@ -0,0 +1,51 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/cloudsecuritycompliance/v1/audit.proto for package 'Google.Cloud.CloudSecurityCompliance.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/cloud/cloudsecuritycompliance/v1/audit_pb' + +module Google + module Cloud + module CloudSecurityCompliance + module V1 + module Audit + # Service describing handlers for resources + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.cloudsecuritycompliance.v1.Audit' + + # Generates an audit scope report for a framework. + rpc :GenerateFrameworkAuditScopeReport, ::Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportRequest, ::Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportResponse + # Creates an audit scope report for a framework. + rpc :CreateFrameworkAudit, ::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkAuditRequest, ::Google::Longrunning::Operation + # Lists the framework audits for a given organization, folder, or project. + rpc :ListFrameworkAudits, ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkAuditsRequest, ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkAuditsResponse + # Gets the details for a framework audit. + rpc :GetFrameworkAudit, ::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkAuditRequest, ::Google::Cloud::CloudSecurityCompliance::V1::FrameworkAudit + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/cm_enrollment_service_pb.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/cm_enrollment_service_pb.rb new file mode 100644 index 000000000000..6e6198235508 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/cm_enrollment_service_pb.rb @@ -0,0 +1,32 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/cloudsecuritycompliance/v1/cm_enrollment_service.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\nCgoogle/cloud/cloudsecuritycompliance/v1/cm_enrollment_service.proto\x12\'google.cloud.cloudsecuritycompliance.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xa4\x01\n\x19UpdateCmEnrollmentRequest\x12Q\n\rcm_enrollment\x18\x01 \x01(\x0b\x32\x35.google.cloud.cloudsecuritycompliance.v1.CmEnrollmentB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"r\n%CalculateEffectiveCmEnrollmentRequest\x12I\n\x04name\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\n3cloudsecuritycompliance.googleapis.com/CmEnrollment\"\xd8\x02\n\x0c\x43mEnrollment\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x15\n\x08\x65nrolled\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12O\n\x0c\x61udit_config\x18\x03 \x01(\x0b\x32\x34.google.cloud.cloudsecuritycompliance.v1.AuditConfigB\x03\xe0\x41\x01:\xcc\x01\xea\x41\xc8\x01\n3cloudsecuritycompliance.googleapis.com/CmEnrollment\x12>organizations/{organization}/locations/{location}/cmEnrollment\x12\x34projects/{project}/locations/{location}/cmEnrollment*\rcmEnrollments2\x0c\x63mEnrollment\"v\n&CalculateEffectiveCmEnrollmentResponse\x12L\n\rcm_enrollment\x18\x01 \x01(\x0b\x32\x35.google.cloud.cloudsecuritycompliance.v1.CmEnrollment\"\xbf\x01\n\x0b\x41uditConfig\x12\x65\n\x0c\x64\x65stinations\x18\x01 \x03(\x0b\x32J.google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestinationB\x03\xe0\x41\x02\x1aI\n\x15\x43mEligibleDestination\x12\x14\n\ngcs_bucket\x18\x01 \x01(\tH\x00\x42\x1a\n\x18\x63m_eligible_destinations2\xa3\x07\n\x13\x43mEnrollmentService\x12\xa4\x03\n\x12UpdateCmEnrollment\x12\x42.google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest\x1a\x35.google.cloud.cloudsecuritycompliance.v1.CmEnrollment\"\x92\x02\xda\x41\x19\x63m_enrollment,update_mask\x82\xd3\xe4\x93\x02\xef\x01\x32\x41/v1/{cm_enrollment.name=organizations/*/locations/*/cmEnrollment}:\rcm_enrollmentZL2;/v1/{cm_enrollment.name=folders/*/locations/*/cmEnrollment}:\rcm_enrollmentZM2projects/{project}/locations/{location}/frameworks/{framework}*\nframeworks2\tframework\"\x95\x01\n\x13\x43loudControlDetails\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1e\n\x11major_revision_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02\x12K\n\nparameters\x18\x04 \x03(\x0b\x32\x32.google.cloud.cloudsecuritycompliance.v1.ParameterB\x03\xe0\x41\x01\"\x9c\x01\n\x12\x46rameworkReference\x12K\n\tframework\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0cloudsecuritycompliance.googleapis.com/Framework\x12#\n\x11major_revision_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x14\n\x12_major_revision_id\"q\n\tParameter\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12Q\n\x0fparameter_value\x18\x02 \x01(\x0b\x32\x33.google.cloud.cloudsecuritycompliance.v1.ParamValueB\x03\xe0\x41\x02\"\xa1\t\n\x0c\x43loudControl\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x08\x12\x1e\n\x11major_revision_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x62\n\x1bsupported_enforcement_modes\x18\x07 \x03(\x0e\x32\x38.google.cloud.cloudsecuritycompliance.v1.EnforcementModeB\x03\xe0\x41\x03\x12S\n\x0eparameter_spec\x18\x08 \x03(\x0b\x32\x36.google.cloud.cloudsecuritycompliance.v1.ParameterSpecB\x03\xe0\x41\x01\x12\x41\n\x05rules\x18\t \x03(\x0b\x32-.google.cloud.cloudsecuritycompliance.v1.RuleB\x03\xe0\x41\x01\x12H\n\x08severity\x18\x0b \x01(\x0e\x32\x31.google.cloud.cloudsecuritycompliance.v1.SeverityB\x03\xe0\x41\x01\x12\x1d\n\x10\x66inding_category\x18\x0c \x01(\tB\x03\xe0\x41\x01\x12^\n\x19supported_cloud_providers\x18\r \x03(\x0e\x32\x36.google.cloud.cloudsecuritycompliance.v1.CloudProviderB\x03\xe0\x41\x01\x12\x1f\n\x12related_frameworks\x18\x0e \x03(\tB\x03\xe0\x41\x03\x12\x1e\n\x11remediation_steps\x18\x0f \x01(\tB\x03\xe0\x41\x01\x12V\n\ncategories\x18\x10 \x03(\x0e\x32=.google.cloud.cloudsecuritycompliance.v1.CloudControlCategoryB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x11 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12i\n\x1fsupported_target_resource_types\x18\x12 \x03(\x0e\x32;.google.cloud.cloudsecuritycompliance.v1.TargetResourceTypeB\x03\xe0\x41\x01\"6\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06\x43USTOM\x10\x01\x12\x0c\n\x08\x42UILT_IN\x10\x02:\xee\x01\xea\x41\xea\x01\n3cloudsecuritycompliance.googleapis.com/CloudControl\x12Oorganizations/{organization}/locations/{location}/cloudControls/{cloud_control}\x12\x45projects/{project}/locations/{location}/cloudControls/{cloud_control}*\rcloudControls2\x0c\x63loudControl\"\x8e\x05\n\rParameterSpec\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bis_required\x18\x04 \x01(\x08\x42\x03\xe0\x41\x02\x12Y\n\nvalue_type\x18\x05 \x01(\x0e\x32@.google.cloud.cloudsecuritycompliance.v1.ParameterSpec.ValueTypeB\x03\xe0\x41\x02\x12O\n\rdefault_value\x18\x06 \x01(\x0b\x32\x33.google.cloud.cloudsecuritycompliance.v1.ParamValueB\x03\xe0\x41\x01\x12\x63\n\x12substitution_rules\x18\x07 \x03(\x0b\x32\x42.google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRuleB\x03\xe0\x41\x01\x12S\n\x0esub_parameters\x18\x08 \x03(\x0b\x32\x36.google.cloud.cloudsecuritycompliance.v1.ParameterSpecB\x03\xe0\x41\x01\x12L\n\nvalidation\x18\t \x01(\x0b\x32\x33.google.cloud.cloudsecuritycompliance.v1.ValidationB\x03\xe0\x41\x01\"g\n\tValueType\x12\x1a\n\x16VALUE_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06STRING\x10\x03\x12\x0b\n\x07\x42OOLEAN\x10\x04\x12\x0e\n\nSTRINGLIST\x10\x05\x12\n\n\x06NUMBER\x10\x06\x12\t\n\x05ONEOF\x10\x07\"\x86\x02\n\nValidation\x12P\n\x0e\x61llowed_values\x18\x01 \x01(\x0b\x32\x36.google.cloud.cloudsecuritycompliance.v1.AllowedValuesH\x00\x12\x46\n\tint_range\x18\x02 \x01(\x0b\x32\x31.google.cloud.cloudsecuritycompliance.v1.IntRangeH\x00\x12P\n\x0eregexp_pattern\x18\x03 \x01(\x0b\x32\x36.google.cloud.cloudsecuritycompliance.v1.RegexpPatternH\x00\x42\x0c\n\nconstraint\"Y\n\rAllowedValues\x12H\n\x06values\x18\x01 \x03(\x0b\x32\x33.google.cloud.cloudsecuritycompliance.v1.ParamValueB\x03\xe0\x41\x02\"%\n\rRegexpPattern\x12\x14\n\x07pattern\x18\x01 \x01(\tB\x03\xe0\x41\x02\".\n\x08IntRange\x12\x10\n\x03min\x18\x01 \x01(\x03\x42\x03\xe0\x41\x02\x12\x10\n\x03max\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02\"!\n\nStringList\x12\x13\n\x06values\x18\x01 \x03(\tB\x03\xe0\x41\x02\"\x90\x02\n\nParamValue\x12\x1b\n\x0cstring_value\x18\x03 \x01(\tB\x03\xe0\x41\x01H\x00\x12\x19\n\nbool_value\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01H\x00\x12U\n\x11string_list_value\x18\x05 \x01(\x0b\x32\x33.google.cloud.cloudsecuritycompliance.v1.StringListB\x03\xe0\x41\x01H\x00\x12\x1b\n\x0cnumber_value\x18\x06 \x01(\x01\x42\x03\xe0\x41\x01H\x00\x12N\n\x0boneof_value\x18\x07 \x01(\x0b\x32\x32.google.cloud.cloudsecuritycompliance.v1.ParameterB\x03\xe0\x41\x01H\x00\x42\x06\n\x04kind\"\x8a\x02\n\x19ParameterSubstitutionRule\x12m\n\x1dplaceholder_substitution_rule\x18\x01 \x01(\x0b\x32\x44.google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRuleH\x00\x12i\n\x1b\x61ttribute_substitution_rule\x18\x02 \x01(\x0b\x32\x42.google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRuleH\x00\x42\x13\n\x11substitution_type\".\n\x19\x41ttributeSubstitutionRule\x12\x11\n\tattribute\x18\x01 \x01(\t\"0\n\x1bPlaceholderSubstitutionRule\x12\x11\n\tattribute\x18\x01 \x01(\t\"\xdd\x01\n\x04Rule\x12P\n\x0e\x63\x65l_expression\x18\x01 \x01(\x0b\x32\x36.google.cloud.cloudsecuritycompliance.v1.CELExpressionH\x00\x12\x18\n\x0b\x64\x65scription\x18\n \x01(\tB\x03\xe0\x41\x01\x12W\n\x11rule_action_types\x18\x10 \x03(\x0e\x32\x37.google.cloud.cloudsecuritycompliance.v1.RuleActionTypeB\x03\xe0\x41\x02\x42\x10\n\x0eimplementation\"\x8a\x01\n\rCELExpression\x12T\n\x15resource_types_values\x18\x03 \x01(\x0b\x32\x33.google.cloud.cloudsecuritycompliance.v1.StringListH\x00\x12\x17\n\nexpression\x18\x01 \x01(\tB\x03\xe0\x41\x02\x42\n\n\x08\x63riteria\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\"\xa3\x08\n\x07\x43ontrol\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12L\n\x06\x66\x61mily\x18\x05 \x01(\x0e\x32\x37.google.cloud.cloudsecuritycompliance.v1.Control.FamilyB\x03\xe0\x41\x03\x12S\n\x0e\x63ontrol_family\x18\x06 \x01(\x0b\x32\x36.google.cloud.cloudsecuritycompliance.v1.ControlFamilyB\x03\xe0\x41\x03\x12n\n\x13responsibility_type\x18\x07 \x01(\x0e\x32L.google.cloud.cloudsecuritycompliance.v1.RegulatoryControlResponsibilityTypeB\x03\xe0\x41\x03\x12.\n!google_responsibility_description\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x31\n$google_responsibility_implementation\x18\t \x01(\tB\x03\xe0\x41\x03\x12\x30\n#customer_responsibility_description\x18\n \x01(\tB\x03\xe0\x41\x03\x12\x33\n&customer_responsibility_implementation\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12.\n!shared_responsibility_description\x18\x0c \x01(\tB\x03\xe0\x41\x03\x12#\n\x16\x61\x64\x64itional_content_uri\x18\r \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x12related_frameworks\x18\x0e \x03(\tB\x03\xe0\x41\x03\"\xb0\x01\n\x06\x46\x61mily\x12\x16\n\x12\x46\x41MILY_UNSPECIFIED\x10\x00\x12\x06\n\x02\x41\x43\x10\x01\x12\x06\n\x02\x41T\x10\x02\x12\x06\n\x02\x41U\x10\x03\x12\x06\n\x02\x43\x41\x10\x04\x12\x06\n\x02\x43M\x10\x05\x12\x06\n\x02\x43P\x10\x06\x12\x06\n\x02IA\x10\x07\x12\x06\n\x02IR\x10\x08\x12\x06\n\x02MA\x10\t\x12\x06\n\x02MP\x10\n\x12\x06\n\x02PE\x10\x0b\x12\x06\n\x02PL\x10\x0c\x12\x06\n\x02PS\x10\r\x12\x06\n\x02RA\x10\x0e\x12\x06\n\x02SA\x10\x0f\x12\x06\n\x02SC\x10\x10\x12\x06\n\x02SI\x10\x11\x12\x06\n\x02SR\x10\x12:\xc9\x01\xea\x41\xc5\x01\n.cloudsecuritycompliance.googleapis.com/Control\x12\x44organizations/{organization}/locations/{location}/controls/{control}\x12:projects/{project}/locations/{location}/controls/{control}*\x08\x63ontrols2\x07\x63ontrol\"8\n\rControlFamily\x12\x11\n\tfamily_id\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t*\x83\x01\n#RegulatoryControlResponsibilityType\x12\x36\n2REGULATORY_CONTROL_RESPONSIBILITY_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06GOOGLE\x10\x01\x12\x0c\n\x08\x43USTOMER\x10\x02\x12\n\n\x06SHARED\x10\x03*]\n\x0f\x45nforcementMode\x12 \n\x1c\x45NFORCEMENT_MODE_UNSPECIFIED\x10\x00\x12\x0e\n\nPREVENTIVE\x10\x01\x12\r\n\tDETECTIVE\x10\x02\x12\t\n\x05\x41UDIT\x10\x03*\xb1\x01\n\x11\x46rameworkCategory\x12\"\n\x1e\x46RAMEWORK_CATEGORY_UNSPECIFIED\x10\x00\x12\x1d\n\x19INDUSTRY_DEFINED_STANDARD\x10\x01\x12\x15\n\x11\x41SSURED_WORKLOADS\x10\x02\x12\x11\n\rDATA_SECURITY\x10\x03\x12\x19\n\x15GOOGLE_BEST_PRACTICES\x10\x04\x12\x14\n\x10\x43USTOM_FRAMEWORK\x10\x05*\xfe\x05\n\x14\x43loudControlCategory\x12&\n\"CLOUD_CONTROL_CATEGORY_UNSPECIFIED\x10\x00\x12\x1e\n\x1a\x43\x43_CATEGORY_INFRASTRUCTURE\x10\x01\x12\'\n#CC_CATEGORY_ARTIFICIAL_INTELLIGENCE\x10\x02\x12!\n\x1d\x43\x43_CATEGORY_PHYSICAL_SECURITY\x10\x03\x12\x1d\n\x19\x43\x43_CATEGORY_DATA_SECURITY\x10\x04\x12 \n\x1c\x43\x43_CATEGORY_NETWORK_SECURITY\x10\x05\x12#\n\x1f\x43\x43_CATEGORY_INCIDENT_MANAGEMENT\x10\x06\x12.\n*CC_CATEGORY_IDENTITY_AND_ACCESS_MANAGEMENT\x10\x07\x12\x1a\n\x16\x43\x43_CATEGORY_ENCRYPTION\x10\x08\x12\x32\n.CC_CATEGORY_LOGS_MANAGEMENT_AND_INFRASTRUCTURE\x10\t\x12&\n\"CC_CATEGORY_HR_ADMIN_AND_PROCESSES\x10\n\x12\x38\n4CC_CATEGORY_THIRD_PARTY_AND_SUB_PROCESSOR_MANAGEMENT\x10\x0b\x12%\n!CC_CATEGORY_LEGAL_AND_DISCLOSURES\x10\x0c\x12(\n$CC_CATEGORY_VULNERABILITY_MANAGEMENT\x10\r\x12\x17\n\x13\x43\x43_CATEGORY_PRIVACY\x10\x0e\x12\x14\n\x10\x43\x43_CATEGORY_BCDR\x10\x0f\x12\x1c\n\x18\x43\x43_CATEGORY_ADMIN_ACCESS\x10\x10\x12\x1e\n\x1a\x43\x43_CATEGORY_DATA_RESIDENCY\x10\x11\x12*\n&CC_CATEGORY_RESOURCE_USAGE_RESTRICTION\x10\x12\x12 \n\x1c\x43\x43_CATEGORY_SERVICE_SPECIFIC\x10\x13*L\n\rCloudProvider\x12\x1e\n\x1a\x43LOUD_PROVIDER_UNSPECIFIED\x10\x00\x12\x07\n\x03\x41WS\x10\x01\x12\t\n\x05\x41ZURE\x10\x02\x12\x07\n\x03GCP\x10\x03*Q\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43RITICAL\x10\x01\x12\x08\n\x04HIGH\x10\x02\x12\n\n\x06MEDIUM\x10\x03\x12\x07\n\x03LOW\x10\x04*\x8f\x01\n\x0eRuleActionType\x12 \n\x1cRULE_ACTION_TYPE_UNSPECIFIED\x10\x00\x12\x1f\n\x1bRULE_ACTION_TYPE_PREVENTIVE\x10\x01\x12\x1e\n\x1aRULE_ACTION_TYPE_DETECTIVE\x10\x02\x12\x1a\n\x16RULE_ACTION_TYPE_AUDIT\x10\x03*\xcd\x01\n\x12TargetResourceType\x12$\n TARGET_RESOURCE_TYPE_UNSPECIFIED\x10\x00\x12 \n\x1cTARGET_RESOURCE_CRM_TYPE_ORG\x10\x01\x12#\n\x1fTARGET_RESOURCE_CRM_TYPE_FOLDER\x10\x02\x12$\n TARGET_RESOURCE_CRM_TYPE_PROJECT\x10\x03\x12$\n TARGET_RESOURCE_TYPE_APPLICATION\x10\x04\x42\x97\x03\n+com.google.cloud.cloudsecuritycompliance.v1B\x0b\x43ommonProtoP\x01Zecloud.google.com/go/cloudsecuritycompliance/apiv1/cloudsecuritycompliancepb;cloudsecuritycompliancepb\xaa\x02\'Google.Cloud.CloudSecurityCompliance.V1\xca\x02\'Google\\Cloud\\CloudSecurityCompliance\\V1\xea\x02*Google::Cloud::CloudSecurityCompliance::V1\xea\x41p\n;cloudsecuritycompliance.googleapis.com/OrganizationLocation\x12\x31organizations/{organization}/locations/{location}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module CloudSecurityCompliance + module V1 + Framework = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.Framework").msgclass + Framework::FrameworkType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType").enummodule + CloudControlDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.CloudControlDetails").msgclass + FrameworkReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.FrameworkReference").msgclass + Parameter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.Parameter").msgclass + CloudControl = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.CloudControl").msgclass + CloudControl::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.CloudControl.Type").enummodule + ParameterSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.ParameterSpec").msgclass + ParameterSpec::ValueType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.ParameterSpec.ValueType").enummodule + Validation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.Validation").msgclass + AllowedValues = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.AllowedValues").msgclass + RegexpPattern = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.RegexpPattern").msgclass + IntRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.IntRange").msgclass + StringList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.StringList").msgclass + ParamValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.ParamValue").msgclass + ParameterSubstitutionRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule").msgclass + AttributeSubstitutionRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule").msgclass + PlaceholderSubstitutionRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule").msgclass + Rule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.Rule").msgclass + CELExpression = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.CELExpression").msgclass + OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.OperationMetadata").msgclass + Control = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.Control").msgclass + Control::Family = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.Control.Family").enummodule + ControlFamily = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.ControlFamily").msgclass + RegulatoryControlResponsibilityType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.RegulatoryControlResponsibilityType").enummodule + EnforcementMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.EnforcementMode").enummodule + FrameworkCategory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.FrameworkCategory").enummodule + CloudControlCategory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.CloudControlCategory").enummodule + CloudProvider = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.CloudProvider").enummodule + Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.Severity").enummodule + RuleActionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.RuleActionType").enummodule + TargetResourceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.TargetResourceType").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/config_pb.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/config_pb.rb new file mode 100644 index 000000000000..2d01f26a779a --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/config_pb.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/cloudsecuritycompliance/v1/config.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/cloudsecuritycompliance/v1/common_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n4google/cloud/cloudsecuritycompliance/v1/config.proto\x12\'google.cloud.cloudsecuritycompliance.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x34google/cloud/cloudsecuritycompliance/v1/common.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\x92\x01\n\x15ListFrameworksRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\x12\x30\x63loudsecuritycompliance.googleapis.com/Framework\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"y\n\x16ListFrameworksResponse\x12\x46\n\nframeworks\x18\x01 \x03(\x0b\x32\x32.google.cloud.cloudsecuritycompliance.v1.Framework\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"}\n\x13GetFrameworkRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0cloudsecuritycompliance.googleapis.com/Framework\x12\x1e\n\x11major_revision_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01\"\xc9\x01\n\x16\x43reateFrameworkRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\x12\x30\x63loudsecuritycompliance.googleapis.com/Framework\x12\x19\n\x0c\x66ramework_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12J\n\tframework\x18\x03 \x01(\x0b\x32\x32.google.cloud.cloudsecuritycompliance.v1.FrameworkB\x03\xe0\x41\x02\"\xba\x01\n\x16UpdateFrameworkRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12J\n\tframework\x18\x02 \x01(\x0b\x32\x32.google.cloud.cloudsecuritycompliance.v1.FrameworkB\x03\xe0\x41\x02\x12\x1e\n\x11major_revision_id\x18\x03 \x01(\x03\x42\x03\xe0\x41\x01\"`\n\x16\x44\x65leteFrameworkRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0cloudsecuritycompliance.googleapis.com/Framework\"\x98\x01\n\x18ListCloudControlsRequest\x12K\n\x06parent\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\x12\x33\x63loudsecuritycompliance.googleapis.com/CloudControl\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x83\x01\n\x19ListCloudControlsResponse\x12M\n\x0e\x63loud_controls\x18\x01 \x03(\x0b\x32\x35.google.cloud.cloudsecuritycompliance.v1.CloudControl\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x83\x01\n\x16GetCloudControlRequest\x12I\n\x04name\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\n3cloudsecuritycompliance.googleapis.com/CloudControl\x12\x1e\n\x11major_revision_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01\"\xda\x01\n\x19\x43reateCloudControlRequest\x12K\n\x06parent\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\x12\x33\x63loudsecuritycompliance.googleapis.com/CloudControl\x12\x1d\n\x10\x63loud_control_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12Q\n\rcloud_control\x18\x03 \x01(\x0b\x32\x35.google.cloud.cloudsecuritycompliance.v1.CloudControlB\x03\xe0\x41\x02\"\xa4\x01\n\x19UpdateCloudControlRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12Q\n\rcloud_control\x18\x02 \x01(\x0b\x32\x35.google.cloud.cloudsecuritycompliance.v1.CloudControlB\x03\xe0\x41\x02\"f\n\x19\x44\x65leteCloudControlRequest\x12I\n\x04name\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\n3cloudsecuritycompliance.googleapis.com/CloudControl2\xf7\x16\n\x06\x43onfig\x12\x89\x02\n\x0eListFrameworks\x12>.google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest\x1a?.google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse\"v\xda\x41\x06parent\x82\xd3\xe4\x93\x02g\x12\x33/v1/{parent=organizations/*/locations/*}/frameworksZ0\x12./v1/{parent=projects/*/locations/*}/frameworks\x12\xf6\x01\n\x0cGetFramework\x12<.google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest\x1a\x32.google.cloud.cloudsecuritycompliance.v1.Framework\"t\xda\x41\x04name\x82\xd3\xe4\x93\x02g\x12\x33/v1/{name=organizations/*/locations/*/frameworks/*}Z0\x12./v1/{name=projects/*/locations/*/frameworks/*}\x12\xac\x02\n\x0f\x43reateFramework\x12?.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest\x1a\x32.google.cloud.cloudsecuritycompliance.v1.Framework\"\xa3\x01\xda\x41\x1dparent,framework,framework_id\x82\xd3\xe4\x93\x02}\"3/v1/{parent=organizations/*/locations/*}/frameworks:\tframeworkZ;\"./v1/{parent=projects/*/locations/*}/frameworks:\tframework\x12\xb9\x02\n\x0fUpdateFramework\x12?.google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest\x1a\x32.google.cloud.cloudsecuritycompliance.v1.Framework\"\xb0\x01\xda\x41\x15\x66ramework,update_mask\x82\xd3\xe4\x93\x02\x91\x01\x32=/v1/{framework.name=organizations/*/locations/*/frameworks/*}:\tframeworkZE28/v1/{framework.name=projects/*/locations/*/frameworks/*}:\tframework\x12\xe0\x01\n\x0f\x44\x65leteFramework\x12?.google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest\x1a\x16.google.protobuf.Empty\"t\xda\x41\x04name\x82\xd3\xe4\x93\x02g*3/v1/{name=organizations/*/locations/*/frameworks/*}Z0*./v1/{name=projects/*/locations/*/frameworks/*}\x12\x98\x02\n\x11ListCloudControls\x12\x41.google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest\x1a\x42.google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse\"|\xda\x41\x06parent\x82\xd3\xe4\x93\x02m\x12\x36/v1/{parent=organizations/*/locations/*}/cloudControlsZ3\x12\x31/v1/{parent=projects/*/locations/*}/cloudControls\x12\x85\x02\n\x0fGetCloudControl\x12?.google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest\x1a\x35.google.cloud.cloudsecuritycompliance.v1.CloudControl\"z\xda\x41\x04name\x82\xd3\xe4\x93\x02m\x12\x36/v1/{name=organizations/*/locations/*/cloudControls/*}Z3\x12\x31/v1/{name=projects/*/locations/*/cloudControls/*}\x12\xcc\x02\n\x12\x43reateCloudControl\x12\x42.google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest\x1a\x35.google.cloud.cloudsecuritycompliance.v1.CloudControl\"\xba\x01\xda\x41%parent,cloud_control,cloud_control_id\x82\xd3\xe4\x93\x02\x8b\x01\"6/v1/{parent=organizations/*/locations/*}/cloudControls:\rcloud_controlZB\"1/v1/{parent=projects/*/locations/*}/cloudControls:\rcloud_control\x12\xdc\x02\n\x12UpdateCloudControl\x12\x42.google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest\x1a\x35.google.cloud.cloudsecuritycompliance.v1.CloudControl\"\xca\x01\xda\x41\x19\x63loud_control,update_mask\x82\xd3\xe4\x93\x02\xa7\x01\x32\x44/v1/{cloud_control.name=organizations/*/locations/*/cloudControls/*}:\rcloud_controlZP2?/v1/{cloud_control.name=projects/*/locations/*/cloudControls/*}:\rcloud_control\x12\xec\x01\n\x12\x44\x65leteCloudControl\x12\x42.google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest\x1a\x16.google.protobuf.Empty\"z\xda\x41\x04name\x82\xd3\xe4\x93\x02m*6/v1/{name=organizations/*/locations/*/cloudControls/*}Z3*1/v1/{name=projects/*/locations/*/cloudControls/*}\x1aZ\xca\x41&cloudsecuritycompliance.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xa4\x02\n+com.google.cloud.cloudsecuritycompliance.v1B\x0b\x43onfigProtoP\x01Zecloud.google.com/go/cloudsecuritycompliance/apiv1/cloudsecuritycompliancepb;cloudsecuritycompliancepb\xaa\x02\'Google.Cloud.CloudSecurityCompliance.V1\xca\x02\'Google\\Cloud\\CloudSecurityCompliance\\V1\xea\x02*Google::Cloud::CloudSecurityCompliance::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module CloudSecurityCompliance + module V1 + ListFrameworksRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest").msgclass + ListFrameworksResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse").msgclass + GetFrameworkRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest").msgclass + CreateFrameworkRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest").msgclass + UpdateFrameworkRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest").msgclass + DeleteFrameworkRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest").msgclass + ListCloudControlsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest").msgclass + ListCloudControlsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse").msgclass + GetCloudControlRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest").msgclass + CreateCloudControlRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest").msgclass + UpdateCloudControlRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest").msgclass + DeleteCloudControlRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/config_services_pb.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/config_services_pb.rb new file mode 100644 index 000000000000..63e4655503da --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/config_services_pb.rb @@ -0,0 +1,120 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/cloudsecuritycompliance/v1/config.proto for package 'Google.Cloud.CloudSecurityCompliance.V1' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/cloud/cloudsecuritycompliance/v1/config_pb' + +module Google + module Cloud + module CloudSecurityCompliance + module V1 + module Config + # Config Service manages compliance frameworks, cloud controls, and their + # configurations. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.cloudsecuritycompliance.v1.Config' + + # Lists the frameworks (both built-in and custom) that are available within + # the parent resource. The latest major version of each framework is + # returned. + # This method supports pagination. + rpc :ListFrameworks, ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworksRequest, ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworksResponse + # Gets details about a framework. + # This method retrieves the latest major version of the framework. + # + # To retrieve a specific major version, include `major_revision_id` in + # the request. + rpc :GetFramework, ::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkRequest, ::Google::Cloud::CloudSecurityCompliance::V1::Framework + # Creates a custom framework in a given parent resource. + # You can't create built-in frameworks because those are managed by + # Google. + rpc :CreateFramework, ::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkRequest, ::Google::Cloud::CloudSecurityCompliance::V1::Framework + # Updates a custom framework. + # This method allows for partial updates of a framework. Use the + # `update_mask` to specify which fields to update. Consider the following: + # + # - If you provide an `update_mask`, only the fields that are specified + # in the mask are updated. + # - If you don't provide an `update_mask`, all the fields that are present + # in the request's `framework` body are used to overwrite the existing + # resource. + # + # You can only update frameworks with the `CUSTOM` type. + # A successful update creates a new version of the framework. + rpc :UpdateFramework, ::Google::Cloud::CloudSecurityCompliance::V1::UpdateFrameworkRequest, ::Google::Cloud::CloudSecurityCompliance::V1::Framework + # Deletes a custom framework, including all its major and + # minor revisions. Consider the following: + # + # - You can't delete built-in frameworks. You can only delete frameworks + # with type `CUSTOM`. + # - You can't delete frameworks that are deployed to a resource. + # - You can't restore a deleted framework. This action is permanent. + rpc :DeleteFramework, ::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkRequest, ::Google::Protobuf::Empty + # Lists the cloud controls (both built-in and custom) that are available + # in a given parent resource. The latest major version of each cloud control + # is returned. + # This method supports pagination. + rpc :ListCloudControls, ::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlsRequest, ::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlsResponse + # Gets details about a cloud control. + # This method retrieves the latest major version of a cloud control that + # you identify by name. + # + # By default, the latest major version of the cloud control is returned. + # To retrieve a specific major version, include `major_revision_id` in + # the request. + rpc :GetCloudControl, ::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlRequest, ::Google::Cloud::CloudSecurityCompliance::V1::CloudControl + # Creates a custom cloud control in a given parent + # resource. + # You can't create built-in cloud controls because those are managed by + # Google. + rpc :CreateCloudControl, ::Google::Cloud::CloudSecurityCompliance::V1::CreateCloudControlRequest, ::Google::Cloud::CloudSecurityCompliance::V1::CloudControl + # Updates a custom cloud control. + # This method allows for partial updates of a cloud control. Use the + # `update_mask` to specify which fields to update. Consider the following: + # + # - If you provide an `update_mask`, only the fields that are specified + # in the mask are updated. + # - If you don't provide an `update_mask`, all the fields that are present + # in the request's `cloud_control` body are used to overwrite the existing + # resource. + # + # You can only update cloud controls with the `CUSTOM` type. + # A successful update creates a new version of the cloud control. + rpc :UpdateCloudControl, ::Google::Cloud::CloudSecurityCompliance::V1::UpdateCloudControlRequest, ::Google::Cloud::CloudSecurityCompliance::V1::CloudControl + # Deletes a custom cloud control, including all its + # major and minor revisions. Consider the following: + # + # - You can't delete built-in cloud controls. You can only delete cloud + # controls with type `CUSTOM`. + # - You can't delete cloud controls if any of the versions are referenced + # by a framework. + # - You can't restore a deleted cloud control. This action is permanent. + rpc :DeleteCloudControl, ::Google::Cloud::CloudSecurityCompliance::V1::DeleteCloudControlRequest, ::Google::Protobuf::Empty + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/deployment_pb.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/deployment_pb.rb new file mode 100644 index 000000000000..ed79434c5c14 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/deployment_pb.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/cloudsecuritycompliance/v1/deployment.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/cloudsecuritycompliance/v1/common_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n8google/cloud/cloudsecuritycompliance/v1/deployment.proto\x12\'google.cloud.cloudsecuritycompliance.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x34google/cloud/cloudsecuritycompliance/v1/common.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa7\x08\n\x13\x46rameworkDeployment\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x62\n\x16target_resource_config\x18\x02 \x01(\x0b\x32=.google.cloud.cloudsecuritycompliance.v1.TargetResourceConfigB\x03\xe0\x41\x02\x12%\n\x18\x63omputed_target_resource\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12S\n\tframework\x18\x04 \x01(\x0b\x32;.google.cloud.cloudsecuritycompliance.v1.FrameworkReferenceB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x62\n\x16\x63loud_control_metadata\x18\x06 \x03(\x0b\x32=.google.cloud.cloudsecuritycompliance.v1.CloudControlMetadataB\x03\xe0\x41\x02\x12W\n\x10\x64\x65ployment_state\x18\x07 \x01(\x0e\x32\x38.google.cloud.cloudsecuritycompliance.v1.DeploymentStateB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\x0b \x01(\tB\x03\xe0\x41\x01\x12)\n\x1ctarget_resource_display_name\x18\r \x01(\tB\x03\xe0\x41\x03\x12z\n#cloud_control_deployment_references\x18\x0e \x03(\x0b\x32H.google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReferenceB\x03\xe0\x41\x03:\x9f\x02\xea\x41\x9b\x02\n:cloudsecuritycompliance.googleapis.com/FrameworkDeployment\x12]organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}\x12Sprojects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}*\x14\x66rameworkDeployments2\x13\x66rameworkDeployment\"\xc5\x08\n\x16\x43loudControlDeployment\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x62\n\x16target_resource_config\x18\x02 \x01(\x0b\x32=.google.cloud.cloudsecuritycompliance.v1.TargetResourceConfigB\x03\xe0\x41\x02\x12\x1c\n\x0ftarget_resource\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x62\n\x16\x63loud_control_metadata\x18\x04 \x01(\x0b\x32=.google.cloud.cloudsecuritycompliance.v1.CloudControlMetadataB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12W\n\x10\x64\x65ployment_state\x18\x06 \x01(\x0e\x32\x38.google.cloud.cloudsecuritycompliance.v1.DeploymentStateB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\t \x01(\tB\x03\xe0\x41\x01\x12g\n#parameter_substituted_cloud_control\x18\n \x01(\x0b\x32\x35.google.cloud.cloudsecuritycompliance.v1.CloudControlB\x03\xe0\x41\x03\x12s\n\x1f\x66ramework_deployment_references\x18\x0b \x03(\x0b\x32\x45.google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReferenceB\x03\xe0\x41\x03\x12)\n\x1ctarget_resource_display_name\x18\x0c \x01(\tB\x03\xe0\x41\x03:\xb6\x02\xea\x41\xb2\x02\n=cloudsecuritycompliance.googleapis.com/CloudControlDeployment\x12\x64organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}\x12Zprojects/{project}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}*\x17\x63loudControlDeployments2\x16\x63loudControlDeployment\"\xc9\x01\n\x14TargetResourceConfig\x12\'\n\x18\x65xisting_target_resource\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x12u\n\x1ftarget_resource_creation_config\x18\x02 \x01(\x0b\x32\x45.google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfigB\x03\xe0\x41\x01H\x00\x42\x11\n\x0fresource_config\"\x88\x02\n\x1cTargetResourceCreationConfig\x12\x64\n\x16\x66older_creation_config\x18\x01 \x01(\x0b\x32=.google.cloud.cloudsecuritycompliance.v1.FolderCreationConfigB\x03\xe0\x41\x01H\x00\x12\x66\n\x17project_creation_config\x18\x02 \x01(\x0b\x32>.google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfigB\x03\xe0\x41\x01H\x00\x42\x1a\n\x18resource_creation_config\"M\n\x14\x46olderCreationConfig\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12 \n\x13\x66older_display_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\"p\n\x15ProjectCreationConfig\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x14project_display_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x1f\n\x12\x62illing_account_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\xd1\x01\n\x14\x43loudControlMetadata\x12`\n\x15\x63loud_control_details\x18\x01 \x01(\x0b\x32<.google.cloud.cloudsecuritycompliance.v1.CloudControlDetailsB\x03\xe0\x41\x02\x12W\n\x10\x65nforcement_mode\x18\x02 \x01(\x0e\x32\x38.google.cloud.cloudsecuritycompliance.v1.EnforcementModeB\x03\xe0\x41\x02\"\xfd\x01\n CreateFrameworkDeploymentRequest\x12R\n\x06parent\x18\x01 \x01(\tBB\xe0\x41\x02\xfa\x41<\x12:cloudsecuritycompliance.googleapis.com/FrameworkDeployment\x12$\n\x17\x66ramework_deployment_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12_\n\x14\x66ramework_deployment\x18\x03 \x01(\x0b\x32<.google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentB\x03\xe0\x41\x02\"\x87\x01\n DeleteFrameworkDeploymentRequest\x12P\n\x04name\x18\x01 \x01(\tBB\xe0\x41\x02\xfa\x41<\n:cloudsecuritycompliance.googleapis.com/FrameworkDeployment\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"q\n\x1dGetFrameworkDeploymentRequest\x12P\n\x04name\x18\x01 \x01(\tBB\xe0\x41\x02\xfa\x41<\n:cloudsecuritycompliance.googleapis.com/FrameworkDeployment\"\xd2\x01\n\x1fListFrameworkDeploymentsRequest\x12R\n\x06parent\x18\x01 \x01(\tBB\xe0\x41\x02\xfa\x41<\x12:cloudsecuritycompliance.googleapis.com/FrameworkDeployment\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x98\x01\n ListFrameworkDeploymentsResponse\x12[\n\x15\x66ramework_deployments\x18\x01 \x03(\x0b\x32<.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"w\n GetCloudControlDeploymentRequest\x12S\n\x04name\x18\x01 \x01(\tBE\xe0\x41\x02\xfa\x41?\n=cloudsecuritycompliance.googleapis.com/CloudControlDeployment\"\xd8\x01\n\"ListCloudControlDeploymentsRequest\x12U\n\x06parent\x18\x01 \x01(\tBE\xe0\x41\x02\xfa\x41?\x12=cloudsecuritycompliance.googleapis.com/CloudControlDeployment\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xa2\x01\n#ListCloudControlDeploymentsResponse\x12\x62\n\x19\x63loud_control_deployments\x18\x01 \x03(\x0b\x32?.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x8a\x01\n\x1f\x43loudControlDeploymentReference\x12g\n\x18\x63loud_control_deployment\x18\x01 \x01(\tBE\xe0\x41\x03\xfa\x41?\n=cloudsecuritycompliance.googleapis.com/CloudControlDeployment\"\x84\x02\n\x1c\x46rameworkDeploymentReference\x12`\n\x14\x66ramework_deployment\x18\x01 \x01(\tBB\xe0\x41\x03\xfa\x41<\n:cloudsecuritycompliance.googleapis.com/FrameworkDeployment\x12]\n\x13\x66ramework_reference\x18\x02 \x01(\x0b\x32;.google.cloud.cloudsecuritycompliance.v1.FrameworkReferenceB\x03\xe0\x41\x01\x12#\n\x16\x66ramework_display_name\x18\x03 \x01(\tB\x03\xe0\x41\x01*\xbb\x02\n\x0f\x44\x65ploymentState\x12 \n\x1c\x44\x45PLOYMENT_STATE_UNSPECIFIED\x10\x00\x12\x1f\n\x1b\x44\x45PLOYMENT_STATE_VALIDATING\x10\x01\x12\x1d\n\x19\x44\x45PLOYMENT_STATE_CREATING\x10\x02\x12\x1d\n\x19\x44\x45PLOYMENT_STATE_DELETING\x10\x03\x12\x1d\n\x19\x44\x45PLOYMENT_STATE_UPDATING\x10\x08\x12\x1b\n\x17\x44\x45PLOYMENT_STATE_FAILED\x10\x04\x12\x1a\n\x16\x44\x45PLOYMENT_STATE_READY\x10\x05\x12\'\n#DEPLOYMENT_STATE_PARTIALLY_DEPLOYED\x10\x06\x12&\n\"DEPLOYMENT_STATE_PARTIALLY_DELETED\x10\x07\x32\x88\x11\n\nDeployment\x12\xbf\x03\n\x19\x43reateFrameworkDeployment\x12I.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest\x1a\x1d.google.longrunning.Operation\"\xb7\x02\xca\x41P\n\x13\x46rameworkDeployment\x12\x39google.cloud.cloudsecuritycompliance.v1.OperationMetadata\xda\x41\x33parent,framework_deployment,framework_deployment_id\x82\xd3\xe4\x93\x02\xa7\x01\"=/v1/{parent=organizations/*/locations/*}/frameworkDeployments:\x14\x66ramework_deploymentZP\"8/v1/{parent=projects/*/locations/*}/frameworkDeployments:\x14\x66ramework_deployment\x12\xe5\x02\n\x19\x44\x65leteFrameworkDeployment\x12I.google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest\x1a\x1d.google.longrunning.Operation\"\xdd\x01\xca\x41R\n\x15google.protobuf.Empty\x12\x39google.cloud.cloudsecuritycompliance.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02{*=/v1/{name=organizations/*/locations/*/frameworkDeployments/*}Z:*8/v1/{name=projects/*/locations/*/frameworkDeployments/*}\x12\xa9\x02\n\x16GetFrameworkDeployment\x12\x46.google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest\x1a<.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment\"\x88\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02{\x12=/v1/{name=organizations/*/locations/*/frameworkDeployments/*}Z:\x12\x38/v1/{name=projects/*/locations/*/frameworkDeployments/*}\x12\xbc\x02\n\x18ListFrameworkDeployments\x12H.google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest\x1aI.google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse\"\x8a\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02{\x12=/v1/{parent=organizations/*/locations/*}/frameworkDeploymentsZ:\x12\x38/v1/{parent=projects/*/locations/*}/frameworkDeployments\x12\xb9\x02\n\x19GetCloudControlDeployment\x12I.google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest\x1a?.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment\"\x8f\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\x81\x01\x12@/v1/{name=organizations/*/locations/*/cloudControlDeployments/*}Z=\x12;/v1/{name=projects/*/locations/*/cloudControlDeployments/*}\x12\xcc\x02\n\x1bListCloudControlDeployments\x12K.google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest\x1aL.google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse\"\x91\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x81\x01\x12@/v1/{parent=organizations/*/locations/*}/cloudControlDeploymentsZ=\x12;/v1/{parent=projects/*/locations/*}/cloudControlDeployments\x1aZ\xca\x41&cloudsecuritycompliance.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xa8\x02\n+com.google.cloud.cloudsecuritycompliance.v1B\x0f\x44\x65ploymentProtoP\x01Zecloud.google.com/go/cloudsecuritycompliance/apiv1/cloudsecuritycompliancepb;cloudsecuritycompliancepb\xaa\x02\'Google.Cloud.CloudSecurityCompliance.V1\xca\x02\'Google\\Cloud\\CloudSecurityCompliance\\V1\xea\x02*Google::Cloud::CloudSecurityCompliance::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module CloudSecurityCompliance + module V1 + FrameworkDeployment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment").msgclass + CloudControlDeployment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment").msgclass + TargetResourceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig").msgclass + TargetResourceCreationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig").msgclass + FolderCreationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig").msgclass + ProjectCreationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig").msgclass + CloudControlMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata").msgclass + CreateFrameworkDeploymentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest").msgclass + DeleteFrameworkDeploymentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest").msgclass + GetFrameworkDeploymentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest").msgclass + ListFrameworkDeploymentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest").msgclass + ListFrameworkDeploymentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse").msgclass + GetCloudControlDeploymentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest").msgclass + ListCloudControlDeploymentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest").msgclass + ListCloudControlDeploymentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse").msgclass + CloudControlDeploymentReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference").msgclass + FrameworkDeploymentReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference").msgclass + DeploymentState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.DeploymentState").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/deployment_services_pb.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/deployment_services_pb.rb new file mode 100644 index 000000000000..1acf4f42b1ed --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/deployment_services_pb.rb @@ -0,0 +1,59 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/cloudsecuritycompliance/v1/deployment.proto for package 'Google.Cloud.CloudSecurityCompliance.V1' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/cloud/cloudsecuritycompliance/v1/deployment_pb' + +module Google + module Cloud + module CloudSecurityCompliance + module V1 + module Deployment + # Deployment service allows users to manage deployments of Frameworks and + # Cloud Controls on a target resource. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.cloudsecuritycompliance.v1.Deployment' + + # Creates a framework deployment in a given parent resource. A + # framework deployment lets you assign a particular framework version to an + # organization, folder, or project so that you can control and monitor + # those resources using the framework's cloud controls. + rpc :CreateFrameworkDeployment, ::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkDeploymentRequest, ::Google::Longrunning::Operation + # Deletes a framework deployment. + rpc :DeleteFrameworkDeployment, ::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkDeploymentRequest, ::Google::Longrunning::Operation + # Gets details about a framework deployment. + rpc :GetFrameworkDeployment, ::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkDeploymentRequest, ::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment + # Lists the framework deployments in a given parent resource. + rpc :ListFrameworkDeployments, ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkDeploymentsRequest, ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkDeploymentsResponse + # Gets details about a cloud control deployment. + rpc :GetCloudControlDeployment, ::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlDeploymentRequest, ::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment + # Lists the cloud conrol deployments in a given parent resource. + rpc :ListCloudControlDeployments, ::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlDeploymentsRequest, ::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlDeploymentsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/monitoring_pb.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/monitoring_pb.rb new file mode 100644 index 000000000000..5eaaaa4c0538 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/monitoring_pb.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/cloudsecuritycompliance/v1/monitoring.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/cloudsecuritycompliance/v1/common_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/timestamp_pb' +require 'google/type/interval_pb' + + +descriptor_data = "\n8google/cloud/cloudsecuritycompliance/v1/monitoring.proto\x12\'google.cloud.cloudsecuritycompliance.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x34google/cloud/cloudsecuritycompliance/v1/common.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1agoogle/type/interval.proto\"\xa6\x02\n\'ListFrameworkComplianceSummariesRequest\x12Y\n\x06parent\x18\x01 \x01(\tBI\xe0\x41\x02\xfa\x41\x43\x12\x41\x63loudsecuritycompliance.googleapis.com/FrameworkComplianceSummary\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12Z\n\x04view\x18\x05 \x01(\x0e\x32G.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummaryViewB\x03\xe0\x41\x01\"\xb5\x01\n(ListFrameworkComplianceSummariesResponse\x12k\n\x1e\x66ramework_compliance_summaries\x18\x01 \x03(\x0b\x32\x43.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x03\"\xf6\x08\n\x19\x46rameworkComplianceReport\x12\x11\n\tframework\x18\x01 \x01(\t\x12\x1d\n\x15\x66ramework_description\x18\x02 \x01(\t\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x65\n\x1a\x63ontrol_assessment_details\x18\x04 \x01(\x0b\x32\x41.google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails\x12X\n\x0e\x66ramework_type\x18\x05 \x01(\x0e\x32@.google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType\x12Y\n\x19supported_cloud_providers\x18\x06 \x03(\x0e\x32\x36.google.cloud.cloudsecuritycompliance.v1.CloudProvider\x12X\n\x14\x66ramework_categories\x18\x07 \x03(\x0e\x32:.google.cloud.cloudsecuritycompliance.v1.FrameworkCategory\x12#\n\x16\x66ramework_display_name\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04name\x18\t \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x11major_revision_id\x18\n \x01(\x03\x12\x19\n\x11minor_revision_id\x18\x0b \x01(\x03\x12_\n\x17target_resource_details\x18\x0c \x03(\x0b\x32>.google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails:\xab\x03\xea\x41\xa7\x03\n@cloudsecuritycompliance.googleapis.com/FrameworkComplianceReport\x12`projects/{project}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}\x12^folders/{folder}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}\x12jorganizations/{organization}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}*\x1a\x66rameworkComplianceReports2\x19\x66rameworkComplianceReport\"\xc7\x01\n%FetchFrameworkComplianceReportRequest\x12V\n\x04name\x18\x01 \x01(\tBH\xe0\x41\x02\xfa\x41\x42\n@cloudsecuritycompliance.googleapis.com/FrameworkComplianceReport\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xe7\x01\n\x1bListFindingSummariesRequest\x12M\n\x06parent\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\x12\x35\x63loudsecuritycompliance.googleapis.com/FindingSummary\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x33\n\x08\x65nd_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x05\x18\x01\xe0\x41\x01\"\x90\x01\n\x1cListFindingSummariesResponse\x12R\n\x11\x66inding_summaries\x18\x01 \x03(\x0b\x32\x37.google.cloud.cloudsecuritycompliance.v1.FindingSummary\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x03\"\xfb\x01\n%ListControlComplianceSummariesRequest\x12W\n\x06parent\x18\x01 \x01(\tBG\xe0\x41\x02\xfa\x41\x41\x12?cloudsecuritycompliance.googleapis.com/ControlComplianceSummary\x12\x33\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x05\x18\x01\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xaf\x01\n&ListControlComplianceSummariesResponse\x12g\n\x1c\x63ontrol_compliance_summaries\x18\x01 \x03(\x0b\x32\x41.google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x03\"\xc6\x01\n)AggregateFrameworkComplianceReportRequest\x12V\n\x04name\x18\x01 \x01(\tBH\xe0\x41\x02\xfa\x41\x42\n@cloudsecuritycompliance.googleapis.com/FrameworkComplianceReport\x12,\n\x08interval\x18\x02 \x01(\x0b\x32\x15.google.type.IntervalB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x98\x01\n*AggregateFrameworkComplianceReportResponse\x12j\n\x1d\x61ggregated_compliance_reports\x18\x01 \x03(\x0b\x32\x43.google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport\"\x90\x01\n\x18\x43ontrolAssessmentDetails\x12\x18\n\x10passing_controls\x18\x01 \x01(\x05\x12\x18\n\x10\x66\x61iling_controls\x18\x02 \x01(\x05\x12!\n\x19\x61ssessed_passing_controls\x18\x03 \x01(\x05\x12\x1d\n\x15not_assessed_controls\x18\x04 \x01(\x05\"\xa0\t\n\x1a\x46rameworkComplianceSummary\x12\x11\n\tframework\x18\x01 \x01(\t\x12\x65\n\x1a\x63ontrol_assessment_details\x18\x02 \x01(\x0b\x32\x41.google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails\x12X\n\x0e\x66ramework_type\x18\x03 \x01(\x0e\x32@.google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType\x12Y\n\x19supported_cloud_providers\x18\x04 \x03(\x0e\x32\x36.google.cloud.cloudsecuritycompliance.v1.CloudProvider\x12X\n\x14\x66ramework_categories\x18\x05 \x03(\x0e\x32:.google.cloud.cloudsecuritycompliance.v1.FrameworkCategory\x12#\n\x16\x66ramework_display_name\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04name\x18\x07 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x11major_revision_id\x18\x08 \x01(\x03\x12\x19\n\x11minor_revision_id\x18\t \x01(\x03\x12_\n\x17target_resource_details\x18\n \x03(\x0b\x32>.google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails\x12\x1a\n\rfinding_count\x18\x0b \x01(\x03\x42\x03\xe0\x41\x03\x12S\n\x16\x63ontrols_passing_trend\x18\x0c \x01(\x0b\x32..google.cloud.cloudsecuritycompliance.v1.TrendB\x03\xe0\x41\x03:\xb8\x03\xea\x41\xb4\x03\nAcloudsecuritycompliance.googleapis.com/FrameworkComplianceSummary\x12\x63projects/{project}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}\x12\x61\x66olders/{folder}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}\x12morganizations/{organization}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}*\x1c\x66rameworkComplianceSummaries2\x1a\x66rameworkComplianceSummary\"\x8a\x05\n\x0e\x46indingSummary\x12\x18\n\x10\x66inding_category\x18\x01 \x01(\t\x12L\n\rfinding_class\x18\x02 \x01(\x0e\x32\x35.google.cloud.cloudsecuritycompliance.v1.FindingClass\x12\x43\n\x08severity\x18\x03 \x01(\x0e\x32\x31.google.cloud.cloudsecuritycompliance.v1.Severity\x12\x15\n\rfinding_count\x18\x04 \x01(\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1f\n\x12related_frameworks\x18\x06 \x03(\tB\x03\xe0\x41\x01\x12\x11\n\x04name\x18\x07 \x01(\tB\x03\xe0\x41\x08:\xc9\x02\xea\x41\xc5\x02\n5cloudsecuritycompliance.googleapis.com/FindingSummary\x12Jprojects/{project}/locations/{location}/findingSummaries/{finding_summary}\x12Hfolders/{folder}/locations/{location}/findingSummaries/{finding_summary}\x12Torganizations/{organization}/locations/{location}/findingSummaries/{finding_summary}*\x10\x66indingSummaries2\x0e\x66indingSummary\"\x9a\t\n\x18\x43ontrolComplianceSummary\x12\x0f\n\x07\x63ontrol\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12_\n\x18overall_evaluation_state\x18\x04 \x01(\x0e\x32\x38.google.cloud.cloudsecuritycompliance.v1.EvaluationStateB\x03\xe0\x41\x03\x12\x1c\n\x14total_findings_count\x18\x05 \x01(\x05\x12\x1d\n\x15\x63ompliance_frameworks\x18\x06 \x03(\t\x12R\n\x10similar_controls\x18\x07 \x03(\x0b\x32\x38.google.cloud.cloudsecuritycompliance.v1.SimilarControls\x12Z\n\x15\x63loud_control_reports\x18\x08 \x03(\x0b\x32;.google.cloud.cloudsecuritycompliance.v1.CloudControlReport\x12q\n\x1b\x63ontrol_responsibility_type\x18\t \x01(\x0e\x32L.google.cloud.cloudsecuritycompliance.v1.RegulatoryControlResponsibilityType\x12\x17\n\x0fis_fake_control\x18\n \x01(\x08\x12\x11\n\x04name\x18\x0b \x01(\tB\x03\xe0\x41\x08:\xd4\x04\xea\x41\xd0\x04\n?cloudsecuritycompliance.googleapis.com/ControlComplianceSummary\x12\x98\x01projects/{project}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}/controlComplianceSummaries/{control_compliance_summary}\x12\x96\x01\x66olders/{folder}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}/controlComplianceSummaries/{control_compliance_summary}\x12\xa2\x01organizations/{organization}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}/controlComplianceSummaries/{control_compliance_summary}*\x1a\x63ontrolComplianceSummaries2\x18\x63ontrolComplianceSummary\"\x98\x07\n\x12\x43loudControlReport\x12\x7f\n\'manual_cloud_control_assessment_details\x18\r \x01(\x0b\x32L.google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetailsH\x00\x12r\n cloud_control_assessment_details\x18\x0e \x01(\x0b\x32\x46.google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetailsH\x00\x12\x15\n\rcloud_control\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x12\n\ncategories\x18\x06 \x03(\t\x12R\n\x10similar_controls\x18\t \x03(\x0b\x32\x38.google.cloud.cloudsecuritycompliance.v1.SimilarControls\x12V\n\x12\x63loud_control_type\x18\n \x01(\x0e\x32:.google.cloud.cloudsecuritycompliance.v1.CloudControl.Type\x12\x18\n\x10\x66inding_category\x18\x0b \x01(\t\x12<\n\x05rules\x18\x0c \x03(\x0b\x32-.google.cloud.cloudsecuritycompliance.v1.Rule\x12K\n\x10\x66inding_severity\x18\x0f \x01(\x0e\x32\x31.google.cloud.cloudsecuritycompliance.v1.Severity\x12R\n\x10\x65nforcement_mode\x18\x10 \x01(\x0e\x32\x38.google.cloud.cloudsecuritycompliance.v1.EnforcementMode\x12 \n\x18\x63loud_control_deployment\x18\x11 \x01(\t\x12\x19\n\x11major_revision_id\x18\x12 \x01(\x03\x12\x19\n\x11minor_revision_id\x18\x13 \x01(\x03\x12$\n\x1c\x66ramework_major_revision_ids\x18\x14 \x03(\x03\x42\x14\n\x12\x61ssessment_details\"I\n#ManualCloudControlAssessmentDetails\x12\"\n\x1amanual_cloud_control_guide\x18\x01 \x03(\t\"\x90\x01\n\x1d\x43loudControlAssessmentDetails\x12\x16\n\x0e\x66indings_count\x18\x01 \x01(\x05\x12W\n\x10\x65valuation_state\x18\x02 \x01(\x0e\x32\x38.google.cloud.cloudsecuritycompliance.v1.EvaluationStateB\x03\xe0\x41\x03\"8\n\x0fSimilarControls\x12\x11\n\tframework\x18\x01 \x01(\t\x12\x12\n\ncontrol_id\x18\x02 \x01(\t\"\xb4\x01\n\x1a\x41ggregatedComplianceReport\x12\x65\n\x1a\x63ontrol_assessment_details\x18\x01 \x01(\x0b\x32\x41.google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails\x12/\n\x0breport_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x8c\x02\n\x15TargetResourceDetails\x12\x1c\n\x14\x66ramework_deployment\x18\x01 \x01(\t\x12$\n\x1ctarget_resource_display_name\x18\x02 \x01(\t\x12\x17\n\x0ftarget_resource\x18\x03 \x01(\t\x12/\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x19\n\x11major_revision_id\x18\x06 \x01(\x03\x12\x19\n\x11minor_revision_id\x18\x07 \x01(\x03\"U\n\x05Trend\x12\x30\n\x08\x64uration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\x12\x1a\n\rvalue_percent\x18\x02 \x01(\x01\x42\x03\xe0\x41\x03*\x90\x01\n\x0f\x45valuationState\x12 \n\x1c\x45VALUATION_STATE_UNSPECIFIED\x10\x00\x12\x1b\n\x17\x45VALUATION_STATE_PASSED\x10\x01\x12\x1b\n\x17\x45VALUATION_STATE_FAILED\x10\x02\x12!\n\x1d\x45VALUATION_STATE_NOT_ASSESSED\x10\x03*\xd9\x01\n\x0c\x46indingClass\x12\x1d\n\x19\x46INDING_CLASS_UNSPECIFIED\x10\x00\x12\n\n\x06THREAT\x10\x01\x12\x11\n\rVULNERABILITY\x10\x02\x12\x14\n\x10MISCONFIGURATION\x10\x03\x12\x0f\n\x0bOBSERVATION\x10\x04\x12\r\n\tSCC_ERROR\x10\x05\x12\x15\n\x11POSTURE_VIOLATION\x10\x06\x12\x15\n\x11TOXIC_COMBINATION\x10\x07\x12\x17\n\x13SENSITIVE_DATA_RISK\x10\x08\x12\x0e\n\nCHOKEPOINT\x10\t*\xac\x01\n\x1e\x46rameworkComplianceSummaryView\x12\x31\n-FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_UNSPECIFIED\x10\x00\x12+\n\'FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_BASIC\x10\x01\x12*\n&FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_FULL\x10\x02\x32\xd5\x11\n\nMonitoring\x12\xa8\x03\n ListFrameworkComplianceSummaries\x12P.google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest\x1aQ.google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse\"\xde\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xce\x01\x12\x45/v1/{parent=organizations/*/locations/*}/frameworkComplianceSummariesZA\x12?/v1/{parent=folders/*/locations/*}/frameworkComplianceSummariesZB\x12@/v1/{parent=projects/*/locations/*}/frameworkComplianceSummaries\x12\xe0\x02\n\x14ListFindingSummaries\x12\x44.google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest\x1a\x45.google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse\"\xba\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xaa\x01\x12\x39/v1/{parent=organizations/*/locations/*}/findingSummariesZ5\x12\x33/v1/{parent=folders/*/locations/*}/findingSummariesZ6\x12\x34/v1/{parent=projects/*/locations/*}/findingSummaries\x12\x9f\x03\n\x1e\x46\x65tchFrameworkComplianceReport\x12N.google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest\x1a\x42.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport\"\xe8\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xda\x01\x12I/v1/{name=organizations/*/locations/*/frameworkComplianceReports/*}:fetchZE\x12\x43/v1/{name=folders/*/locations/*/frameworkComplianceReports/*}:fetchZF\x12\x44/v1/{name=projects/*/locations/*/frameworkComplianceReports/*}:fetch\x12\xf3\x03\n\x1eListControlComplianceSummaries\x12N.google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest\x1aO.google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse\"\xaf\x02\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x9f\x02\x12`/v1/{parent=organizations/*/locations/*/frameworkComplianceReports/*}/controlComplianceSummariesZ\\\x12Z/v1/{parent=folders/*/locations/*/frameworkComplianceReports/*}/controlComplianceSummariesZ]\x12[/v1/{parent=projects/*/locations/*/frameworkComplianceReports/*}/controlComplianceSummaries\x12\xc4\x03\n\"AggregateFrameworkComplianceReport\x12R.google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest\x1aS.google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse\"\xf4\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xe6\x01\x12M/v1/{name=organizations/*/locations/*/frameworkComplianceReports/*}:aggregateZI\x12G/v1/{name=folders/*/locations/*/frameworkComplianceReports/*}:aggregateZJ\x12H/v1/{name=projects/*/locations/*/frameworkComplianceReports/*}:aggregate\x1aZ\xca\x41&cloudsecuritycompliance.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x89\x03\n+com.google.cloud.cloudsecuritycompliance.v1B\x0fMonitoringProtoP\x01Zecloud.google.com/go/cloudsecuritycompliance/apiv1/cloudsecuritycompliancepb;cloudsecuritycompliancepb\xaa\x02\'Google.Cloud.CloudSecurityCompliance.V1\xca\x02\'Google\\Cloud\\CloudSecurityCompliance\\V1\xea\x02*Google::Cloud::CloudSecurityCompliance::V1\xea\x41^\n5cloudsecuritycompliance.googleapis.com/FolderLocation\x12%folders/{folder}/locations/{location}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module CloudSecurityCompliance + module V1 + ListFrameworkComplianceSummariesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest").msgclass + ListFrameworkComplianceSummariesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse").msgclass + FrameworkComplianceReport = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport").msgclass + FetchFrameworkComplianceReportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest").msgclass + ListFindingSummariesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest").msgclass + ListFindingSummariesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse").msgclass + ListControlComplianceSummariesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest").msgclass + ListControlComplianceSummariesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse").msgclass + AggregateFrameworkComplianceReportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest").msgclass + AggregateFrameworkComplianceReportResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse").msgclass + ControlAssessmentDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails").msgclass + FrameworkComplianceSummary = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary").msgclass + FindingSummary = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.FindingSummary").msgclass + ControlComplianceSummary = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary").msgclass + CloudControlReport = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.CloudControlReport").msgclass + ManualCloudControlAssessmentDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails").msgclass + CloudControlAssessmentDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails").msgclass + SimilarControls = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.SimilarControls").msgclass + AggregatedComplianceReport = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport").msgclass + TargetResourceDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails").msgclass + Trend = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.Trend").msgclass + EvaluationState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.EvaluationState").enummodule + FindingClass = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.FindingClass").enummodule + FrameworkComplianceSummaryView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummaryView").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/monitoring_services_pb.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/monitoring_services_pb.rb new file mode 100644 index 000000000000..3a6961e1141e --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/monitoring_services_pb.rb @@ -0,0 +1,53 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/cloudsecuritycompliance/v1/monitoring.proto for package 'Google.Cloud.CloudSecurityCompliance.V1' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/cloud/cloudsecuritycompliance/v1/monitoring_pb' + +module Google + module Cloud + module CloudSecurityCompliance + module V1 + module Monitoring + # Service describing handlers for resources + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.cloudsecuritycompliance.v1.Monitoring' + + # Lists the framework compliance summary for a given scope. + rpc :ListFrameworkComplianceSummaries, ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkComplianceSummariesRequest, ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkComplianceSummariesResponse + # Lists the finding summary by category for a given scope. + rpc :ListFindingSummaries, ::Google::Cloud::CloudSecurityCompliance::V1::ListFindingSummariesRequest, ::Google::Cloud::CloudSecurityCompliance::V1::ListFindingSummariesResponse + # Fetches the framework compliance report for a given scope. + rpc :FetchFrameworkComplianceReport, ::Google::Cloud::CloudSecurityCompliance::V1::FetchFrameworkComplianceReportRequest, ::Google::Cloud::CloudSecurityCompliance::V1::FrameworkComplianceReport + # Lists the control compliance summary for a given scope. + rpc :ListControlComplianceSummaries, ::Google::Cloud::CloudSecurityCompliance::V1::ListControlComplianceSummariesRequest, ::Google::Cloud::CloudSecurityCompliance::V1::ListControlComplianceSummariesResponse + # Gets the aggregated compliance report over time for a given scope. + rpc :AggregateFrameworkComplianceReport, ::Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportRequest, ::Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/README.md new file mode 100644 index 000000000000..5043f1175240 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Cloud Security Compliance V1 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + # + # Note: This field should not be used in most cases. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + # to this is for Nested Collections that have stuttering names, as defined + # in [AIP-122](https://google.aip.dev/122#nested-collections), where the + # collection ID in the resource name pattern does not necessarily directly + # match the `plural` value. + # + # It is the same concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/cloud/cloudsecuritycompliance/v1/audit.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/cloud/cloudsecuritycompliance/v1/audit.rb new file mode 100644 index 000000000000..bc09ec4a4605 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/cloud/cloudsecuritycompliance/v1/audit.rb @@ -0,0 +1,413 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module CloudSecurityCompliance + module V1 + # The request message for [GenerateFrameworkAuditScopeReport][]. + # @!attribute [rw] scope + # @return [::String] + # Required. The organization, folder or project for the audit report. + # + # Supported formats are the following: + # + # * `projects/{project_id}/locations/{location}` + # * `folders/{folder_id}/locations/{location}` + # * `organizations/{organization_id}/locations/{location}` + # @!attribute [rw] report_format + # @return [::Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportRequest::Format] + # Required. The format that the scope report bytes is returned in. + # @!attribute [rw] compliance_framework + # @return [::String] + # Required. The compliance framework that the scope report is generated for. + class GenerateFrameworkAuditScopeReportRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The set of options for the audit scope report format. + module Format + # Default value. This value is unused. + FORMAT_UNSPECIFIED = 0 + + # The report format is the Open Document Format (ODF). + ODF = 1 + end + end + + # The response message for [GenerateFrameworkAuditScopeReport][]. + # @!attribute [rw] scope_report_contents + # @return [::String] + # The audit scope report content in byte format. + # @!attribute [rw] name + # @return [::String] + # Identifier. The name of the audit report, in the format that was + # given in the request. + # @!attribute [rw] compliance_framework + # @return [::String] + # Required. The compliance framework that the audit scope report is generated + # for. + class GenerateFrameworkAuditScopeReportResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Additional information for an audit operation. + # @!attribute [r] total_count + # @return [::Integer] + # Output only. The total number of checks. + # @!attribute [r] compliant_count + # @return [::Integer] + # Output only. The number of compliant checks. + # @!attribute [r] violation_count + # @return [::Integer] + # Output only. The number of checks with violations. + # @!attribute [r] manual_review_needed_count + # @return [::Integer] + # Output only. The number of checks with "manual review needed" status. + # @!attribute [r] error_count + # @return [::Integer] + # Output only. The number of checks that can't be performed due to errors. + class ReportSummary + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for [CreateFrameworkAudit][]. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource where this framework audit is created. + # + # Supported formats are the following: + # + # * `organizations/{organization_id}/locations/{location}` + # * `folders/{folder_id}/locations/{location}` + # * `projects/{project_id}/locations/{location}` + # @!attribute [rw] framework_audit_id + # @return [::String] + # Optional. The ID to use for the framework audit. The ID becomes the final + # component of the framework audit's full resource name. + # + # The ID must be between 4-63 characters, and valid characters + # are `\[a-z][0-9]-\`. + # @!attribute [rw] framework_audit + # @return [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkAudit] + # Required. The framework audit to create. + class CreateFrameworkAuditRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A destination for the framework audit. + # @!attribute [rw] bucket + # @return [::Google::Cloud::CloudSecurityCompliance::V1::BucketDestination] + # The Cloud Storage bucket destination. + class FrameworkAuditDestination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A Cloud Storage bucket destination. + # @!attribute [rw] bucket_uri + # @return [::String] + # Required. The URI of the Cloud Storage bucket. + # @!attribute [rw] framework_audit_format + # @return [::Google::Cloud::CloudSecurityCompliance::V1::BucketDestination::Format] + # Optional. The format of the framework audit. + class BucketDestination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The set of options for the framework audit format. + module Format + # Default value. This value is unused. + FORMAT_UNSPECIFIED = 0 + + # The format for the framework audit report is Open Document. + ODF = 1 + end + end + + # A framework audit. + # @!attribute [r] name + # @return [::String] + # Output only. Identifier. The name of the framework audit. + # @!attribute [r] framework_audit_id + # @return [::String] + # Output only. The ID of the framework audit. + # @!attribute [r] compliance_framework + # @return [::String] + # Output only. The compliance framework used for the audit. + # @!attribute [r] scope + # @return [::String] + # Output only. The scope of the audit. + # @!attribute [rw] framework_audit_destination + # @return [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkAuditDestination] + # Required. The destination for the audit reports. + # @!attribute [r] start_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time that the audit started. + # @!attribute [r] finish_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time that the audit finished. + # @!attribute [r] compliance_state + # @return [::Google::Cloud::CloudSecurityCompliance::V1::ComplianceState] + # Output only. The overall compliance state of the audit. + # @!attribute [r] report_summary + # @return [::Google::Cloud::CloudSecurityCompliance::V1::ReportSummary] + # Output only. The summary of the report. + # @!attribute [rw] cloud_control_group_audit_details + # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::CloudControlGroupAuditDetails>] + # Optional. The details for the cloud control groups within this audit. + # @!attribute [rw] cloud_control_audit_details + # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::CloudControlAuditDetails>] + # Optional. The details for the cloud controls within this audit. + # @!attribute [r] operation_id + # @return [::String] + # Output only. The ID of the long-running operation. + # @!attribute [r] state + # @return [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkAudit::State] + # Output only. The framework audit state of the audit. + class FrameworkAudit + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The state of the framework audit. + module State + # Default value. This value is unused. + STATE_UNSPECIFIED = 0 + + # The audit is scheduled. + SCHEDULED = 1 + + # The audit is running. + RUNNING = 2 + + # The audit results are being uploaded. + UPLOADING = 3 + + # The audit failed. + FAILED = 4 + + # The audit completed successfully. + SUCCEEDED = 5 + end + end + + # The request message for [ListFrameworkAudits][]. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource where the framework audits are listed. + # + # Supported formats are the following: + # + # * `organizations/{organization_id}/locations/{location}` + # * `folders/{folder_id}/locations/{location}` + # * `projects/{project_id}/locations/{location}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of framework audits to return. The service + # might return fewer audits than this value. If unspecified, a maximum of 10 + # framework audits are returned. The maximum value is 50; values above 50 are + # limited to 50. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The `next_page_token` value that's returned from a previous list + # request, if any. + # @!attribute [rw] filter + # @return [::String] + # Optional. The filters to apply to the framework audits. + # Supported filters are `compliance_framework`, `compliance_state`, + # `create_time,` and `framework_audit_name`. If the filter is invalid, an + # invalid argument error is returned. + # For syntax details, see [AIP-160][https://google.aip.dev/160]. + class ListFrameworkAuditsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for [ListFrameworkAudits][]. + # @!attribute [rw] framework_audits + # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::FrameworkAudit>] + # The framework audits. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which you can send as the `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListFrameworkAuditsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for [GetFrameworkAudit][]. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the framework audit to retrieve. + # + # Supported formats are the following: + # + # * `organizations/{organization_id}/locations/{location}/frameworkAudits/{frameworkAuditName}` + # * `folders/{folder_id}/locations/{location}/frameworkAudits/{frameworkAuditName}` + # * `projects/{project_id}/locations/{location}/frameworkAudits/{frameworkAuditName}` + class GetFrameworkAuditRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The details for a cloud control group. + # @!attribute [r] cloud_control_group_id + # @return [::String] + # Output only. The ID of the cloud control group. + # @!attribute [r] display_name + # @return [::String] + # Output only. The display name of the cloud control group. + # @!attribute [r] description + # @return [::String] + # Output only. The description of the cloud control group. + # @!attribute [r] responsibility_type + # @return [::String] + # Output only. The responsibility type. + # @!attribute [r] google_responsibility_description + # @return [::String] + # Output only. The description of Google's responsibility. + # @!attribute [r] google_responsibility_implementation + # @return [::String] + # Output only. The implementation of Google's responsibility. + # @!attribute [r] customer_responsibility_description + # @return [::String] + # Output only. The description of your responsibility. + # @!attribute [r] customer_responsibility_implementation + # @return [::String] + # Output only. The implementation of your responsibility. + # @!attribute [r] compliance_state + # @return [::Google::Cloud::CloudSecurityCompliance::V1::ComplianceState] + # Output only. The compliance state of the control group. + # @!attribute [r] control_id + # @return [::String] + # Output only. The ID of the regulatory control. + # @!attribute [r] control_family + # @return [::Google::Cloud::CloudSecurityCompliance::V1::ControlFamily] + # Output only. The control family. + # @!attribute [r] cloud_control_details + # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::CloudControlAuditDetails>] + # Output only. The details for the cloud controls within this group. + # @!attribute [r] report_summary + # @return [::Google::Cloud::CloudSecurityCompliance::V1::ReportSummary] + # Output only. The summary of the report. + class CloudControlGroupAuditDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The details for a finding. + # @!attribute [r] name + # @return [::String] + # Output only. The name of the finding. + # @!attribute [r] compliance_state + # @return [::Google::Cloud::CloudSecurityCompliance::V1::ComplianceState] + # Output only. The compliance state of the finding. + # @!attribute [r] observation + # @return [::Google::Cloud::CloudSecurityCompliance::V1::ObservationDetails] + # Output only. The observation details for the finding. + # @!attribute [r] evidence + # @return [::Google::Cloud::CloudSecurityCompliance::V1::EvidenceDetails] + # Output only. The evidence details for the finding. + class FindingDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The observation details for a finding. + # @!attribute [r] current_value + # @return [::String] + # Output only. The current value. + # @!attribute [rw] expected_value + # @return [::String] + # Optional. The expected value. + # @!attribute [r] guidance + # @return [::String] + # Output only. Any guidance for the observation. + class ObservationDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The evidence details for a finding. + # @!attribute [r] resource + # @return [::String] + # Output only. The resource identifier. + # @!attribute [r] service + # @return [::String] + # Output only. The service identifier. + # @!attribute [r] evidence_path + # @return [::String] + # Output only. The path to the evidence. + class EvidenceDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The details for a cloud control audit. + # @!attribute [r] cloud_control + # @return [::String] + # Output only. The name of the cloud control. + # @!attribute [r] cloud_control_id + # @return [::String] + # Output only. The ID of the cloud control. + # @!attribute [r] cloud_control_description + # @return [::String] + # Output only. The description of the cloud control. + # @!attribute [r] compliance_state + # @return [::Google::Cloud::CloudSecurityCompliance::V1::ComplianceState] + # Output only. The overall status of the findings for the control. + # @!attribute [r] report_summary + # @return [::Google::Cloud::CloudSecurityCompliance::V1::ReportSummary] + # Output only. The summary of the report. + # @!attribute [r] findings + # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::FindingDetails>] + # Output only. The findings for the control. + class CloudControlAuditDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The state of compliance after evaluation is complete. + module ComplianceState + # Default value. This value is unused. + COMPLIANCE_STATE_UNSPECIFIED = 0 + + # The resource is compliant. + COMPLIANT = 1 + + # The resource has a violation. + VIOLATION = 2 + + # The resource requires manual review from you. + MANUAL_REVIEW_NEEDED = 3 + + # An error occurred while computing the resource status. + ERROR = 4 + + # The resource can't be audited. + AUDIT_NOT_SUPPORTED = 5 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/cloud/cloudsecuritycompliance/v1/cm_enrollment_service.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/cloud/cloudsecuritycompliance/v1/cm_enrollment_service.rb new file mode 100644 index 000000000000..49abb65a66c5 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/cloud/cloudsecuritycompliance/v1/cm_enrollment_service.rb @@ -0,0 +1,108 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module CloudSecurityCompliance + module V1 + # The request message for [UpdateCmEnrollment][]. + # @!attribute [rw] cm_enrollment + # @return [::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollment] + # Required. The Compliance Manager enrollment to update. + # The `name` field is used to identify the settings that you want to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. The list of fields that you want to update. + class UpdateCmEnrollmentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for [CalculateEffectiveCmEnrollment][]. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the Compliance Manager enrollment to calculate. + # + # Supported formats are the following: + # + # * `organizations/{organization_id}/locations/{location}/cmEnrollment` + # * `folders/{folder_id}/locations/{location}/cmEnrollment` + # * `projects/{project_id}/locations/{location}/cmEnrollment` + class CalculateEffectiveCmEnrollmentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The settings for Compliance Manager at a specific resource scope.= + # @!attribute [rw] name + # @return [::String] + # Identifier. The name of the Compliance Manager enrollment. + # + # Supported formats are the following: + # + # * `organizations/{organization_id}/locations/{location}/cmEnrollment` + # * `folders/{folder_id}/locations/{location}/cmEnrollment` + # * `projects/{project_id}/locations/{location}/cmEnrollment` + # @!attribute [rw] enrolled + # @return [::Boolean] + # Optional. Whether the resource is enrolled in Compliance Manager. + # This setting is inherited by all descendants. + # @!attribute [rw] audit_config + # @return [::Google::Cloud::CloudSecurityCompliance::V1::AuditConfig] + # Optional. The audit configuration for Compliance Manager. + # If set at a scope, this configuration overrides any inherited audit + # configuration. + class CmEnrollment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for [CalculateEffectiveCmEnrollment][]. + # @!attribute [rw] cm_enrollment + # @return [::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollment] + # The effective Compliance Manager enrollment for the resource. + class CalculateEffectiveCmEnrollmentResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The audit configuration for Compliance Manager. + # @!attribute [rw] destinations + # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::AuditConfig::CmEligibleDestination>] + # Required. The list of destinations that can be selected for uploading audit + # reports to. + class AuditConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The destination details where audit reports are + # uploaded. + # @!attribute [rw] gcs_bucket + # @return [::String] + # The Cloud Storage bucket where audit reports and evidences can be + # uploaded. The format is `gs://{bucket_name}`. + class CmEligibleDestination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/cloud/cloudsecuritycompliance/v1/common.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/cloud/cloudsecuritycompliance/v1/common.rb new file mode 100644 index 000000000000..662d2ed61c0c --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/cloud/cloudsecuritycompliance/v1/common.rb @@ -0,0 +1,808 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module CloudSecurityCompliance + module V1 + # A framework is a collection of cloud controls and regulatory controls + # that represent security best practices or industry-defined standards such as + # FedRAMP or NIST. + # @!attribute [rw] name + # @return [::String] + # Required. Identifier. The name of the framework, in one of the following + # formats: + # `organizations/{organization}/locations/{location}/frameworks/{framework}` + # or + # `projects/{project}/locations/{location}/frameworks/{framework}`. + # + # The only supported location is `global`. + # @!attribute [r] major_revision_id + # @return [::Integer] + # Output only. The major version of the framework, which is incremented in + # ascending order. + # @!attribute [rw] display_name + # @return [::String] + # Optional. The friendly name of the framework. The maximum length is 200 + # characters. + # @!attribute [rw] description + # @return [::String] + # Optional. The description of the framework. The maximum length is 2000 + # characters. + # @!attribute [r] type + # @return [::Google::Cloud::CloudSecurityCompliance::V1::Framework::FrameworkType] + # Output only. The type of framework. + # @!attribute [rw] cloud_control_details + # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDetails>] + # Optional. The cloud control details that are directly added without any + # grouping in the framework. + # @!attribute [rw] category + # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::FrameworkCategory>] + # Optional. The category of the framework. + # @!attribute [r] supported_cloud_providers + # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::CloudProvider>] + # Output only. The cloud providers that are supported by the framework. + # @!attribute [r] supported_target_resource_types + # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::TargetResourceType>] + # Output only. The target resource types that are supported by the framework. + # @!attribute [r] supported_enforcement_modes + # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::EnforcementMode>] + # Output only. The supported enforcement modes of the framework. + class Framework + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of framework. + module FrameworkType + # Default value. This value is unused. + FRAMEWORK_TYPE_UNSPECIFIED = 0 + + # A framework that's provided and managed by Google. + BUILT_IN = 1 + + # A framework that's created and managed by you. + CUSTOM = 2 + end + end + + # The details of a cloud control. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the cloud control, in one of the following formats: + # `organizations/{organization}/locations/{location}/cloudControls/{cloud_control}` + # or + # `projects/{project}/locations/{location}/cloudControls/{cloud_control}`. + # + # The only supported location is `global`. + # @!attribute [rw] major_revision_id + # @return [::Integer] + # Required. The major version of the cloud control. + # @!attribute [rw] parameters + # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::Parameter>] + # Optional. Parameters are key-value pairs that let you provide your custom + # location requirements, environment requirements, or other settings that are + # relevant to the cloud control. An example parameter is + # `{"name": "location","value": "us-west-1"}`. + class CloudControlDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The reference of a framework, in one of the following formats: + # - `organizations/{organization}/locations/{location}/frameworks/{framework}` + # - `projects/{project}/locations/{location}/frameworks/{framework}`. + # + # The only supported location is `global`. + # @!attribute [rw] framework + # @return [::String] + # Required. The major version of the framework. If not specified, the version + # corresponds to the latest version of the framework. + # @!attribute [rw] major_revision_id + # @return [::Integer] + # Optional. The major version of the framework. If not specified, the version + # corresponds to the latest version of the framework. + class FrameworkReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Parameters are key-value pairs that let you provide your custom location + # requirements, environment requirements, or other settings that are + # relevant to the cloud control. + # @!attribute [rw] name + # @return [::String] + # Required. The name or key of the parameter. + # @!attribute [rw] parameter_value + # @return [::Google::Cloud::CloudSecurityCompliance::V1::ParamValue] + # Required. The value of the parameter. + class Parameter + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A cloud control is a set of rules and associated metadata that you can + # use to define your organization's security or compliance intent. + # @!attribute [rw] name + # @return [::String] + # Required. Identifier. The name of the cloud control, in either of the + # formats: + # `organizations/{organization}/locations/{location}/cloudControls/{cloud_control}` + # or + # `projects/{project}/locations/{location}/cloudControls/{cloud_control}`. + # + # The only supported location is `global`. + # @!attribute [r] major_revision_id + # @return [::Integer] + # Output only. The major version of the cloud control, which is incremented + # in ascending order. + # @!attribute [rw] description + # @return [::String] + # Optional. A description of the cloud control. The maximum length is 2000 + # characters. + # @!attribute [rw] display_name + # @return [::String] + # Optional. The friendly name of the cloud control. The maximum length is 200 + # characters. + # @!attribute [r] supported_enforcement_modes + # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::EnforcementMode>] + # Output only. The supported enforcement modes for the cloud control. + # @!attribute [rw] parameter_spec + # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::ParameterSpec>] + # Optional. The parameter specifications for the cloud control. + # @!attribute [rw] rules + # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::Rule>] + # Optional. The rules that you can enforce to meet your security or + # compliance intent. + # @!attribute [rw] severity + # @return [::Google::Cloud::CloudSecurityCompliance::V1::Severity] + # Optional. The severity of the findings that are generated by the cloud + # control. + # @!attribute [rw] finding_category + # @return [::String] + # Optional. The finding category for the cloud control findings. The maximum + # length is 255 characters. + # @!attribute [rw] supported_cloud_providers + # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::CloudProvider>] + # Optional. The supported cloud providers. + # @!attribute [r] related_frameworks + # @return [::Array<::String>] + # Output only. The frameworks that include this cloud control. + # @!attribute [rw] remediation_steps + # @return [::String] + # Optional. The remediation steps for the cloud control findings. The + # maximum length is 400 characters. + # @!attribute [rw] categories + # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::CloudControlCategory>] + # Optional. The categories for the cloud control. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time that the cloud control was last updated. + # `create_time` is used because a new cloud control is created + # whenever an existing cloud control is updated. + # @!attribute [rw] supported_target_resource_types + # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::TargetResourceType>] + # Optional. The target resource types that are supported by the cloud + # control. + class CloudControl + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of cloud control. + module Type + # Default value. This value is unused. + TYPE_UNSPECIFIED = 0 + + # A cloud control that's created and managed by you. + CUSTOM = 1 + + # A cloud control that's provided and managed by Google. + BUILT_IN = 2 + end + end + + # The parameter specification for the cloud control. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the parameter. + # @!attribute [rw] display_name + # @return [::String] + # Optional. The friendly name of the parameter. The maximum length is 200 + # characters. + # @!attribute [rw] description + # @return [::String] + # Optional. The description of the parameter. The maximum length is 2000 + # characters. + # @!attribute [rw] is_required + # @return [::Boolean] + # Required. Whether the parameter is required. + # @!attribute [rw] value_type + # @return [::Google::Cloud::CloudSecurityCompliance::V1::ParameterSpec::ValueType] + # Required. The parameter value type. + # @!attribute [rw] default_value + # @return [::Google::Cloud::CloudSecurityCompliance::V1::ParamValue] + # Optional. The default value of the parameter. + # @!attribute [rw] substitution_rules + # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::ParameterSubstitutionRule>] + # Optional. The list of parameter substitutions. + # @!attribute [rw] sub_parameters + # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::ParameterSpec>] + # Optional. The parameter specification for `oneOf` attributes. + # @!attribute [rw] validation + # @return [::Google::Cloud::CloudSecurityCompliance::V1::Validation] + # Optional. The permitted set of values for the parameter. + class ParameterSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of parameter value. + module ValueType + # Default value. This value is unused. + VALUE_TYPE_UNSPECIFIED = 0 + + # A string value. + STRING = 3 + + # A boolean value. + BOOLEAN = 4 + + # A string list value. + STRINGLIST = 5 + + # A numeric value. + NUMBER = 6 + + # A oneOf value. + ONEOF = 7 + end + end + + # The validation of the parameter. + # @!attribute [rw] allowed_values + # @return [::Google::Cloud::CloudSecurityCompliance::V1::AllowedValues] + # The permitted set of values for the parameter. + # + # Note: The following fields are mutually exclusive: `allowed_values`, `int_range`, `regexp_pattern`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] int_range + # @return [::Google::Cloud::CloudSecurityCompliance::V1::IntRange] + # The permitted range for numeric parameters. + # + # Note: The following fields are mutually exclusive: `int_range`, `allowed_values`, `regexp_pattern`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] regexp_pattern + # @return [::Google::Cloud::CloudSecurityCompliance::V1::RegexpPattern] + # The regular expression for string parameters. + # + # Note: The following fields are mutually exclusive: `regexp_pattern`, `allowed_values`, `int_range`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Validation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The allowed set of values for the parameter. + # @!attribute [rw] values + # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::ParamValue>] + # Required. The list of allowed values for the parameter. + class AllowedValues + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The regular expression (regex) validator for parameter values. + # @!attribute [rw] pattern + # @return [::String] + # Required. The regex pattern to match the values of the parameter with. + class RegexpPattern + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The number range for number parameters. + # @!attribute [rw] min + # @return [::Integer] + # Required. The minimum permitted value for the numeric parameter + # (inclusive). + # @!attribute [rw] max + # @return [::Integer] + # Required. The maximum permitted value for the numeric parameter + # (inclusive). + class IntRange + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A list of strings for the parameter value. + # @!attribute [rw] values + # @return [::Array<::String>] + # Required. The strings in the list. + class StringList + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The possible parameter value types. + # @!attribute [rw] string_value + # @return [::String] + # Optional. A string value. + # + # Note: The following fields are mutually exclusive: `string_value`, `bool_value`, `string_list_value`, `number_value`, `oneof_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bool_value + # @return [::Boolean] + # Optional. A boolean value. + # + # Note: The following fields are mutually exclusive: `bool_value`, `string_value`, `string_list_value`, `number_value`, `oneof_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] string_list_value + # @return [::Google::Cloud::CloudSecurityCompliance::V1::StringList] + # Optional. A repeated string. + # + # Note: The following fields are mutually exclusive: `string_list_value`, `string_value`, `bool_value`, `number_value`, `oneof_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] number_value + # @return [::Float] + # Optional. A double value. + # + # Note: The following fields are mutually exclusive: `number_value`, `string_value`, `bool_value`, `string_list_value`, `oneof_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] oneof_value + # @return [::Google::Cloud::CloudSecurityCompliance::V1::Parameter] + # Optional. Sub-parameter values. + # + # Note: The following fields are mutually exclusive: `oneof_value`, `string_value`, `bool_value`, `string_list_value`, `number_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class ParamValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The parameter substitution rules. + # @!attribute [rw] placeholder_substitution_rule + # @return [::Google::Cloud::CloudSecurityCompliance::V1::PlaceholderSubstitutionRule] + # The placeholder substitution rule. + # + # Note: The following fields are mutually exclusive: `placeholder_substitution_rule`, `attribute_substitution_rule`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] attribute_substitution_rule + # @return [::Google::Cloud::CloudSecurityCompliance::V1::AttributeSubstitutionRule] + # The attribute substitution rule. + # + # Note: The following fields are mutually exclusive: `attribute_substitution_rule`, `placeholder_substitution_rule`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class ParameterSubstitutionRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The attribute at the given path that's substituted entirely. + # @!attribute [rw] attribute + # @return [::String] + # The fully qualified proto attribute path, in dot notation. + # For example: `rules[0].cel_expression.resource_types_values` + class AttributeSubstitutionRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The placeholder that's substituted in the rendered string. + # @!attribute [rw] attribute + # @return [::String] + # The fully qualified proto attribute path, in dot notation. + class PlaceholderSubstitutionRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A rule in the cloud control. + # @!attribute [rw] cel_expression + # @return [::Google::Cloud::CloudSecurityCompliance::V1::CELExpression] + # The rule's logic expression in Common Expression Language (CEL). + # @!attribute [rw] description + # @return [::String] + # Optional. The rule description. The maximum length is 2000 characters. + # @!attribute [rw] rule_action_types + # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::RuleActionType>] + # Required. The functionality that's enabled by the rule. + class Rule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A Common Expression Language (CEL) expression that's used to create a rule. + # @!attribute [rw] resource_types_values + # @return [::Google::Cloud::CloudSecurityCompliance::V1::StringList] + # The resource instance types on which this expression is defined. + # The format is `/`. + # For example: `compute.googleapis.com/Instance` + # @!attribute [rw] expression + # @return [::String] + # Required. The logical expression in CEL. The maximum length of the + # condition is 1000 characters. For more information, see [CEL + # expression](https://cloud.google.com/security-command-center/docs/compliance-manager-write-cel-expressions). + class CELExpression + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The metadata for the long-running operation. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation was created. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation finished running. + # @!attribute [r] target + # @return [::String] + # Output only. The server-defined resource path for the target of the + # operation. + # @!attribute [r] verb + # @return [::String] + # Output only. The name of the verb that was executed by the operation. + # @!attribute [r] status_message + # @return [::String] + # Output only. The human-readable status of the operation, if any. + # @!attribute [r] requested_cancellation + # @return [::Boolean] + # Output only. Identifies whether the user has requested that the operation + # be cancelled. If an operation was cancelled successfully, then the field + # {::Google::Longrunning::Operation#error google.longrunning.Operation.error} + # contains the value [google.rpc.Code.CANCELLED][google.rpc.Code.CANCELLED]. + # @!attribute [r] api_version + # @return [::String] + # Output only. The API version that was used to start the operation. + class OperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The regulatory control. + # @!attribute [r] name + # @return [::String] + # Output only. The name of a regulatory control, in one of the following + # formats: + # - `organizations/{organization}/locations/{location}/controls/{control}` + # - `projects/{project}/locations/{location}/controls/{control}`. + # + # The only supported location is `global`. + # @!attribute [r] display_name + # @return [::String] + # Output only. The friendly name for the regulatory control. + # @!attribute [r] description + # @return [::String] + # Output only. The description of the regulatory control. + # @!attribute [r] family + # @return [::Google::Cloud::CloudSecurityCompliance::V1::Control::Family] + # Output only. The regulatory group that the control belongs to. + # @!attribute [r] control_family + # @return [::Google::Cloud::CloudSecurityCompliance::V1::ControlFamily] + # Output only. The regulatory family that the control belongs to. + # @!attribute [r] responsibility_type + # @return [::Google::Cloud::CloudSecurityCompliance::V1::RegulatoryControlResponsibilityType] + # Output only. The entity that's responsible for the control, whether Google, + # you as the customer, or both. + # @!attribute [r] google_responsibility_description + # @return [::String] + # Output only. A description of Google's responsibility for the regulatory + # control. + # @!attribute [r] google_responsibility_implementation + # @return [::String] + # Output only. A description of Google's responsibility for implementing the + # regulatory control. + # @!attribute [r] customer_responsibility_description + # @return [::String] + # Output only. A description of your responsibility for the regulatory + # control. + # @!attribute [r] customer_responsibility_implementation + # @return [::String] + # Output only. A description of the your responsibility for implementing the + # regulatory control. + # @!attribute [r] shared_responsibility_description + # @return [::String] + # Output only. A description of the responsibility that's shared between + # Google and you in implementing this control. + # @!attribute [r] additional_content_uri + # @return [::String] + # Output only. A link to the documentation that's related to this control. + # @!attribute [r] related_frameworks + # @return [::Array<::String>] + # Output only. The frameworks that include this control. + class Control + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The regulatory control family. + module Family + # Default value. This value is unused. + FAMILY_UNSPECIFIED = 0 + + # Access control + AC = 1 + + # Awareness and araining + AT = 2 + + # Audit and accountability + AU = 3 + + # Certification, accreditation, and security assessments + CA = 4 + + # Configuration management + CM = 5 + + # Contingency planning + CP = 6 + + # Identification and authentication + IA = 7 + + # Incident response + IR = 8 + + # Maintenance + MA = 9 + + # Media protection + MP = 10 + + # Physical and environmental protection + PE = 11 + + # Security planning + PL = 12 + + # Personnel aecurity + PS = 13 + + # Risk assessment + RA = 14 + + # System services and acquisition + SA = 15 + + # System and communications protection + SC = 16 + + # System and information integrity + SI = 17 + + # Supply chain risk management + SR = 18 + end + end + + # The regulatory family of the control. + # @!attribute [rw] family_id + # @return [::String] + # The identifier for the regulatory control family. + # @!attribute [rw] display_name + # @return [::String] + # The friendly name for the regulatory control family. + class ControlFamily + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The responsibility type for the regulatory control. + module RegulatoryControlResponsibilityType + # Default value. This value is unused. + REGULATORY_CONTROL_RESPONSIBILITY_TYPE_UNSPECIFIED = 0 + + # Google's responsibility. + GOOGLE = 1 + + # Your responsibility. + CUSTOMER = 2 + + # Shared responsibility. + SHARED = 3 + end + + # The enforcement mode for the cloud control. + module EnforcementMode + # Default value. This value is unused. + ENFORCEMENT_MODE_UNSPECIFIED = 0 + + # The cloud control is enforced to prevent non-compliance. + PREVENTIVE = 1 + + # The cloud control is enforced to detect non-compliance. + DETECTIVE = 2 + + # The cloud control is enforced to audit for non-compliance. + AUDIT = 3 + end + + # The category for the framework. + module FrameworkCategory + # Default value. This value is unused. + FRAMEWORK_CATEGORY_UNSPECIFIED = 0 + + # An industry-defined framework. + INDUSTRY_DEFINED_STANDARD = 1 + + # An Assured Workloads framework. + ASSURED_WORKLOADS = 2 + + # A data security posture framework. + DATA_SECURITY = 3 + + # A Google's best practices framework. + GOOGLE_BEST_PRACTICES = 4 + + # A user-created framework. + CUSTOM_FRAMEWORK = 5 + end + + # The category for the cloud control. + module CloudControlCategory + # Default value. This value is unused. + CLOUD_CONTROL_CATEGORY_UNSPECIFIED = 0 + + # The infrastructure security category. + CC_CATEGORY_INFRASTRUCTURE = 1 + + # The artificial intelligence category. + CC_CATEGORY_ARTIFICIAL_INTELLIGENCE = 2 + + # The physical security category. + CC_CATEGORY_PHYSICAL_SECURITY = 3 + + # The data security category. + CC_CATEGORY_DATA_SECURITY = 4 + + # The network security category. + CC_CATEGORY_NETWORK_SECURITY = 5 + + # The incident management category. + CC_CATEGORY_INCIDENT_MANAGEMENT = 6 + + # The identity and access management category. + CC_CATEGORY_IDENTITY_AND_ACCESS_MANAGEMENT = 7 + + # The encryption category. + CC_CATEGORY_ENCRYPTION = 8 + + # The logs management and infrastructure category. + CC_CATEGORY_LOGS_MANAGEMENT_AND_INFRASTRUCTURE = 9 + + # The HR, admin, and processes category. + CC_CATEGORY_HR_ADMIN_AND_PROCESSES = 10 + + # The third-party and sub-processor management category. + CC_CATEGORY_THIRD_PARTY_AND_SUB_PROCESSOR_MANAGEMENT = 11 + + # The legal and disclosures category. + CC_CATEGORY_LEGAL_AND_DISCLOSURES = 12 + + # The vulnerability management category. + CC_CATEGORY_VULNERABILITY_MANAGEMENT = 13 + + # The privacy category. + CC_CATEGORY_PRIVACY = 14 + + # The business continuity and disaster recovery (BCDR) category. + CC_CATEGORY_BCDR = 15 + + # The admin access category. + CC_CATEGORY_ADMIN_ACCESS = 16 + + # DRZ (Data Residency). + CC_CATEGORY_DATA_RESIDENCY = 17 + + # RUR (Resource Usage Restriction). + CC_CATEGORY_RESOURCE_USAGE_RESTRICTION = 18 + + # SERVICE SPECIFIC + CC_CATEGORY_SERVICE_SPECIFIC = 19 + end + + # The cloud provider that's associated with the cloud control. + module CloudProvider + # Default value. This value is unused. + CLOUD_PROVIDER_UNSPECIFIED = 0 + + # Amazon Web Services (AWS). + AWS = 1 + + # Microsoft Azure. + AZURE = 2 + + # Google Cloud. + GCP = 3 + end + + # The severity of the finding. + module Severity + # Default value. This value is unused. + SEVERITY_UNSPECIFIED = 0 + + # A critical vulnerability is easily discoverable by an external actor, + # exploitable, and results in the direct ability to execute arbitrary code, + # exfiltrate data, and otherwise gain additional access and privileges to + # cloud resources and workloads. Examples include publicly accessible + # unprotected user data and public SSH access with weak or no + # passwords. + # + # A critical threat is a threat that can access, modify, or delete data or + # execute unauthorized code within existing resources. + CRITICAL = 1 + + # A high-risk vulnerability can be easily discovered and exploited in + # combination with other vulnerabilities to gain direct access and + # the ability to execute arbitrary code, exfiltrate data, and otherwise + # gain additional access and privileges to cloud resources and workloads. + # An example is a database with weak or no passwords that is only + # accessible internally. This database could easily be compromised by an + # actor that had access to the internal network. + # + # A high-risk threat is a threat that can create new computational + # resources in an environment but can't access data or execute code in + # existing resources. + HIGH = 2 + + # A medium-risk vulnerability can be used by an actor to gain access to + # resources or privileges that enable them to eventually (through multiple + # steps or a complex exploit) gain access and the ability to execute + # arbitrary code or exfiltrate data. An example is a service account with + # access to more projects than it should have. If an actor gains access to + # the service account, they could potentially use that access to manipulate + # a project the service account was not intended to. + # + # A medium-risk threat can cause operational impact but might not + # access data or execute unauthorized code. + MEDIUM = 3 + + # A low-risk vulnerability hampers a security organization's ability to + # detect vulnerabilities or active threats in their deployment, or prevents + # the root cause investigation of security issues. An example is monitoring + # and logs being disabled for resource configurations and access. + # + # A low-risk threat is a threat that has obtained minimal access to an + # environment but can't access data, execute code, or create resources. + LOW = 4 + end + + # The action type of the rule. + module RuleActionType + # Default value. This value is unused. + RULE_ACTION_TYPE_UNSPECIFIED = 0 + + # The rule is intended to prevent non-compliance. + RULE_ACTION_TYPE_PREVENTIVE = 1 + + # The rule is intended to detect non-compliance. + RULE_ACTION_TYPE_DETECTIVE = 2 + + # The rule is intended to audit non-compliance. + RULE_ACTION_TYPE_AUDIT = 3 + end + + # The type of resource that a control or framework can be applied to. + module TargetResourceType + # Default value. This value is unused. + TARGET_RESOURCE_TYPE_UNSPECIFIED = 0 + + # The target resource is a Google Cloud organization. + TARGET_RESOURCE_CRM_TYPE_ORG = 1 + + # The target resource is a folder. + TARGET_RESOURCE_CRM_TYPE_FOLDER = 2 + + # The target resource is a project. + TARGET_RESOURCE_CRM_TYPE_PROJECT = 3 + + # The target resource is an application in App Hub. + TARGET_RESOURCE_TYPE_APPLICATION = 4 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/cloud/cloudsecuritycompliance/v1/config.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/cloud/cloudsecuritycompliance/v1/config.rb new file mode 100644 index 000000000000..bf3572fe685e --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/cloud/cloudsecuritycompliance/v1/config.rb @@ -0,0 +1,258 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module CloudSecurityCompliance + module V1 + # Request message for [ListFrameworks][]. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource name, in one of the following formats: + # - `organizations/{organization}/locations/{location}` + # - `projects/{project}/locations/{location}`. + # + # The only supported location is `global`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of frameworks to return. The default value is + # `500`. + # + # If you exceed the maximum value of `1000`, then the service uses the + # maximum value. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A pagination token returned from a previous request to list + # frameworks. Provide this token to retrieve the next page of results. + class ListFrameworksRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for [ListFrameworks][]. + # Returns a paginated list of Framework resources. + # @!attribute [rw] frameworks + # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::Framework>] + # The list of framework resources. + # @!attribute [rw] next_page_token + # @return [::String] + # A pagination token. To retrieve the next page of results, call the method + # again with this token. + class ListFrameworksResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for [GetFramework][]. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the framework to retrieve, in one of the following + # formats: + # `organizations/{organization}/locations/{location}/frameworks/{framework}` + # or + # `projects/{project}/locations/{location}/frameworks/{framework}`. + # + # The only supported location is `global`. + # @!attribute [rw] major_revision_id + # @return [::Integer] + # Optional. The framework major version to retrieve. If not specified, the + # most recently updated `revision_id` is retrieved. + class GetFrameworkRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for [CreateFramework][]. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource name, in one of the following formats: + # - `organizations/{organization}/locations/{location}` + # - `projects/{project}/locations/{location}`. + # + # The only supported location is `global`. + # @!attribute [rw] framework_id + # @return [::String] + # Required. The identifier (ID) of the framework. The ID is not the full name + # of the framework; it's the last part of the full name of the framework. + # @!attribute [rw] framework + # @return [::Google::Cloud::CloudSecurityCompliance::V1::Framework] + # Required. The resource being created. + class CreateFrameworkRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for [UpdateFramework][]. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. A field mask is used to specify the fields to be overwritten in + # the framework resource by the update. The fields specified in the + # `update_mask` are relative to the resource, not the full request. A field + # is overwritten if it is in the mask. If you don't provide a mask then all + # fields present in the request will be overwritten. + # @!attribute [rw] framework + # @return [::Google::Cloud::CloudSecurityCompliance::V1::Framework] + # Required. The resource that is being updated. + # @!attribute [rw] major_revision_id + # @return [::Integer] + # Optional. The major version ID of the framework to update. + class UpdateFrameworkRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for [DeleteFramework][]. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the resource, in one of the following formats: + # `organizations/{organization}/locations/{location}/frameworks/{framework}` + # or + # `projects/{project}/locations/{location}/frameworks/{framework}`. + # + # The only supported location is `global`. + class DeleteFrameworkRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for [ListCloudControls][]. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource name, in one of the following formats: + # - `organizations/{organization}/locations/{location}` + # - `projects/{project}/locations/{location}`. + # + # The only supported location is `global`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of cloud controls to return. The default value + # is `500`. + # + # If you exceed the maximum value of `1000`, then the service uses the + # maximum value. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A pagination token that's returned from a previous request to + # list cloud controls. Provide this token to retrieve the next page of + # results. + # + # When paginating, the parent that you provide to the + # {::Google::Cloud::CloudSecurityCompliance::V1::Config::Client#list_cloud_controls ListCloudControls} + # request must match the call that provided the page token. + class ListCloudControlsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for [ListCloudControls][]. + # @!attribute [rw] cloud_controls + # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::CloudControl>] + # The list of CloudControl resources. + # @!attribute [rw] next_page_token + # @return [::String] + # A pagination token. To retrieve the next page of results, call the method + # again with this token. + class ListCloudControlsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for [GetCloudControl][]. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the cloud control to retrieve, in one of the + # following formats: + # `organizations/{organization}/locations/{location}/cloudControls/{cloud_control}` + # or + # `projects/{project}/locations/{location}/cloudControls/{cloud_control}`. + # + # The only supported location is `global`. + # @!attribute [rw] major_revision_id + # @return [::Integer] + # Optional. The major version of the cloud control to retrieve. If not + # specified, the most recently updated `revision_id` is retrieved. + class GetCloudControlRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for [CreateCloudControl][]. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource name, in one of the following formats: + # - `organizations/{organization}/locations/{location}`. + # - `projects/{project}/locations/{location}`. + # + # The only supported location is `global`. + # @!attribute [rw] cloud_control_id + # @return [::String] + # Required. The identifier for the cloud control, which is the last segment + # of the cloud control name. The format is + # `^[a-zA-Z][a-zA-Z0-9-]{0,61}[a-zA-Z0-9]$`. + # @!attribute [rw] cloud_control + # @return [::Google::Cloud::CloudSecurityCompliance::V1::CloudControl] + # Required. The cloud control that's being created. + class CreateCloudControlRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for [UpdateCloudControl][]. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. Use a field mask to specify the fields to be overwritten in the + # cloud control during the update. + # The fields that you specify in the `update_mask` are relative to the + # cloud control, not the full request. A field is overwritten if it is in + # the mask. If you don't provide a mask, all fields in the request + # are updated. + # + # You can update the following fields: + # + # - Display name + # - Description + # - Parameters + # - Rules + # - Parameter specification + # @!attribute [rw] cloud_control + # @return [::Google::Cloud::CloudSecurityCompliance::V1::CloudControl] + # Required. The cloud control that you're updating. + class UpdateCloudControlRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for [DeleteCloudControl][]. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the cloud control to delete, in one of the following + # formats: + # `organizations/{organization}/locations/{location}/CloudControls/{CloudControl}` + # or + # `projects/{project}/locations/{location}/CloudControls/{CloudControl}`. + # + # The only supported location is `global`. + class DeleteCloudControlRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/cloud/cloudsecuritycompliance/v1/deployment.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/cloud/cloudsecuritycompliance/v1/deployment.rb new file mode 100644 index 000000000000..909df6aae867 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/cloud/cloudsecuritycompliance/v1/deployment.rb @@ -0,0 +1,492 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module CloudSecurityCompliance + module V1 + # Framework deployments represent the assignment of a framework to a target + # resource. Supported target resources are organizations, folders, and + # projects. + # @!attribute [rw] name + # @return [::String] + # Identifier. The name of the framework deployment, in the format + # `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}` + # or + # `projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}`. + # The only supported location is `global`. + # @!attribute [rw] target_resource_config + # @return [::Google::Cloud::CloudSecurityCompliance::V1::TargetResourceConfig] + # Required. The details of the target resource that you want to deploy the + # framework to. You can specify an existing resource, or create a new one. + # @!attribute [r] computed_target_resource + # @return [::String] + # Output only. The target resource to deploy the framework to, in one the + # following formats: + # + # - `organizations/{organizationID}` + # - `folders/{folderID}` + # - `projects/{projectID}` + # @!attribute [rw] framework + # @return [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkReference] + # Required. A reference to the framework that you're deploying. + # @!attribute [rw] description + # @return [::String] + # Optional. A user-provided description of the framework deployment. + # @!attribute [rw] cloud_control_metadata + # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::CloudControlMetadata>] + # Required. The deployment mode and parameters for each of the cloud controls + # in the framework. Every cloud control in the framework includes metadata. + # @!attribute [r] deployment_state + # @return [::Google::Cloud::CloudSecurityCompliance::V1::DeploymentState] + # Output only. The state for the framework deployment. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which the resource was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which the resource last updated. + # @!attribute [rw] etag + # @return [::String] + # Optional. To prevent concurrent updates from overwriting each other, always + # provide the `etag` when you update a framework deployment. You can also + # provide the `etag` when you delete a framework deployment, to help + # ensure that you're deleting the intended version of the + # framework deployment. + # @!attribute [r] target_resource_display_name + # @return [::String] + # Output only. The display name of the target resource. + # @!attribute [r] cloud_control_deployment_references + # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeploymentReference>] + # Output only. The references to the cloud control deployments. The reference + # includes all the cloud control deployments that are in the framework or in + # a cloud control group. + # + # For example, if a framework deployment deploys two + # cloud controls, `cc-deployment-1` and `cc-deployment-2`, then the + # references are: + # + # ``` + # { + # cloud_control_deployment_reference: { + # cloud_control_deployment: + # "organizations/\\{organization}/locations/\\{location}/cloudControlDeployments/cc-deployment-1" + # }, + # cloud_control_deployment_reference: { + # cloud_control_deployment: + # "organizations/\\{organization}/locations/\\{location}/cloudControlDeployments/cc-deployment-2" + # } + # ``` + class FrameworkDeployment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A cloud control deployment represents the deployment of a particular cloud + # control on a target resource. Supported target resources are + # `organizations/{organizationID}`, `folders/{folderID}`, and + # `projects/{projectID}`. + # @!attribute [rw] name + # @return [::String] + # Identifier. The name for the cloud control deployment, in the format + # `organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}` + # or + # `projects/{project}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}`. + # The only supported location is `global`. + # @!attribute [rw] target_resource_config + # @return [::Google::Cloud::CloudSecurityCompliance::V1::TargetResourceConfig] + # Required. The details of the target resource that the cloud control is + # deployed You can use an existing target resource or create a new target. + # @!attribute [r] target_resource + # @return [::String] + # Output only. The resource that the cloud control is deployed on, in one of + # the following formats: + # + # - `organizations/{organizationID}` + # - `folders/{folderID}` + # - `projects/{projectID}` + # @!attribute [rw] cloud_control_metadata + # @return [::Google::Cloud::CloudSecurityCompliance::V1::CloudControlMetadata] + # Required. The deployment mode and parameters for the cloud control. + # @!attribute [rw] description + # @return [::String] + # Optional. A friendly description for the cloud control deployment. + # @!attribute [r] deployment_state + # @return [::Google::Cloud::CloudSecurityCompliance::V1::DeploymentState] + # Output only. The state of the cloud control deployment. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the resource was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the resource was last updated. + # @!attribute [rw] etag + # @return [::String] + # Optional. To prevent concurrent updates from overwriting each other, + # provide the `etag` when you update a cloud control deployment. You can also + # provide the `etag` when you delete a cloud control deployment to help + # ensure that you're deleting the intended version of the + # deployment. + # @!attribute [r] parameter_substituted_cloud_control + # @return [::Google::Cloud::CloudSecurityCompliance::V1::CloudControl] + # Output only. The cloud control after the given parameters are substituted. + # @!attribute [r] framework_deployment_references + # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeploymentReference>] + # Output only. The references to the framework deployments that this cloud + # control deployment is part of. A cloud control deployment can be part of + # multiple framework deployments. + # @!attribute [r] target_resource_display_name + # @return [::String] + # Output only. The display name of the target resource. + class CloudControlDeployment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The name of the target resource or the configuration that's required to + # create a new target resource. + # @!attribute [rw] existing_target_resource + # @return [::String] + # Optional. The resource hierarchy node, in one of the following formats: + # + # - `organizations/{organizationID}` + # - `folders/{folderID}` + # - `projects/{projectID}` + # + # Note: The following fields are mutually exclusive: `existing_target_resource`, `target_resource_creation_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] target_resource_creation_config + # @return [::Google::Cloud::CloudSecurityCompliance::V1::TargetResourceCreationConfig] + # Optional. The details that are required to create a resource and use + # that resource as the target resource for deployment. + # + # Note: The following fields are mutually exclusive: `target_resource_creation_config`, `existing_target_resource`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class TargetResourceConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The configuration that's required to create a target resource. + # @!attribute [rw] folder_creation_config + # @return [::Google::Cloud::CloudSecurityCompliance::V1::FolderCreationConfig] + # Optional. The configuration that's required to create a folder. + # + # Note: The following fields are mutually exclusive: `folder_creation_config`, `project_creation_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] project_creation_config + # @return [::Google::Cloud::CloudSecurityCompliance::V1::ProjectCreationConfig] + # Optional. The configuration that's required to create a project. + # + # Note: The following fields are mutually exclusive: `project_creation_config`, `folder_creation_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class TargetResourceCreationConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The configuration that's required to create a folder to be used + # as the target resource for a deployment. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent of the folder, in the format + # `organizations/{organizationID}` or `folders/{folderID}`. + # @!attribute [rw] folder_display_name + # @return [::String] + # Required. The display name of the folder. + class FolderCreationConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The configuration that's required to create a project to be used + # as the target resource of a deployment. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent of the project, in the format + # `organizations/{organizationID}` or `folders/{folderID}`. + # @!attribute [rw] project_display_name + # @return [::String] + # Required. The display name of the project. + # @!attribute [rw] billing_account_id + # @return [::String] + # Required. The billing account ID for the project. + class ProjectCreationConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The enforcement mode and parameters of a cloud + # control deployment. + # @!attribute [rw] cloud_control_details + # @return [::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDetails] + # Required. The cloud control name and parameters. + # @!attribute [rw] enforcement_mode + # @return [::Google::Cloud::CloudSecurityCompliance::V1::EnforcementMode] + # Required. The enforcement mode of the cloud control. + class CloudControlMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for [CreateFrameworkDeployment][]. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource of the framework deployment in the format + # `organizations/{organization}/locations/{location}` + # or + # `projects/{project}/locations/{location}`. + # Only the global location is supported. + # @!attribute [rw] framework_deployment_id + # @return [::String] + # Optional. An identifier for the framework deployment that's unique in scope + # of the parent. If you don't specify a value, then a random UUID is + # generated. + # @!attribute [rw] framework_deployment + # @return [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment] + # Required. The framework deployment that you're creating. + class CreateFrameworkDeploymentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for [DeleteFrameworkDeployment][]. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the framework deployment that you want to delete, + # in the format + # `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}` + # or + # `projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}`. + # The only supported location is `global`. + # @!attribute [rw] etag + # @return [::String] + # Optional. An opaque identifier for the current version of the resource. + # + # If you provide this value, then it must match the existing value. If the + # values don't match, then the request fails with an + # [`ABORTED`][google.rpc.Code.ABORTED] error. + # + # If you omit this value, then the resource is deleted regardless of its + # current `etag` value. + class DeleteFrameworkDeploymentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for [GetFrameworkDeployment][]. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the framework deployment, in the format + # `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}` + # or + # `projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}`. + # The only supported location is `global`. + class GetFrameworkDeploymentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for [ListFrameworkDeployments][]. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource of the framework deployment, in the format + # `organizations/{organization}/locations/{location}` + # or + # `projects/{project}/locations/{location}`. + # The only supported location is `global`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The requested page size. The server might return fewer items than + # requested. + # If unspecified, the server picks an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token that identifies a page of results the server should + # return. + # @!attribute [rw] filter + # @return [::String] + # Optional. The filter to be applied on the resource, as defined by + # [AIP-160: Filtering](https://google.aip.dev/160). + # @!attribute [rw] order_by + # @return [::String] + # Optional. The sort order for the results. The following values are + # supported: + # + # * `name` + # * `name desc` + # + # If you do not specify a value, then the results are not sorted. + class ListFrameworkDeploymentsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for [ListFrameworkDeployments][]. + # @!attribute [rw] framework_deployments + # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment>] + # The list of framework deployments. + # @!attribute [rw] next_page_token + # @return [::String] + # A token that identifies the next page of results that the server + # should return. + class ListFrameworkDeploymentsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for [GetCloudControlDeployment][]. + # @!attribute [rw] name + # @return [::String] + # Required. The name for the cloud control deployment, in the format + # `organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}` + # or + # `projects/{project}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}`. + # The only supported location is `global`. + class GetCloudControlDeploymentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for [ListCloudControlDeployments][]. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource for the cloud control deployment, in the + # format `organizations/{organization}/locations/{location}` or + # `projects/{project}/locations/{location}`. + # The only supported location is `global`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The requested page size. The server might return fewer items than + # you requested. + # If unspecified, the server picks an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token that identifies the page of results that the server + # should return. + # @!attribute [rw] filter + # @return [::String] + # Optional. The filter to apply on the resource, as defined by + # [AIP-160: Filtering](https://google.aip.dev/160). + # @!attribute [rw] order_by + # @return [::String] + # Optional. The sort order for the results. The following values are + # supported: + # + # * `name` + # * `name desc` + # + # If you do not specify a value, then the results are not sorted. + class ListCloudControlDeploymentsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for [ListCloudControlDeployments][]. + # @!attribute [rw] cloud_control_deployments + # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment>] + # The list of cloud control deployments. + # @!attribute [rw] next_page_token + # @return [::String] + # A token that identifies the next page of results that the server + # should return. + class ListCloudControlDeploymentsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The reference to a cloud control deployment. + # @!attribute [r] cloud_control_deployment + # @return [::String] + # Output only. The name of the CloudControlDeployment. The format is + # `organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}` + # or + # `projects/{project}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}`. + # The only supported location is `global`. + class CloudControlDeploymentReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The reference to a framework deployment. + # @!attribute [r] framework_deployment + # @return [::String] + # Output only. The name of the framework deployment, in the format + # `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}` + # or + # `projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}`. + # The only supported location is `global`. + # @!attribute [rw] framework_reference + # @return [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkReference] + # Optional. The reference to the framework that this deployment is for. + # For example: + # + # ``` + # { + # framework: + # "organizations/\\{organization}/locations/\\{location}/frameworks/\\{framework}", + # major_revision_id: 1 + # } + # ``` + # + # The only supported location is `global`. + # @!attribute [rw] framework_display_name + # @return [::String] + # Optional. The display name of the framework that this framework deployment + # is for. + class FrameworkDeploymentReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The state of the deployment resource. + module DeploymentState + # Default value. This value is unused. + DEPLOYMENT_STATE_UNSPECIFIED = 0 + + # Validating the deployment. + DEPLOYMENT_STATE_VALIDATING = 1 + + # Deployment is being created. + DEPLOYMENT_STATE_CREATING = 2 + + # Deployment is being deleted. + DEPLOYMENT_STATE_DELETING = 3 + + # Deployment is being updated. + DEPLOYMENT_STATE_UPDATING = 8 + + # Deployment has failed. All the changes made by the deployment were + # successfully rolled back. You can retry or delete a deployment that's + # in this state. + DEPLOYMENT_STATE_FAILED = 4 + + # Deployment is successful and ready to use. + DEPLOYMENT_STATE_READY = 5 + + # Deployment is partially deployed. All the cloud controls weren't deployed + # successfully. Retrying the operation resumes from the first failed + # step. + DEPLOYMENT_STATE_PARTIALLY_DEPLOYED = 6 + + # Deployment is partially deleted. All the cloud control deployments weren't + # deleted successfully. Retrying the operation resumes from the first + # failed step. + DEPLOYMENT_STATE_PARTIALLY_DELETED = 7 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/cloud/cloudsecuritycompliance/v1/monitoring.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/cloud/cloudsecuritycompliance/v1/monitoring.rb new file mode 100644 index 000000000000..adfa51fc7207 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/cloud/cloudsecuritycompliance/v1/monitoring.rb @@ -0,0 +1,569 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module CloudSecurityCompliance + module V1 + # The request message for + # {::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkComplianceSummariesRequest ListFrameworkComplianceSummariesRequest}. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent scope for the framework compliance summary. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The requested page size. The server might return fewer items than + # requested. If unspecified, the server picks an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token that identifies the page of results that the server + # should return. + # @!attribute [rw] filter + # @return [::String] + # Optional. The filtering results. + # @!attribute [rw] view + # @return [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkComplianceSummaryView] + # Optional. Specifies the level of detail to return in the response. + class ListFrameworkComplianceSummariesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for + # {::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkComplianceSummariesResponse ListFrameworkComplianceSummariesResponse}. + # @!attribute [rw] framework_compliance_summaries + # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::FrameworkComplianceSummary>] + # The list of framework compliance summaries. + # @!attribute [r] next_page_token + # @return [::String] + # Output only. The token to retrieve the next page of results. + class ListFrameworkComplianceSummariesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for [GetFrameworkComplianceReport][]. + # @!attribute [rw] framework + # @return [::String] + # The name of the framework. + # @!attribute [rw] framework_description + # @return [::String] + # The description of the framework. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The last updated time of the report. + # @!attribute [rw] control_assessment_details + # @return [::Google::Cloud::CloudSecurityCompliance::V1::ControlAssessmentDetails] + # The control assessment details of the framework. + # @!attribute [rw] framework_type + # @return [::Google::Cloud::CloudSecurityCompliance::V1::Framework::FrameworkType] + # The type of framework. + # @!attribute [rw] supported_cloud_providers + # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::CloudProvider>] + # The list of cloud providers supported by the framework. + # @!attribute [rw] framework_categories + # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::FrameworkCategory>] + # The list of framework categories supported. + # @!attribute [rw] framework_display_name + # @return [::String] + # Optional. The display name for the framework. + # @!attribute [rw] name + # @return [::String] + # Identifier. The name of the framework compliance report. + # @!attribute [rw] major_revision_id + # @return [::Integer] + # The latest major revision ID of the framework. + # @!attribute [rw] minor_revision_id + # @return [::Integer] + # The latest minor revision ID of the latest major revision of the framework. + # @!attribute [rw] target_resource_details + # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::TargetResourceDetails>] + # The target resource details of the framework. + class FrameworkComplianceReport + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for [FetchFrameworkComplianceReport][]. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the framework compliance report to retrieve. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # Optional. The end time of the report. + # @!attribute [rw] filter + # @return [::String] + # Optional. The filtering results. + class FetchFrameworkComplianceReportRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for [ListFindingSummaries][]. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent scope for the framework overview page. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The requested page size. The server might return fewer items than + # requested. If unspecified, the server picks an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token that identifies the page of results that the server + # should return. + # @!attribute [rw] filter + # @return [::String] + # Optional. The filtering results. + # @!attribute [rw] end_time + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Protobuf::Timestamp] + # Optional. The end time of the finding summary. + class ListFindingSummariesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for [ListFindingSummaries][]. + # @!attribute [rw] finding_summaries + # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::FindingSummary>] + # List of finding summary by category. + # @!attribute [r] next_page_token + # @return [::String] + # Output only. The token to retrieve the next page of results. + class ListFindingSummariesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for [ListControlComplianceSummaries][]. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent scope for the framework overview page. + # @!attribute [rw] end_time + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Protobuf::Timestamp] + # Optional. The end time of the control compliance summary. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The requested page size. The server might return fewer items than + # requested. If unspecified, the server picks an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token that identifies the page of results that the server + # should return. + # @!attribute [rw] filter + # @return [::String] + # Optional. The filtering results. + class ListControlComplianceSummariesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for [ListControlComplianceSummaries][]. + # @!attribute [rw] control_compliance_summaries + # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::ControlComplianceSummary>] + # The list of control compliance details. + # @!attribute [r] next_page_token + # @return [::String] + # Output only. The token to retrieve the next page of results. + class ListControlComplianceSummariesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for [AggregateFrameworkComplianceReport][]. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the aggregated compliance report over time to + # retrieve. + # + # The supported format is: + # `organizations/{organization_id}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}` + # @!attribute [rw] interval + # @return [::Google::Type::Interval] + # Optional. The start and end time range for the aggregated compliance + # report. + # @!attribute [rw] filter + # @return [::String] + # Optional. The filtering results. + class AggregateFrameworkComplianceReportRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for [AggregateFrameworkComplianceReport][]. + # @!attribute [rw] aggregated_compliance_reports + # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::AggregatedComplianceReport>] + # The list of aggregated compliance reports. + class AggregateFrameworkComplianceReportResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The details for a control assessment. + # @!attribute [rw] passing_controls + # @return [::Integer] + # The number of controls that are passing or not assessed. + # @!attribute [rw] failing_controls + # @return [::Integer] + # The number of controls that are failing. + # @!attribute [rw] assessed_passing_controls + # @return [::Integer] + # The number of controls that were assessed and are passing. + # @!attribute [rw] not_assessed_controls + # @return [::Integer] + # The number of controls that aren't assessed because they require manual + # review. + class ControlAssessmentDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The details for a framework compliance summary. + # @!attribute [rw] framework + # @return [::String] + # The name of the framework. + # @!attribute [rw] control_assessment_details + # @return [::Google::Cloud::CloudSecurityCompliance::V1::ControlAssessmentDetails] + # The control assessment details of the framework. + # @!attribute [rw] framework_type + # @return [::Google::Cloud::CloudSecurityCompliance::V1::Framework::FrameworkType] + # The type of framework. + # @!attribute [rw] supported_cloud_providers + # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::CloudProvider>] + # The list of cloud providers supported by the framework. + # @!attribute [rw] framework_categories + # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::FrameworkCategory>] + # The list of framework categories supported by the framework. + # @!attribute [rw] framework_display_name + # @return [::String] + # Optional. The display name for the framework. + # @!attribute [rw] name + # @return [::String] + # Identifier. The name of the framework compliance summary. + # @!attribute [rw] major_revision_id + # @return [::Integer] + # The major revision ID of the framework. + # @!attribute [rw] minor_revision_id + # @return [::Integer] + # The minor revision ID of the framework. + # @!attribute [rw] target_resource_details + # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::TargetResourceDetails>] + # The target resource details for the framework. + # @!attribute [r] finding_count + # @return [::Integer] + # Output only. The count of the findings generated against the framework. + # @!attribute [r] controls_passing_trend + # @return [::Google::Cloud::CloudSecurityCompliance::V1::Trend] + # Output only. The trend of controls that are passing for the given duration. + class FrameworkComplianceSummary + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The details for a finding. + # @!attribute [rw] finding_category + # @return [::String] + # The category of the finding. + # @!attribute [rw] finding_class + # @return [::Google::Cloud::CloudSecurityCompliance::V1::FindingClass] + # The class of the finding. + # @!attribute [rw] severity + # @return [::Google::Cloud::CloudSecurityCompliance::V1::Severity] + # The severity of the finding. + # @!attribute [rw] finding_count + # @return [::Integer] + # The count of the finding. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The last updated time of the finding. + # @!attribute [rw] related_frameworks + # @return [::Array<::String>] + # Optional. The list of compliance frameworks that the finding belongs to. + # @!attribute [rw] name + # @return [::String] + # Identifier. The name of the finding summary. + class FindingSummary + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The details for control compliance. + # @!attribute [rw] control + # @return [::String] + # The name of the control. + # @!attribute [rw] display_name + # @return [::String] + # The display name of the control. + # @!attribute [rw] description + # @return [::String] + # The description of the control. + # @!attribute [r] overall_evaluation_state + # @return [::Google::Cloud::CloudSecurityCompliance::V1::EvaluationState] + # Output only. The overall evaluation status of the control. + # @!attribute [rw] total_findings_count + # @return [::Integer] + # The total number of findings for the control. + # @!attribute [rw] compliance_frameworks + # @return [::Array<::String>] + # The list of compliance frameworks that the control belongs to. + # @!attribute [rw] similar_controls + # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::SimilarControls>] + # The list of similar controls. + # @!attribute [rw] cloud_control_reports + # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::CloudControlReport>] + # The list of cloud control reports. + # @!attribute [rw] control_responsibility_type + # @return [::Google::Cloud::CloudSecurityCompliance::V1::RegulatoryControlResponsibilityType] + # The responsibility type for the control. + # @!attribute [rw] is_fake_control + # @return [::Boolean] + # Whether the control is a fake control. Fake controls are created + # and mapped to cloud controls that don't belong to a control group. + # @!attribute [rw] name + # @return [::String] + # Identifier. The name of the control compliance summary. + class ControlComplianceSummary + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The cloud control report. + # @!attribute [rw] manual_cloud_control_assessment_details + # @return [::Google::Cloud::CloudSecurityCompliance::V1::ManualCloudControlAssessmentDetails] + # The details of a manual cloud control assessment. + # + # Note: The following fields are mutually exclusive: `manual_cloud_control_assessment_details`, `cloud_control_assessment_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] cloud_control_assessment_details + # @return [::Google::Cloud::CloudSecurityCompliance::V1::CloudControlAssessmentDetails] + # The details of a cloud control assessment. + # + # Note: The following fields are mutually exclusive: `cloud_control_assessment_details`, `manual_cloud_control_assessment_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] cloud_control + # @return [::String] + # The name of the cloud control. + # @!attribute [rw] display_name + # @return [::String] + # The display name of the cloud control. + # @!attribute [rw] description + # @return [::String] + # The description of the cloud control. + # @!attribute [rw] categories + # @return [::Array<::String>] + # The list of categories for the cloud control. + # @!attribute [rw] similar_controls + # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::SimilarControls>] + # The list of similar controls. + # @!attribute [rw] cloud_control_type + # @return [::Google::Cloud::CloudSecurityCompliance::V1::CloudControl::Type] + # The type of the cloud control. + # @!attribute [rw] finding_category + # @return [::String] + # The category of the finding. + # @!attribute [rw] rules + # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::Rule>] + # The list of rules that correspond to the cloud control. + # @!attribute [rw] finding_severity + # @return [::Google::Cloud::CloudSecurityCompliance::V1::Severity] + # The severity of the finding. + # @!attribute [rw] enforcement_mode + # @return [::Google::Cloud::CloudSecurityCompliance::V1::EnforcementMode] + # The enforcement mode of the cloud control. + # @!attribute [rw] cloud_control_deployment + # @return [::String] + # The name of the cloud control deployment. + # @!attribute [rw] major_revision_id + # @return [::Integer] + # The major revision ID of the cloud control. + # @!attribute [rw] minor_revision_id + # @return [::Integer] + # The minor revision ID of the cloud control. + # @!attribute [rw] framework_major_revision_ids + # @return [::Array<::Integer>] + # The major revision IDs of the frameworks that the cloud control belongs to. + class CloudControlReport + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The details for a manual cloud control assessment. + # @!attribute [rw] manual_cloud_control_guide + # @return [::Array<::String>] + # The guide for assessing a cloud control manually. + class ManualCloudControlAssessmentDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The cloud control assessment details for non-manual cloud controls. + # @!attribute [rw] findings_count + # @return [::Integer] + # The number of findings for the cloud control. + # @!attribute [r] evaluation_state + # @return [::Google::Cloud::CloudSecurityCompliance::V1::EvaluationState] + # Output only. The evaluation status of the cloud control. + class CloudControlAssessmentDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The similar controls. + # @!attribute [rw] framework + # @return [::String] + # The name of the framework. + # @!attribute [rw] control_id + # @return [::String] + # The ID of the control. + class SimilarControls + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The aggregated compliance report. + # @!attribute [rw] control_assessment_details + # @return [::Google::Cloud::CloudSecurityCompliance::V1::ControlAssessmentDetails] + # The control assessment details of the framework. + # @!attribute [rw] report_time + # @return [::Google::Protobuf::Timestamp] + # The report time of the aggregated compliance report. + class AggregatedComplianceReport + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The details for a target resource. + # @!attribute [rw] framework_deployment + # @return [::String] + # The framework deployment name for the target resource. + # + # For example, + # `organizations/{organization_id}/locations/{location}/frameworkDeployments/{framework_deployment_id}` + # @!attribute [rw] target_resource_display_name + # @return [::String] + # The display name of the target resource. For example, `google.com`, + # `staging-project`, or `development-folder`. + # @!attribute [rw] target_resource + # @return [::String] + # The target resource. For example, `organizations/1234567890`, + # `projects/1234567890`, or `folders/1234567890`. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # The create time of the target resource. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # The update time of the target resource. + # @!attribute [rw] major_revision_id + # @return [::Integer] + # The major revision ID of the framework for the target resource. + # @!attribute [rw] minor_revision_id + # @return [::Integer] + # The minor revision ID of the framework for the target resource. + class TargetResourceDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The trend of a compliance metric. + # @!attribute [r] duration + # @return [::Google::Protobuf::Duration] + # Output only. The duration for the trend. + # @!attribute [r] value_percent + # @return [::Float] + # Output only. The trend value as a percentage. The value can be positive or + # negative. + class Trend + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The evaluation state of the control. + module EvaluationState + # Default value. This value is unused. + EVALUATION_STATE_UNSPECIFIED = 0 + + # The control is passing. + EVALUATION_STATE_PASSED = 1 + + # The control is failing. + EVALUATION_STATE_FAILED = 2 + + # The control is not assessed. + EVALUATION_STATE_NOT_ASSESSED = 3 + end + + # A finding is a record of assessment data like security, risk, health, or + # privacy. + module FindingClass + # Default value. This value is unused. + FINDING_CLASS_UNSPECIFIED = 0 + + # The activity is unwanted or malicious. + THREAT = 1 + + # A potential weakness in software that increases risk to + # confidentiality, integrity, and availability. + VULNERABILITY = 2 + + # A potential weakness in a cloud resource or asset configuration that + # increases risk. + MISCONFIGURATION = 3 + + # A security observation that is for informational purposes. + OBSERVATION = 4 + + # An error that prevents Security Command Center from functioning properly. + SCC_ERROR = 5 + + # A potential security risk that's due to a change in the security + # posture. + POSTURE_VIOLATION = 6 + + # A combination of security issues that represent a more severe + # security problem when taken together. + TOXIC_COMBINATION = 7 + + # A potential security risk to data assets that contain sensitive + # data. + SENSITIVE_DATA_RISK = 8 + + # A resource or resource group where high risk attack paths + # converge, based on attack path simulations (APS). + CHOKEPOINT = 9 + end + + # Specifies the view of the framework compliance summary to be returned. + # New values may be added in the future. + module FrameworkComplianceSummaryView + # The default / unset value. The API will default to the BASIC view. + FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_UNSPECIFIED = 0 + + # Includes basic compliance metadata, but omits trend data. + FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_BASIC = 1 + + # Includes all information, including + # [finding_count][google.cloud.cloudsecuritycompliance.v1main.FrameworkComplianceSummary.finding_count] + # and + # [controls_passing_trend][google.cloud.cloudsecuritycompliance.v1main.FrameworkComplianceSummary.controls_passing_trend]. + # Trend data is provided for the last 30 days. + FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_FULL = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/longrunning/operations.rb @@ -0,0 +1,191 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Longrunning + # This resource represents a long-running operation that is the result of a + # network API call. + # @!attribute [rw] name + # @return [::String] + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should be a resource name ending with `operations/{unique_id}`. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Any] + # Service-specific metadata associated with the operation. It typically + # contains progress information and common metadata such as create time. + # Some services might not provide such metadata. Any method that returns a + # long-running operation should document the metadata type, if any. + # @!attribute [rw] done + # @return [::Boolean] + # If the value is `false`, it means the operation is still in progress. + # If `true`, the operation is completed, and either `error` or `response` is + # available. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # The error result of the operation in case of failure or cancellation. + # + # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] response + # @return [::Google::Protobuf::Any] + # The normal, successful response of the operation. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + # + # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Operation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.GetOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource. + class GetOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.ListOperations. + # @!attribute [rw] name + # @return [::String] + # The name of the operation's parent resource. + # @!attribute [rw] filter + # @return [::String] + # The standard list filter. + # @!attribute [rw] page_size + # @return [::Integer] + # The standard list page size. + # @!attribute [rw] page_token + # @return [::String] + # The standard list page token. + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + class ListOperationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for + # Operations.ListOperations. + # @!attribute [rw] operations + # @return [::Array<::Google::Longrunning::Operation>] + # A list of operations that matches the specified filter in the request. + # @!attribute [rw] next_page_token + # @return [::String] + # The standard List next-page token. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unordered list. Unreachable resources. Populated when the request sets + # `ListOperationsRequest.return_partial_success` and reads across + # collections e.g. when attempting to list all resources across all supported + # locations. + class ListOperationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.CancelOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be cancelled. + class CancelOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.DeleteOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be deleted. + class DeleteOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.WaitOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to wait on. + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + class WaitOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message representing the message types used by a long-running operation. + # + # Example: + # + # rpc Export(ExportRequest) returns (google.longrunning.Operation) { + # option (google.longrunning.operation_info) = { + # response_type: "ExportResponse" + # metadata_type: "ExportMetadata" + # }; + # } + # @!attribute [rw] response_type + # @return [::String] + # Required. The message name of the primary return type for this + # long-running operation. + # This type will be used to deserialize the LRO's response. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + # @!attribute [rw] metadata_type + # @return [::String] + # Required. The message name of the metadata type for this long-running + # operation. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + class OperationInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Any` contains an arbitrary serialized protocol buffer message along with a + # URL that describes the type of the serialized message. + # + # Protobuf library provides support to pack/unpack Any values in the form + # of utility functions or additional generated methods of the Any type. + # + # Example 1: Pack and unpack a message in C++. + # + # Foo foo = ...; + # Any any; + # any.PackFrom(foo); + # ... + # if (any.UnpackTo(&foo)) { + # ... + # } + # + # Example 2: Pack and unpack a message in Java. + # + # Foo foo = ...; + # Any any = Any.pack(foo); + # ... + # if (any.is(Foo.class)) { + # foo = any.unpack(Foo.class); + # } + # // or ... + # if (any.isSameTypeAs(Foo.getDefaultInstance())) { + # foo = any.unpack(Foo.getDefaultInstance()); + # } + # + # Example 3: Pack and unpack a message in Python. + # + # foo = Foo(...) + # any = Any() + # any.Pack(foo) + # ... + # if any.Is(Foo.DESCRIPTOR): + # any.Unpack(foo) + # ... + # + # Example 4: Pack and unpack a message in Go + # + # foo := &pb.Foo{...} + # any, err := anypb.New(foo) + # if err != nil { + # ... + # } + # ... + # foo := &pb.Foo{} + # if err := any.UnmarshalTo(foo); err != nil { + # ... + # } + # + # The pack methods provided by protobuf library will by default use + # 'type.googleapis.com/full.type.name' as the type URL and the unpack + # methods only use the fully qualified type name after the last '/' + # in the type URL, for example "foo.bar.com/x/y.z" will yield type + # name "y.z". + # + # JSON + # ==== + # The JSON representation of an `Any` value uses the regular + # representation of the deserialized, embedded message, with an + # additional field `@type` which contains the type URL. Example: + # + # package google.profile; + # message Person { + # string first_name = 1; + # string last_name = 2; + # } + # + # { + # "@type": "type.googleapis.com/google.profile.Person", + # "firstName": , + # "lastName": + # } + # + # If the embedded message type is well-known and has a custom JSON + # representation, that representation will be embedded adding a field + # `value` which holds the custom JSON in addition to the `@type` + # field. Example (for message [google.protobuf.Duration][]): + # + # { + # "@type": "type.googleapis.com/google.protobuf.Duration", + # "value": "1.212s" + # } + # @!attribute [rw] type_url + # @return [::String] + # A URL/resource name that uniquely identifies the type of the serialized + # protocol buffer message. This string must contain at least + # one "/" character. The last segment of the URL's path must represent + # the fully qualified name of the type (as in + # `path/google.protobuf.Duration`). The name should be in a canonical form + # (e.g., leading "." is not accepted). + # + # In practice, teams usually precompile into the binary all types that they + # expect it to use in the context of Any. However, for URLs which use the + # scheme `http`, `https`, or no scheme, one can optionally set up a type + # server that maps type URLs to message definitions as follows: + # + # * If no scheme is provided, `https` is assumed. + # * An HTTP GET on the URL must yield a [google.protobuf.Type][] + # value in binary format, or produce an error. + # * Applications are allowed to cache lookup results based on the + # URL, or have them precompiled into a binary to avoid any + # lookup. Therefore, binary compatibility needs to be preserved + # on changes to types. (Use versioned type names to manage + # breaking changes.) + # + # Note: this functionality is not currently available in the official + # protobuf release, and it is not used for type URLs beginning with + # type.googleapis.com. As of May 2023, there are no widely used type server + # implementations and no plans to implement one. + # + # Schemes other than `http`, `https` (or the empty scheme) might be + # used with implementation specific semantics. + # @!attribute [rw] value + # @return [::String] + # Must be a valid serialized protocol buffer of the above specified type. + class Any + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `FieldMask` represents a set of symbolic field paths, for example: + # + # paths: "f.a" + # paths: "f.b.d" + # + # Here `f` represents a field in some root message, `a` and `b` + # fields in the message found in `f`, and `d` a field found in the + # message in `f.b`. + # + # Field masks are used to specify a subset of fields that should be + # returned by a get operation or modified by an update operation. + # Field masks also have a custom JSON encoding (see below). + # + # # Field Masks in Projections + # + # When used in the context of a projection, a response message or + # sub-message is filtered by the API to only contain those fields as + # specified in the mask. For example, if the mask in the previous + # example is applied to a response message as follows: + # + # f { + # a : 22 + # b { + # d : 1 + # x : 2 + # } + # y : 13 + # } + # z: 8 + # + # The result will not contain specific values for fields x,y and z + # (their value will be set to the default, and omitted in proto text + # output): + # + # + # f { + # a : 22 + # b { + # d : 1 + # } + # } + # + # A repeated field is not allowed except at the last position of a + # paths string. + # + # If a FieldMask object is not present in a get operation, the + # operation applies to all fields (as if a FieldMask of all fields + # had been specified). + # + # Note that a field mask does not necessarily apply to the + # top-level response message. In case of a REST get operation, the + # field mask applies directly to the response, but in case of a REST + # list operation, the mask instead applies to each individual message + # in the returned resource list. In case of a REST custom method, + # other definitions may be used. Where the mask applies will be + # clearly documented together with its declaration in the API. In + # any case, the effect on the returned resource/resources is required + # behavior for APIs. + # + # # Field Masks in Update Operations + # + # A field mask in update operations specifies which fields of the + # targeted resource are going to be updated. The API is required + # to only change the values of the fields as specified in the mask + # and leave the others untouched. If a resource is passed in to + # describe the updated values, the API ignores the values of all + # fields not covered by the mask. + # + # If a repeated field is specified for an update operation, new values will + # be appended to the existing repeated field in the target resource. Note that + # a repeated field is only allowed in the last position of a `paths` string. + # + # If a sub-message is specified in the last position of the field mask for an + # update operation, then new value will be merged into the existing sub-message + # in the target resource. + # + # For example, given the target message: + # + # f { + # b { + # d: 1 + # x: 2 + # } + # c: [1] + # } + # + # And an update message: + # + # f { + # b { + # d: 10 + # } + # c: [2] + # } + # + # then if the field mask is: + # + # paths: ["f.b", "f.c"] + # + # then the result will be: + # + # f { + # b { + # d: 10 + # x: 2 + # } + # c: [1, 2] + # } + # + # An implementation may provide options to override this default behavior for + # repeated and message fields. + # + # In order to reset a field's value to the default, the field must + # be in the mask and set to the default value in the provided resource. + # Hence, in order to reset all fields of a resource, provide a default + # instance of the resource and set all fields in the mask, or do + # not provide a mask as described below. + # + # If a field mask is not present on update, the operation applies to + # all fields (as if a field mask of all fields has been specified). + # Note that in the presence of schema evolution, this may mean that + # fields the client does not know and has therefore not filled into + # the request will be reset to their default. If this is unwanted + # behavior, a specific service may require a client to always specify + # a field mask, producing an error if not. + # + # As with get operations, the location of the resource which + # describes the updated values in the request message depends on the + # operation kind. In any case, the effect of the field mask is + # required to be honored by the API. + # + # ## Considerations for HTTP REST + # + # The HTTP kind of an update operation which uses a field mask must + # be set to PATCH instead of PUT in order to satisfy HTTP semantics + # (PUT must only be used for full updates). + # + # # JSON Encoding of Field Masks + # + # In JSON, a field mask is encoded as a single string where paths are + # separated by a comma. Fields name in each path are converted + # to/from lower-camel naming conventions. + # + # As an example, consider the following message declarations: + # + # message Profile { + # User user = 1; + # Photo photo = 2; + # } + # message User { + # string display_name = 1; + # string address = 2; + # } + # + # In proto a field mask for `Profile` may look as such: + # + # mask { + # paths: "user.display_name" + # paths: "photo" + # } + # + # In JSON, the same mask is represented as below: + # + # { + # mask: "user.displayName,photo" + # } + # + # # Field Masks and Oneof Fields + # + # Field masks treat fields in oneofs just as regular fields. Consider the + # following message: + # + # message SampleMessage { + # oneof test_oneof { + # string name = 4; + # SubMessage sub_message = 9; + # } + # } + # + # The field mask can be: + # + # mask { + # paths: "name" + # } + # + # Or: + # + # mask { + # paths: "sub_message" + # } + # + # Note that oneof type names ("test_oneof" in this case) cannot be used in + # paths. + # + # ## Field Mask Verification + # + # The implementation of any API method which has a FieldMask type field in the + # request should verify the included field paths, and return an + # `INVALID_ARGUMENT` error if any path is unmappable. + # @!attribute [rw] paths + # @return [::Array<::String>] + # The set of field mask paths. + class FieldMask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch + # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + # 9999-12-31T23:59:59Z inclusive. + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. Negative + # second values with fractions must still have non-negative nanos values + # that count forward in time. Must be from 0 to 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/rpc/status.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Rpc + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # @!attribute [rw] code + # @return [::Integer] + # The status code, which should be an enum value of + # [google.rpc.Code][google.rpc.Code]. + # @!attribute [rw] message + # @return [::String] + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized + # by the client. + # @!attribute [rw] details + # @return [::Array<::Google::Protobuf::Any>] + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + class Status + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/type/interval.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/type/interval.rb new file mode 100644 index 000000000000..9350ca479005 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/type/interval.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents a time interval, encoded as a Timestamp start (inclusive) and a + # Timestamp end (exclusive). + # + # The start must be less than or equal to the end. + # When the start equals the end, the interval is empty (matches no time). + # When both start and end are unspecified, the interval matches any time. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # Optional. Inclusive start of the interval. + # + # If specified, a Timestamp matching this interval will have to be the same + # or after the start. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # Optional. Exclusive end of the interval. + # + # If specified, a Timestamp matching this interval will have to be before the + # end. + class Interval + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/Gemfile new file mode 100644 index 000000000000..364a5ba4cea8 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-cloud-cloud_security_compliance-v1", path: "../" +else + gem "google-cloud-cloud_security_compliance-v1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/audit/create_framework_audit.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/audit/create_framework_audit.rb new file mode 100644 index 000000000000..ce659d02bf89 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/audit/create_framework_audit.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudsecuritycompliance_v1_generated_Audit_CreateFrameworkAudit_sync] +require "google/cloud/cloud_security_compliance/v1" + +## +# Snippet for the create_framework_audit call in the Audit service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::CloudSecurityCompliance::V1::Audit::Client#create_framework_audit. +# +def create_framework_audit + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CloudSecurityCompliance::V1::Audit::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkAuditRequest.new + + # Call the create_framework_audit method. + result = client.create_framework_audit request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END cloudsecuritycompliance_v1_generated_Audit_CreateFrameworkAudit_sync] diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/audit/generate_framework_audit_scope_report.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/audit/generate_framework_audit_scope_report.rb new file mode 100644 index 000000000000..5c753a51d708 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/audit/generate_framework_audit_scope_report.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudsecuritycompliance_v1_generated_Audit_GenerateFrameworkAuditScopeReport_sync] +require "google/cloud/cloud_security_compliance/v1" + +## +# Snippet for the generate_framework_audit_scope_report call in the Audit service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::CloudSecurityCompliance::V1::Audit::Client#generate_framework_audit_scope_report. +# +def generate_framework_audit_scope_report + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CloudSecurityCompliance::V1::Audit::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportRequest.new + + # Call the generate_framework_audit_scope_report method. + result = client.generate_framework_audit_scope_report request + + # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportResponse. + p result +end +# [END cloudsecuritycompliance_v1_generated_Audit_GenerateFrameworkAuditScopeReport_sync] diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/audit/get_framework_audit.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/audit/get_framework_audit.rb new file mode 100644 index 000000000000..2e6b4e57cfd1 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/audit/get_framework_audit.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudsecuritycompliance_v1_generated_Audit_GetFrameworkAudit_sync] +require "google/cloud/cloud_security_compliance/v1" + +## +# Snippet for the get_framework_audit call in the Audit service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::CloudSecurityCompliance::V1::Audit::Client#get_framework_audit. +# +def get_framework_audit + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CloudSecurityCompliance::V1::Audit::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkAuditRequest.new + + # Call the get_framework_audit method. + result = client.get_framework_audit request + + # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::FrameworkAudit. + p result +end +# [END cloudsecuritycompliance_v1_generated_Audit_GetFrameworkAudit_sync] diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/audit/list_framework_audits.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/audit/list_framework_audits.rb new file mode 100644 index 000000000000..7dab0e738235 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/audit/list_framework_audits.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudsecuritycompliance_v1_generated_Audit_ListFrameworkAudits_sync] +require "google/cloud/cloud_security_compliance/v1" + +## +# Snippet for the list_framework_audits call in the Audit service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::CloudSecurityCompliance::V1::Audit::Client#list_framework_audits. +# +def list_framework_audits + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CloudSecurityCompliance::V1::Audit::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkAuditsRequest.new + + # Call the list_framework_audits method. + result = client.list_framework_audits request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::CloudSecurityCompliance::V1::FrameworkAudit. + p item + end +end +# [END cloudsecuritycompliance_v1_generated_Audit_ListFrameworkAudits_sync] diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/cm_enrollment_service/calculate_effective_cm_enrollment.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/cm_enrollment_service/calculate_effective_cm_enrollment.rb new file mode 100644 index 000000000000..6f5c4a66813b --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/cm_enrollment_service/calculate_effective_cm_enrollment.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudsecuritycompliance_v1_generated_CmEnrollmentService_CalculateEffectiveCmEnrollment_sync] +require "google/cloud/cloud_security_compliance/v1" + +## +# Snippet for the calculate_effective_cm_enrollment call in the CmEnrollmentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Client#calculate_effective_cm_enrollment. +# +def calculate_effective_cm_enrollment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CloudSecurityCompliance::V1::CalculateEffectiveCmEnrollmentRequest.new + + # Call the calculate_effective_cm_enrollment method. + result = client.calculate_effective_cm_enrollment request + + # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::CalculateEffectiveCmEnrollmentResponse. + p result +end +# [END cloudsecuritycompliance_v1_generated_CmEnrollmentService_CalculateEffectiveCmEnrollment_sync] diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/cm_enrollment_service/update_cm_enrollment.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/cm_enrollment_service/update_cm_enrollment.rb new file mode 100644 index 000000000000..d3b494a1582e --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/cm_enrollment_service/update_cm_enrollment.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudsecuritycompliance_v1_generated_CmEnrollmentService_UpdateCmEnrollment_sync] +require "google/cloud/cloud_security_compliance/v1" + +## +# Snippet for the update_cm_enrollment call in the CmEnrollmentService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Client#update_cm_enrollment. +# +def update_cm_enrollment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CloudSecurityCompliance::V1::UpdateCmEnrollmentRequest.new + + # Call the update_cm_enrollment method. + result = client.update_cm_enrollment request + + # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::CmEnrollment. + p result +end +# [END cloudsecuritycompliance_v1_generated_CmEnrollmentService_UpdateCmEnrollment_sync] diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/create_cloud_control.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/create_cloud_control.rb new file mode 100644 index 000000000000..ea3ac426a874 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/create_cloud_control.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudsecuritycompliance_v1_generated_Config_CreateCloudControl_sync] +require "google/cloud/cloud_security_compliance/v1" + +## +# Snippet for the create_cloud_control call in the Config service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::CloudSecurityCompliance::V1::Config::Client#create_cloud_control. +# +def create_cloud_control + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CloudSecurityCompliance::V1::CreateCloudControlRequest.new + + # Call the create_cloud_control method. + result = client.create_cloud_control request + + # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::CloudControl. + p result +end +# [END cloudsecuritycompliance_v1_generated_Config_CreateCloudControl_sync] diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/create_framework.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/create_framework.rb new file mode 100644 index 000000000000..fb1b27a7eafd --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/create_framework.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudsecuritycompliance_v1_generated_Config_CreateFramework_sync] +require "google/cloud/cloud_security_compliance/v1" + +## +# Snippet for the create_framework call in the Config service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::CloudSecurityCompliance::V1::Config::Client#create_framework. +# +def create_framework + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkRequest.new + + # Call the create_framework method. + result = client.create_framework request + + # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::Framework. + p result +end +# [END cloudsecuritycompliance_v1_generated_Config_CreateFramework_sync] diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/delete_cloud_control.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/delete_cloud_control.rb new file mode 100644 index 000000000000..069434007011 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/delete_cloud_control.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudsecuritycompliance_v1_generated_Config_DeleteCloudControl_sync] +require "google/cloud/cloud_security_compliance/v1" + +## +# Snippet for the delete_cloud_control call in the Config service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::CloudSecurityCompliance::V1::Config::Client#delete_cloud_control. +# +def delete_cloud_control + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CloudSecurityCompliance::V1::DeleteCloudControlRequest.new + + # Call the delete_cloud_control method. + result = client.delete_cloud_control request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END cloudsecuritycompliance_v1_generated_Config_DeleteCloudControl_sync] diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/delete_framework.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/delete_framework.rb new file mode 100644 index 000000000000..79399e028c57 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/delete_framework.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudsecuritycompliance_v1_generated_Config_DeleteFramework_sync] +require "google/cloud/cloud_security_compliance/v1" + +## +# Snippet for the delete_framework call in the Config service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::CloudSecurityCompliance::V1::Config::Client#delete_framework. +# +def delete_framework + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkRequest.new + + # Call the delete_framework method. + result = client.delete_framework request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END cloudsecuritycompliance_v1_generated_Config_DeleteFramework_sync] diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/get_cloud_control.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/get_cloud_control.rb new file mode 100644 index 000000000000..1100e8dfd490 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/get_cloud_control.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudsecuritycompliance_v1_generated_Config_GetCloudControl_sync] +require "google/cloud/cloud_security_compliance/v1" + +## +# Snippet for the get_cloud_control call in the Config service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::CloudSecurityCompliance::V1::Config::Client#get_cloud_control. +# +def get_cloud_control + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlRequest.new + + # Call the get_cloud_control method. + result = client.get_cloud_control request + + # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::CloudControl. + p result +end +# [END cloudsecuritycompliance_v1_generated_Config_GetCloudControl_sync] diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/get_framework.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/get_framework.rb new file mode 100644 index 000000000000..af0ec33d3935 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/get_framework.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudsecuritycompliance_v1_generated_Config_GetFramework_sync] +require "google/cloud/cloud_security_compliance/v1" + +## +# Snippet for the get_framework call in the Config service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::CloudSecurityCompliance::V1::Config::Client#get_framework. +# +def get_framework + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkRequest.new + + # Call the get_framework method. + result = client.get_framework request + + # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::Framework. + p result +end +# [END cloudsecuritycompliance_v1_generated_Config_GetFramework_sync] diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/list_cloud_controls.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/list_cloud_controls.rb new file mode 100644 index 000000000000..a682b0e50076 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/list_cloud_controls.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudsecuritycompliance_v1_generated_Config_ListCloudControls_sync] +require "google/cloud/cloud_security_compliance/v1" + +## +# Snippet for the list_cloud_controls call in the Config service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::CloudSecurityCompliance::V1::Config::Client#list_cloud_controls. +# +def list_cloud_controls + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlsRequest.new + + # Call the list_cloud_controls method. + result = client.list_cloud_controls request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::CloudSecurityCompliance::V1::CloudControl. + p item + end +end +# [END cloudsecuritycompliance_v1_generated_Config_ListCloudControls_sync] diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/list_frameworks.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/list_frameworks.rb new file mode 100644 index 000000000000..8c39cf70ff77 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/list_frameworks.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudsecuritycompliance_v1_generated_Config_ListFrameworks_sync] +require "google/cloud/cloud_security_compliance/v1" + +## +# Snippet for the list_frameworks call in the Config service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::CloudSecurityCompliance::V1::Config::Client#list_frameworks. +# +def list_frameworks + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CloudSecurityCompliance::V1::ListFrameworksRequest.new + + # Call the list_frameworks method. + result = client.list_frameworks request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::CloudSecurityCompliance::V1::Framework. + p item + end +end +# [END cloudsecuritycompliance_v1_generated_Config_ListFrameworks_sync] diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/update_cloud_control.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/update_cloud_control.rb new file mode 100644 index 000000000000..ba3ed702de99 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/update_cloud_control.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudsecuritycompliance_v1_generated_Config_UpdateCloudControl_sync] +require "google/cloud/cloud_security_compliance/v1" + +## +# Snippet for the update_cloud_control call in the Config service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::CloudSecurityCompliance::V1::Config::Client#update_cloud_control. +# +def update_cloud_control + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CloudSecurityCompliance::V1::UpdateCloudControlRequest.new + + # Call the update_cloud_control method. + result = client.update_cloud_control request + + # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::CloudControl. + p result +end +# [END cloudsecuritycompliance_v1_generated_Config_UpdateCloudControl_sync] diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/update_framework.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/update_framework.rb new file mode 100644 index 000000000000..773e5aa1f5ab --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/update_framework.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudsecuritycompliance_v1_generated_Config_UpdateFramework_sync] +require "google/cloud/cloud_security_compliance/v1" + +## +# Snippet for the update_framework call in the Config service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::CloudSecurityCompliance::V1::Config::Client#update_framework. +# +def update_framework + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CloudSecurityCompliance::V1::UpdateFrameworkRequest.new + + # Call the update_framework method. + result = client.update_framework request + + # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::Framework. + p result +end +# [END cloudsecuritycompliance_v1_generated_Config_UpdateFramework_sync] diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/deployment/create_framework_deployment.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/deployment/create_framework_deployment.rb new file mode 100644 index 000000000000..d24a477bf574 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/deployment/create_framework_deployment.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudsecuritycompliance_v1_generated_Deployment_CreateFrameworkDeployment_sync] +require "google/cloud/cloud_security_compliance/v1" + +## +# Snippet for the create_framework_deployment call in the Deployment service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client#create_framework_deployment. +# +def create_framework_deployment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkDeploymentRequest.new + + # Call the create_framework_deployment method. + result = client.create_framework_deployment request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END cloudsecuritycompliance_v1_generated_Deployment_CreateFrameworkDeployment_sync] diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/deployment/delete_framework_deployment.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/deployment/delete_framework_deployment.rb new file mode 100644 index 000000000000..609ff968e9dc --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/deployment/delete_framework_deployment.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudsecuritycompliance_v1_generated_Deployment_DeleteFrameworkDeployment_sync] +require "google/cloud/cloud_security_compliance/v1" + +## +# Snippet for the delete_framework_deployment call in the Deployment service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client#delete_framework_deployment. +# +def delete_framework_deployment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkDeploymentRequest.new + + # Call the delete_framework_deployment method. + result = client.delete_framework_deployment request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END cloudsecuritycompliance_v1_generated_Deployment_DeleteFrameworkDeployment_sync] diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/deployment/get_cloud_control_deployment.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/deployment/get_cloud_control_deployment.rb new file mode 100644 index 000000000000..b5626f18d60e --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/deployment/get_cloud_control_deployment.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudsecuritycompliance_v1_generated_Deployment_GetCloudControlDeployment_sync] +require "google/cloud/cloud_security_compliance/v1" + +## +# Snippet for the get_cloud_control_deployment call in the Deployment service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client#get_cloud_control_deployment. +# +def get_cloud_control_deployment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlDeploymentRequest.new + + # Call the get_cloud_control_deployment method. + result = client.get_cloud_control_deployment request + + # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment. + p result +end +# [END cloudsecuritycompliance_v1_generated_Deployment_GetCloudControlDeployment_sync] diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/deployment/get_framework_deployment.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/deployment/get_framework_deployment.rb new file mode 100644 index 000000000000..a8b63334d6fe --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/deployment/get_framework_deployment.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudsecuritycompliance_v1_generated_Deployment_GetFrameworkDeployment_sync] +require "google/cloud/cloud_security_compliance/v1" + +## +# Snippet for the get_framework_deployment call in the Deployment service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client#get_framework_deployment. +# +def get_framework_deployment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkDeploymentRequest.new + + # Call the get_framework_deployment method. + result = client.get_framework_deployment request + + # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment. + p result +end +# [END cloudsecuritycompliance_v1_generated_Deployment_GetFrameworkDeployment_sync] diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/deployment/list_cloud_control_deployments.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/deployment/list_cloud_control_deployments.rb new file mode 100644 index 000000000000..d0f99bf0331c --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/deployment/list_cloud_control_deployments.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudsecuritycompliance_v1_generated_Deployment_ListCloudControlDeployments_sync] +require "google/cloud/cloud_security_compliance/v1" + +## +# Snippet for the list_cloud_control_deployments call in the Deployment service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client#list_cloud_control_deployments. +# +def list_cloud_control_deployments + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlDeploymentsRequest.new + + # Call the list_cloud_control_deployments method. + result = client.list_cloud_control_deployments request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment. + p item + end +end +# [END cloudsecuritycompliance_v1_generated_Deployment_ListCloudControlDeployments_sync] diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/deployment/list_framework_deployments.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/deployment/list_framework_deployments.rb new file mode 100644 index 000000000000..0447441f7ae8 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/deployment/list_framework_deployments.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudsecuritycompliance_v1_generated_Deployment_ListFrameworkDeployments_sync] +require "google/cloud/cloud_security_compliance/v1" + +## +# Snippet for the list_framework_deployments call in the Deployment service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client#list_framework_deployments. +# +def list_framework_deployments + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkDeploymentsRequest.new + + # Call the list_framework_deployments method. + result = client.list_framework_deployments request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment. + p item + end +end +# [END cloudsecuritycompliance_v1_generated_Deployment_ListFrameworkDeployments_sync] diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/monitoring/aggregate_framework_compliance_report.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/monitoring/aggregate_framework_compliance_report.rb new file mode 100644 index 000000000000..f08950b2b50e --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/monitoring/aggregate_framework_compliance_report.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudsecuritycompliance_v1_generated_Monitoring_AggregateFrameworkComplianceReport_sync] +require "google/cloud/cloud_security_compliance/v1" + +## +# Snippet for the aggregate_framework_compliance_report call in the Monitoring service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client#aggregate_framework_compliance_report. +# +def aggregate_framework_compliance_report + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportRequest.new + + # Call the aggregate_framework_compliance_report method. + result = client.aggregate_framework_compliance_report request + + # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportResponse. + p result +end +# [END cloudsecuritycompliance_v1_generated_Monitoring_AggregateFrameworkComplianceReport_sync] diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/monitoring/fetch_framework_compliance_report.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/monitoring/fetch_framework_compliance_report.rb new file mode 100644 index 000000000000..08f2d012dd8a --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/monitoring/fetch_framework_compliance_report.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudsecuritycompliance_v1_generated_Monitoring_FetchFrameworkComplianceReport_sync] +require "google/cloud/cloud_security_compliance/v1" + +## +# Snippet for the fetch_framework_compliance_report call in the Monitoring service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client#fetch_framework_compliance_report. +# +def fetch_framework_compliance_report + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CloudSecurityCompliance::V1::FetchFrameworkComplianceReportRequest.new + + # Call the fetch_framework_compliance_report method. + result = client.fetch_framework_compliance_report request + + # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::FrameworkComplianceReport. + p result +end +# [END cloudsecuritycompliance_v1_generated_Monitoring_FetchFrameworkComplianceReport_sync] diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/monitoring/list_control_compliance_summaries.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/monitoring/list_control_compliance_summaries.rb new file mode 100644 index 000000000000..d151b5b3fdd1 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/monitoring/list_control_compliance_summaries.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudsecuritycompliance_v1_generated_Monitoring_ListControlComplianceSummaries_sync] +require "google/cloud/cloud_security_compliance/v1" + +## +# Snippet for the list_control_compliance_summaries call in the Monitoring service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client#list_control_compliance_summaries. +# +def list_control_compliance_summaries + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CloudSecurityCompliance::V1::ListControlComplianceSummariesRequest.new + + # Call the list_control_compliance_summaries method. + result = client.list_control_compliance_summaries request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::CloudSecurityCompliance::V1::ControlComplianceSummary. + p item + end +end +# [END cloudsecuritycompliance_v1_generated_Monitoring_ListControlComplianceSummaries_sync] diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/monitoring/list_finding_summaries.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/monitoring/list_finding_summaries.rb new file mode 100644 index 000000000000..ac46a9ee89b5 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/monitoring/list_finding_summaries.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudsecuritycompliance_v1_generated_Monitoring_ListFindingSummaries_sync] +require "google/cloud/cloud_security_compliance/v1" + +## +# Snippet for the list_finding_summaries call in the Monitoring service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client#list_finding_summaries. +# +def list_finding_summaries + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CloudSecurityCompliance::V1::ListFindingSummariesRequest.new + + # Call the list_finding_summaries method. + result = client.list_finding_summaries request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::CloudSecurityCompliance::V1::FindingSummary. + p item + end +end +# [END cloudsecuritycompliance_v1_generated_Monitoring_ListFindingSummaries_sync] diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/monitoring/list_framework_compliance_summaries.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/monitoring/list_framework_compliance_summaries.rb new file mode 100644 index 000000000000..4e712b0ca450 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/monitoring/list_framework_compliance_summaries.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudsecuritycompliance_v1_generated_Monitoring_ListFrameworkComplianceSummaries_sync] +require "google/cloud/cloud_security_compliance/v1" + +## +# Snippet for the list_framework_compliance_summaries call in the Monitoring service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client#list_framework_compliance_summaries. +# +def list_framework_compliance_summaries + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkComplianceSummariesRequest.new + + # Call the list_framework_compliance_summaries method. + result = client.list_framework_compliance_summaries request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::CloudSecurityCompliance::V1::FrameworkComplianceSummary. + p item + end +end +# [END cloudsecuritycompliance_v1_generated_Monitoring_ListFrameworkComplianceSummaries_sync] diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/snippet_metadata_google.cloud.cloudsecuritycompliance.v1.json b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/snippet_metadata_google.cloud.cloudsecuritycompliance.v1.json new file mode 100644 index 000000000000..0149b29a22ae --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/snippet_metadata_google.cloud.cloudsecuritycompliance.v1.json @@ -0,0 +1,1095 @@ +{ + "client_library": { + "name": "google-cloud-cloud_security_compliance-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.cloudsecuritycompliance.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "cloudsecuritycompliance_v1_generated_Audit_GenerateFrameworkAuditScopeReport_sync", + "title": "Snippet for the generate_framework_audit_scope_report call in the Audit service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudSecurityCompliance::V1::Audit::Client#generate_framework_audit_scope_report.", + "file": "audit/generate_framework_audit_scope_report.rb", + "language": "RUBY", + "client_method": { + "short_name": "generate_framework_audit_scope_report", + "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client#generate_framework_audit_scope_report", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportResponse", + "client": { + "short_name": "Audit::Client", + "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client" + }, + "method": { + "short_name": "GenerateFrameworkAuditScopeReport", + "full_name": "google.cloud.cloudsecuritycompliance.v1.Audit.GenerateFrameworkAuditScopeReport", + "service": { + "short_name": "Audit", + "full_name": "google.cloud.cloudsecuritycompliance.v1.Audit" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudsecuritycompliance_v1_generated_Audit_CreateFrameworkAudit_sync", + "title": "Snippet for the create_framework_audit call in the Audit service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudSecurityCompliance::V1::Audit::Client#create_framework_audit.", + "file": "audit/create_framework_audit.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_framework_audit", + "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client#create_framework_audit", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkAuditRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Audit::Client", + "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client" + }, + "method": { + "short_name": "CreateFrameworkAudit", + "full_name": "google.cloud.cloudsecuritycompliance.v1.Audit.CreateFrameworkAudit", + "service": { + "short_name": "Audit", + "full_name": "google.cloud.cloudsecuritycompliance.v1.Audit" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudsecuritycompliance_v1_generated_Audit_ListFrameworkAudits_sync", + "title": "Snippet for the list_framework_audits call in the Audit service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudSecurityCompliance::V1::Audit::Client#list_framework_audits.", + "file": "audit/list_framework_audits.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_framework_audits", + "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client#list_framework_audits", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkAuditsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkAuditsResponse", + "client": { + "short_name": "Audit::Client", + "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client" + }, + "method": { + "short_name": "ListFrameworkAudits", + "full_name": "google.cloud.cloudsecuritycompliance.v1.Audit.ListFrameworkAudits", + "service": { + "short_name": "Audit", + "full_name": "google.cloud.cloudsecuritycompliance.v1.Audit" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudsecuritycompliance_v1_generated_Audit_GetFrameworkAudit_sync", + "title": "Snippet for the get_framework_audit call in the Audit service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudSecurityCompliance::V1::Audit::Client#get_framework_audit.", + "file": "audit/get_framework_audit.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_framework_audit", + "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client#get_framework_audit", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkAuditRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CloudSecurityCompliance::V1::FrameworkAudit", + "client": { + "short_name": "Audit::Client", + "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client" + }, + "method": { + "short_name": "GetFrameworkAudit", + "full_name": "google.cloud.cloudsecuritycompliance.v1.Audit.GetFrameworkAudit", + "service": { + "short_name": "Audit", + "full_name": "google.cloud.cloudsecuritycompliance.v1.Audit" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudsecuritycompliance_v1_generated_CmEnrollmentService_UpdateCmEnrollment_sync", + "title": "Snippet for the update_cm_enrollment call in the CmEnrollmentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Client#update_cm_enrollment.", + "file": "cm_enrollment_service/update_cm_enrollment.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_cm_enrollment", + "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Client#update_cm_enrollment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CloudSecurityCompliance::V1::UpdateCmEnrollmentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollment", + "client": { + "short_name": "CmEnrollmentService::Client", + "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Client" + }, + "method": { + "short_name": "UpdateCmEnrollment", + "full_name": "google.cloud.cloudsecuritycompliance.v1.CmEnrollmentService.UpdateCmEnrollment", + "service": { + "short_name": "CmEnrollmentService", + "full_name": "google.cloud.cloudsecuritycompliance.v1.CmEnrollmentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudsecuritycompliance_v1_generated_CmEnrollmentService_CalculateEffectiveCmEnrollment_sync", + "title": "Snippet for the calculate_effective_cm_enrollment call in the CmEnrollmentService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Client#calculate_effective_cm_enrollment.", + "file": "cm_enrollment_service/calculate_effective_cm_enrollment.rb", + "language": "RUBY", + "client_method": { + "short_name": "calculate_effective_cm_enrollment", + "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Client#calculate_effective_cm_enrollment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CloudSecurityCompliance::V1::CalculateEffectiveCmEnrollmentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CloudSecurityCompliance::V1::CalculateEffectiveCmEnrollmentResponse", + "client": { + "short_name": "CmEnrollmentService::Client", + "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Client" + }, + "method": { + "short_name": "CalculateEffectiveCmEnrollment", + "full_name": "google.cloud.cloudsecuritycompliance.v1.CmEnrollmentService.CalculateEffectiveCmEnrollment", + "service": { + "short_name": "CmEnrollmentService", + "full_name": "google.cloud.cloudsecuritycompliance.v1.CmEnrollmentService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudsecuritycompliance_v1_generated_Config_ListFrameworks_sync", + "title": "Snippet for the list_frameworks call in the Config service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudSecurityCompliance::V1::Config::Client#list_frameworks.", + "file": "config/list_frameworks.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_frameworks", + "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Config::Client#list_frameworks", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworksRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworksResponse", + "client": { + "short_name": "Config::Client", + "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Config::Client" + }, + "method": { + "short_name": "ListFrameworks", + "full_name": "google.cloud.cloudsecuritycompliance.v1.Config.ListFrameworks", + "service": { + "short_name": "Config", + "full_name": "google.cloud.cloudsecuritycompliance.v1.Config" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudsecuritycompliance_v1_generated_Config_GetFramework_sync", + "title": "Snippet for the get_framework call in the Config service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudSecurityCompliance::V1::Config::Client#get_framework.", + "file": "config/get_framework.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_framework", + "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Config::Client#get_framework", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CloudSecurityCompliance::V1::Framework", + "client": { + "short_name": "Config::Client", + "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Config::Client" + }, + "method": { + "short_name": "GetFramework", + "full_name": "google.cloud.cloudsecuritycompliance.v1.Config.GetFramework", + "service": { + "short_name": "Config", + "full_name": "google.cloud.cloudsecuritycompliance.v1.Config" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudsecuritycompliance_v1_generated_Config_CreateFramework_sync", + "title": "Snippet for the create_framework call in the Config service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudSecurityCompliance::V1::Config::Client#create_framework.", + "file": "config/create_framework.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_framework", + "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Config::Client#create_framework", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CloudSecurityCompliance::V1::Framework", + "client": { + "short_name": "Config::Client", + "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Config::Client" + }, + "method": { + "short_name": "CreateFramework", + "full_name": "google.cloud.cloudsecuritycompliance.v1.Config.CreateFramework", + "service": { + "short_name": "Config", + "full_name": "google.cloud.cloudsecuritycompliance.v1.Config" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudsecuritycompliance_v1_generated_Config_UpdateFramework_sync", + "title": "Snippet for the update_framework call in the Config service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudSecurityCompliance::V1::Config::Client#update_framework.", + "file": "config/update_framework.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_framework", + "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Config::Client#update_framework", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CloudSecurityCompliance::V1::UpdateFrameworkRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CloudSecurityCompliance::V1::Framework", + "client": { + "short_name": "Config::Client", + "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Config::Client" + }, + "method": { + "short_name": "UpdateFramework", + "full_name": "google.cloud.cloudsecuritycompliance.v1.Config.UpdateFramework", + "service": { + "short_name": "Config", + "full_name": "google.cloud.cloudsecuritycompliance.v1.Config" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudsecuritycompliance_v1_generated_Config_DeleteFramework_sync", + "title": "Snippet for the delete_framework call in the Config service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudSecurityCompliance::V1::Config::Client#delete_framework.", + "file": "config/delete_framework.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_framework", + "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Config::Client#delete_framework", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "Config::Client", + "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Config::Client" + }, + "method": { + "short_name": "DeleteFramework", + "full_name": "google.cloud.cloudsecuritycompliance.v1.Config.DeleteFramework", + "service": { + "short_name": "Config", + "full_name": "google.cloud.cloudsecuritycompliance.v1.Config" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudsecuritycompliance_v1_generated_Config_ListCloudControls_sync", + "title": "Snippet for the list_cloud_controls call in the Config service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudSecurityCompliance::V1::Config::Client#list_cloud_controls.", + "file": "config/list_cloud_controls.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_cloud_controls", + "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Config::Client#list_cloud_controls", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlsResponse", + "client": { + "short_name": "Config::Client", + "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Config::Client" + }, + "method": { + "short_name": "ListCloudControls", + "full_name": "google.cloud.cloudsecuritycompliance.v1.Config.ListCloudControls", + "service": { + "short_name": "Config", + "full_name": "google.cloud.cloudsecuritycompliance.v1.Config" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudsecuritycompliance_v1_generated_Config_GetCloudControl_sync", + "title": "Snippet for the get_cloud_control call in the Config service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudSecurityCompliance::V1::Config::Client#get_cloud_control.", + "file": "config/get_cloud_control.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_cloud_control", + "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Config::Client#get_cloud_control", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CloudSecurityCompliance::V1::CloudControl", + "client": { + "short_name": "Config::Client", + "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Config::Client" + }, + "method": { + "short_name": "GetCloudControl", + "full_name": "google.cloud.cloudsecuritycompliance.v1.Config.GetCloudControl", + "service": { + "short_name": "Config", + "full_name": "google.cloud.cloudsecuritycompliance.v1.Config" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudsecuritycompliance_v1_generated_Config_CreateCloudControl_sync", + "title": "Snippet for the create_cloud_control call in the Config service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudSecurityCompliance::V1::Config::Client#create_cloud_control.", + "file": "config/create_cloud_control.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_cloud_control", + "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Config::Client#create_cloud_control", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CloudSecurityCompliance::V1::CreateCloudControlRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CloudSecurityCompliance::V1::CloudControl", + "client": { + "short_name": "Config::Client", + "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Config::Client" + }, + "method": { + "short_name": "CreateCloudControl", + "full_name": "google.cloud.cloudsecuritycompliance.v1.Config.CreateCloudControl", + "service": { + "short_name": "Config", + "full_name": "google.cloud.cloudsecuritycompliance.v1.Config" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudsecuritycompliance_v1_generated_Config_UpdateCloudControl_sync", + "title": "Snippet for the update_cloud_control call in the Config service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudSecurityCompliance::V1::Config::Client#update_cloud_control.", + "file": "config/update_cloud_control.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_cloud_control", + "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Config::Client#update_cloud_control", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CloudSecurityCompliance::V1::UpdateCloudControlRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CloudSecurityCompliance::V1::CloudControl", + "client": { + "short_name": "Config::Client", + "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Config::Client" + }, + "method": { + "short_name": "UpdateCloudControl", + "full_name": "google.cloud.cloudsecuritycompliance.v1.Config.UpdateCloudControl", + "service": { + "short_name": "Config", + "full_name": "google.cloud.cloudsecuritycompliance.v1.Config" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudsecuritycompliance_v1_generated_Config_DeleteCloudControl_sync", + "title": "Snippet for the delete_cloud_control call in the Config service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudSecurityCompliance::V1::Config::Client#delete_cloud_control.", + "file": "config/delete_cloud_control.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_cloud_control", + "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Config::Client#delete_cloud_control", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CloudSecurityCompliance::V1::DeleteCloudControlRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "Config::Client", + "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Config::Client" + }, + "method": { + "short_name": "DeleteCloudControl", + "full_name": "google.cloud.cloudsecuritycompliance.v1.Config.DeleteCloudControl", + "service": { + "short_name": "Config", + "full_name": "google.cloud.cloudsecuritycompliance.v1.Config" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudsecuritycompliance_v1_generated_Deployment_CreateFrameworkDeployment_sync", + "title": "Snippet for the create_framework_deployment call in the Deployment service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client#create_framework_deployment.", + "file": "deployment/create_framework_deployment.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_framework_deployment", + "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client#create_framework_deployment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkDeploymentRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Deployment::Client", + "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client" + }, + "method": { + "short_name": "CreateFrameworkDeployment", + "full_name": "google.cloud.cloudsecuritycompliance.v1.Deployment.CreateFrameworkDeployment", + "service": { + "short_name": "Deployment", + "full_name": "google.cloud.cloudsecuritycompliance.v1.Deployment" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudsecuritycompliance_v1_generated_Deployment_DeleteFrameworkDeployment_sync", + "title": "Snippet for the delete_framework_deployment call in the Deployment service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client#delete_framework_deployment.", + "file": "deployment/delete_framework_deployment.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_framework_deployment", + "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client#delete_framework_deployment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkDeploymentRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Deployment::Client", + "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client" + }, + "method": { + "short_name": "DeleteFrameworkDeployment", + "full_name": "google.cloud.cloudsecuritycompliance.v1.Deployment.DeleteFrameworkDeployment", + "service": { + "short_name": "Deployment", + "full_name": "google.cloud.cloudsecuritycompliance.v1.Deployment" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudsecuritycompliance_v1_generated_Deployment_GetFrameworkDeployment_sync", + "title": "Snippet for the get_framework_deployment call in the Deployment service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client#get_framework_deployment.", + "file": "deployment/get_framework_deployment.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_framework_deployment", + "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client#get_framework_deployment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkDeploymentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment", + "client": { + "short_name": "Deployment::Client", + "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client" + }, + "method": { + "short_name": "GetFrameworkDeployment", + "full_name": "google.cloud.cloudsecuritycompliance.v1.Deployment.GetFrameworkDeployment", + "service": { + "short_name": "Deployment", + "full_name": "google.cloud.cloudsecuritycompliance.v1.Deployment" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudsecuritycompliance_v1_generated_Deployment_ListFrameworkDeployments_sync", + "title": "Snippet for the list_framework_deployments call in the Deployment service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client#list_framework_deployments.", + "file": "deployment/list_framework_deployments.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_framework_deployments", + "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client#list_framework_deployments", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkDeploymentsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkDeploymentsResponse", + "client": { + "short_name": "Deployment::Client", + "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client" + }, + "method": { + "short_name": "ListFrameworkDeployments", + "full_name": "google.cloud.cloudsecuritycompliance.v1.Deployment.ListFrameworkDeployments", + "service": { + "short_name": "Deployment", + "full_name": "google.cloud.cloudsecuritycompliance.v1.Deployment" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudsecuritycompliance_v1_generated_Deployment_GetCloudControlDeployment_sync", + "title": "Snippet for the get_cloud_control_deployment call in the Deployment service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client#get_cloud_control_deployment.", + "file": "deployment/get_cloud_control_deployment.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_cloud_control_deployment", + "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client#get_cloud_control_deployment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlDeploymentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment", + "client": { + "short_name": "Deployment::Client", + "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client" + }, + "method": { + "short_name": "GetCloudControlDeployment", + "full_name": "google.cloud.cloudsecuritycompliance.v1.Deployment.GetCloudControlDeployment", + "service": { + "short_name": "Deployment", + "full_name": "google.cloud.cloudsecuritycompliance.v1.Deployment" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudsecuritycompliance_v1_generated_Deployment_ListCloudControlDeployments_sync", + "title": "Snippet for the list_cloud_control_deployments call in the Deployment service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client#list_cloud_control_deployments.", + "file": "deployment/list_cloud_control_deployments.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_cloud_control_deployments", + "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client#list_cloud_control_deployments", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlDeploymentsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlDeploymentsResponse", + "client": { + "short_name": "Deployment::Client", + "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client" + }, + "method": { + "short_name": "ListCloudControlDeployments", + "full_name": "google.cloud.cloudsecuritycompliance.v1.Deployment.ListCloudControlDeployments", + "service": { + "short_name": "Deployment", + "full_name": "google.cloud.cloudsecuritycompliance.v1.Deployment" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudsecuritycompliance_v1_generated_Monitoring_ListFrameworkComplianceSummaries_sync", + "title": "Snippet for the list_framework_compliance_summaries call in the Monitoring service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client#list_framework_compliance_summaries.", + "file": "monitoring/list_framework_compliance_summaries.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_framework_compliance_summaries", + "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client#list_framework_compliance_summaries", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkComplianceSummariesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkComplianceSummariesResponse", + "client": { + "short_name": "Monitoring::Client", + "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client" + }, + "method": { + "short_name": "ListFrameworkComplianceSummaries", + "full_name": "google.cloud.cloudsecuritycompliance.v1.Monitoring.ListFrameworkComplianceSummaries", + "service": { + "short_name": "Monitoring", + "full_name": "google.cloud.cloudsecuritycompliance.v1.Monitoring" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudsecuritycompliance_v1_generated_Monitoring_ListFindingSummaries_sync", + "title": "Snippet for the list_finding_summaries call in the Monitoring service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client#list_finding_summaries.", + "file": "monitoring/list_finding_summaries.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_finding_summaries", + "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client#list_finding_summaries", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CloudSecurityCompliance::V1::ListFindingSummariesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CloudSecurityCompliance::V1::ListFindingSummariesResponse", + "client": { + "short_name": "Monitoring::Client", + "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client" + }, + "method": { + "short_name": "ListFindingSummaries", + "full_name": "google.cloud.cloudsecuritycompliance.v1.Monitoring.ListFindingSummaries", + "service": { + "short_name": "Monitoring", + "full_name": "google.cloud.cloudsecuritycompliance.v1.Monitoring" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudsecuritycompliance_v1_generated_Monitoring_FetchFrameworkComplianceReport_sync", + "title": "Snippet for the fetch_framework_compliance_report call in the Monitoring service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client#fetch_framework_compliance_report.", + "file": "monitoring/fetch_framework_compliance_report.rb", + "language": "RUBY", + "client_method": { + "short_name": "fetch_framework_compliance_report", + "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client#fetch_framework_compliance_report", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CloudSecurityCompliance::V1::FetchFrameworkComplianceReportRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CloudSecurityCompliance::V1::FrameworkComplianceReport", + "client": { + "short_name": "Monitoring::Client", + "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client" + }, + "method": { + "short_name": "FetchFrameworkComplianceReport", + "full_name": "google.cloud.cloudsecuritycompliance.v1.Monitoring.FetchFrameworkComplianceReport", + "service": { + "short_name": "Monitoring", + "full_name": "google.cloud.cloudsecuritycompliance.v1.Monitoring" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudsecuritycompliance_v1_generated_Monitoring_ListControlComplianceSummaries_sync", + "title": "Snippet for the list_control_compliance_summaries call in the Monitoring service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client#list_control_compliance_summaries.", + "file": "monitoring/list_control_compliance_summaries.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_control_compliance_summaries", + "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client#list_control_compliance_summaries", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CloudSecurityCompliance::V1::ListControlComplianceSummariesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CloudSecurityCompliance::V1::ListControlComplianceSummariesResponse", + "client": { + "short_name": "Monitoring::Client", + "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client" + }, + "method": { + "short_name": "ListControlComplianceSummaries", + "full_name": "google.cloud.cloudsecuritycompliance.v1.Monitoring.ListControlComplianceSummaries", + "service": { + "short_name": "Monitoring", + "full_name": "google.cloud.cloudsecuritycompliance.v1.Monitoring" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudsecuritycompliance_v1_generated_Monitoring_AggregateFrameworkComplianceReport_sync", + "title": "Snippet for the aggregate_framework_compliance_report call in the Monitoring service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client#aggregate_framework_compliance_report.", + "file": "monitoring/aggregate_framework_compliance_report.rb", + "language": "RUBY", + "client_method": { + "short_name": "aggregate_framework_compliance_report", + "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client#aggregate_framework_compliance_report", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportResponse", + "client": { + "short_name": "Monitoring::Client", + "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client" + }, + "method": { + "short_name": "AggregateFrameworkComplianceReport", + "full_name": "google.cloud.cloudsecuritycompliance.v1.Monitoring.AggregateFrameworkComplianceReport", + "service": { + "short_name": "Monitoring", + "full_name": "google.cloud.cloudsecuritycompliance.v1.Monitoring" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/audit_operations_test.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/audit_operations_test.rb new file mode 100644 index 000000000000..095cac982ad8 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/audit_operations_test.rb @@ -0,0 +1,400 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/cloudsecuritycompliance/v1/audit_pb" +require "google/cloud/cloudsecuritycompliance/v1/audit_services_pb" +require "google/cloud/cloud_security_compliance/v1/audit" + +class ::Google::Cloud::CloudSecurityCompliance::V1::Audit::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Operations.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/audit_paths_test.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/audit_paths_test.rb new file mode 100644 index 000000000000..b4e184205496 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/audit_paths_test.rb @@ -0,0 +1,82 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/cloud_security_compliance/v1/audit" + +class ::Google::Cloud::CloudSecurityCompliance::V1::Audit::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_framework_audit_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.framework_audit_path project: "value0", location: "value1", framework_audit: "value2" + assert_equal "projects/value0/locations/value1/frameworkAudits/value2", path + + path = client.framework_audit_path organization: "value0", location: "value1", framework_audit: "value2" + assert_equal "organizations/value0/locations/value1/frameworkAudits/value2", path + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1", path + end + end + + def test_organization_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.organization_location_path organization: "value0", location: "value1" + assert_equal "organizations/value0/locations/value1", path + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/audit_rest_test.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/audit_rest_test.rb new file mode 100644 index 000000000000..3febaeb289ea --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/audit_rest_test.rb @@ -0,0 +1,322 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/cloudsecuritycompliance/v1/audit_pb" +require "google/cloud/cloud_security_compliance/v1/audit/rest" + + +class ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_generate_framework_audit_scope_report + # Create test objects. + client_result = ::Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + scope = "hello world" + report_format = :FORMAT_UNSPECIFIED + compliance_framework = "hello world" + + generate_framework_audit_scope_report_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Rest::ServiceStub.stub :transcode_generate_framework_audit_scope_report_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, generate_framework_audit_scope_report_client_stub do + # Create client + client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.generate_framework_audit_scope_report({ scope: scope, report_format: report_format, compliance_framework: compliance_framework }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.generate_framework_audit_scope_report scope: scope, report_format: report_format, compliance_framework: compliance_framework do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.generate_framework_audit_scope_report ::Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportRequest.new(scope: scope, report_format: report_format, compliance_framework: compliance_framework) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.generate_framework_audit_scope_report({ scope: scope, report_format: report_format, compliance_framework: compliance_framework }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.generate_framework_audit_scope_report(::Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportRequest.new(scope: scope, report_format: report_format, compliance_framework: compliance_framework), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, generate_framework_audit_scope_report_client_stub.call_count + end + end + end + + def test_create_framework_audit + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + framework_audit_id = "hello world" + framework_audit = {} + + create_framework_audit_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Rest::ServiceStub.stub :transcode_create_framework_audit_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_framework_audit_client_stub do + # Create client + client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_framework_audit({ parent: parent, framework_audit_id: framework_audit_id, framework_audit: framework_audit }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_framework_audit parent: parent, framework_audit_id: framework_audit_id, framework_audit: framework_audit do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_framework_audit ::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkAuditRequest.new(parent: parent, framework_audit_id: framework_audit_id, framework_audit: framework_audit) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_framework_audit({ parent: parent, framework_audit_id: framework_audit_id, framework_audit: framework_audit }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_framework_audit(::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkAuditRequest.new(parent: parent, framework_audit_id: framework_audit_id, framework_audit: framework_audit), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_framework_audit_client_stub.call_count + end + end + end + + def test_list_framework_audits + # Create test objects. + client_result = ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkAuditsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_framework_audits_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Rest::ServiceStub.stub :transcode_list_framework_audits_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_framework_audits_client_stub do + # Create client + client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_framework_audits({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_framework_audits parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_framework_audits ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkAuditsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_framework_audits({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_framework_audits(::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkAuditsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_framework_audits_client_stub.call_count + end + end + end + + def test_get_framework_audit + # Create test objects. + client_result = ::Google::Cloud::CloudSecurityCompliance::V1::FrameworkAudit.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_framework_audit_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Rest::ServiceStub.stub :transcode_get_framework_audit_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_framework_audit_client_stub do + # Create client + client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_framework_audit({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_framework_audit name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_framework_audit ::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkAuditRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_framework_audit({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_framework_audit(::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkAuditRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_framework_audit_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/audit_test.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/audit_test.rb new file mode 100644 index 000000000000..c6a1ce7c38c6 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/audit_test.rb @@ -0,0 +1,374 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/cloudsecuritycompliance/v1/audit_pb" +require "google/cloud/cloud_security_compliance/v1/audit" + +class ::Google::Cloud::CloudSecurityCompliance::V1::Audit::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_generate_framework_audit_scope_report + # Create GRPC objects. + grpc_response = ::Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + scope = "hello world" + report_format = :FORMAT_UNSPECIFIED + compliance_framework = "hello world" + + generate_framework_audit_scope_report_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :generate_framework_audit_scope_report, name + assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportRequest, request + assert_equal "hello world", request["scope"] + assert_equal :FORMAT_UNSPECIFIED, request["report_format"] + assert_equal "hello world", request["compliance_framework"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, generate_framework_audit_scope_report_client_stub do + # Create client + client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.generate_framework_audit_scope_report({ scope: scope, report_format: report_format, compliance_framework: compliance_framework }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.generate_framework_audit_scope_report scope: scope, report_format: report_format, compliance_framework: compliance_framework do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.generate_framework_audit_scope_report ::Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportRequest.new(scope: scope, report_format: report_format, compliance_framework: compliance_framework) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.generate_framework_audit_scope_report({ scope: scope, report_format: report_format, compliance_framework: compliance_framework }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.generate_framework_audit_scope_report(::Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportRequest.new(scope: scope, report_format: report_format, compliance_framework: compliance_framework), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, generate_framework_audit_scope_report_client_stub.call_rpc_count + end + end + + def test_create_framework_audit + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + framework_audit_id = "hello world" + framework_audit = {} + + create_framework_audit_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_framework_audit, name + assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkAuditRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["framework_audit_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CloudSecurityCompliance::V1::FrameworkAudit), request["framework_audit"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_framework_audit_client_stub do + # Create client + client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_framework_audit({ parent: parent, framework_audit_id: framework_audit_id, framework_audit: framework_audit }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_framework_audit parent: parent, framework_audit_id: framework_audit_id, framework_audit: framework_audit do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_framework_audit ::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkAuditRequest.new(parent: parent, framework_audit_id: framework_audit_id, framework_audit: framework_audit) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_framework_audit({ parent: parent, framework_audit_id: framework_audit_id, framework_audit: framework_audit }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_framework_audit(::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkAuditRequest.new(parent: parent, framework_audit_id: framework_audit_id, framework_audit: framework_audit), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_framework_audit_client_stub.call_rpc_count + end + end + + def test_list_framework_audits + # Create GRPC objects. + grpc_response = ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkAuditsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_framework_audits_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_framework_audits, name + assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkAuditsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_framework_audits_client_stub do + # Create client + client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_framework_audits({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_framework_audits parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_framework_audits ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkAuditsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_framework_audits({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_framework_audits(::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkAuditsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_framework_audits_client_stub.call_rpc_count + end + end + + def test_get_framework_audit + # Create GRPC objects. + grpc_response = ::Google::Cloud::CloudSecurityCompliance::V1::FrameworkAudit.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_framework_audit_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_framework_audit, name + assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkAuditRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_framework_audit_client_stub do + # Create client + client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_framework_audit({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_framework_audit name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_framework_audit ::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkAuditRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_framework_audit({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_framework_audit(::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkAuditRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_framework_audit_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client, client + assert_equal creds, client.configure.credentials + end + end + + def test_operations_client + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/cm_enrollment_service_paths_test.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/cm_enrollment_service_paths_test.rb new file mode 100644 index 000000000000..3343676f5804 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/cm_enrollment_service_paths_test.rb @@ -0,0 +1,58 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/cloud_security_compliance/v1/cm_enrollment_service" + +class ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_cm_enrollment_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.cm_enrollment_path organization: "value0", location: "value1" + assert_equal "organizations/value0/locations/value1/cmEnrollment", path + + path = client.cm_enrollment_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1/cmEnrollment", path + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/cm_enrollment_service_rest_test.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/cm_enrollment_service_rest_test.rb new file mode 100644 index 000000000000..6984e3c798f8 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/cm_enrollment_service_rest_test.rb @@ -0,0 +1,208 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/cloudsecuritycompliance/v1/cm_enrollment_service_pb" +require "google/cloud/cloud_security_compliance/v1/cm_enrollment_service/rest" + + +class ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_update_cm_enrollment + # Create test objects. + client_result = ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollment.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + cm_enrollment = {} + update_mask = {} + + update_cm_enrollment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Rest::ServiceStub.stub :transcode_update_cm_enrollment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_cm_enrollment_client_stub do + # Create client + client = ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_cm_enrollment({ cm_enrollment: cm_enrollment, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_cm_enrollment cm_enrollment: cm_enrollment, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_cm_enrollment ::Google::Cloud::CloudSecurityCompliance::V1::UpdateCmEnrollmentRequest.new(cm_enrollment: cm_enrollment, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_cm_enrollment({ cm_enrollment: cm_enrollment, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_cm_enrollment(::Google::Cloud::CloudSecurityCompliance::V1::UpdateCmEnrollmentRequest.new(cm_enrollment: cm_enrollment, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_cm_enrollment_client_stub.call_count + end + end + end + + def test_calculate_effective_cm_enrollment + # Create test objects. + client_result = ::Google::Cloud::CloudSecurityCompliance::V1::CalculateEffectiveCmEnrollmentResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + calculate_effective_cm_enrollment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Rest::ServiceStub.stub :transcode_calculate_effective_cm_enrollment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, calculate_effective_cm_enrollment_client_stub do + # Create client + client = ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.calculate_effective_cm_enrollment({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.calculate_effective_cm_enrollment name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.calculate_effective_cm_enrollment ::Google::Cloud::CloudSecurityCompliance::V1::CalculateEffectiveCmEnrollmentRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.calculate_effective_cm_enrollment({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.calculate_effective_cm_enrollment(::Google::Cloud::CloudSecurityCompliance::V1::CalculateEffectiveCmEnrollmentRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, calculate_effective_cm_enrollment_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/cm_enrollment_service_test.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/cm_enrollment_service_test.rb new file mode 100644 index 000000000000..76f65d00851d --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/cm_enrollment_service_test.rb @@ -0,0 +1,222 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/cloudsecuritycompliance/v1/cm_enrollment_service_pb" +require "google/cloud/cloud_security_compliance/v1/cm_enrollment_service" + +class ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_update_cm_enrollment + # Create GRPC objects. + grpc_response = ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollment.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + cm_enrollment = {} + update_mask = {} + + update_cm_enrollment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_cm_enrollment, name + assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::UpdateCmEnrollmentRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollment), request["cm_enrollment"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_cm_enrollment_client_stub do + # Create client + client = ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_cm_enrollment({ cm_enrollment: cm_enrollment, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_cm_enrollment cm_enrollment: cm_enrollment, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_cm_enrollment ::Google::Cloud::CloudSecurityCompliance::V1::UpdateCmEnrollmentRequest.new(cm_enrollment: cm_enrollment, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_cm_enrollment({ cm_enrollment: cm_enrollment, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_cm_enrollment(::Google::Cloud::CloudSecurityCompliance::V1::UpdateCmEnrollmentRequest.new(cm_enrollment: cm_enrollment, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_cm_enrollment_client_stub.call_rpc_count + end + end + + def test_calculate_effective_cm_enrollment + # Create GRPC objects. + grpc_response = ::Google::Cloud::CloudSecurityCompliance::V1::CalculateEffectiveCmEnrollmentResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + calculate_effective_cm_enrollment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :calculate_effective_cm_enrollment, name + assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::CalculateEffectiveCmEnrollmentRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, calculate_effective_cm_enrollment_client_stub do + # Create client + client = ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.calculate_effective_cm_enrollment({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.calculate_effective_cm_enrollment name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.calculate_effective_cm_enrollment ::Google::Cloud::CloudSecurityCompliance::V1::CalculateEffectiveCmEnrollmentRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.calculate_effective_cm_enrollment({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.calculate_effective_cm_enrollment(::Google::Cloud::CloudSecurityCompliance::V1::CalculateEffectiveCmEnrollmentRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, calculate_effective_cm_enrollment_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/config_paths_test.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/config_paths_test.rb new file mode 100644 index 000000000000..f30c23b66461 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/config_paths_test.rb @@ -0,0 +1,97 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/cloud_security_compliance/v1/config" + +class ::Google::Cloud::CloudSecurityCompliance::V1::Config::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_cloud_control_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.cloud_control_path organization: "value0", location: "value1", cloud_control: "value2" + assert_equal "organizations/value0/locations/value1/cloudControls/value2", path + + path = client.cloud_control_path project: "value0", location: "value1", cloud_control: "value2" + assert_equal "projects/value0/locations/value1/cloudControls/value2", path + end + end + + def test_framework_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.framework_path organization: "value0", location: "value1", framework: "value2" + assert_equal "organizations/value0/locations/value1/frameworks/value2", path + + path = client.framework_path project: "value0", location: "value1", framework: "value2" + assert_equal "projects/value0/locations/value1/frameworks/value2", path + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1", path + end + end + + def test_organization_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.organization_location_path organization: "value0", location: "value1" + assert_equal "organizations/value0/locations/value1", path + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/config_rest_test.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/config_rest_test.rb new file mode 100644 index 000000000000..810240fc3602 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/config_rest_test.rb @@ -0,0 +1,652 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/cloudsecuritycompliance/v1/config_pb" +require "google/cloud/cloud_security_compliance/v1/config/rest" + + +class ::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_frameworks + # Create test objects. + client_result = ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworksResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_frameworks_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::ServiceStub.stub :transcode_list_frameworks_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_frameworks_client_stub do + # Create client + client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_frameworks({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_frameworks parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_frameworks ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworksRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_frameworks({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_frameworks(::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworksRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_frameworks_client_stub.call_count + end + end + end + + def test_get_framework + # Create test objects. + client_result = ::Google::Cloud::CloudSecurityCompliance::V1::Framework.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + major_revision_id = 42 + + get_framework_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::ServiceStub.stub :transcode_get_framework_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_framework_client_stub do + # Create client + client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_framework({ name: name, major_revision_id: major_revision_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_framework name: name, major_revision_id: major_revision_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_framework ::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkRequest.new(name: name, major_revision_id: major_revision_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_framework({ name: name, major_revision_id: major_revision_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_framework(::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkRequest.new(name: name, major_revision_id: major_revision_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_framework_client_stub.call_count + end + end + end + + def test_create_framework + # Create test objects. + client_result = ::Google::Cloud::CloudSecurityCompliance::V1::Framework.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + framework_id = "hello world" + framework = {} + + create_framework_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::ServiceStub.stub :transcode_create_framework_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_framework_client_stub do + # Create client + client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_framework({ parent: parent, framework_id: framework_id, framework: framework }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_framework parent: parent, framework_id: framework_id, framework: framework do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_framework ::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkRequest.new(parent: parent, framework_id: framework_id, framework: framework) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_framework({ parent: parent, framework_id: framework_id, framework: framework }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_framework(::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkRequest.new(parent: parent, framework_id: framework_id, framework: framework), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_framework_client_stub.call_count + end + end + end + + def test_update_framework + # Create test objects. + client_result = ::Google::Cloud::CloudSecurityCompliance::V1::Framework.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + update_mask = {} + framework = {} + major_revision_id = 42 + + update_framework_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::ServiceStub.stub :transcode_update_framework_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_framework_client_stub do + # Create client + client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_framework({ update_mask: update_mask, framework: framework, major_revision_id: major_revision_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_framework update_mask: update_mask, framework: framework, major_revision_id: major_revision_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_framework ::Google::Cloud::CloudSecurityCompliance::V1::UpdateFrameworkRequest.new(update_mask: update_mask, framework: framework, major_revision_id: major_revision_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_framework({ update_mask: update_mask, framework: framework, major_revision_id: major_revision_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_framework(::Google::Cloud::CloudSecurityCompliance::V1::UpdateFrameworkRequest.new(update_mask: update_mask, framework: framework, major_revision_id: major_revision_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_framework_client_stub.call_count + end + end + end + + def test_delete_framework + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_framework_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::ServiceStub.stub :transcode_delete_framework_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_framework_client_stub do + # Create client + client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_framework({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_framework name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_framework ::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_framework({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_framework(::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_framework_client_stub.call_count + end + end + end + + def test_list_cloud_controls + # Create test objects. + client_result = ::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_cloud_controls_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::ServiceStub.stub :transcode_list_cloud_controls_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_cloud_controls_client_stub do + # Create client + client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_cloud_controls({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_cloud_controls parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_cloud_controls ::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_cloud_controls({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_cloud_controls(::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_cloud_controls_client_stub.call_count + end + end + end + + def test_get_cloud_control + # Create test objects. + client_result = ::Google::Cloud::CloudSecurityCompliance::V1::CloudControl.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + major_revision_id = 42 + + get_cloud_control_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::ServiceStub.stub :transcode_get_cloud_control_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_cloud_control_client_stub do + # Create client + client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_cloud_control({ name: name, major_revision_id: major_revision_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_cloud_control name: name, major_revision_id: major_revision_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_cloud_control ::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlRequest.new(name: name, major_revision_id: major_revision_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_cloud_control({ name: name, major_revision_id: major_revision_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_cloud_control(::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlRequest.new(name: name, major_revision_id: major_revision_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_cloud_control_client_stub.call_count + end + end + end + + def test_create_cloud_control + # Create test objects. + client_result = ::Google::Cloud::CloudSecurityCompliance::V1::CloudControl.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + cloud_control_id = "hello world" + cloud_control = {} + + create_cloud_control_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::ServiceStub.stub :transcode_create_cloud_control_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_cloud_control_client_stub do + # Create client + client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_cloud_control({ parent: parent, cloud_control_id: cloud_control_id, cloud_control: cloud_control }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_cloud_control parent: parent, cloud_control_id: cloud_control_id, cloud_control: cloud_control do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_cloud_control ::Google::Cloud::CloudSecurityCompliance::V1::CreateCloudControlRequest.new(parent: parent, cloud_control_id: cloud_control_id, cloud_control: cloud_control) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_cloud_control({ parent: parent, cloud_control_id: cloud_control_id, cloud_control: cloud_control }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_cloud_control(::Google::Cloud::CloudSecurityCompliance::V1::CreateCloudControlRequest.new(parent: parent, cloud_control_id: cloud_control_id, cloud_control: cloud_control), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_cloud_control_client_stub.call_count + end + end + end + + def test_update_cloud_control + # Create test objects. + client_result = ::Google::Cloud::CloudSecurityCompliance::V1::CloudControl.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + update_mask = {} + cloud_control = {} + + update_cloud_control_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::ServiceStub.stub :transcode_update_cloud_control_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_cloud_control_client_stub do + # Create client + client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_cloud_control({ update_mask: update_mask, cloud_control: cloud_control }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_cloud_control update_mask: update_mask, cloud_control: cloud_control do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_cloud_control ::Google::Cloud::CloudSecurityCompliance::V1::UpdateCloudControlRequest.new(update_mask: update_mask, cloud_control: cloud_control) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_cloud_control({ update_mask: update_mask, cloud_control: cloud_control }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_cloud_control(::Google::Cloud::CloudSecurityCompliance::V1::UpdateCloudControlRequest.new(update_mask: update_mask, cloud_control: cloud_control), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_cloud_control_client_stub.call_count + end + end + end + + def test_delete_cloud_control + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_cloud_control_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::ServiceStub.stub :transcode_delete_cloud_control_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_cloud_control_client_stub do + # Create client + client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_cloud_control({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_cloud_control name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_cloud_control ::Google::Cloud::CloudSecurityCompliance::V1::DeleteCloudControlRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_cloud_control({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_cloud_control(::Google::Cloud::CloudSecurityCompliance::V1::DeleteCloudControlRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_cloud_control_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/config_test.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/config_test.rb new file mode 100644 index 000000000000..bab06fa29df5 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/config_test.rb @@ -0,0 +1,720 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/cloudsecuritycompliance/v1/config_pb" +require "google/cloud/cloud_security_compliance/v1/config" + +class ::Google::Cloud::CloudSecurityCompliance::V1::Config::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_frameworks + # Create GRPC objects. + grpc_response = ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworksResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_frameworks_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_frameworks, name + assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworksRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_frameworks_client_stub do + # Create client + client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_frameworks({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_frameworks parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_frameworks ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworksRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_frameworks({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_frameworks(::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworksRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_frameworks_client_stub.call_rpc_count + end + end + + def test_get_framework + # Create GRPC objects. + grpc_response = ::Google::Cloud::CloudSecurityCompliance::V1::Framework.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + major_revision_id = 42 + + get_framework_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_framework, name + assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkRequest, request + assert_equal "hello world", request["name"] + assert_equal 42, request["major_revision_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_framework_client_stub do + # Create client + client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_framework({ name: name, major_revision_id: major_revision_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_framework name: name, major_revision_id: major_revision_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_framework ::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkRequest.new(name: name, major_revision_id: major_revision_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_framework({ name: name, major_revision_id: major_revision_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_framework(::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkRequest.new(name: name, major_revision_id: major_revision_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_framework_client_stub.call_rpc_count + end + end + + def test_create_framework + # Create GRPC objects. + grpc_response = ::Google::Cloud::CloudSecurityCompliance::V1::Framework.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + framework_id = "hello world" + framework = {} + + create_framework_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_framework, name + assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["framework_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CloudSecurityCompliance::V1::Framework), request["framework"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_framework_client_stub do + # Create client + client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_framework({ parent: parent, framework_id: framework_id, framework: framework }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_framework parent: parent, framework_id: framework_id, framework: framework do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_framework ::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkRequest.new(parent: parent, framework_id: framework_id, framework: framework) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_framework({ parent: parent, framework_id: framework_id, framework: framework }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_framework(::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkRequest.new(parent: parent, framework_id: framework_id, framework: framework), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_framework_client_stub.call_rpc_count + end + end + + def test_update_framework + # Create GRPC objects. + grpc_response = ::Google::Cloud::CloudSecurityCompliance::V1::Framework.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + update_mask = {} + framework = {} + major_revision_id = 42 + + update_framework_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_framework, name + assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::UpdateFrameworkRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CloudSecurityCompliance::V1::Framework), request["framework"] + assert_equal 42, request["major_revision_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_framework_client_stub do + # Create client + client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_framework({ update_mask: update_mask, framework: framework, major_revision_id: major_revision_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_framework update_mask: update_mask, framework: framework, major_revision_id: major_revision_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_framework ::Google::Cloud::CloudSecurityCompliance::V1::UpdateFrameworkRequest.new(update_mask: update_mask, framework: framework, major_revision_id: major_revision_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_framework({ update_mask: update_mask, framework: framework, major_revision_id: major_revision_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_framework(::Google::Cloud::CloudSecurityCompliance::V1::UpdateFrameworkRequest.new(update_mask: update_mask, framework: framework, major_revision_id: major_revision_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_framework_client_stub.call_rpc_count + end + end + + def test_delete_framework + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_framework_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_framework, name + assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_framework_client_stub do + # Create client + client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_framework({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_framework name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_framework ::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_framework({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_framework(::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_framework_client_stub.call_rpc_count + end + end + + def test_list_cloud_controls + # Create GRPC objects. + grpc_response = ::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_cloud_controls_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_cloud_controls, name + assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_cloud_controls_client_stub do + # Create client + client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_cloud_controls({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_cloud_controls parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_cloud_controls ::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_cloud_controls({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_cloud_controls(::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_cloud_controls_client_stub.call_rpc_count + end + end + + def test_get_cloud_control + # Create GRPC objects. + grpc_response = ::Google::Cloud::CloudSecurityCompliance::V1::CloudControl.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + major_revision_id = 42 + + get_cloud_control_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_cloud_control, name + assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlRequest, request + assert_equal "hello world", request["name"] + assert_equal 42, request["major_revision_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_cloud_control_client_stub do + # Create client + client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_cloud_control({ name: name, major_revision_id: major_revision_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_cloud_control name: name, major_revision_id: major_revision_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_cloud_control ::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlRequest.new(name: name, major_revision_id: major_revision_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_cloud_control({ name: name, major_revision_id: major_revision_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_cloud_control(::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlRequest.new(name: name, major_revision_id: major_revision_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_cloud_control_client_stub.call_rpc_count + end + end + + def test_create_cloud_control + # Create GRPC objects. + grpc_response = ::Google::Cloud::CloudSecurityCompliance::V1::CloudControl.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + cloud_control_id = "hello world" + cloud_control = {} + + create_cloud_control_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_cloud_control, name + assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::CreateCloudControlRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["cloud_control_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CloudSecurityCompliance::V1::CloudControl), request["cloud_control"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_cloud_control_client_stub do + # Create client + client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_cloud_control({ parent: parent, cloud_control_id: cloud_control_id, cloud_control: cloud_control }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_cloud_control parent: parent, cloud_control_id: cloud_control_id, cloud_control: cloud_control do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_cloud_control ::Google::Cloud::CloudSecurityCompliance::V1::CreateCloudControlRequest.new(parent: parent, cloud_control_id: cloud_control_id, cloud_control: cloud_control) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_cloud_control({ parent: parent, cloud_control_id: cloud_control_id, cloud_control: cloud_control }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_cloud_control(::Google::Cloud::CloudSecurityCompliance::V1::CreateCloudControlRequest.new(parent: parent, cloud_control_id: cloud_control_id, cloud_control: cloud_control), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_cloud_control_client_stub.call_rpc_count + end + end + + def test_update_cloud_control + # Create GRPC objects. + grpc_response = ::Google::Cloud::CloudSecurityCompliance::V1::CloudControl.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + update_mask = {} + cloud_control = {} + + update_cloud_control_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_cloud_control, name + assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::UpdateCloudControlRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CloudSecurityCompliance::V1::CloudControl), request["cloud_control"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_cloud_control_client_stub do + # Create client + client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_cloud_control({ update_mask: update_mask, cloud_control: cloud_control }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_cloud_control update_mask: update_mask, cloud_control: cloud_control do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_cloud_control ::Google::Cloud::CloudSecurityCompliance::V1::UpdateCloudControlRequest.new(update_mask: update_mask, cloud_control: cloud_control) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_cloud_control({ update_mask: update_mask, cloud_control: cloud_control }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_cloud_control(::Google::Cloud::CloudSecurityCompliance::V1::UpdateCloudControlRequest.new(update_mask: update_mask, cloud_control: cloud_control), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_cloud_control_client_stub.call_rpc_count + end + end + + def test_delete_cloud_control + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_cloud_control_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_cloud_control, name + assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::DeleteCloudControlRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_cloud_control_client_stub do + # Create client + client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_cloud_control({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_cloud_control name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_cloud_control ::Google::Cloud::CloudSecurityCompliance::V1::DeleteCloudControlRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_cloud_control({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_cloud_control(::Google::Cloud::CloudSecurityCompliance::V1::DeleteCloudControlRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_cloud_control_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::Config::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::Config::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/deployment_operations_test.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/deployment_operations_test.rb new file mode 100644 index 000000000000..b4fc87e40767 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/deployment_operations_test.rb @@ -0,0 +1,400 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/cloudsecuritycompliance/v1/deployment_pb" +require "google/cloud/cloudsecuritycompliance/v1/deployment_services_pb" +require "google/cloud/cloud_security_compliance/v1/deployment" + +class ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Operations.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/deployment_paths_test.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/deployment_paths_test.rb new file mode 100644 index 000000000000..3b757bca5db8 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/deployment_paths_test.rb @@ -0,0 +1,112 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/cloud_security_compliance/v1/deployment" + +class ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_cloud_control_deployment_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.cloud_control_deployment_path organization: "value0", location: "value1", cloud_control_deployment: "value2" + assert_equal "organizations/value0/locations/value1/cloudControlDeployments/value2", path + + path = client.cloud_control_deployment_path project: "value0", location: "value1", cloud_control_deployment: "value2" + assert_equal "projects/value0/locations/value1/cloudControlDeployments/value2", path + end + end + + def test_framework_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.framework_path organization: "value0", location: "value1", framework: "value2" + assert_equal "organizations/value0/locations/value1/frameworks/value2", path + + path = client.framework_path project: "value0", location: "value1", framework: "value2" + assert_equal "projects/value0/locations/value1/frameworks/value2", path + end + end + + def test_framework_deployment_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.framework_deployment_path organization: "value0", location: "value1", framework_deployment: "value2" + assert_equal "organizations/value0/locations/value1/frameworkDeployments/value2", path + + path = client.framework_deployment_path project: "value0", location: "value1", framework_deployment: "value2" + assert_equal "projects/value0/locations/value1/frameworkDeployments/value2", path + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1", path + end + end + + def test_organization_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.organization_location_path organization: "value0", location: "value1" + assert_equal "organizations/value0/locations/value1", path + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/deployment_rest_test.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/deployment_rest_test.rb new file mode 100644 index 000000000000..81286c9d38bc --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/deployment_rest_test.rb @@ -0,0 +1,434 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/cloudsecuritycompliance/v1/deployment_pb" +require "google/cloud/cloud_security_compliance/v1/deployment/rest" + + +class ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_create_framework_deployment + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + framework_deployment_id = "hello world" + framework_deployment = {} + + create_framework_deployment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::ServiceStub.stub :transcode_create_framework_deployment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_framework_deployment_client_stub do + # Create client + client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_framework_deployment({ parent: parent, framework_deployment_id: framework_deployment_id, framework_deployment: framework_deployment }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_framework_deployment parent: parent, framework_deployment_id: framework_deployment_id, framework_deployment: framework_deployment do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_framework_deployment ::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkDeploymentRequest.new(parent: parent, framework_deployment_id: framework_deployment_id, framework_deployment: framework_deployment) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_framework_deployment({ parent: parent, framework_deployment_id: framework_deployment_id, framework_deployment: framework_deployment }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_framework_deployment(::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkDeploymentRequest.new(parent: parent, framework_deployment_id: framework_deployment_id, framework_deployment: framework_deployment), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_framework_deployment_client_stub.call_count + end + end + end + + def test_delete_framework_deployment + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_framework_deployment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::ServiceStub.stub :transcode_delete_framework_deployment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_framework_deployment_client_stub do + # Create client + client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_framework_deployment({ name: name, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_framework_deployment name: name, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_framework_deployment ::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkDeploymentRequest.new(name: name, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_framework_deployment({ name: name, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_framework_deployment(::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkDeploymentRequest.new(name: name, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_framework_deployment_client_stub.call_count + end + end + end + + def test_get_framework_deployment + # Create test objects. + client_result = ::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_framework_deployment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::ServiceStub.stub :transcode_get_framework_deployment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_framework_deployment_client_stub do + # Create client + client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_framework_deployment({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_framework_deployment name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_framework_deployment ::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkDeploymentRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_framework_deployment({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_framework_deployment(::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkDeploymentRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_framework_deployment_client_stub.call_count + end + end + end + + def test_list_framework_deployments + # Create test objects. + client_result = ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkDeploymentsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_framework_deployments_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::ServiceStub.stub :transcode_list_framework_deployments_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_framework_deployments_client_stub do + # Create client + client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_framework_deployments({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_framework_deployments parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_framework_deployments ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkDeploymentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_framework_deployments({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_framework_deployments(::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkDeploymentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_framework_deployments_client_stub.call_count + end + end + end + + def test_get_cloud_control_deployment + # Create test objects. + client_result = ::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_cloud_control_deployment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::ServiceStub.stub :transcode_get_cloud_control_deployment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_cloud_control_deployment_client_stub do + # Create client + client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_cloud_control_deployment({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_cloud_control_deployment name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_cloud_control_deployment ::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlDeploymentRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_cloud_control_deployment({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_cloud_control_deployment(::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlDeploymentRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_cloud_control_deployment_client_stub.call_count + end + end + end + + def test_list_cloud_control_deployments + # Create test objects. + client_result = ::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlDeploymentsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_cloud_control_deployments_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::ServiceStub.stub :transcode_list_cloud_control_deployments_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_cloud_control_deployments_client_stub do + # Create client + client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_cloud_control_deployments({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_cloud_control_deployments parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_cloud_control_deployments ::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlDeploymentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_cloud_control_deployments({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_cloud_control_deployments(::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlDeploymentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_cloud_control_deployments_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/deployment_test.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/deployment_test.rb new file mode 100644 index 000000000000..15563cc06745 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/deployment_test.rb @@ -0,0 +1,508 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/cloudsecuritycompliance/v1/deployment_pb" +require "google/cloud/cloud_security_compliance/v1/deployment" + +class ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_create_framework_deployment + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + framework_deployment_id = "hello world" + framework_deployment = {} + + create_framework_deployment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_framework_deployment, name + assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkDeploymentRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["framework_deployment_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment), request["framework_deployment"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_framework_deployment_client_stub do + # Create client + client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_framework_deployment({ parent: parent, framework_deployment_id: framework_deployment_id, framework_deployment: framework_deployment }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_framework_deployment parent: parent, framework_deployment_id: framework_deployment_id, framework_deployment: framework_deployment do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_framework_deployment ::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkDeploymentRequest.new(parent: parent, framework_deployment_id: framework_deployment_id, framework_deployment: framework_deployment) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_framework_deployment({ parent: parent, framework_deployment_id: framework_deployment_id, framework_deployment: framework_deployment }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_framework_deployment(::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkDeploymentRequest.new(parent: parent, framework_deployment_id: framework_deployment_id, framework_deployment: framework_deployment), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_framework_deployment_client_stub.call_rpc_count + end + end + + def test_delete_framework_deployment + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + etag = "hello world" + + delete_framework_deployment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_framework_deployment, name + assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkDeploymentRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_framework_deployment_client_stub do + # Create client + client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_framework_deployment({ name: name, etag: etag }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_framework_deployment name: name, etag: etag do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_framework_deployment ::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkDeploymentRequest.new(name: name, etag: etag) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_framework_deployment({ name: name, etag: etag }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_framework_deployment(::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkDeploymentRequest.new(name: name, etag: etag), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_framework_deployment_client_stub.call_rpc_count + end + end + + def test_get_framework_deployment + # Create GRPC objects. + grpc_response = ::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_framework_deployment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_framework_deployment, name + assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkDeploymentRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_framework_deployment_client_stub do + # Create client + client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_framework_deployment({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_framework_deployment name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_framework_deployment ::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkDeploymentRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_framework_deployment({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_framework_deployment(::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkDeploymentRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_framework_deployment_client_stub.call_rpc_count + end + end + + def test_list_framework_deployments + # Create GRPC objects. + grpc_response = ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkDeploymentsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_framework_deployments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_framework_deployments, name + assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkDeploymentsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_framework_deployments_client_stub do + # Create client + client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_framework_deployments({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_framework_deployments parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_framework_deployments ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkDeploymentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_framework_deployments({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_framework_deployments(::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkDeploymentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_framework_deployments_client_stub.call_rpc_count + end + end + + def test_get_cloud_control_deployment + # Create GRPC objects. + grpc_response = ::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_cloud_control_deployment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_cloud_control_deployment, name + assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlDeploymentRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_cloud_control_deployment_client_stub do + # Create client + client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_cloud_control_deployment({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_cloud_control_deployment name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_cloud_control_deployment ::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlDeploymentRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_cloud_control_deployment({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_cloud_control_deployment(::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlDeploymentRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_cloud_control_deployment_client_stub.call_rpc_count + end + end + + def test_list_cloud_control_deployments + # Create GRPC objects. + grpc_response = ::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlDeploymentsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_cloud_control_deployments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_cloud_control_deployments, name + assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlDeploymentsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_cloud_control_deployments_client_stub do + # Create client + client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_cloud_control_deployments({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_cloud_control_deployments parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_cloud_control_deployments ::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlDeploymentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_cloud_control_deployments({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_cloud_control_deployments(::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlDeploymentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_cloud_control_deployments_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client, client + assert_equal creds, client.configure.credentials + end + end + + def test_operations_client + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/monitoring_paths_test.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/monitoring_paths_test.rb new file mode 100644 index 000000000000..4e758f1ea511 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/monitoring_paths_test.rb @@ -0,0 +1,97 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/cloud_security_compliance/v1/monitoring" + +class ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_folder_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.folder_location_path folder: "value0", location: "value1" + assert_equal "folders/value0/locations/value1", path + end + end + + def test_framework_compliance_report_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.framework_compliance_report_path project: "value0", location: "value1", framework_compliance_report: "value2" + assert_equal "projects/value0/locations/value1/frameworkComplianceReports/value2", path + + path = client.framework_compliance_report_path folder: "value0", location: "value1", framework_compliance_report: "value2" + assert_equal "folders/value0/locations/value1/frameworkComplianceReports/value2", path + + path = client.framework_compliance_report_path organization: "value0", location: "value1", framework_compliance_report: "value2" + assert_equal "organizations/value0/locations/value1/frameworkComplianceReports/value2", path + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1", path + end + end + + def test_organization_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.organization_location_path organization: "value0", location: "value1" + assert_equal "organizations/value0/locations/value1", path + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/monitoring_rest_test.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/monitoring_rest_test.rb new file mode 100644 index 000000000000..08012d88bdda --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/monitoring_rest_test.rb @@ -0,0 +1,385 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/cloudsecuritycompliance/v1/monitoring_pb" +require "google/cloud/cloud_security_compliance/v1/monitoring/rest" + + +class ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_framework_compliance_summaries + # Create test objects. + client_result = ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkComplianceSummariesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + view = :FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_UNSPECIFIED + + list_framework_compliance_summaries_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Rest::ServiceStub.stub :transcode_list_framework_compliance_summaries_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_framework_compliance_summaries_client_stub do + # Create client + client = ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_framework_compliance_summaries({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_framework_compliance_summaries parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_framework_compliance_summaries ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkComplianceSummariesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_framework_compliance_summaries({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_framework_compliance_summaries(::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkComplianceSummariesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_framework_compliance_summaries_client_stub.call_count + end + end + end + + def test_list_finding_summaries + # Create test objects. + client_result = ::Google::Cloud::CloudSecurityCompliance::V1::ListFindingSummariesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + end_time = {} + + list_finding_summaries_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Rest::ServiceStub.stub :transcode_list_finding_summaries_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_finding_summaries_client_stub do + # Create client + client = ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_finding_summaries({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, end_time: end_time }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_finding_summaries parent: parent, page_size: page_size, page_token: page_token, filter: filter, end_time: end_time do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_finding_summaries ::Google::Cloud::CloudSecurityCompliance::V1::ListFindingSummariesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, end_time: end_time) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_finding_summaries({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, end_time: end_time }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_finding_summaries(::Google::Cloud::CloudSecurityCompliance::V1::ListFindingSummariesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, end_time: end_time), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_finding_summaries_client_stub.call_count + end + end + end + + def test_fetch_framework_compliance_report + # Create test objects. + client_result = ::Google::Cloud::CloudSecurityCompliance::V1::FrameworkComplianceReport.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + end_time = {} + filter = "hello world" + + fetch_framework_compliance_report_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Rest::ServiceStub.stub :transcode_fetch_framework_compliance_report_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, fetch_framework_compliance_report_client_stub do + # Create client + client = ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.fetch_framework_compliance_report({ name: name, end_time: end_time, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.fetch_framework_compliance_report name: name, end_time: end_time, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.fetch_framework_compliance_report ::Google::Cloud::CloudSecurityCompliance::V1::FetchFrameworkComplianceReportRequest.new(name: name, end_time: end_time, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.fetch_framework_compliance_report({ name: name, end_time: end_time, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.fetch_framework_compliance_report(::Google::Cloud::CloudSecurityCompliance::V1::FetchFrameworkComplianceReportRequest.new(name: name, end_time: end_time, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, fetch_framework_compliance_report_client_stub.call_count + end + end + end + + def test_list_control_compliance_summaries + # Create test objects. + client_result = ::Google::Cloud::CloudSecurityCompliance::V1::ListControlComplianceSummariesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + end_time = {} + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_control_compliance_summaries_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Rest::ServiceStub.stub :transcode_list_control_compliance_summaries_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_control_compliance_summaries_client_stub do + # Create client + client = ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_control_compliance_summaries({ parent: parent, end_time: end_time, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_control_compliance_summaries parent: parent, end_time: end_time, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_control_compliance_summaries ::Google::Cloud::CloudSecurityCompliance::V1::ListControlComplianceSummariesRequest.new(parent: parent, end_time: end_time, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_control_compliance_summaries({ parent: parent, end_time: end_time, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_control_compliance_summaries(::Google::Cloud::CloudSecurityCompliance::V1::ListControlComplianceSummariesRequest.new(parent: parent, end_time: end_time, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_control_compliance_summaries_client_stub.call_count + end + end + end + + def test_aggregate_framework_compliance_report + # Create test objects. + client_result = ::Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + interval = {} + filter = "hello world" + + aggregate_framework_compliance_report_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Rest::ServiceStub.stub :transcode_aggregate_framework_compliance_report_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, aggregate_framework_compliance_report_client_stub do + # Create client + client = ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.aggregate_framework_compliance_report({ name: name, interval: interval, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.aggregate_framework_compliance_report name: name, interval: interval, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.aggregate_framework_compliance_report ::Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportRequest.new(name: name, interval: interval, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.aggregate_framework_compliance_report({ name: name, interval: interval, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.aggregate_framework_compliance_report(::Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportRequest.new(name: name, interval: interval, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, aggregate_framework_compliance_report_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/monitoring_test.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/monitoring_test.rb new file mode 100644 index 000000000000..c258129ce4b3 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/monitoring_test.rb @@ -0,0 +1,441 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/cloudsecuritycompliance/v1/monitoring_pb" +require "google/cloud/cloud_security_compliance/v1/monitoring" + +class ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_framework_compliance_summaries + # Create GRPC objects. + grpc_response = ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkComplianceSummariesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + view = :FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_UNSPECIFIED + + list_framework_compliance_summaries_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_framework_compliance_summaries, name + assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkComplianceSummariesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal :FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_framework_compliance_summaries_client_stub do + # Create client + client = ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_framework_compliance_summaries({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_framework_compliance_summaries parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_framework_compliance_summaries ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkComplianceSummariesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_framework_compliance_summaries({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_framework_compliance_summaries(::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkComplianceSummariesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_framework_compliance_summaries_client_stub.call_rpc_count + end + end + + def test_list_finding_summaries + # Create GRPC objects. + grpc_response = ::Google::Cloud::CloudSecurityCompliance::V1::ListFindingSummariesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + end_time = {} + + list_finding_summaries_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_finding_summaries, name + assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::ListFindingSummariesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["end_time"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_finding_summaries_client_stub do + # Create client + client = ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_finding_summaries({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, end_time: end_time }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_finding_summaries parent: parent, page_size: page_size, page_token: page_token, filter: filter, end_time: end_time do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_finding_summaries ::Google::Cloud::CloudSecurityCompliance::V1::ListFindingSummariesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, end_time: end_time) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_finding_summaries({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, end_time: end_time }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_finding_summaries(::Google::Cloud::CloudSecurityCompliance::V1::ListFindingSummariesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, end_time: end_time), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_finding_summaries_client_stub.call_rpc_count + end + end + + def test_fetch_framework_compliance_report + # Create GRPC objects. + grpc_response = ::Google::Cloud::CloudSecurityCompliance::V1::FrameworkComplianceReport.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + end_time = {} + filter = "hello world" + + fetch_framework_compliance_report_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :fetch_framework_compliance_report, name + assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::FetchFrameworkComplianceReportRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["end_time"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, fetch_framework_compliance_report_client_stub do + # Create client + client = ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.fetch_framework_compliance_report({ name: name, end_time: end_time, filter: filter }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.fetch_framework_compliance_report name: name, end_time: end_time, filter: filter do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.fetch_framework_compliance_report ::Google::Cloud::CloudSecurityCompliance::V1::FetchFrameworkComplianceReportRequest.new(name: name, end_time: end_time, filter: filter) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.fetch_framework_compliance_report({ name: name, end_time: end_time, filter: filter }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.fetch_framework_compliance_report(::Google::Cloud::CloudSecurityCompliance::V1::FetchFrameworkComplianceReportRequest.new(name: name, end_time: end_time, filter: filter), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, fetch_framework_compliance_report_client_stub.call_rpc_count + end + end + + def test_list_control_compliance_summaries + # Create GRPC objects. + grpc_response = ::Google::Cloud::CloudSecurityCompliance::V1::ListControlComplianceSummariesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + end_time = {} + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_control_compliance_summaries_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_control_compliance_summaries, name + assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::ListControlComplianceSummariesRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["end_time"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_control_compliance_summaries_client_stub do + # Create client + client = ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_control_compliance_summaries({ parent: parent, end_time: end_time, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_control_compliance_summaries parent: parent, end_time: end_time, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_control_compliance_summaries ::Google::Cloud::CloudSecurityCompliance::V1::ListControlComplianceSummariesRequest.new(parent: parent, end_time: end_time, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_control_compliance_summaries({ parent: parent, end_time: end_time, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_control_compliance_summaries(::Google::Cloud::CloudSecurityCompliance::V1::ListControlComplianceSummariesRequest.new(parent: parent, end_time: end_time, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_control_compliance_summaries_client_stub.call_rpc_count + end + end + + def test_aggregate_framework_compliance_report + # Create GRPC objects. + grpc_response = ::Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + interval = {} + filter = "hello world" + + aggregate_framework_compliance_report_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :aggregate_framework_compliance_report, name + assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Type::Interval), request["interval"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, aggregate_framework_compliance_report_client_stub do + # Create client + client = ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.aggregate_framework_compliance_report({ name: name, interval: interval, filter: filter }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.aggregate_framework_compliance_report name: name, interval: interval, filter: filter do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.aggregate_framework_compliance_report ::Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportRequest.new(name: name, interval: interval, filter: filter) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.aggregate_framework_compliance_report({ name: name, interval: interval, filter: filter }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.aggregate_framework_compliance_report(::Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportRequest.new(name: name, interval: interval, filter: filter), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, aggregate_framework_compliance_report_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/helper.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" From 1807ae578f1a27801f426e7bfecb35385ac311c4 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Wed, 22 Apr 2026 09:06:34 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .../v1/audit/rest/operations.rb | 29 + .../v1/bindings_override.rb | 16 + .../v1/config/client.rb | 55 +- .../v1/config/paths.rb | 97 +- .../v1/config/rest/client.rb | 55 +- .../v1/config/rest/service_stub.rb | 74 + .../v1/deployment/client.rb | 25 +- .../v1/deployment/paths.rb | 140 +- .../v1/deployment/rest/client.rb | 25 +- .../v1/deployment/rest/operations.rb | 29 + .../v1/deployment/rest/service_stub.rb | 43 + .../v1/monitoring/client.rb | 8 +- .../v1/monitoring/rest/client.rb | 8 +- .../cloudsecuritycompliance/v1/common_pb.rb | 4 +- .../cloudsecuritycompliance/v1/config_pb.rb | 2 +- .../v1/deployment_pb.rb | 2 +- .../v1/monitoring_pb.rb | 5 +- .../proto_docs/google/api/client.rb | 4 + .../cloudsecuritycompliance/v1/common.rb | 167 +- .../cloudsecuritycompliance/v1/config.rb | 55 +- .../cloudsecuritycompliance/v1/deployment.rb | 46 +- .../cloudsecuritycompliance/v1/monitoring.rb | 42 + .../v1/config_paths_test.rb | 18 + .../v1/deployment_paths_test.rb | 33 + .../v1/monitoring_rest_test.rb | 22 +- .../v1/monitoring_test.rb | 24 +- .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 -- .../CHANGELOG.md | 2 - .../Gemfile | 14 - .../LICENSE.md | 201 --- .../README.md | 154 -- .../Rakefile | 169 -- .../gapic_metadata.json | 189 -- ...cloud-cloud_security_compliance-v1.gemspec | 29 - ...ogle-cloud-cloud_security_compliance-v1.rb | 21 - .../cloud/cloud_security_compliance/v1.rb | 49 - .../cloud_security_compliance/v1/audit.rb | 56 - .../v1/audit/client.rb | 859 ---------- .../v1/audit/credentials.rb | 47 - .../v1/audit/operations.rb | 841 --------- .../v1/audit/paths.rb | 110 -- .../v1/audit/rest.rb | 54 - .../v1/audit/rest/client.rb | 796 --------- .../v1/audit/rest/operations.rb | 954 ----------- .../v1/audit/rest/service_stub.rb | 387 ----- .../v1/bindings_override.rb | 91 - .../v1/cm_enrollment_service.rb | 56 - .../v1/cm_enrollment_service/client.rb | 608 ------- .../v1/cm_enrollment_service/credentials.rb | 47 - .../v1/cm_enrollment_service/paths.rb | 72 - .../v1/cm_enrollment_service/rest.rb | 54 - .../v1/cm_enrollment_service/rest/client.rb | 559 ------ .../rest/service_stub.rb | 234 --- .../cloud_security_compliance/v1/config.rb | 56 - .../v1/config/client.rb | 1521 ----------------- .../v1/config/credentials.rb | 47 - .../v1/config/paths.rb | 153 -- .../v1/config/rest.rb | 54 - .../v1/config/rest/client.rb | 1416 --------------- .../v1/config/rest/service_stub.rb | 769 --------- .../v1/deployment.rb | 57 - .../v1/deployment/client.rb | 1097 ------------ .../v1/deployment/credentials.rb | 47 - .../v1/deployment/operations.rb | 841 --------- .../v1/deployment/paths.rb | 196 --- .../v1/deployment/rest.rb | 55 - .../v1/deployment/rest/client.rb | 1020 ----------- .../v1/deployment/rest/operations.rb | 954 ----------- .../v1/deployment/rest/service_stub.rb | 491 ------ .../v1/monitoring.rb | 55 - .../v1/monitoring/client.rb | 944 ---------- .../v1/monitoring/credentials.rb | 47 - .../v1/monitoring/paths.rb | 142 -- .../v1/monitoring/rest.rb | 53 - .../v1/monitoring/rest/client.rb | 874 ---------- .../v1/monitoring/rest/service_stub.rb | 456 ----- .../cloud_security_compliance/v1/rest.rb | 42 - .../cloud_security_compliance/v1/version.rb | 28 - .../cloudsecuritycompliance/v1/audit_pb.rb | 47 - .../v1/audit_services_pb.rb | 51 - .../v1/cm_enrollment_service_pb.rb | 32 - .../v1/cm_enrollment_service_services_pb.rb | 54 - .../cloudsecuritycompliance/v1/common_pb.rb | 56 - .../cloudsecuritycompliance/v1/config_pb.rb | 40 - .../v1/config_services_pb.rb | 120 -- .../v1/deployment_pb.rb | 47 - .../v1/deployment_services_pb.rb | 59 - .../v1/monitoring_pb.rb | 53 - .../v1/monitoring_services_pb.rb | 53 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 ------- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 --- .../cloud/cloudsecuritycompliance/v1/audit.rb | 413 ----- .../v1/cm_enrollment_service.rb | 108 -- .../cloudsecuritycompliance/v1/common.rb | 808 --------- .../cloudsecuritycompliance/v1/config.rb | 258 --- .../cloudsecuritycompliance/v1/deployment.rb | 492 ------ .../cloudsecuritycompliance/v1/monitoring.rb | 569 ------ .../google/longrunning/operations.rb | 191 --- .../proto_docs/google/protobuf/any.rb | 145 -- .../proto_docs/google/protobuf/duration.rb | 98 -- .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 --- .../proto_docs/google/protobuf/timestamp.rb | 127 -- .../proto_docs/google/rpc/status.rb | 48 - .../proto_docs/google/type/interval.rb | 45 - .../snippets/Gemfile | 32 - .../snippets/audit/create_framework_audit.rb | 54 - .../generate_framework_audit_scope_report.rb | 47 - .../snippets/audit/get_framework_audit.rb | 47 - .../snippets/audit/list_framework_audits.rb | 51 - .../calculate_effective_cm_enrollment.rb | 47 - .../update_cm_enrollment.rb | 47 - .../snippets/config/create_cloud_control.rb | 47 - .../snippets/config/create_framework.rb | 47 - .../snippets/config/delete_cloud_control.rb | 47 - .../snippets/config/delete_framework.rb | 47 - .../snippets/config/get_cloud_control.rb | 47 - .../snippets/config/get_framework.rb | 47 - .../snippets/config/list_cloud_controls.rb | 51 - .../snippets/config/list_frameworks.rb | 51 - .../snippets/config/update_cloud_control.rb | 47 - .../snippets/config/update_framework.rb | 47 - .../deployment/create_framework_deployment.rb | 54 - .../deployment/delete_framework_deployment.rb | 54 - .../get_cloud_control_deployment.rb | 47 - .../deployment/get_framework_deployment.rb | 47 - .../list_cloud_control_deployments.rb | 51 - .../deployment/list_framework_deployments.rb | 51 - .../aggregate_framework_compliance_report.rb | 47 - .../fetch_framework_compliance_report.rb | 47 - .../list_control_compliance_summaries.rb | 51 - .../monitoring/list_finding_summaries.rb | 51 - .../list_framework_compliance_summaries.rb | 51 - ...ogle.cloud.cloudsecuritycompliance.v1.json | 1095 ------------ .../v1/audit_operations_test.rb | 400 ----- .../v1/audit_paths_test.rb | 82 - .../v1/audit_rest_test.rb | 322 ---- .../v1/audit_test.rb | 374 ---- .../v1/cm_enrollment_service_paths_test.rb | 58 - .../v1/cm_enrollment_service_rest_test.rb | 208 --- .../v1/cm_enrollment_service_test.rb | 222 --- .../v1/config_paths_test.rb | 97 -- .../v1/config_rest_test.rb | 652 ------- .../v1/config_test.rb | 720 -------- .../v1/deployment_operations_test.rb | 400 ----- .../v1/deployment_paths_test.rb | 112 -- .../v1/deployment_rest_test.rb | 434 ----- .../v1/deployment_test.rb | 508 ------ .../v1/monitoring_paths_test.rb | 97 -- .../v1/monitoring_rest_test.rb | 385 ----- .../v1/monitoring_test.rb | 441 ----- .../test/helper.rb | 26 - 160 files changed, 881 insertions(+), 31593 deletions(-) delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/google-cloud-cloud_security_compliance-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google-cloud-cloud_security_compliance-v1.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/client.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/operations.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/paths.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/rest.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/bindings_override.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/cm_enrollment_service.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/cm_enrollment_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/cm_enrollment_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/cm_enrollment_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/cm_enrollment_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/cm_enrollment_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/cm_enrollment_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config/client.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config/paths.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config/rest.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/client.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/operations.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/paths.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/rest.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/monitoring.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/monitoring/client.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/monitoring/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/monitoring/paths.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/monitoring/rest.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/monitoring/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/monitoring/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/audit_pb.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/audit_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/cm_enrollment_service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/cm_enrollment_service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/common_pb.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/config_pb.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/config_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/deployment_pb.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/deployment_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/monitoring_pb.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/monitoring_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/cloud/cloudsecuritycompliance/v1/audit.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/cloud/cloudsecuritycompliance/v1/cm_enrollment_service.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/cloud/cloudsecuritycompliance/v1/common.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/cloud/cloudsecuritycompliance/v1/config.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/cloud/cloudsecuritycompliance/v1/deployment.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/cloud/cloudsecuritycompliance/v1/monitoring.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/type/interval.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/audit/create_framework_audit.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/audit/generate_framework_audit_scope_report.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/audit/get_framework_audit.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/audit/list_framework_audits.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/cm_enrollment_service/calculate_effective_cm_enrollment.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/cm_enrollment_service/update_cm_enrollment.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/create_cloud_control.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/create_framework.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/delete_cloud_control.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/delete_framework.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/get_cloud_control.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/get_framework.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/list_cloud_controls.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/list_frameworks.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/update_cloud_control.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/update_framework.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/deployment/create_framework_deployment.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/deployment/delete_framework_deployment.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/deployment/get_cloud_control_deployment.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/deployment/get_framework_deployment.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/deployment/list_cloud_control_deployments.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/deployment/list_framework_deployments.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/monitoring/aggregate_framework_compliance_report.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/monitoring/fetch_framework_compliance_report.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/monitoring/list_control_compliance_summaries.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/monitoring/list_finding_summaries.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/monitoring/list_framework_compliance_summaries.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/snippet_metadata_google.cloud.cloudsecuritycompliance.v1.json delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/audit_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/audit_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/audit_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/audit_test.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/cm_enrollment_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/cm_enrollment_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/cm_enrollment_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/config_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/config_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/config_test.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/deployment_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/deployment_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/deployment_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/deployment_test.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/monitoring_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/monitoring_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/monitoring_test.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/helper.rb diff --git a/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/rest/operations.rb b/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/rest/operations.rb index c3c301e1e19c..ebe48b06364c 100644 --- a/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/rest/operations.rb +++ b/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/rest/operations.rb @@ -850,6 +850,13 @@ def self.transcode_list_operations_request request_pb ["name", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] ] ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) transcoder.transcode request_pb end @@ -871,6 +878,13 @@ def self.transcode_get_operation_request request_pb ["name", %r{^organizations/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] ] ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) transcoder.transcode request_pb end @@ -892,6 +906,13 @@ def self.transcode_delete_operation_request request_pb ["name", %r{^organizations/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] ] ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) transcoder.transcode request_pb end @@ -914,6 +935,14 @@ def self.transcode_cancel_operation_request request_pb ["name", %r{^organizations/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] ] ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) transcoder.transcode request_pb end end diff --git a/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/bindings_override.rb b/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/bindings_override.rb index bbb9a2a22e25..251163c727e1 100644 --- a/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/bindings_override.rb +++ b/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/bindings_override.rb @@ -51,6 +51,14 @@ def self.configure ["name", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] ], body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ], + body: nil ) ] default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [ @@ -62,6 +70,14 @@ def self.configure ["name", %r{^organizations/[^/]+/?$}, false] ], body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{name}/locations", + matches: [ + ["name", %r{^projects/[^/]+/?$}, false] + ], + body: nil ) ] default_config diff --git a/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config/client.rb b/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config/client.rb index 59be159712fb..d4a04a57cfc9 100644 --- a/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config/client.rb +++ b/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config/client.rb @@ -254,8 +254,10 @@ def logger # the default parameter values, pass an empty Hash as a request object (see above). # # @param parent [::String] - # Required. The parent resource name, in the format - # `organizations/{organization}/locations/{location}`. + # Required. The parent resource name, in one of the following formats: + # - `organizations/{organization}/locations/{location}` + # - `projects/{project}/locations/{location}`. + # # The only supported location is `global`. # @param page_size [::Integer] # Optional. The maximum number of frameworks to return. The default value is @@ -360,8 +362,12 @@ def list_frameworks request, options = nil # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] - # Required. The name of the framework to retrieve, in the format - # `organizations/{organization}/locations/{location}/frameworks/{framework_id}` + # Required. The name of the framework to retrieve, in one of the following + # formats: + # `organizations/{organization}/locations/{location}/frameworks/{framework}` + # or + # `projects/{project}/locations/{location}/frameworks/{framework}`. + # # The only supported location is `global`. # @param major_revision_id [::Integer] # Optional. The framework major version to retrieve. If not specified, the @@ -452,8 +458,10 @@ def get_framework request, options = nil # the default parameter values, pass an empty Hash as a request object (see above). # # @param parent [::String] - # Required. The parent resource name, in the format - # `organizations/{organization}/locations/{location}`. + # Required. The parent resource name, in one of the following formats: + # - `organizations/{organization}/locations/{location}` + # - `projects/{project}/locations/{location}`. + # # The only supported location is `global`. # @param framework_id [::String] # Required. The identifier (ID) of the framework. The ID is not the full name @@ -654,8 +662,11 @@ def update_framework request, options = nil # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] - # Required. The name of the resource, in the format - # `organizations/{organization}/locations/{location}/frameworks/{framework}`. + # Required. The name of the resource, in one of the following formats: + # `organizations/{organization}/locations/{location}/frameworks/{framework}` + # or + # `projects/{project}/locations/{location}/frameworks/{framework}`. + # # The only supported location is `global`. # # @yield [response, operation] Access the result along with the RPC operation @@ -744,8 +755,10 @@ def delete_framework request, options = nil # the default parameter values, pass an empty Hash as a request object (see above). # # @param parent [::String] - # Required. The parent resource name, in the format - # `organizations/{organization}/locations/{location}`. + # Required. The parent resource name, in one of the following formats: + # - `organizations/{organization}/locations/{location}` + # - `projects/{project}/locations/{location}`. + # # The only supported location is `global`. # @param page_size [::Integer] # Optional. The maximum number of cloud controls to return. The default value @@ -857,8 +870,12 @@ def list_cloud_controls request, options = nil # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] - # Required. The name of the cloud control to retrieve, in the format - # `organizations/{organization}/locations/{location}/cloudControls/{cloud_control}`. + # Required. The name of the cloud control to retrieve, in one of the + # following formats: + # `organizations/{organization}/locations/{location}/cloudControls/{cloud_control}` + # or + # `projects/{project}/locations/{location}/cloudControls/{cloud_control}`. + # # The only supported location is `global`. # @param major_revision_id [::Integer] # Optional. The major version of the cloud control to retrieve. If not @@ -950,8 +967,10 @@ def get_cloud_control request, options = nil # the default parameter values, pass an empty Hash as a request object (see above). # # @param parent [::String] - # Required. The parent resource name, in the format - # `organizations/{organization}/locations/{location}`. + # Required. The parent resource name, in one of the following formats: + # - `organizations/{organization}/locations/{location}`. + # - `projects/{project}/locations/{location}`. + # # The only supported location is `global`. # @param cloud_control_id [::String] # Required. The identifier for the cloud control, which is the last segment @@ -1161,8 +1180,12 @@ def update_cloud_control request, options = nil # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] - # Required. The name of the cloud control to delete, in the format - # `organizations/{organization}/locations/{location}/CloudControls/{CloudControl}`. + # Required. The name of the cloud control to delete, in one of the following + # formats: + # `organizations/{organization}/locations/{location}/CloudControls/{CloudControl}` + # or + # `projects/{project}/locations/{location}/CloudControls/{CloudControl}`. + # # The only supported location is `global`. # # @yield [response, operation] Access the result along with the RPC operation diff --git a/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config/paths.rb b/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config/paths.rb index 25e21ce39ab2..f11db2e1c473 100644 --- a/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config/paths.rb +++ b/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config/paths.rb @@ -27,39 +27,104 @@ module Paths ## # Create a fully-qualified CloudControl resource string. # - # The resource will be in the following format: + # @overload cloud_control_path(organization:, location:, cloud_control:) + # The resource will be in the following format: # - # `organizations/{organization}/locations/{location}/cloudControls/{cloud_control}` + # `organizations/{organization}/locations/{location}/cloudControls/{cloud_control}` # - # @param organization [String] - # @param location [String] - # @param cloud_control [String] + # @param organization [String] + # @param location [String] + # @param cloud_control [String] + # + # @overload cloud_control_path(project:, location:, cloud_control:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/cloudControls/{cloud_control}` + # + # @param project [String] + # @param location [String] + # @param cloud_control [String] # # @return [::String] - def cloud_control_path organization:, location:, cloud_control: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + def cloud_control_path **args + resources = { + "cloud_control:location:organization" => (proc do |organization:, location:, cloud_control:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - "organizations/#{organization}/locations/#{location}/cloudControls/#{cloud_control}" + "organizations/#{organization}/locations/#{location}/cloudControls/#{cloud_control}" + end), + "cloud_control:location:project" => (proc do |project:, location:, cloud_control:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/cloudControls/#{cloud_control}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) end ## # Create a fully-qualified Framework resource string. # + # @overload framework_path(organization:, location:, framework:) + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/frameworks/{framework}` + # + # @param organization [String] + # @param location [String] + # @param framework [String] + # + # @overload framework_path(project:, location:, framework:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/frameworks/{framework}` + # + # @param project [String] + # @param location [String] + # @param framework [String] + # + # @return [::String] + def framework_path **args + resources = { + "framework:location:organization" => (proc do |organization:, location:, framework:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/frameworks/#{framework}" + end), + "framework:location:project" => (proc do |project:, location:, framework:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/frameworks/#{framework}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified Location resource string. + # # The resource will be in the following format: # - # `organizations/{organization}/locations/{location}/frameworks/{framework}` + # `projects/{project}/locations/{location}` # - # @param organization [String] + # @param project [String] # @param location [String] - # @param framework [String] # # @return [::String] - def framework_path organization:, location:, framework: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - "organizations/#{organization}/locations/#{location}/frameworks/#{framework}" + "projects/#{project}/locations/#{location}" end ## diff --git a/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config/rest/client.rb b/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config/rest/client.rb index 15f63919f80b..fa715ce333f7 100644 --- a/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config/rest/client.rb +++ b/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config/rest/client.rb @@ -248,8 +248,10 @@ def logger # the default parameter values, pass an empty Hash as a request object (see above). # # @param parent [::String] - # Required. The parent resource name, in the format - # `organizations/{organization}/locations/{location}`. + # Required. The parent resource name, in one of the following formats: + # - `organizations/{organization}/locations/{location}` + # - `projects/{project}/locations/{location}`. + # # The only supported location is `global`. # @param page_size [::Integer] # Optional. The maximum number of frameworks to return. The default value is @@ -347,8 +349,12 @@ def list_frameworks request, options = nil # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] - # Required. The name of the framework to retrieve, in the format - # `organizations/{organization}/locations/{location}/frameworks/{framework_id}` + # Required. The name of the framework to retrieve, in one of the following + # formats: + # `organizations/{organization}/locations/{location}/frameworks/{framework}` + # or + # `projects/{project}/locations/{location}/frameworks/{framework}`. + # # The only supported location is `global`. # @param major_revision_id [::Integer] # Optional. The framework major version to retrieve. If not specified, the @@ -432,8 +438,10 @@ def get_framework request, options = nil # the default parameter values, pass an empty Hash as a request object (see above). # # @param parent [::String] - # Required. The parent resource name, in the format - # `organizations/{organization}/locations/{location}`. + # Required. The parent resource name, in one of the following formats: + # - `organizations/{organization}/locations/{location}` + # - `projects/{project}/locations/{location}`. + # # The only supported location is `global`. # @param framework_id [::String] # Required. The identifier (ID) of the framework. The ID is not the full name @@ -620,8 +628,11 @@ def update_framework request, options = nil # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] - # Required. The name of the resource, in the format - # `organizations/{organization}/locations/{location}/frameworks/{framework}`. + # Required. The name of the resource, in one of the following formats: + # `organizations/{organization}/locations/{location}/frameworks/{framework}` + # or + # `projects/{project}/locations/{location}/frameworks/{framework}`. + # # The only supported location is `global`. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Protobuf::Empty] @@ -703,8 +714,10 @@ def delete_framework request, options = nil # the default parameter values, pass an empty Hash as a request object (see above). # # @param parent [::String] - # Required. The parent resource name, in the format - # `organizations/{organization}/locations/{location}`. + # Required. The parent resource name, in one of the following formats: + # - `organizations/{organization}/locations/{location}` + # - `projects/{project}/locations/{location}`. + # # The only supported location is `global`. # @param page_size [::Integer] # Optional. The maximum number of cloud controls to return. The default value @@ -809,8 +822,12 @@ def list_cloud_controls request, options = nil # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] - # Required. The name of the cloud control to retrieve, in the format - # `organizations/{organization}/locations/{location}/cloudControls/{cloud_control}`. + # Required. The name of the cloud control to retrieve, in one of the + # following formats: + # `organizations/{organization}/locations/{location}/cloudControls/{cloud_control}` + # or + # `projects/{project}/locations/{location}/cloudControls/{cloud_control}`. + # # The only supported location is `global`. # @param major_revision_id [::Integer] # Optional. The major version of the cloud control to retrieve. If not @@ -895,8 +912,10 @@ def get_cloud_control request, options = nil # the default parameter values, pass an empty Hash as a request object (see above). # # @param parent [::String] - # Required. The parent resource name, in the format - # `organizations/{organization}/locations/{location}`. + # Required. The parent resource name, in one of the following formats: + # - `organizations/{organization}/locations/{location}`. + # - `projects/{project}/locations/{location}`. + # # The only supported location is `global`. # @param cloud_control_id [::String] # Required. The identifier for the cloud control, which is the last segment @@ -1092,8 +1111,12 @@ def update_cloud_control request, options = nil # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] - # Required. The name of the cloud control to delete, in the format - # `organizations/{organization}/locations/{location}/CloudControls/{CloudControl}`. + # Required. The name of the cloud control to delete, in one of the following + # formats: + # `organizations/{organization}/locations/{location}/CloudControls/{CloudControl}` + # or + # `projects/{project}/locations/{location}/CloudControls/{CloudControl}`. + # # The only supported location is `global`. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Protobuf::Empty] diff --git a/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config/rest/service_stub.rb b/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config/rest/service_stub.rb index bc811913a334..3e1b140821f0 100644 --- a/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config/rest/service_stub.rb +++ b/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config/rest/service_stub.rb @@ -491,6 +491,13 @@ def self.transcode_list_frameworks_request request_pb ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] ] ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/frameworks", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) transcoder.transcode request_pb end @@ -512,6 +519,13 @@ def self.transcode_get_framework_request request_pb ["name", %r{^organizations/[^/]+/locations/[^/]+/frameworks/[^/]+/?$}, false] ] ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/frameworks/[^/]+/?$}, false] + ] + ) transcoder.transcode request_pb end @@ -534,6 +548,14 @@ def self.transcode_create_framework_request request_pb ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] ] ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/frameworks", + body: "framework", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) transcoder.transcode request_pb end @@ -556,6 +578,14 @@ def self.transcode_update_framework_request request_pb ["framework.name", %r{^organizations/[^/]+/locations/[^/]+/frameworks/[^/]+/?$}, false] ] ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{framework.name}", + body: "framework", + matches: [ + ["framework.name", %r{^projects/[^/]+/locations/[^/]+/frameworks/[^/]+/?$}, false] + ] + ) transcoder.transcode request_pb end @@ -577,6 +607,13 @@ def self.transcode_delete_framework_request request_pb ["name", %r{^organizations/[^/]+/locations/[^/]+/frameworks/[^/]+/?$}, false] ] ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/frameworks/[^/]+/?$}, false] + ] + ) transcoder.transcode request_pb end @@ -598,6 +635,13 @@ def self.transcode_list_cloud_controls_request request_pb ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] ] ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/cloudControls", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) transcoder.transcode request_pb end @@ -619,6 +663,13 @@ def self.transcode_get_cloud_control_request request_pb ["name", %r{^organizations/[^/]+/locations/[^/]+/cloudControls/[^/]+/?$}, false] ] ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/cloudControls/[^/]+/?$}, false] + ] + ) transcoder.transcode request_pb end @@ -641,6 +692,14 @@ def self.transcode_create_cloud_control_request request_pb ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] ] ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/cloudControls", + body: "cloud_control", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) transcoder.transcode request_pb end @@ -663,6 +722,14 @@ def self.transcode_update_cloud_control_request request_pb ["cloud_control.name", %r{^organizations/[^/]+/locations/[^/]+/cloudControls/[^/]+/?$}, false] ] ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{cloud_control.name}", + body: "cloud_control", + matches: [ + ["cloud_control.name", %r{^projects/[^/]+/locations/[^/]+/cloudControls/[^/]+/?$}, false] + ] + ) transcoder.transcode request_pb end @@ -684,6 +751,13 @@ def self.transcode_delete_cloud_control_request request_pb ["name", %r{^organizations/[^/]+/locations/[^/]+/cloudControls/[^/]+/?$}, false] ] ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/cloudControls/[^/]+/?$}, false] + ] + ) transcoder.transcode request_pb end end diff --git a/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/client.rb b/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/client.rb index 9f5fa51f2b50..7a0c4613006a 100644 --- a/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/client.rb +++ b/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/client.rb @@ -261,7 +261,9 @@ def logger # # @param parent [::String] # Required. The parent resource of the framework deployment in the format - # `organizations/{organization}/locations/{location}`. + # `organizations/{organization}/locations/{location}` + # or + # `projects/{project}/locations/{location}`. # Only the global location is supported. # @param framework_deployment_id [::String] # Optional. An identifier for the framework deployment that's unique in scope @@ -364,7 +366,9 @@ def create_framework_deployment request, options = nil # @param name [::String] # Required. The name of the framework deployment that you want to delete, # in the format - # `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment_id}`. + # `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}` + # or + # `projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}`. # The only supported location is `global`. # @param etag [::String] # Optional. An opaque identifier for the current version of the resource. @@ -469,7 +473,9 @@ def delete_framework_deployment request, options = nil # # @param name [::String] # Required. The name of the framework deployment, in the format - # `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment_id}`. + # `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}` + # or + # `projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}`. # The only supported location is `global`. # # @yield [response, operation] Access the result along with the RPC operation @@ -556,7 +562,9 @@ def get_framework_deployment request, options = nil # # @param parent [::String] # Required. The parent resource of the framework deployment, in the format - # `organizations/{organization}/locations/{location}`. + # `organizations/{organization}/locations/{location}` + # or + # `projects/{project}/locations/{location}`. # The only supported location is `global`. # @param page_size [::Integer] # Optional. The requested page size. The server might return fewer items than @@ -667,7 +675,9 @@ def list_framework_deployments request, options = nil # # @param name [::String] # Required. The name for the cloud control deployment, in the format - # `organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment_id}`. + # `organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}` + # or + # `projects/{project}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}`. # The only supported location is `global`. # # @yield [response, operation] Access the result along with the RPC operation @@ -754,8 +764,9 @@ def get_cloud_control_deployment request, options = nil # # @param parent [::String] # Required. The parent resource for the cloud control deployment, in the - # format `organizations/{organization}/locations/{location}`. The only - # supported location is `global`. + # format `organizations/{organization}/locations/{location}` or + # `projects/{project}/locations/{location}`. + # The only supported location is `global`. # @param page_size [::Integer] # Optional. The requested page size. The server might return fewer items than # you requested. diff --git a/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/paths.rb b/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/paths.rb index d987646b952c..33eccecf4ccf 100644 --- a/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/paths.rb +++ b/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/paths.rb @@ -27,39 +27,147 @@ module Paths ## # Create a fully-qualified CloudControlDeployment resource string. # - # The resource will be in the following format: + # @overload cloud_control_deployment_path(organization:, location:, cloud_control_deployment:) + # The resource will be in the following format: # - # `organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}` + # `organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}` # - # @param organization [String] - # @param location [String] - # @param cloud_control_deployment [String] + # @param organization [String] + # @param location [String] + # @param cloud_control_deployment [String] + # + # @overload cloud_control_deployment_path(project:, location:, cloud_control_deployment:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}` + # + # @param project [String] + # @param location [String] + # @param cloud_control_deployment [String] # # @return [::String] - def cloud_control_deployment_path organization:, location:, cloud_control_deployment: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + def cloud_control_deployment_path **args + resources = { + "cloud_control_deployment:location:organization" => (proc do |organization:, location:, cloud_control_deployment:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/cloudControlDeployments/#{cloud_control_deployment}" + end), + "cloud_control_deployment:location:project" => (proc do |project:, location:, cloud_control_deployment:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - "organizations/#{organization}/locations/#{location}/cloudControlDeployments/#{cloud_control_deployment}" + "projects/#{project}/locations/#{location}/cloudControlDeployments/#{cloud_control_deployment}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified Framework resource string. + # + # @overload framework_path(organization:, location:, framework:) + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/frameworks/{framework}` + # + # @param organization [String] + # @param location [String] + # @param framework [String] + # + # @overload framework_path(project:, location:, framework:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/frameworks/{framework}` + # + # @param project [String] + # @param location [String] + # @param framework [String] + # + # @return [::String] + def framework_path **args + resources = { + "framework:location:organization" => (proc do |organization:, location:, framework:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/frameworks/#{framework}" + end), + "framework:location:project" => (proc do |project:, location:, framework:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/frameworks/#{framework}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) end ## # Create a fully-qualified FrameworkDeployment resource string. # + # @overload framework_deployment_path(organization:, location:, framework_deployment:) + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}` + # + # @param organization [String] + # @param location [String] + # @param framework_deployment [String] + # + # @overload framework_deployment_path(project:, location:, framework_deployment:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}` + # + # @param project [String] + # @param location [String] + # @param framework_deployment [String] + # + # @return [::String] + def framework_deployment_path **args + resources = { + "framework_deployment:location:organization" => (proc do |organization:, location:, framework_deployment:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/frameworkDeployments/#{framework_deployment}" + end), + "framework_deployment:location:project" => (proc do |project:, location:, framework_deployment:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/frameworkDeployments/#{framework_deployment}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified Location resource string. + # # The resource will be in the following format: # - # `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}` + # `projects/{project}/locations/{location}` # - # @param organization [String] + # @param project [String] # @param location [String] - # @param framework_deployment [String] # # @return [::String] - def framework_deployment_path organization:, location:, framework_deployment: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - "organizations/#{organization}/locations/#{location}/frameworkDeployments/#{framework_deployment}" + "projects/#{project}/locations/#{location}" end ## diff --git a/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/rest/client.rb b/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/rest/client.rb index e61c929137d2..5747e24e9380 100644 --- a/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/rest/client.rb +++ b/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/rest/client.rb @@ -255,7 +255,9 @@ def logger # # @param parent [::String] # Required. The parent resource of the framework deployment in the format - # `organizations/{organization}/locations/{location}`. + # `organizations/{organization}/locations/{location}` + # or + # `projects/{project}/locations/{location}`. # Only the global location is supported. # @param framework_deployment_id [::String] # Optional. An identifier for the framework deployment that's unique in scope @@ -351,7 +353,9 @@ def create_framework_deployment request, options = nil # @param name [::String] # Required. The name of the framework deployment that you want to delete, # in the format - # `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment_id}`. + # `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}` + # or + # `projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}`. # The only supported location is `global`. # @param etag [::String] # Optional. An opaque identifier for the current version of the resource. @@ -449,7 +453,9 @@ def delete_framework_deployment request, options = nil # # @param name [::String] # Required. The name of the framework deployment, in the format - # `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment_id}`. + # `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}` + # or + # `projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}`. # The only supported location is `global`. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment] @@ -529,7 +535,9 @@ def get_framework_deployment request, options = nil # # @param parent [::String] # Required. The parent resource of the framework deployment, in the format - # `organizations/{organization}/locations/{location}`. + # `organizations/{organization}/locations/{location}` + # or + # `projects/{project}/locations/{location}`. # The only supported location is `global`. # @param page_size [::Integer] # Optional. The requested page size. The server might return fewer items than @@ -633,7 +641,9 @@ def list_framework_deployments request, options = nil # # @param name [::String] # Required. The name for the cloud control deployment, in the format - # `organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment_id}`. + # `organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}` + # or + # `projects/{project}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}`. # The only supported location is `global`. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment] @@ -713,8 +723,9 @@ def get_cloud_control_deployment request, options = nil # # @param parent [::String] # Required. The parent resource for the cloud control deployment, in the - # format `organizations/{organization}/locations/{location}`. The only - # supported location is `global`. + # format `organizations/{organization}/locations/{location}` or + # `projects/{project}/locations/{location}`. + # The only supported location is `global`. # @param page_size [::Integer] # Optional. The requested page size. The server might return fewer items than # you requested. diff --git a/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/rest/operations.rb b/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/rest/operations.rb index e5766007b032..dd3c1a5b7f0e 100644 --- a/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/rest/operations.rb +++ b/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/rest/operations.rb @@ -850,6 +850,13 @@ def self.transcode_list_operations_request request_pb ["name", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] ] ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) transcoder.transcode request_pb end @@ -871,6 +878,13 @@ def self.transcode_get_operation_request request_pb ["name", %r{^organizations/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] ] ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) transcoder.transcode request_pb end @@ -892,6 +906,13 @@ def self.transcode_delete_operation_request request_pb ["name", %r{^organizations/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] ] ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) transcoder.transcode request_pb end @@ -914,6 +935,14 @@ def self.transcode_cancel_operation_request request_pb ["name", %r{^organizations/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] ] ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) transcoder.transcode request_pb end end diff --git a/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/rest/service_stub.rb b/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/rest/service_stub.rb index 264677181bbe..cf84ef409f79 100644 --- a/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/rest/service_stub.rb +++ b/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/rest/service_stub.rb @@ -332,6 +332,14 @@ def self.transcode_create_framework_deployment_request request_pb ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] ] ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/frameworkDeployments", + body: "framework_deployment", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) transcoder.transcode request_pb end @@ -353,6 +361,13 @@ def self.transcode_delete_framework_deployment_request request_pb ["name", %r{^organizations/[^/]+/locations/[^/]+/frameworkDeployments/[^/]+/?$}, false] ] ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/frameworkDeployments/[^/]+/?$}, false] + ] + ) transcoder.transcode request_pb end @@ -374,6 +389,13 @@ def self.transcode_get_framework_deployment_request request_pb ["name", %r{^organizations/[^/]+/locations/[^/]+/frameworkDeployments/[^/]+/?$}, false] ] ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/frameworkDeployments/[^/]+/?$}, false] + ] + ) transcoder.transcode request_pb end @@ -395,6 +417,13 @@ def self.transcode_list_framework_deployments_request request_pb ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] ] ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/frameworkDeployments", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) transcoder.transcode request_pb end @@ -416,6 +445,13 @@ def self.transcode_get_cloud_control_deployment_request request_pb ["name", %r{^organizations/[^/]+/locations/[^/]+/cloudControlDeployments/[^/]+/?$}, false] ] ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/cloudControlDeployments/[^/]+/?$}, false] + ] + ) transcoder.transcode request_pb end @@ -437,6 +473,13 @@ def self.transcode_list_cloud_control_deployments_request request_pb ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] ] ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/cloudControlDeployments", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) transcoder.transcode request_pb end end diff --git a/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/monitoring/client.rb b/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/monitoring/client.rb index 4a17f067467e..5a38fc883a54 100644 --- a/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/monitoring/client.rb +++ b/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/monitoring/client.rb @@ -237,7 +237,7 @@ def logger # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # - # @overload list_framework_compliance_summaries(parent: nil, page_size: nil, page_token: nil, filter: nil) + # @overload list_framework_compliance_summaries(parent: nil, page_size: nil, page_token: nil, filter: nil, view: nil) # Pass arguments to `list_framework_compliance_summaries` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). @@ -252,6 +252,8 @@ def logger # should return. # @param filter [::String] # Optional. The filtering results. + # @param view [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkComplianceSummaryView] + # Optional. Specifies the level of detail to return in the response. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::FrameworkComplianceSummary>] @@ -437,7 +439,7 @@ def list_finding_summaries request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # - # @overload fetch_framework_compliance_report(name: nil, end_time: nil) + # @overload fetch_framework_compliance_report(name: nil, end_time: nil, filter: nil) # Pass arguments to `fetch_framework_compliance_report` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). @@ -446,6 +448,8 @@ def list_finding_summaries request, options = nil # Required. The name of the framework compliance report to retrieve. # @param end_time [::Google::Protobuf::Timestamp, ::Hash] # Optional. The end time of the report. + # @param filter [::String] + # Optional. The filtering results. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkComplianceReport] diff --git a/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/monitoring/rest/client.rb b/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/monitoring/rest/client.rb index 74b9cf470d61..759aa07b6a71 100644 --- a/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/monitoring/rest/client.rb +++ b/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/monitoring/rest/client.rb @@ -231,7 +231,7 @@ def logger # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # - # @overload list_framework_compliance_summaries(parent: nil, page_size: nil, page_token: nil, filter: nil) + # @overload list_framework_compliance_summaries(parent: nil, page_size: nil, page_token: nil, filter: nil, view: nil) # Pass arguments to `list_framework_compliance_summaries` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). @@ -246,6 +246,8 @@ def logger # should return. # @param filter [::String] # Optional. The filtering results. + # @param view [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkComplianceSummaryView] + # Optional. Specifies the level of detail to return in the response. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::FrameworkComplianceSummary>] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -417,7 +419,7 @@ def list_finding_summaries request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # - # @overload fetch_framework_compliance_report(name: nil, end_time: nil) + # @overload fetch_framework_compliance_report(name: nil, end_time: nil, filter: nil) # Pass arguments to `fetch_framework_compliance_report` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). @@ -426,6 +428,8 @@ def list_finding_summaries request, options = nil # Required. The name of the framework compliance report to retrieve. # @param end_time [::Google::Protobuf::Timestamp, ::Hash] # Optional. The end time of the report. + # @param filter [::String] + # Optional. The filtering results. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkComplianceReport] # @yieldparam operation [::Gapic::Rest::TransportOperation] diff --git a/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/common_pb.rb b/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/common_pb.rb index 413c17af27c1..c3c0fcbfde38 100644 --- a/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/common_pb.rb +++ b/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/common_pb.rb @@ -9,7 +9,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n4google/cloud/cloudsecuritycompliance/v1/common.proto\x12\'google.cloud.cloudsecuritycompliance.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x94\x07\n\tFramework\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x08\x12\x1e\n\x11major_revision_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12S\n\x04type\x18\x06 \x01(\x0e\x32@.google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkTypeB\x03\xe0\x41\x03\x12`\n\x15\x63loud_control_details\x18\x08 \x03(\x0b\x32<.google.cloud.cloudsecuritycompliance.v1.CloudControlDetailsB\x03\xe0\x41\x01\x12Q\n\x08\x63\x61tegory\x18\t \x03(\x0e\x32:.google.cloud.cloudsecuritycompliance.v1.FrameworkCategoryB\x03\xe0\x41\x01\x12^\n\x19supported_cloud_providers\x18\n \x03(\x0e\x32\x36.google.cloud.cloudsecuritycompliance.v1.CloudProviderB\x03\xe0\x41\x03\x12i\n\x1fsupported_target_resource_types\x18\x0b \x03(\x0e\x32;.google.cloud.cloudsecuritycompliance.v1.TargetResourceTypeB\x03\xe0\x41\x03\x12\x62\n\x1bsupported_enforcement_modes\x18\r \x03(\x0e\x32\x38.google.cloud.cloudsecuritycompliance.v1.EnforcementModeB\x03\xe0\x41\x03\"I\n\rFrameworkType\x12\x1e\n\x1a\x46RAMEWORK_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x42UILT_IN\x10\x01\x12\n\n\x06\x43USTOM\x10\x02:\x97\x01\xea\x41\x93\x01\n0cloudsecuritycompliance.googleapis.com/Framework\x12Horganizations/{organization}/locations/{location}/frameworks/{framework}*\nframeworks2\tframework\"\x95\x01\n\x13\x43loudControlDetails\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1e\n\x11major_revision_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02\x12K\n\nparameters\x18\x04 \x03(\x0b\x32\x32.google.cloud.cloudsecuritycompliance.v1.ParameterB\x03\xe0\x41\x01\"g\n\x12\x46rameworkReference\x12\x16\n\tframework\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12#\n\x11major_revision_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x14\n\x12_major_revision_id\"q\n\tParameter\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12Q\n\x0fparameter_value\x18\x02 \x01(\x0b\x32\x33.google.cloud.cloudsecuritycompliance.v1.ParamValueB\x03\xe0\x41\x02\"\xda\x08\n\x0c\x43loudControl\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x08\x12\x1e\n\x11major_revision_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x62\n\x1bsupported_enforcement_modes\x18\x07 \x03(\x0e\x32\x38.google.cloud.cloudsecuritycompliance.v1.EnforcementModeB\x03\xe0\x41\x03\x12S\n\x0eparameter_spec\x18\x08 \x03(\x0b\x32\x36.google.cloud.cloudsecuritycompliance.v1.ParameterSpecB\x03\xe0\x41\x01\x12\x41\n\x05rules\x18\t \x03(\x0b\x32-.google.cloud.cloudsecuritycompliance.v1.RuleB\x03\xe0\x41\x01\x12H\n\x08severity\x18\x0b \x01(\x0e\x32\x31.google.cloud.cloudsecuritycompliance.v1.SeverityB\x03\xe0\x41\x01\x12\x1d\n\x10\x66inding_category\x18\x0c \x01(\tB\x03\xe0\x41\x01\x12^\n\x19supported_cloud_providers\x18\r \x03(\x0e\x32\x36.google.cloud.cloudsecuritycompliance.v1.CloudProviderB\x03\xe0\x41\x01\x12\x1f\n\x12related_frameworks\x18\x0e \x03(\tB\x03\xe0\x41\x03\x12\x1e\n\x11remediation_steps\x18\x0f \x01(\tB\x03\xe0\x41\x01\x12V\n\ncategories\x18\x10 \x03(\x0e\x32=.google.cloud.cloudsecuritycompliance.v1.CloudControlCategoryB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x11 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12i\n\x1fsupported_target_resource_types\x18\x12 \x03(\x0e\x32;.google.cloud.cloudsecuritycompliance.v1.TargetResourceTypeB\x03\xe0\x41\x01\"6\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06\x43USTOM\x10\x01\x12\x0c\n\x08\x42UILT_IN\x10\x02:\xa7\x01\xea\x41\xa3\x01\n3cloudsecuritycompliance.googleapis.com/CloudControl\x12Oorganizations/{organization}/locations/{location}/cloudControls/{cloud_control}*\rcloudControls2\x0c\x63loudControl\"\x8e\x05\n\rParameterSpec\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bis_required\x18\x04 \x01(\x08\x42\x03\xe0\x41\x02\x12Y\n\nvalue_type\x18\x05 \x01(\x0e\x32@.google.cloud.cloudsecuritycompliance.v1.ParameterSpec.ValueTypeB\x03\xe0\x41\x02\x12O\n\rdefault_value\x18\x06 \x01(\x0b\x32\x33.google.cloud.cloudsecuritycompliance.v1.ParamValueB\x03\xe0\x41\x01\x12\x63\n\x12substitution_rules\x18\x07 \x03(\x0b\x32\x42.google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRuleB\x03\xe0\x41\x01\x12S\n\x0esub_parameters\x18\x08 \x03(\x0b\x32\x36.google.cloud.cloudsecuritycompliance.v1.ParameterSpecB\x03\xe0\x41\x01\x12L\n\nvalidation\x18\t \x01(\x0b\x32\x33.google.cloud.cloudsecuritycompliance.v1.ValidationB\x03\xe0\x41\x01\"g\n\tValueType\x12\x1a\n\x16VALUE_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06STRING\x10\x03\x12\x0b\n\x07\x42OOLEAN\x10\x04\x12\x0e\n\nSTRINGLIST\x10\x05\x12\n\n\x06NUMBER\x10\x06\x12\t\n\x05ONEOF\x10\x07\"\x86\x02\n\nValidation\x12P\n\x0e\x61llowed_values\x18\x01 \x01(\x0b\x32\x36.google.cloud.cloudsecuritycompliance.v1.AllowedValuesH\x00\x12\x46\n\tint_range\x18\x02 \x01(\x0b\x32\x31.google.cloud.cloudsecuritycompliance.v1.IntRangeH\x00\x12P\n\x0eregexp_pattern\x18\x03 \x01(\x0b\x32\x36.google.cloud.cloudsecuritycompliance.v1.RegexpPatternH\x00\x42\x0c\n\nconstraint\"Y\n\rAllowedValues\x12H\n\x06values\x18\x01 \x03(\x0b\x32\x33.google.cloud.cloudsecuritycompliance.v1.ParamValueB\x03\xe0\x41\x02\"%\n\rRegexpPattern\x12\x14\n\x07pattern\x18\x01 \x01(\tB\x03\xe0\x41\x02\".\n\x08IntRange\x12\x10\n\x03min\x18\x01 \x01(\x03\x42\x03\xe0\x41\x02\x12\x10\n\x03max\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02\"!\n\nStringList\x12\x13\n\x06values\x18\x01 \x03(\tB\x03\xe0\x41\x02\"\xf7\x01\n\nParamValue\x12\x16\n\x0cstring_value\x18\x03 \x01(\tH\x00\x12\x14\n\nbool_value\x18\x04 \x01(\x08H\x00\x12P\n\x11string_list_value\x18\x05 \x01(\x0b\x32\x33.google.cloud.cloudsecuritycompliance.v1.StringListH\x00\x12\x16\n\x0cnumber_value\x18\x06 \x01(\x01H\x00\x12I\n\x0boneof_value\x18\x07 \x01(\x0b\x32\x32.google.cloud.cloudsecuritycompliance.v1.ParameterH\x00\x42\x06\n\x04kind\"\x8a\x02\n\x19ParameterSubstitutionRule\x12m\n\x1dplaceholder_substitution_rule\x18\x01 \x01(\x0b\x32\x44.google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRuleH\x00\x12i\n\x1b\x61ttribute_substitution_rule\x18\x02 \x01(\x0b\x32\x42.google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRuleH\x00\x42\x13\n\x11substitution_type\".\n\x19\x41ttributeSubstitutionRule\x12\x11\n\tattribute\x18\x01 \x01(\t\"0\n\x1bPlaceholderSubstitutionRule\x12\x11\n\tattribute\x18\x01 \x01(\t\"\xdd\x01\n\x04Rule\x12P\n\x0e\x63\x65l_expression\x18\x01 \x01(\x0b\x32\x36.google.cloud.cloudsecuritycompliance.v1.CELExpressionH\x00\x12\x18\n\x0b\x64\x65scription\x18\n \x01(\tB\x03\xe0\x41\x01\x12W\n\x11rule_action_types\x18\x10 \x03(\x0e\x32\x37.google.cloud.cloudsecuritycompliance.v1.RuleActionTypeB\x03\xe0\x41\x02\x42\x10\n\x0eimplementation\"\x8a\x01\n\rCELExpression\x12T\n\x15resource_types_values\x18\x03 \x01(\x0b\x32\x33.google.cloud.cloudsecuritycompliance.v1.StringListH\x00\x12\x17\n\nexpression\x18\x01 \x01(\tB\x03\xe0\x41\x02\x42\n\n\x08\x63riteria\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\"8\n\rControlFamily\x12\x11\n\tfamily_id\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t*\x83\x01\n#RegulatoryControlResponsibilityType\x12\x36\n2REGULATORY_CONTROL_RESPONSIBILITY_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06GOOGLE\x10\x01\x12\x0c\n\x08\x43USTOMER\x10\x02\x12\n\n\x06SHARED\x10\x03*]\n\x0f\x45nforcementMode\x12 \n\x1c\x45NFORCEMENT_MODE_UNSPECIFIED\x10\x00\x12\x0e\n\nPREVENTIVE\x10\x01\x12\r\n\tDETECTIVE\x10\x02\x12\t\n\x05\x41UDIT\x10\x03*\xb1\x01\n\x11\x46rameworkCategory\x12\"\n\x1e\x46RAMEWORK_CATEGORY_UNSPECIFIED\x10\x00\x12\x1d\n\x19INDUSTRY_DEFINED_STANDARD\x10\x01\x12\x15\n\x11\x41SSURED_WORKLOADS\x10\x02\x12\x11\n\rDATA_SECURITY\x10\x03\x12\x19\n\x15GOOGLE_BEST_PRACTICES\x10\x04\x12\x14\n\x10\x43USTOM_FRAMEWORK\x10\x05*\xf2\x04\n\x14\x43loudControlCategory\x12&\n\"CLOUD_CONTROL_CATEGORY_UNSPECIFIED\x10\x00\x12\x1e\n\x1a\x43\x43_CATEGORY_INFRASTRUCTURE\x10\x01\x12\'\n#CC_CATEGORY_ARTIFICIAL_INTELLIGENCE\x10\x02\x12!\n\x1d\x43\x43_CATEGORY_PHYSICAL_SECURITY\x10\x03\x12\x1d\n\x19\x43\x43_CATEGORY_DATA_SECURITY\x10\x04\x12 \n\x1c\x43\x43_CATEGORY_NETWORK_SECURITY\x10\x05\x12#\n\x1f\x43\x43_CATEGORY_INCIDENT_MANAGEMENT\x10\x06\x12.\n*CC_CATEGORY_IDENTITY_AND_ACCESS_MANAGEMENT\x10\x07\x12\x1a\n\x16\x43\x43_CATEGORY_ENCRYPTION\x10\x08\x12\x32\n.CC_CATEGORY_LOGS_MANAGEMENT_AND_INFRASTRUCTURE\x10\t\x12&\n\"CC_CATEGORY_HR_ADMIN_AND_PROCESSES\x10\n\x12\x38\n4CC_CATEGORY_THIRD_PARTY_AND_SUB_PROCESSOR_MANAGEMENT\x10\x0b\x12%\n!CC_CATEGORY_LEGAL_AND_DISCLOSURES\x10\x0c\x12(\n$CC_CATEGORY_VULNERABILITY_MANAGEMENT\x10\r\x12\x17\n\x13\x43\x43_CATEGORY_PRIVACY\x10\x0e\x12\x14\n\x10\x43\x43_CATEGORY_BCDR\x10\x0f*L\n\rCloudProvider\x12\x1e\n\x1a\x43LOUD_PROVIDER_UNSPECIFIED\x10\x00\x12\x07\n\x03\x41WS\x10\x01\x12\t\n\x05\x41ZURE\x10\x02\x12\x07\n\x03GCP\x10\x03*Q\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43RITICAL\x10\x01\x12\x08\n\x04HIGH\x10\x02\x12\n\n\x06MEDIUM\x10\x03\x12\x07\n\x03LOW\x10\x04*\x8f\x01\n\x0eRuleActionType\x12 \n\x1cRULE_ACTION_TYPE_UNSPECIFIED\x10\x00\x12\x1f\n\x1bRULE_ACTION_TYPE_PREVENTIVE\x10\x01\x12\x1e\n\x1aRULE_ACTION_TYPE_DETECTIVE\x10\x02\x12\x1a\n\x16RULE_ACTION_TYPE_AUDIT\x10\x03*\xcd\x01\n\x12TargetResourceType\x12$\n TARGET_RESOURCE_TYPE_UNSPECIFIED\x10\x00\x12 \n\x1cTARGET_RESOURCE_CRM_TYPE_ORG\x10\x01\x12#\n\x1fTARGET_RESOURCE_CRM_TYPE_FOLDER\x10\x02\x12$\n TARGET_RESOURCE_CRM_TYPE_PROJECT\x10\x03\x12$\n TARGET_RESOURCE_TYPE_APPLICATION\x10\x04\x42\x97\x03\n+com.google.cloud.cloudsecuritycompliance.v1B\x0b\x43ommonProtoP\x01Zecloud.google.com/go/cloudsecuritycompliance/apiv1/cloudsecuritycompliancepb;cloudsecuritycompliancepb\xaa\x02\'Google.Cloud.CloudSecurityCompliance.V1\xca\x02\'Google\\Cloud\\CloudSecurityCompliance\\V1\xea\x02*Google::Cloud::CloudSecurityCompliance::V1\xea\x41p\n;cloudsecuritycompliance.googleapis.com/OrganizationLocation\x12\x31organizations/{organization}/locations/{location}b\x06proto3" +descriptor_data = "\n4google/cloud/cloudsecuritycompliance/v1/common.proto\x12\'google.cloud.cloudsecuritycompliance.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd4\x07\n\tFramework\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x08\x12\x1e\n\x11major_revision_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12S\n\x04type\x18\x06 \x01(\x0e\x32@.google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkTypeB\x03\xe0\x41\x03\x12`\n\x15\x63loud_control_details\x18\x08 \x03(\x0b\x32<.google.cloud.cloudsecuritycompliance.v1.CloudControlDetailsB\x03\xe0\x41\x01\x12Q\n\x08\x63\x61tegory\x18\t \x03(\x0e\x32:.google.cloud.cloudsecuritycompliance.v1.FrameworkCategoryB\x03\xe0\x41\x01\x12^\n\x19supported_cloud_providers\x18\n \x03(\x0e\x32\x36.google.cloud.cloudsecuritycompliance.v1.CloudProviderB\x03\xe0\x41\x03\x12i\n\x1fsupported_target_resource_types\x18\x0b \x03(\x0e\x32;.google.cloud.cloudsecuritycompliance.v1.TargetResourceTypeB\x03\xe0\x41\x03\x12\x62\n\x1bsupported_enforcement_modes\x18\r \x03(\x0e\x32\x38.google.cloud.cloudsecuritycompliance.v1.EnforcementModeB\x03\xe0\x41\x03\"I\n\rFrameworkType\x12\x1e\n\x1a\x46RAMEWORK_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x42UILT_IN\x10\x01\x12\n\n\x06\x43USTOM\x10\x02:\xd7\x01\xea\x41\xd3\x01\n0cloudsecuritycompliance.googleapis.com/Framework\x12Horganizations/{organization}/locations/{location}/frameworks/{framework}\x12>projects/{project}/locations/{location}/frameworks/{framework}*\nframeworks2\tframework\"\x95\x01\n\x13\x43loudControlDetails\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1e\n\x11major_revision_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02\x12K\n\nparameters\x18\x04 \x03(\x0b\x32\x32.google.cloud.cloudsecuritycompliance.v1.ParameterB\x03\xe0\x41\x01\"\x9c\x01\n\x12\x46rameworkReference\x12K\n\tframework\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0cloudsecuritycompliance.googleapis.com/Framework\x12#\n\x11major_revision_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x14\n\x12_major_revision_id\"q\n\tParameter\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12Q\n\x0fparameter_value\x18\x02 \x01(\x0b\x32\x33.google.cloud.cloudsecuritycompliance.v1.ParamValueB\x03\xe0\x41\x02\"\xa1\t\n\x0c\x43loudControl\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x08\x12\x1e\n\x11major_revision_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x62\n\x1bsupported_enforcement_modes\x18\x07 \x03(\x0e\x32\x38.google.cloud.cloudsecuritycompliance.v1.EnforcementModeB\x03\xe0\x41\x03\x12S\n\x0eparameter_spec\x18\x08 \x03(\x0b\x32\x36.google.cloud.cloudsecuritycompliance.v1.ParameterSpecB\x03\xe0\x41\x01\x12\x41\n\x05rules\x18\t \x03(\x0b\x32-.google.cloud.cloudsecuritycompliance.v1.RuleB\x03\xe0\x41\x01\x12H\n\x08severity\x18\x0b \x01(\x0e\x32\x31.google.cloud.cloudsecuritycompliance.v1.SeverityB\x03\xe0\x41\x01\x12\x1d\n\x10\x66inding_category\x18\x0c \x01(\tB\x03\xe0\x41\x01\x12^\n\x19supported_cloud_providers\x18\r \x03(\x0e\x32\x36.google.cloud.cloudsecuritycompliance.v1.CloudProviderB\x03\xe0\x41\x01\x12\x1f\n\x12related_frameworks\x18\x0e \x03(\tB\x03\xe0\x41\x03\x12\x1e\n\x11remediation_steps\x18\x0f \x01(\tB\x03\xe0\x41\x01\x12V\n\ncategories\x18\x10 \x03(\x0e\x32=.google.cloud.cloudsecuritycompliance.v1.CloudControlCategoryB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x11 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12i\n\x1fsupported_target_resource_types\x18\x12 \x03(\x0e\x32;.google.cloud.cloudsecuritycompliance.v1.TargetResourceTypeB\x03\xe0\x41\x01\"6\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06\x43USTOM\x10\x01\x12\x0c\n\x08\x42UILT_IN\x10\x02:\xee\x01\xea\x41\xea\x01\n3cloudsecuritycompliance.googleapis.com/CloudControl\x12Oorganizations/{organization}/locations/{location}/cloudControls/{cloud_control}\x12\x45projects/{project}/locations/{location}/cloudControls/{cloud_control}*\rcloudControls2\x0c\x63loudControl\"\x8e\x05\n\rParameterSpec\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bis_required\x18\x04 \x01(\x08\x42\x03\xe0\x41\x02\x12Y\n\nvalue_type\x18\x05 \x01(\x0e\x32@.google.cloud.cloudsecuritycompliance.v1.ParameterSpec.ValueTypeB\x03\xe0\x41\x02\x12O\n\rdefault_value\x18\x06 \x01(\x0b\x32\x33.google.cloud.cloudsecuritycompliance.v1.ParamValueB\x03\xe0\x41\x01\x12\x63\n\x12substitution_rules\x18\x07 \x03(\x0b\x32\x42.google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRuleB\x03\xe0\x41\x01\x12S\n\x0esub_parameters\x18\x08 \x03(\x0b\x32\x36.google.cloud.cloudsecuritycompliance.v1.ParameterSpecB\x03\xe0\x41\x01\x12L\n\nvalidation\x18\t \x01(\x0b\x32\x33.google.cloud.cloudsecuritycompliance.v1.ValidationB\x03\xe0\x41\x01\"g\n\tValueType\x12\x1a\n\x16VALUE_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06STRING\x10\x03\x12\x0b\n\x07\x42OOLEAN\x10\x04\x12\x0e\n\nSTRINGLIST\x10\x05\x12\n\n\x06NUMBER\x10\x06\x12\t\n\x05ONEOF\x10\x07\"\x86\x02\n\nValidation\x12P\n\x0e\x61llowed_values\x18\x01 \x01(\x0b\x32\x36.google.cloud.cloudsecuritycompliance.v1.AllowedValuesH\x00\x12\x46\n\tint_range\x18\x02 \x01(\x0b\x32\x31.google.cloud.cloudsecuritycompliance.v1.IntRangeH\x00\x12P\n\x0eregexp_pattern\x18\x03 \x01(\x0b\x32\x36.google.cloud.cloudsecuritycompliance.v1.RegexpPatternH\x00\x42\x0c\n\nconstraint\"Y\n\rAllowedValues\x12H\n\x06values\x18\x01 \x03(\x0b\x32\x33.google.cloud.cloudsecuritycompliance.v1.ParamValueB\x03\xe0\x41\x02\"%\n\rRegexpPattern\x12\x14\n\x07pattern\x18\x01 \x01(\tB\x03\xe0\x41\x02\".\n\x08IntRange\x12\x10\n\x03min\x18\x01 \x01(\x03\x42\x03\xe0\x41\x02\x12\x10\n\x03max\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02\"!\n\nStringList\x12\x13\n\x06values\x18\x01 \x03(\tB\x03\xe0\x41\x02\"\x90\x02\n\nParamValue\x12\x1b\n\x0cstring_value\x18\x03 \x01(\tB\x03\xe0\x41\x01H\x00\x12\x19\n\nbool_value\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01H\x00\x12U\n\x11string_list_value\x18\x05 \x01(\x0b\x32\x33.google.cloud.cloudsecuritycompliance.v1.StringListB\x03\xe0\x41\x01H\x00\x12\x1b\n\x0cnumber_value\x18\x06 \x01(\x01\x42\x03\xe0\x41\x01H\x00\x12N\n\x0boneof_value\x18\x07 \x01(\x0b\x32\x32.google.cloud.cloudsecuritycompliance.v1.ParameterB\x03\xe0\x41\x01H\x00\x42\x06\n\x04kind\"\x8a\x02\n\x19ParameterSubstitutionRule\x12m\n\x1dplaceholder_substitution_rule\x18\x01 \x01(\x0b\x32\x44.google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRuleH\x00\x12i\n\x1b\x61ttribute_substitution_rule\x18\x02 \x01(\x0b\x32\x42.google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRuleH\x00\x42\x13\n\x11substitution_type\".\n\x19\x41ttributeSubstitutionRule\x12\x11\n\tattribute\x18\x01 \x01(\t\"0\n\x1bPlaceholderSubstitutionRule\x12\x11\n\tattribute\x18\x01 \x01(\t\"\xdd\x01\n\x04Rule\x12P\n\x0e\x63\x65l_expression\x18\x01 \x01(\x0b\x32\x36.google.cloud.cloudsecuritycompliance.v1.CELExpressionH\x00\x12\x18\n\x0b\x64\x65scription\x18\n \x01(\tB\x03\xe0\x41\x01\x12W\n\x11rule_action_types\x18\x10 \x03(\x0e\x32\x37.google.cloud.cloudsecuritycompliance.v1.RuleActionTypeB\x03\xe0\x41\x02\x42\x10\n\x0eimplementation\"\x8a\x01\n\rCELExpression\x12T\n\x15resource_types_values\x18\x03 \x01(\x0b\x32\x33.google.cloud.cloudsecuritycompliance.v1.StringListH\x00\x12\x17\n\nexpression\x18\x01 \x01(\tB\x03\xe0\x41\x02\x42\n\n\x08\x63riteria\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\"\xa3\x08\n\x07\x43ontrol\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12L\n\x06\x66\x61mily\x18\x05 \x01(\x0e\x32\x37.google.cloud.cloudsecuritycompliance.v1.Control.FamilyB\x03\xe0\x41\x03\x12S\n\x0e\x63ontrol_family\x18\x06 \x01(\x0b\x32\x36.google.cloud.cloudsecuritycompliance.v1.ControlFamilyB\x03\xe0\x41\x03\x12n\n\x13responsibility_type\x18\x07 \x01(\x0e\x32L.google.cloud.cloudsecuritycompliance.v1.RegulatoryControlResponsibilityTypeB\x03\xe0\x41\x03\x12.\n!google_responsibility_description\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x31\n$google_responsibility_implementation\x18\t \x01(\tB\x03\xe0\x41\x03\x12\x30\n#customer_responsibility_description\x18\n \x01(\tB\x03\xe0\x41\x03\x12\x33\n&customer_responsibility_implementation\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12.\n!shared_responsibility_description\x18\x0c \x01(\tB\x03\xe0\x41\x03\x12#\n\x16\x61\x64\x64itional_content_uri\x18\r \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x12related_frameworks\x18\x0e \x03(\tB\x03\xe0\x41\x03\"\xb0\x01\n\x06\x46\x61mily\x12\x16\n\x12\x46\x41MILY_UNSPECIFIED\x10\x00\x12\x06\n\x02\x41\x43\x10\x01\x12\x06\n\x02\x41T\x10\x02\x12\x06\n\x02\x41U\x10\x03\x12\x06\n\x02\x43\x41\x10\x04\x12\x06\n\x02\x43M\x10\x05\x12\x06\n\x02\x43P\x10\x06\x12\x06\n\x02IA\x10\x07\x12\x06\n\x02IR\x10\x08\x12\x06\n\x02MA\x10\t\x12\x06\n\x02MP\x10\n\x12\x06\n\x02PE\x10\x0b\x12\x06\n\x02PL\x10\x0c\x12\x06\n\x02PS\x10\r\x12\x06\n\x02RA\x10\x0e\x12\x06\n\x02SA\x10\x0f\x12\x06\n\x02SC\x10\x10\x12\x06\n\x02SI\x10\x11\x12\x06\n\x02SR\x10\x12:\xc9\x01\xea\x41\xc5\x01\n.cloudsecuritycompliance.googleapis.com/Control\x12\x44organizations/{organization}/locations/{location}/controls/{control}\x12:projects/{project}/locations/{location}/controls/{control}*\x08\x63ontrols2\x07\x63ontrol\"8\n\rControlFamily\x12\x11\n\tfamily_id\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t*\x83\x01\n#RegulatoryControlResponsibilityType\x12\x36\n2REGULATORY_CONTROL_RESPONSIBILITY_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06GOOGLE\x10\x01\x12\x0c\n\x08\x43USTOMER\x10\x02\x12\n\n\x06SHARED\x10\x03*]\n\x0f\x45nforcementMode\x12 \n\x1c\x45NFORCEMENT_MODE_UNSPECIFIED\x10\x00\x12\x0e\n\nPREVENTIVE\x10\x01\x12\r\n\tDETECTIVE\x10\x02\x12\t\n\x05\x41UDIT\x10\x03*\xb1\x01\n\x11\x46rameworkCategory\x12\"\n\x1e\x46RAMEWORK_CATEGORY_UNSPECIFIED\x10\x00\x12\x1d\n\x19INDUSTRY_DEFINED_STANDARD\x10\x01\x12\x15\n\x11\x41SSURED_WORKLOADS\x10\x02\x12\x11\n\rDATA_SECURITY\x10\x03\x12\x19\n\x15GOOGLE_BEST_PRACTICES\x10\x04\x12\x14\n\x10\x43USTOM_FRAMEWORK\x10\x05*\xfe\x05\n\x14\x43loudControlCategory\x12&\n\"CLOUD_CONTROL_CATEGORY_UNSPECIFIED\x10\x00\x12\x1e\n\x1a\x43\x43_CATEGORY_INFRASTRUCTURE\x10\x01\x12\'\n#CC_CATEGORY_ARTIFICIAL_INTELLIGENCE\x10\x02\x12!\n\x1d\x43\x43_CATEGORY_PHYSICAL_SECURITY\x10\x03\x12\x1d\n\x19\x43\x43_CATEGORY_DATA_SECURITY\x10\x04\x12 \n\x1c\x43\x43_CATEGORY_NETWORK_SECURITY\x10\x05\x12#\n\x1f\x43\x43_CATEGORY_INCIDENT_MANAGEMENT\x10\x06\x12.\n*CC_CATEGORY_IDENTITY_AND_ACCESS_MANAGEMENT\x10\x07\x12\x1a\n\x16\x43\x43_CATEGORY_ENCRYPTION\x10\x08\x12\x32\n.CC_CATEGORY_LOGS_MANAGEMENT_AND_INFRASTRUCTURE\x10\t\x12&\n\"CC_CATEGORY_HR_ADMIN_AND_PROCESSES\x10\n\x12\x38\n4CC_CATEGORY_THIRD_PARTY_AND_SUB_PROCESSOR_MANAGEMENT\x10\x0b\x12%\n!CC_CATEGORY_LEGAL_AND_DISCLOSURES\x10\x0c\x12(\n$CC_CATEGORY_VULNERABILITY_MANAGEMENT\x10\r\x12\x17\n\x13\x43\x43_CATEGORY_PRIVACY\x10\x0e\x12\x14\n\x10\x43\x43_CATEGORY_BCDR\x10\x0f\x12\x1c\n\x18\x43\x43_CATEGORY_ADMIN_ACCESS\x10\x10\x12\x1e\n\x1a\x43\x43_CATEGORY_DATA_RESIDENCY\x10\x11\x12*\n&CC_CATEGORY_RESOURCE_USAGE_RESTRICTION\x10\x12\x12 \n\x1c\x43\x43_CATEGORY_SERVICE_SPECIFIC\x10\x13*L\n\rCloudProvider\x12\x1e\n\x1a\x43LOUD_PROVIDER_UNSPECIFIED\x10\x00\x12\x07\n\x03\x41WS\x10\x01\x12\t\n\x05\x41ZURE\x10\x02\x12\x07\n\x03GCP\x10\x03*Q\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43RITICAL\x10\x01\x12\x08\n\x04HIGH\x10\x02\x12\n\n\x06MEDIUM\x10\x03\x12\x07\n\x03LOW\x10\x04*\x8f\x01\n\x0eRuleActionType\x12 \n\x1cRULE_ACTION_TYPE_UNSPECIFIED\x10\x00\x12\x1f\n\x1bRULE_ACTION_TYPE_PREVENTIVE\x10\x01\x12\x1e\n\x1aRULE_ACTION_TYPE_DETECTIVE\x10\x02\x12\x1a\n\x16RULE_ACTION_TYPE_AUDIT\x10\x03*\xcd\x01\n\x12TargetResourceType\x12$\n TARGET_RESOURCE_TYPE_UNSPECIFIED\x10\x00\x12 \n\x1cTARGET_RESOURCE_CRM_TYPE_ORG\x10\x01\x12#\n\x1fTARGET_RESOURCE_CRM_TYPE_FOLDER\x10\x02\x12$\n TARGET_RESOURCE_CRM_TYPE_PROJECT\x10\x03\x12$\n TARGET_RESOURCE_TYPE_APPLICATION\x10\x04\x42\x97\x03\n+com.google.cloud.cloudsecuritycompliance.v1B\x0b\x43ommonProtoP\x01Zecloud.google.com/go/cloudsecuritycompliance/apiv1/cloudsecuritycompliancepb;cloudsecuritycompliancepb\xaa\x02\'Google.Cloud.CloudSecurityCompliance.V1\xca\x02\'Google\\Cloud\\CloudSecurityCompliance\\V1\xea\x02*Google::Cloud::CloudSecurityCompliance::V1\xea\x41p\n;cloudsecuritycompliance.googleapis.com/OrganizationLocation\x12\x31organizations/{organization}/locations/{location}b\x06proto3" pool = ::Google::Protobuf::DescriptorPool.generated_pool pool.add_serialized_file(descriptor_data) @@ -39,6 +39,8 @@ module V1 Rule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.Rule").msgclass CELExpression = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.CELExpression").msgclass OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.OperationMetadata").msgclass + Control = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.Control").msgclass + Control::Family = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.Control.Family").enummodule ControlFamily = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.ControlFamily").msgclass RegulatoryControlResponsibilityType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.RegulatoryControlResponsibilityType").enummodule EnforcementMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.EnforcementMode").enummodule diff --git a/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/config_pb.rb b/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/config_pb.rb index 66fb71af8ac1..2d01f26a779a 100644 --- a/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/config_pb.rb +++ b/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/config_pb.rb @@ -13,7 +13,7 @@ require 'google/protobuf/field_mask_pb' -descriptor_data = "\n4google/cloud/cloudsecuritycompliance/v1/config.proto\x12\'google.cloud.cloudsecuritycompliance.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x34google/cloud/cloudsecuritycompliance/v1/common.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\x92\x01\n\x15ListFrameworksRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\x12\x30\x63loudsecuritycompliance.googleapis.com/Framework\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"y\n\x16ListFrameworksResponse\x12\x46\n\nframeworks\x18\x01 \x03(\x0b\x32\x32.google.cloud.cloudsecuritycompliance.v1.Framework\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"}\n\x13GetFrameworkRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0cloudsecuritycompliance.googleapis.com/Framework\x12\x1e\n\x11major_revision_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01\"\xc9\x01\n\x16\x43reateFrameworkRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\x12\x30\x63loudsecuritycompliance.googleapis.com/Framework\x12\x19\n\x0c\x66ramework_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12J\n\tframework\x18\x03 \x01(\x0b\x32\x32.google.cloud.cloudsecuritycompliance.v1.FrameworkB\x03\xe0\x41\x02\"\xba\x01\n\x16UpdateFrameworkRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12J\n\tframework\x18\x02 \x01(\x0b\x32\x32.google.cloud.cloudsecuritycompliance.v1.FrameworkB\x03\xe0\x41\x02\x12\x1e\n\x11major_revision_id\x18\x03 \x01(\x03\x42\x03\xe0\x41\x01\"`\n\x16\x44\x65leteFrameworkRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0cloudsecuritycompliance.googleapis.com/Framework\"\x98\x01\n\x18ListCloudControlsRequest\x12K\n\x06parent\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\x12\x33\x63loudsecuritycompliance.googleapis.com/CloudControl\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x83\x01\n\x19ListCloudControlsResponse\x12M\n\x0e\x63loud_controls\x18\x01 \x03(\x0b\x32\x35.google.cloud.cloudsecuritycompliance.v1.CloudControl\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x83\x01\n\x16GetCloudControlRequest\x12I\n\x04name\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\n3cloudsecuritycompliance.googleapis.com/CloudControl\x12\x1e\n\x11major_revision_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01\"\xda\x01\n\x19\x43reateCloudControlRequest\x12K\n\x06parent\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\x12\x33\x63loudsecuritycompliance.googleapis.com/CloudControl\x12\x1d\n\x10\x63loud_control_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12Q\n\rcloud_control\x18\x03 \x01(\x0b\x32\x35.google.cloud.cloudsecuritycompliance.v1.CloudControlB\x03\xe0\x41\x02\"\xa4\x01\n\x19UpdateCloudControlRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12Q\n\rcloud_control\x18\x02 \x01(\x0b\x32\x35.google.cloud.cloudsecuritycompliance.v1.CloudControlB\x03\xe0\x41\x02\"f\n\x19\x44\x65leteCloudControlRequest\x12I\n\x04name\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\n3cloudsecuritycompliance.googleapis.com/CloudControl2\xa1\x12\n\x06\x43onfig\x12\xd7\x01\n\x0eListFrameworks\x12>.google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest\x1a?.google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse\"D\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{parent=organizations/*/locations/*}/frameworks\x12\xc4\x01\n\x0cGetFramework\x12<.google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest\x1a\x32.google.cloud.cloudsecuritycompliance.v1.Framework\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{name=organizations/*/locations/*/frameworks/*}\x12\xee\x01\n\x0f\x43reateFramework\x12?.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest\x1a\x32.google.cloud.cloudsecuritycompliance.v1.Framework\"f\xda\x41\x1dparent,framework,framework_id\x82\xd3\xe4\x93\x02@\"3/v1/{parent=organizations/*/locations/*}/frameworks:\tframework\x12\xf0\x01\n\x0fUpdateFramework\x12?.google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest\x1a\x32.google.cloud.cloudsecuritycompliance.v1.Framework\"h\xda\x41\x15\x66ramework,update_mask\x82\xd3\xe4\x93\x02J2=/v1/{framework.name=organizations/*/locations/*/frameworks/*}:\tframework\x12\xae\x01\n\x0f\x44\x65leteFramework\x12?.google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest\x1a\x16.google.protobuf.Empty\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35*3/v1/{name=organizations/*/locations/*/frameworks/*}\x12\xe3\x01\n\x11ListCloudControls\x12\x41.google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest\x1a\x42.google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse\"G\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x38\x12\x36/v1/{parent=organizations/*/locations/*}/cloudControls\x12\xd0\x01\n\x0fGetCloudControl\x12?.google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest\x1a\x35.google.cloud.cloudsecuritycompliance.v1.CloudControl\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\x12\x36/v1/{name=organizations/*/locations/*/cloudControls/*}\x12\x86\x02\n\x12\x43reateCloudControl\x12\x42.google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest\x1a\x35.google.cloud.cloudsecuritycompliance.v1.CloudControl\"u\xda\x41%parent,cloud_control,cloud_control_id\x82\xd3\xe4\x93\x02G\"6/v1/{parent=organizations/*/locations/*}/cloudControls:\rcloud_control\x12\x88\x02\n\x12UpdateCloudControl\x12\x42.google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest\x1a\x35.google.cloud.cloudsecuritycompliance.v1.CloudControl\"w\xda\x41\x19\x63loud_control,update_mask\x82\xd3\xe4\x93\x02U2D/v1/{cloud_control.name=organizations/*/locations/*/cloudControls/*}:\rcloud_control\x12\xb7\x01\n\x12\x44\x65leteCloudControl\x12\x42.google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest\x1a\x16.google.protobuf.Empty\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38*6/v1/{name=organizations/*/locations/*/cloudControls/*}\x1aZ\xca\x41&cloudsecuritycompliance.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xa4\x02\n+com.google.cloud.cloudsecuritycompliance.v1B\x0b\x43onfigProtoP\x01Zecloud.google.com/go/cloudsecuritycompliance/apiv1/cloudsecuritycompliancepb;cloudsecuritycompliancepb\xaa\x02\'Google.Cloud.CloudSecurityCompliance.V1\xca\x02\'Google\\Cloud\\CloudSecurityCompliance\\V1\xea\x02*Google::Cloud::CloudSecurityCompliance::V1b\x06proto3" +descriptor_data = "\n4google/cloud/cloudsecuritycompliance/v1/config.proto\x12\'google.cloud.cloudsecuritycompliance.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x34google/cloud/cloudsecuritycompliance/v1/common.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\x92\x01\n\x15ListFrameworksRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\x12\x30\x63loudsecuritycompliance.googleapis.com/Framework\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"y\n\x16ListFrameworksResponse\x12\x46\n\nframeworks\x18\x01 \x03(\x0b\x32\x32.google.cloud.cloudsecuritycompliance.v1.Framework\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"}\n\x13GetFrameworkRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0cloudsecuritycompliance.googleapis.com/Framework\x12\x1e\n\x11major_revision_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01\"\xc9\x01\n\x16\x43reateFrameworkRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\x12\x30\x63loudsecuritycompliance.googleapis.com/Framework\x12\x19\n\x0c\x66ramework_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12J\n\tframework\x18\x03 \x01(\x0b\x32\x32.google.cloud.cloudsecuritycompliance.v1.FrameworkB\x03\xe0\x41\x02\"\xba\x01\n\x16UpdateFrameworkRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12J\n\tframework\x18\x02 \x01(\x0b\x32\x32.google.cloud.cloudsecuritycompliance.v1.FrameworkB\x03\xe0\x41\x02\x12\x1e\n\x11major_revision_id\x18\x03 \x01(\x03\x42\x03\xe0\x41\x01\"`\n\x16\x44\x65leteFrameworkRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0cloudsecuritycompliance.googleapis.com/Framework\"\x98\x01\n\x18ListCloudControlsRequest\x12K\n\x06parent\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\x12\x33\x63loudsecuritycompliance.googleapis.com/CloudControl\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x83\x01\n\x19ListCloudControlsResponse\x12M\n\x0e\x63loud_controls\x18\x01 \x03(\x0b\x32\x35.google.cloud.cloudsecuritycompliance.v1.CloudControl\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x83\x01\n\x16GetCloudControlRequest\x12I\n\x04name\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\n3cloudsecuritycompliance.googleapis.com/CloudControl\x12\x1e\n\x11major_revision_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01\"\xda\x01\n\x19\x43reateCloudControlRequest\x12K\n\x06parent\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\x12\x33\x63loudsecuritycompliance.googleapis.com/CloudControl\x12\x1d\n\x10\x63loud_control_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12Q\n\rcloud_control\x18\x03 \x01(\x0b\x32\x35.google.cloud.cloudsecuritycompliance.v1.CloudControlB\x03\xe0\x41\x02\"\xa4\x01\n\x19UpdateCloudControlRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12Q\n\rcloud_control\x18\x02 \x01(\x0b\x32\x35.google.cloud.cloudsecuritycompliance.v1.CloudControlB\x03\xe0\x41\x02\"f\n\x19\x44\x65leteCloudControlRequest\x12I\n\x04name\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\n3cloudsecuritycompliance.googleapis.com/CloudControl2\xf7\x16\n\x06\x43onfig\x12\x89\x02\n\x0eListFrameworks\x12>.google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest\x1a?.google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse\"v\xda\x41\x06parent\x82\xd3\xe4\x93\x02g\x12\x33/v1/{parent=organizations/*/locations/*}/frameworksZ0\x12./v1/{parent=projects/*/locations/*}/frameworks\x12\xf6\x01\n\x0cGetFramework\x12<.google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest\x1a\x32.google.cloud.cloudsecuritycompliance.v1.Framework\"t\xda\x41\x04name\x82\xd3\xe4\x93\x02g\x12\x33/v1/{name=organizations/*/locations/*/frameworks/*}Z0\x12./v1/{name=projects/*/locations/*/frameworks/*}\x12\xac\x02\n\x0f\x43reateFramework\x12?.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest\x1a\x32.google.cloud.cloudsecuritycompliance.v1.Framework\"\xa3\x01\xda\x41\x1dparent,framework,framework_id\x82\xd3\xe4\x93\x02}\"3/v1/{parent=organizations/*/locations/*}/frameworks:\tframeworkZ;\"./v1/{parent=projects/*/locations/*}/frameworks:\tframework\x12\xb9\x02\n\x0fUpdateFramework\x12?.google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest\x1a\x32.google.cloud.cloudsecuritycompliance.v1.Framework\"\xb0\x01\xda\x41\x15\x66ramework,update_mask\x82\xd3\xe4\x93\x02\x91\x01\x32=/v1/{framework.name=organizations/*/locations/*/frameworks/*}:\tframeworkZE28/v1/{framework.name=projects/*/locations/*/frameworks/*}:\tframework\x12\xe0\x01\n\x0f\x44\x65leteFramework\x12?.google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest\x1a\x16.google.protobuf.Empty\"t\xda\x41\x04name\x82\xd3\xe4\x93\x02g*3/v1/{name=organizations/*/locations/*/frameworks/*}Z0*./v1/{name=projects/*/locations/*/frameworks/*}\x12\x98\x02\n\x11ListCloudControls\x12\x41.google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest\x1a\x42.google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse\"|\xda\x41\x06parent\x82\xd3\xe4\x93\x02m\x12\x36/v1/{parent=organizations/*/locations/*}/cloudControlsZ3\x12\x31/v1/{parent=projects/*/locations/*}/cloudControls\x12\x85\x02\n\x0fGetCloudControl\x12?.google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest\x1a\x35.google.cloud.cloudsecuritycompliance.v1.CloudControl\"z\xda\x41\x04name\x82\xd3\xe4\x93\x02m\x12\x36/v1/{name=organizations/*/locations/*/cloudControls/*}Z3\x12\x31/v1/{name=projects/*/locations/*/cloudControls/*}\x12\xcc\x02\n\x12\x43reateCloudControl\x12\x42.google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest\x1a\x35.google.cloud.cloudsecuritycompliance.v1.CloudControl\"\xba\x01\xda\x41%parent,cloud_control,cloud_control_id\x82\xd3\xe4\x93\x02\x8b\x01\"6/v1/{parent=organizations/*/locations/*}/cloudControls:\rcloud_controlZB\"1/v1/{parent=projects/*/locations/*}/cloudControls:\rcloud_control\x12\xdc\x02\n\x12UpdateCloudControl\x12\x42.google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest\x1a\x35.google.cloud.cloudsecuritycompliance.v1.CloudControl\"\xca\x01\xda\x41\x19\x63loud_control,update_mask\x82\xd3\xe4\x93\x02\xa7\x01\x32\x44/v1/{cloud_control.name=organizations/*/locations/*/cloudControls/*}:\rcloud_controlZP2?/v1/{cloud_control.name=projects/*/locations/*/cloudControls/*}:\rcloud_control\x12\xec\x01\n\x12\x44\x65leteCloudControl\x12\x42.google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest\x1a\x16.google.protobuf.Empty\"z\xda\x41\x04name\x82\xd3\xe4\x93\x02m*6/v1/{name=organizations/*/locations/*/cloudControls/*}Z3*1/v1/{name=projects/*/locations/*/cloudControls/*}\x1aZ\xca\x41&cloudsecuritycompliance.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xa4\x02\n+com.google.cloud.cloudsecuritycompliance.v1B\x0b\x43onfigProtoP\x01Zecloud.google.com/go/cloudsecuritycompliance/apiv1/cloudsecuritycompliancepb;cloudsecuritycompliancepb\xaa\x02\'Google.Cloud.CloudSecurityCompliance.V1\xca\x02\'Google\\Cloud\\CloudSecurityCompliance\\V1\xea\x02*Google::Cloud::CloudSecurityCompliance::V1b\x06proto3" pool = ::Google::Protobuf::DescriptorPool.generated_pool pool.add_serialized_file(descriptor_data) diff --git a/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/deployment_pb.rb b/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/deployment_pb.rb index e93e9768d216..ed79434c5c14 100644 --- a/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/deployment_pb.rb +++ b/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/deployment_pb.rb @@ -14,7 +14,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n8google/cloud/cloudsecuritycompliance/v1/deployment.proto\x12\'google.cloud.cloudsecuritycompliance.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x34google/cloud/cloudsecuritycompliance/v1/common.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd2\x07\n\x13\x46rameworkDeployment\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x62\n\x16target_resource_config\x18\x02 \x01(\x0b\x32=.google.cloud.cloudsecuritycompliance.v1.TargetResourceConfigB\x03\xe0\x41\x02\x12%\n\x18\x63omputed_target_resource\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12S\n\tframework\x18\x04 \x01(\x0b\x32;.google.cloud.cloudsecuritycompliance.v1.FrameworkReferenceB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x62\n\x16\x63loud_control_metadata\x18\x06 \x03(\x0b\x32=.google.cloud.cloudsecuritycompliance.v1.CloudControlMetadataB\x03\xe0\x41\x02\x12W\n\x10\x64\x65ployment_state\x18\x07 \x01(\x0e\x32\x38.google.cloud.cloudsecuritycompliance.v1.DeploymentStateB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\x0b \x01(\tB\x03\xe0\x41\x01\x12)\n\x1ctarget_resource_display_name\x18\r \x01(\tB\x03\xe0\x41\x03\x12z\n#cloud_control_deployment_references\x18\x0e \x03(\x0b\x32H.google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReferenceB\x03\xe0\x41\x03:\xca\x01\xea\x41\xc6\x01\n:cloudsecuritycompliance.googleapis.com/FrameworkDeployment\x12]organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}*\x14\x66rameworkDeployments2\x13\x66rameworkDeployment\"\xe9\x07\n\x16\x43loudControlDeployment\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x62\n\x16target_resource_config\x18\x02 \x01(\x0b\x32=.google.cloud.cloudsecuritycompliance.v1.TargetResourceConfigB\x03\xe0\x41\x02\x12\x1c\n\x0ftarget_resource\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x62\n\x16\x63loud_control_metadata\x18\x04 \x01(\x0b\x32=.google.cloud.cloudsecuritycompliance.v1.CloudControlMetadataB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12W\n\x10\x64\x65ployment_state\x18\x06 \x01(\x0e\x32\x38.google.cloud.cloudsecuritycompliance.v1.DeploymentStateB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\t \x01(\tB\x03\xe0\x41\x01\x12g\n#parameter_substituted_cloud_control\x18\n \x01(\x0b\x32\x35.google.cloud.cloudsecuritycompliance.v1.CloudControlB\x03\xe0\x41\x03\x12s\n\x1f\x66ramework_deployment_references\x18\x0b \x03(\x0b\x32\x45.google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReferenceB\x03\xe0\x41\x03\x12)\n\x1ctarget_resource_display_name\x18\x0c \x01(\tB\x03\xe0\x41\x03:\xda\x01\xea\x41\xd6\x01\n=cloudsecuritycompliance.googleapis.com/CloudControlDeployment\x12\x64organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}*\x17\x63loudControlDeployments2\x16\x63loudControlDeployment\"\xc9\x01\n\x14TargetResourceConfig\x12\'\n\x18\x65xisting_target_resource\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x12u\n\x1ftarget_resource_creation_config\x18\x02 \x01(\x0b\x32\x45.google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfigB\x03\xe0\x41\x01H\x00\x42\x11\n\x0fresource_config\"\x88\x02\n\x1cTargetResourceCreationConfig\x12\x64\n\x16\x66older_creation_config\x18\x01 \x01(\x0b\x32=.google.cloud.cloudsecuritycompliance.v1.FolderCreationConfigB\x03\xe0\x41\x01H\x00\x12\x66\n\x17project_creation_config\x18\x02 \x01(\x0b\x32>.google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfigB\x03\xe0\x41\x01H\x00\x42\x1a\n\x18resource_creation_config\"M\n\x14\x46olderCreationConfig\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12 \n\x13\x66older_display_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\"p\n\x15ProjectCreationConfig\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x14project_display_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x1f\n\x12\x62illing_account_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\xd1\x01\n\x14\x43loudControlMetadata\x12`\n\x15\x63loud_control_details\x18\x01 \x01(\x0b\x32<.google.cloud.cloudsecuritycompliance.v1.CloudControlDetailsB\x03\xe0\x41\x02\x12W\n\x10\x65nforcement_mode\x18\x02 \x01(\x0e\x32\x38.google.cloud.cloudsecuritycompliance.v1.EnforcementModeB\x03\xe0\x41\x02\"\xfd\x01\n CreateFrameworkDeploymentRequest\x12R\n\x06parent\x18\x01 \x01(\tBB\xe0\x41\x02\xfa\x41<\x12:cloudsecuritycompliance.googleapis.com/FrameworkDeployment\x12$\n\x17\x66ramework_deployment_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12_\n\x14\x66ramework_deployment\x18\x03 \x01(\x0b\x32<.google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentB\x03\xe0\x41\x02\"\x87\x01\n DeleteFrameworkDeploymentRequest\x12P\n\x04name\x18\x01 \x01(\tBB\xe0\x41\x02\xfa\x41<\n:cloudsecuritycompliance.googleapis.com/FrameworkDeployment\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"q\n\x1dGetFrameworkDeploymentRequest\x12P\n\x04name\x18\x01 \x01(\tBB\xe0\x41\x02\xfa\x41<\n:cloudsecuritycompliance.googleapis.com/FrameworkDeployment\"\xd2\x01\n\x1fListFrameworkDeploymentsRequest\x12R\n\x06parent\x18\x01 \x01(\tBB\xe0\x41\x02\xfa\x41<\x12:cloudsecuritycompliance.googleapis.com/FrameworkDeployment\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x98\x01\n ListFrameworkDeploymentsResponse\x12[\n\x15\x66ramework_deployments\x18\x01 \x03(\x0b\x32<.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"w\n GetCloudControlDeploymentRequest\x12S\n\x04name\x18\x01 \x01(\tBE\xe0\x41\x02\xfa\x41?\n=cloudsecuritycompliance.googleapis.com/CloudControlDeployment\"\xd8\x01\n\"ListCloudControlDeploymentsRequest\x12U\n\x06parent\x18\x01 \x01(\tBE\xe0\x41\x02\xfa\x41?\x12=cloudsecuritycompliance.googleapis.com/CloudControlDeployment\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xa2\x01\n#ListCloudControlDeploymentsResponse\x12\x62\n\x19\x63loud_control_deployments\x18\x01 \x03(\x0b\x32?.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x8a\x01\n\x1f\x43loudControlDeploymentReference\x12g\n\x18\x63loud_control_deployment\x18\x01 \x01(\tBE\xe0\x41\x03\xfa\x41?\n=cloudsecuritycompliance.googleapis.com/CloudControlDeployment\"\x84\x02\n\x1c\x46rameworkDeploymentReference\x12`\n\x14\x66ramework_deployment\x18\x01 \x01(\tBB\xe0\x41\x03\xfa\x41<\n:cloudsecuritycompliance.googleapis.com/FrameworkDeployment\x12]\n\x13\x66ramework_reference\x18\x02 \x01(\x0b\x32;.google.cloud.cloudsecuritycompliance.v1.FrameworkReferenceB\x03\xe0\x41\x01\x12#\n\x16\x66ramework_display_name\x18\x03 \x01(\tB\x03\xe0\x41\x01*\x9c\x02\n\x0f\x44\x65ploymentState\x12 \n\x1c\x44\x45PLOYMENT_STATE_UNSPECIFIED\x10\x00\x12\x1f\n\x1b\x44\x45PLOYMENT_STATE_VALIDATING\x10\x01\x12\x1d\n\x19\x44\x45PLOYMENT_STATE_CREATING\x10\x02\x12\x1d\n\x19\x44\x45PLOYMENT_STATE_DELETING\x10\x03\x12\x1b\n\x17\x44\x45PLOYMENT_STATE_FAILED\x10\x04\x12\x1a\n\x16\x44\x45PLOYMENT_STATE_READY\x10\x05\x12\'\n#DEPLOYMENT_STATE_PARTIALLY_DEPLOYED\x10\x06\x12&\n\"DEPLOYMENT_STATE_PARTIALLY_DELETED\x10\x07\x32\xfd\r\n\nDeployment\x12\xec\x02\n\x19\x43reateFrameworkDeployment\x12I.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest\x1a\x1d.google.longrunning.Operation\"\xe4\x01\xca\x41P\n\x13\x46rameworkDeployment\x12\x39google.cloud.cloudsecuritycompliance.v1.OperationMetadata\xda\x41\x33parent,framework_deployment,framework_deployment_id\x82\xd3\xe4\x93\x02U\"=/v1/{parent=organizations/*/locations/*}/frameworkDeployments:\x14\x66ramework_deployment\x12\xa9\x02\n\x19\x44\x65leteFrameworkDeployment\x12I.google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest\x1a\x1d.google.longrunning.Operation\"\xa1\x01\xca\x41R\n\x15google.protobuf.Empty\x12\x39google.cloud.cloudsecuritycompliance.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02?*=/v1/{name=organizations/*/locations/*/frameworkDeployments/*}\x12\xec\x01\n\x16GetFrameworkDeployment\x12\x46.google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest\x1a<.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment\"L\xda\x41\x04name\x82\xd3\xe4\x93\x02?\x12=/v1/{name=organizations/*/locations/*/frameworkDeployments/*}\x12\xff\x01\n\x18ListFrameworkDeployments\x12H.google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest\x1aI.google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse\"N\xda\x41\x06parent\x82\xd3\xe4\x93\x02?\x12=/v1/{parent=organizations/*/locations/*}/frameworkDeployments\x12\xf8\x01\n\x19GetCloudControlDeployment\x12I.google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest\x1a?.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42\x12@/v1/{name=organizations/*/locations/*/cloudControlDeployments/*}\x12\x8b\x02\n\x1bListCloudControlDeployments\x12K.google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest\x1aL.google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse\"Q\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x42\x12@/v1/{parent=organizations/*/locations/*}/cloudControlDeployments\x1aZ\xca\x41&cloudsecuritycompliance.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xa8\x02\n+com.google.cloud.cloudsecuritycompliance.v1B\x0f\x44\x65ploymentProtoP\x01Zecloud.google.com/go/cloudsecuritycompliance/apiv1/cloudsecuritycompliancepb;cloudsecuritycompliancepb\xaa\x02\'Google.Cloud.CloudSecurityCompliance.V1\xca\x02\'Google\\Cloud\\CloudSecurityCompliance\\V1\xea\x02*Google::Cloud::CloudSecurityCompliance::V1b\x06proto3" +descriptor_data = "\n8google/cloud/cloudsecuritycompliance/v1/deployment.proto\x12\'google.cloud.cloudsecuritycompliance.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x34google/cloud/cloudsecuritycompliance/v1/common.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa7\x08\n\x13\x46rameworkDeployment\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x62\n\x16target_resource_config\x18\x02 \x01(\x0b\x32=.google.cloud.cloudsecuritycompliance.v1.TargetResourceConfigB\x03\xe0\x41\x02\x12%\n\x18\x63omputed_target_resource\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12S\n\tframework\x18\x04 \x01(\x0b\x32;.google.cloud.cloudsecuritycompliance.v1.FrameworkReferenceB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x62\n\x16\x63loud_control_metadata\x18\x06 \x03(\x0b\x32=.google.cloud.cloudsecuritycompliance.v1.CloudControlMetadataB\x03\xe0\x41\x02\x12W\n\x10\x64\x65ployment_state\x18\x07 \x01(\x0e\x32\x38.google.cloud.cloudsecuritycompliance.v1.DeploymentStateB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\x0b \x01(\tB\x03\xe0\x41\x01\x12)\n\x1ctarget_resource_display_name\x18\r \x01(\tB\x03\xe0\x41\x03\x12z\n#cloud_control_deployment_references\x18\x0e \x03(\x0b\x32H.google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReferenceB\x03\xe0\x41\x03:\x9f\x02\xea\x41\x9b\x02\n:cloudsecuritycompliance.googleapis.com/FrameworkDeployment\x12]organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}\x12Sprojects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}*\x14\x66rameworkDeployments2\x13\x66rameworkDeployment\"\xc5\x08\n\x16\x43loudControlDeployment\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x62\n\x16target_resource_config\x18\x02 \x01(\x0b\x32=.google.cloud.cloudsecuritycompliance.v1.TargetResourceConfigB\x03\xe0\x41\x02\x12\x1c\n\x0ftarget_resource\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x62\n\x16\x63loud_control_metadata\x18\x04 \x01(\x0b\x32=.google.cloud.cloudsecuritycompliance.v1.CloudControlMetadataB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12W\n\x10\x64\x65ployment_state\x18\x06 \x01(\x0e\x32\x38.google.cloud.cloudsecuritycompliance.v1.DeploymentStateB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\t \x01(\tB\x03\xe0\x41\x01\x12g\n#parameter_substituted_cloud_control\x18\n \x01(\x0b\x32\x35.google.cloud.cloudsecuritycompliance.v1.CloudControlB\x03\xe0\x41\x03\x12s\n\x1f\x66ramework_deployment_references\x18\x0b \x03(\x0b\x32\x45.google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReferenceB\x03\xe0\x41\x03\x12)\n\x1ctarget_resource_display_name\x18\x0c \x01(\tB\x03\xe0\x41\x03:\xb6\x02\xea\x41\xb2\x02\n=cloudsecuritycompliance.googleapis.com/CloudControlDeployment\x12\x64organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}\x12Zprojects/{project}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}*\x17\x63loudControlDeployments2\x16\x63loudControlDeployment\"\xc9\x01\n\x14TargetResourceConfig\x12\'\n\x18\x65xisting_target_resource\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x12u\n\x1ftarget_resource_creation_config\x18\x02 \x01(\x0b\x32\x45.google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfigB\x03\xe0\x41\x01H\x00\x42\x11\n\x0fresource_config\"\x88\x02\n\x1cTargetResourceCreationConfig\x12\x64\n\x16\x66older_creation_config\x18\x01 \x01(\x0b\x32=.google.cloud.cloudsecuritycompliance.v1.FolderCreationConfigB\x03\xe0\x41\x01H\x00\x12\x66\n\x17project_creation_config\x18\x02 \x01(\x0b\x32>.google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfigB\x03\xe0\x41\x01H\x00\x42\x1a\n\x18resource_creation_config\"M\n\x14\x46olderCreationConfig\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12 \n\x13\x66older_display_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\"p\n\x15ProjectCreationConfig\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x14project_display_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x1f\n\x12\x62illing_account_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\xd1\x01\n\x14\x43loudControlMetadata\x12`\n\x15\x63loud_control_details\x18\x01 \x01(\x0b\x32<.google.cloud.cloudsecuritycompliance.v1.CloudControlDetailsB\x03\xe0\x41\x02\x12W\n\x10\x65nforcement_mode\x18\x02 \x01(\x0e\x32\x38.google.cloud.cloudsecuritycompliance.v1.EnforcementModeB\x03\xe0\x41\x02\"\xfd\x01\n CreateFrameworkDeploymentRequest\x12R\n\x06parent\x18\x01 \x01(\tBB\xe0\x41\x02\xfa\x41<\x12:cloudsecuritycompliance.googleapis.com/FrameworkDeployment\x12$\n\x17\x66ramework_deployment_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12_\n\x14\x66ramework_deployment\x18\x03 \x01(\x0b\x32<.google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentB\x03\xe0\x41\x02\"\x87\x01\n DeleteFrameworkDeploymentRequest\x12P\n\x04name\x18\x01 \x01(\tBB\xe0\x41\x02\xfa\x41<\n:cloudsecuritycompliance.googleapis.com/FrameworkDeployment\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"q\n\x1dGetFrameworkDeploymentRequest\x12P\n\x04name\x18\x01 \x01(\tBB\xe0\x41\x02\xfa\x41<\n:cloudsecuritycompliance.googleapis.com/FrameworkDeployment\"\xd2\x01\n\x1fListFrameworkDeploymentsRequest\x12R\n\x06parent\x18\x01 \x01(\tBB\xe0\x41\x02\xfa\x41<\x12:cloudsecuritycompliance.googleapis.com/FrameworkDeployment\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x98\x01\n ListFrameworkDeploymentsResponse\x12[\n\x15\x66ramework_deployments\x18\x01 \x03(\x0b\x32<.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"w\n GetCloudControlDeploymentRequest\x12S\n\x04name\x18\x01 \x01(\tBE\xe0\x41\x02\xfa\x41?\n=cloudsecuritycompliance.googleapis.com/CloudControlDeployment\"\xd8\x01\n\"ListCloudControlDeploymentsRequest\x12U\n\x06parent\x18\x01 \x01(\tBE\xe0\x41\x02\xfa\x41?\x12=cloudsecuritycompliance.googleapis.com/CloudControlDeployment\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xa2\x01\n#ListCloudControlDeploymentsResponse\x12\x62\n\x19\x63loud_control_deployments\x18\x01 \x03(\x0b\x32?.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x8a\x01\n\x1f\x43loudControlDeploymentReference\x12g\n\x18\x63loud_control_deployment\x18\x01 \x01(\tBE\xe0\x41\x03\xfa\x41?\n=cloudsecuritycompliance.googleapis.com/CloudControlDeployment\"\x84\x02\n\x1c\x46rameworkDeploymentReference\x12`\n\x14\x66ramework_deployment\x18\x01 \x01(\tBB\xe0\x41\x03\xfa\x41<\n:cloudsecuritycompliance.googleapis.com/FrameworkDeployment\x12]\n\x13\x66ramework_reference\x18\x02 \x01(\x0b\x32;.google.cloud.cloudsecuritycompliance.v1.FrameworkReferenceB\x03\xe0\x41\x01\x12#\n\x16\x66ramework_display_name\x18\x03 \x01(\tB\x03\xe0\x41\x01*\xbb\x02\n\x0f\x44\x65ploymentState\x12 \n\x1c\x44\x45PLOYMENT_STATE_UNSPECIFIED\x10\x00\x12\x1f\n\x1b\x44\x45PLOYMENT_STATE_VALIDATING\x10\x01\x12\x1d\n\x19\x44\x45PLOYMENT_STATE_CREATING\x10\x02\x12\x1d\n\x19\x44\x45PLOYMENT_STATE_DELETING\x10\x03\x12\x1d\n\x19\x44\x45PLOYMENT_STATE_UPDATING\x10\x08\x12\x1b\n\x17\x44\x45PLOYMENT_STATE_FAILED\x10\x04\x12\x1a\n\x16\x44\x45PLOYMENT_STATE_READY\x10\x05\x12\'\n#DEPLOYMENT_STATE_PARTIALLY_DEPLOYED\x10\x06\x12&\n\"DEPLOYMENT_STATE_PARTIALLY_DELETED\x10\x07\x32\x88\x11\n\nDeployment\x12\xbf\x03\n\x19\x43reateFrameworkDeployment\x12I.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest\x1a\x1d.google.longrunning.Operation\"\xb7\x02\xca\x41P\n\x13\x46rameworkDeployment\x12\x39google.cloud.cloudsecuritycompliance.v1.OperationMetadata\xda\x41\x33parent,framework_deployment,framework_deployment_id\x82\xd3\xe4\x93\x02\xa7\x01\"=/v1/{parent=organizations/*/locations/*}/frameworkDeployments:\x14\x66ramework_deploymentZP\"8/v1/{parent=projects/*/locations/*}/frameworkDeployments:\x14\x66ramework_deployment\x12\xe5\x02\n\x19\x44\x65leteFrameworkDeployment\x12I.google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest\x1a\x1d.google.longrunning.Operation\"\xdd\x01\xca\x41R\n\x15google.protobuf.Empty\x12\x39google.cloud.cloudsecuritycompliance.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02{*=/v1/{name=organizations/*/locations/*/frameworkDeployments/*}Z:*8/v1/{name=projects/*/locations/*/frameworkDeployments/*}\x12\xa9\x02\n\x16GetFrameworkDeployment\x12\x46.google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest\x1a<.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment\"\x88\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02{\x12=/v1/{name=organizations/*/locations/*/frameworkDeployments/*}Z:\x12\x38/v1/{name=projects/*/locations/*/frameworkDeployments/*}\x12\xbc\x02\n\x18ListFrameworkDeployments\x12H.google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest\x1aI.google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse\"\x8a\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02{\x12=/v1/{parent=organizations/*/locations/*}/frameworkDeploymentsZ:\x12\x38/v1/{parent=projects/*/locations/*}/frameworkDeployments\x12\xb9\x02\n\x19GetCloudControlDeployment\x12I.google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest\x1a?.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment\"\x8f\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\x81\x01\x12@/v1/{name=organizations/*/locations/*/cloudControlDeployments/*}Z=\x12;/v1/{name=projects/*/locations/*/cloudControlDeployments/*}\x12\xcc\x02\n\x1bListCloudControlDeployments\x12K.google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest\x1aL.google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse\"\x91\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x81\x01\x12@/v1/{parent=organizations/*/locations/*}/cloudControlDeploymentsZ=\x12;/v1/{parent=projects/*/locations/*}/cloudControlDeployments\x1aZ\xca\x41&cloudsecuritycompliance.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xa8\x02\n+com.google.cloud.cloudsecuritycompliance.v1B\x0f\x44\x65ploymentProtoP\x01Zecloud.google.com/go/cloudsecuritycompliance/apiv1/cloudsecuritycompliancepb;cloudsecuritycompliancepb\xaa\x02\'Google.Cloud.CloudSecurityCompliance.V1\xca\x02\'Google\\Cloud\\CloudSecurityCompliance\\V1\xea\x02*Google::Cloud::CloudSecurityCompliance::V1b\x06proto3" pool = ::Google::Protobuf::DescriptorPool.generated_pool pool.add_serialized_file(descriptor_data) diff --git a/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/monitoring_pb.rb b/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/monitoring_pb.rb index af3a8f719602..5eaaaa4c0538 100644 --- a/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/monitoring_pb.rb +++ b/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/monitoring_pb.rb @@ -9,11 +9,12 @@ require 'google/api/field_behavior_pb' require 'google/api/resource_pb' require 'google/cloud/cloudsecuritycompliance/v1/common_pb' +require 'google/protobuf/duration_pb' require 'google/protobuf/timestamp_pb' require 'google/type/interval_pb' -descriptor_data = "\n8google/cloud/cloudsecuritycompliance/v1/monitoring.proto\x12\'google.cloud.cloudsecuritycompliance.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x34google/cloud/cloudsecuritycompliance/v1/common.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1agoogle/type/interval.proto\"\xca\x01\n\'ListFrameworkComplianceSummariesRequest\x12Y\n\x06parent\x18\x01 \x01(\tBI\xe0\x41\x02\xfa\x41\x43\x12\x41\x63loudsecuritycompliance.googleapis.com/FrameworkComplianceSummary\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xb5\x01\n(ListFrameworkComplianceSummariesResponse\x12k\n\x1e\x66ramework_compliance_summaries\x18\x01 \x03(\x0b\x32\x43.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x03\"\xf6\x08\n\x19\x46rameworkComplianceReport\x12\x11\n\tframework\x18\x01 \x01(\t\x12\x1d\n\x15\x66ramework_description\x18\x02 \x01(\t\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x65\n\x1a\x63ontrol_assessment_details\x18\x04 \x01(\x0b\x32\x41.google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails\x12X\n\x0e\x66ramework_type\x18\x05 \x01(\x0e\x32@.google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType\x12Y\n\x19supported_cloud_providers\x18\x06 \x03(\x0e\x32\x36.google.cloud.cloudsecuritycompliance.v1.CloudProvider\x12X\n\x14\x66ramework_categories\x18\x07 \x03(\x0e\x32:.google.cloud.cloudsecuritycompliance.v1.FrameworkCategory\x12#\n\x16\x66ramework_display_name\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04name\x18\t \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x11major_revision_id\x18\n \x01(\x03\x12\x19\n\x11minor_revision_id\x18\x0b \x01(\x03\x12_\n\x17target_resource_details\x18\x0c \x03(\x0b\x32>.google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails:\xab\x03\xea\x41\xa7\x03\n@cloudsecuritycompliance.googleapis.com/FrameworkComplianceReport\x12`projects/{project}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}\x12^folders/{folder}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}\x12jorganizations/{organization}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}*\x1a\x66rameworkComplianceReports2\x19\x66rameworkComplianceReport\"\xb2\x01\n%FetchFrameworkComplianceReportRequest\x12V\n\x04name\x18\x01 \x01(\tBH\xe0\x41\x02\xfa\x41\x42\n@cloudsecuritycompliance.googleapis.com/FrameworkComplianceReport\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\"\xe7\x01\n\x1bListFindingSummariesRequest\x12M\n\x06parent\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\x12\x35\x63loudsecuritycompliance.googleapis.com/FindingSummary\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x33\n\x08\x65nd_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x05\x18\x01\xe0\x41\x01\"\x90\x01\n\x1cListFindingSummariesResponse\x12R\n\x11\x66inding_summaries\x18\x01 \x03(\x0b\x32\x37.google.cloud.cloudsecuritycompliance.v1.FindingSummary\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x03\"\xfb\x01\n%ListControlComplianceSummariesRequest\x12W\n\x06parent\x18\x01 \x01(\tBG\xe0\x41\x02\xfa\x41\x41\x12?cloudsecuritycompliance.googleapis.com/ControlComplianceSummary\x12\x33\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x05\x18\x01\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xaf\x01\n&ListControlComplianceSummariesResponse\x12g\n\x1c\x63ontrol_compliance_summaries\x18\x01 \x03(\x0b\x32\x41.google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x03\"\xc6\x01\n)AggregateFrameworkComplianceReportRequest\x12V\n\x04name\x18\x01 \x01(\tBH\xe0\x41\x02\xfa\x41\x42\n@cloudsecuritycompliance.googleapis.com/FrameworkComplianceReport\x12,\n\x08interval\x18\x02 \x01(\x0b\x32\x15.google.type.IntervalB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x98\x01\n*AggregateFrameworkComplianceReportResponse\x12j\n\x1d\x61ggregated_compliance_reports\x18\x01 \x03(\x0b\x32\x43.google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport\"\x90\x01\n\x18\x43ontrolAssessmentDetails\x12\x18\n\x10passing_controls\x18\x01 \x01(\x05\x12\x18\n\x10\x66\x61iling_controls\x18\x02 \x01(\x05\x12!\n\x19\x61ssessed_passing_controls\x18\x03 \x01(\x05\x12\x1d\n\x15not_assessed_controls\x18\x04 \x01(\x05\"\xaf\x08\n\x1a\x46rameworkComplianceSummary\x12\x11\n\tframework\x18\x01 \x01(\t\x12\x65\n\x1a\x63ontrol_assessment_details\x18\x02 \x01(\x0b\x32\x41.google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails\x12X\n\x0e\x66ramework_type\x18\x03 \x01(\x0e\x32@.google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType\x12Y\n\x19supported_cloud_providers\x18\x04 \x03(\x0e\x32\x36.google.cloud.cloudsecuritycompliance.v1.CloudProvider\x12X\n\x14\x66ramework_categories\x18\x05 \x03(\x0e\x32:.google.cloud.cloudsecuritycompliance.v1.FrameworkCategory\x12#\n\x16\x66ramework_display_name\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04name\x18\x07 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x11major_revision_id\x18\x08 \x01(\x03\x12\x19\n\x11minor_revision_id\x18\t \x01(\x03\x12_\n\x17target_resource_details\x18\n \x03(\x0b\x32>.google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails:\xb8\x03\xea\x41\xb4\x03\nAcloudsecuritycompliance.googleapis.com/FrameworkComplianceSummary\x12\x63projects/{project}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}\x12\x61\x66olders/{folder}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}\x12morganizations/{organization}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}*\x1c\x66rameworkComplianceSummaries2\x1a\x66rameworkComplianceSummary\"\x8a\x05\n\x0e\x46indingSummary\x12\x18\n\x10\x66inding_category\x18\x01 \x01(\t\x12L\n\rfinding_class\x18\x02 \x01(\x0e\x32\x35.google.cloud.cloudsecuritycompliance.v1.FindingClass\x12\x43\n\x08severity\x18\x03 \x01(\x0e\x32\x31.google.cloud.cloudsecuritycompliance.v1.Severity\x12\x15\n\rfinding_count\x18\x04 \x01(\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1f\n\x12related_frameworks\x18\x06 \x03(\tB\x03\xe0\x41\x01\x12\x11\n\x04name\x18\x07 \x01(\tB\x03\xe0\x41\x08:\xc9\x02\xea\x41\xc5\x02\n5cloudsecuritycompliance.googleapis.com/FindingSummary\x12Jprojects/{project}/locations/{location}/findingSummaries/{finding_summary}\x12Hfolders/{folder}/locations/{location}/findingSummaries/{finding_summary}\x12Torganizations/{organization}/locations/{location}/findingSummaries/{finding_summary}*\x10\x66indingSummaries2\x0e\x66indingSummary\"\x9a\t\n\x18\x43ontrolComplianceSummary\x12\x0f\n\x07\x63ontrol\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12_\n\x18overall_evaluation_state\x18\x04 \x01(\x0e\x32\x38.google.cloud.cloudsecuritycompliance.v1.EvaluationStateB\x03\xe0\x41\x03\x12\x1c\n\x14total_findings_count\x18\x05 \x01(\x05\x12\x1d\n\x15\x63ompliance_frameworks\x18\x06 \x03(\t\x12R\n\x10similar_controls\x18\x07 \x03(\x0b\x32\x38.google.cloud.cloudsecuritycompliance.v1.SimilarControls\x12Z\n\x15\x63loud_control_reports\x18\x08 \x03(\x0b\x32;.google.cloud.cloudsecuritycompliance.v1.CloudControlReport\x12q\n\x1b\x63ontrol_responsibility_type\x18\t \x01(\x0e\x32L.google.cloud.cloudsecuritycompliance.v1.RegulatoryControlResponsibilityType\x12\x17\n\x0fis_fake_control\x18\n \x01(\x08\x12\x11\n\x04name\x18\x0b \x01(\tB\x03\xe0\x41\x08:\xd4\x04\xea\x41\xd0\x04\n?cloudsecuritycompliance.googleapis.com/ControlComplianceSummary\x12\x98\x01projects/{project}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}/controlComplianceSummaries/{control_compliance_summary}\x12\x96\x01\x66olders/{folder}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}/controlComplianceSummaries/{control_compliance_summary}\x12\xa2\x01organizations/{organization}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}/controlComplianceSummaries/{control_compliance_summary}*\x1a\x63ontrolComplianceSummaries2\x18\x63ontrolComplianceSummary\"\x98\x07\n\x12\x43loudControlReport\x12\x7f\n\'manual_cloud_control_assessment_details\x18\r \x01(\x0b\x32L.google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetailsH\x00\x12r\n cloud_control_assessment_details\x18\x0e \x01(\x0b\x32\x46.google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetailsH\x00\x12\x15\n\rcloud_control\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x12\n\ncategories\x18\x06 \x03(\t\x12R\n\x10similar_controls\x18\t \x03(\x0b\x32\x38.google.cloud.cloudsecuritycompliance.v1.SimilarControls\x12V\n\x12\x63loud_control_type\x18\n \x01(\x0e\x32:.google.cloud.cloudsecuritycompliance.v1.CloudControl.Type\x12\x18\n\x10\x66inding_category\x18\x0b \x01(\t\x12<\n\x05rules\x18\x0c \x03(\x0b\x32-.google.cloud.cloudsecuritycompliance.v1.Rule\x12K\n\x10\x66inding_severity\x18\x0f \x01(\x0e\x32\x31.google.cloud.cloudsecuritycompliance.v1.Severity\x12R\n\x10\x65nforcement_mode\x18\x10 \x01(\x0e\x32\x38.google.cloud.cloudsecuritycompliance.v1.EnforcementMode\x12 \n\x18\x63loud_control_deployment\x18\x11 \x01(\t\x12\x19\n\x11major_revision_id\x18\x12 \x01(\x03\x12\x19\n\x11minor_revision_id\x18\x13 \x01(\x03\x12$\n\x1c\x66ramework_major_revision_ids\x18\x14 \x03(\x03\x42\x14\n\x12\x61ssessment_details\"I\n#ManualCloudControlAssessmentDetails\x12\"\n\x1amanual_cloud_control_guide\x18\x01 \x03(\t\"\x90\x01\n\x1d\x43loudControlAssessmentDetails\x12\x16\n\x0e\x66indings_count\x18\x01 \x01(\x05\x12W\n\x10\x65valuation_state\x18\x02 \x01(\x0e\x32\x38.google.cloud.cloudsecuritycompliance.v1.EvaluationStateB\x03\xe0\x41\x03\"8\n\x0fSimilarControls\x12\x11\n\tframework\x18\x01 \x01(\t\x12\x12\n\ncontrol_id\x18\x02 \x01(\t\"\xb4\x01\n\x1a\x41ggregatedComplianceReport\x12\x65\n\x1a\x63ontrol_assessment_details\x18\x01 \x01(\x0b\x32\x41.google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails\x12/\n\x0breport_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x8c\x02\n\x15TargetResourceDetails\x12\x1c\n\x14\x66ramework_deployment\x18\x01 \x01(\t\x12$\n\x1ctarget_resource_display_name\x18\x02 \x01(\t\x12\x17\n\x0ftarget_resource\x18\x03 \x01(\t\x12/\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x19\n\x11major_revision_id\x18\x06 \x01(\x03\x12\x19\n\x11minor_revision_id\x18\x07 \x01(\x03*\x90\x01\n\x0f\x45valuationState\x12 \n\x1c\x45VALUATION_STATE_UNSPECIFIED\x10\x00\x12\x1b\n\x17\x45VALUATION_STATE_PASSED\x10\x01\x12\x1b\n\x17\x45VALUATION_STATE_FAILED\x10\x02\x12!\n\x1d\x45VALUATION_STATE_NOT_ASSESSED\x10\x03*\xd9\x01\n\x0c\x46indingClass\x12\x1d\n\x19\x46INDING_CLASS_UNSPECIFIED\x10\x00\x12\n\n\x06THREAT\x10\x01\x12\x11\n\rVULNERABILITY\x10\x02\x12\x14\n\x10MISCONFIGURATION\x10\x03\x12\x0f\n\x0bOBSERVATION\x10\x04\x12\r\n\tSCC_ERROR\x10\x05\x12\x15\n\x11POSTURE_VIOLATION\x10\x06\x12\x15\n\x11TOXIC_COMBINATION\x10\x07\x12\x17\n\x13SENSITIVE_DATA_RISK\x10\x08\x12\x0e\n\nCHOKEPOINT\x10\t2\xd5\x11\n\nMonitoring\x12\xa8\x03\n ListFrameworkComplianceSummaries\x12P.google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest\x1aQ.google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse\"\xde\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xce\x01\x12\x45/v1/{parent=organizations/*/locations/*}/frameworkComplianceSummariesZA\x12?/v1/{parent=folders/*/locations/*}/frameworkComplianceSummariesZB\x12@/v1/{parent=projects/*/locations/*}/frameworkComplianceSummaries\x12\xe0\x02\n\x14ListFindingSummaries\x12\x44.google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest\x1a\x45.google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse\"\xba\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xaa\x01\x12\x39/v1/{parent=organizations/*/locations/*}/findingSummariesZ5\x12\x33/v1/{parent=folders/*/locations/*}/findingSummariesZ6\x12\x34/v1/{parent=projects/*/locations/*}/findingSummaries\x12\x9f\x03\n\x1e\x46\x65tchFrameworkComplianceReport\x12N.google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest\x1a\x42.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport\"\xe8\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xda\x01\x12I/v1/{name=organizations/*/locations/*/frameworkComplianceReports/*}:fetchZE\x12\x43/v1/{name=folders/*/locations/*/frameworkComplianceReports/*}:fetchZF\x12\x44/v1/{name=projects/*/locations/*/frameworkComplianceReports/*}:fetch\x12\xf3\x03\n\x1eListControlComplianceSummaries\x12N.google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest\x1aO.google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse\"\xaf\x02\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x9f\x02\x12`/v1/{parent=organizations/*/locations/*/frameworkComplianceReports/*}/controlComplianceSummariesZ\\\x12Z/v1/{parent=folders/*/locations/*/frameworkComplianceReports/*}/controlComplianceSummariesZ]\x12[/v1/{parent=projects/*/locations/*/frameworkComplianceReports/*}/controlComplianceSummaries\x12\xc4\x03\n\"AggregateFrameworkComplianceReport\x12R.google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest\x1aS.google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse\"\xf4\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xe6\x01\x12M/v1/{name=organizations/*/locations/*/frameworkComplianceReports/*}:aggregateZI\x12G/v1/{name=folders/*/locations/*/frameworkComplianceReports/*}:aggregateZJ\x12H/v1/{name=projects/*/locations/*/frameworkComplianceReports/*}:aggregate\x1aZ\xca\x41&cloudsecuritycompliance.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x89\x03\n+com.google.cloud.cloudsecuritycompliance.v1B\x0fMonitoringProtoP\x01Zecloud.google.com/go/cloudsecuritycompliance/apiv1/cloudsecuritycompliancepb;cloudsecuritycompliancepb\xaa\x02\'Google.Cloud.CloudSecurityCompliance.V1\xca\x02\'Google\\Cloud\\CloudSecurityCompliance\\V1\xea\x02*Google::Cloud::CloudSecurityCompliance::V1\xea\x41^\n5cloudsecuritycompliance.googleapis.com/FolderLocation\x12%folders/{folder}/locations/{location}b\x06proto3" +descriptor_data = "\n8google/cloud/cloudsecuritycompliance/v1/monitoring.proto\x12\'google.cloud.cloudsecuritycompliance.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x34google/cloud/cloudsecuritycompliance/v1/common.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1agoogle/type/interval.proto\"\xa6\x02\n\'ListFrameworkComplianceSummariesRequest\x12Y\n\x06parent\x18\x01 \x01(\tBI\xe0\x41\x02\xfa\x41\x43\x12\x41\x63loudsecuritycompliance.googleapis.com/FrameworkComplianceSummary\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12Z\n\x04view\x18\x05 \x01(\x0e\x32G.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummaryViewB\x03\xe0\x41\x01\"\xb5\x01\n(ListFrameworkComplianceSummariesResponse\x12k\n\x1e\x66ramework_compliance_summaries\x18\x01 \x03(\x0b\x32\x43.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x03\"\xf6\x08\n\x19\x46rameworkComplianceReport\x12\x11\n\tframework\x18\x01 \x01(\t\x12\x1d\n\x15\x66ramework_description\x18\x02 \x01(\t\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x65\n\x1a\x63ontrol_assessment_details\x18\x04 \x01(\x0b\x32\x41.google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails\x12X\n\x0e\x66ramework_type\x18\x05 \x01(\x0e\x32@.google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType\x12Y\n\x19supported_cloud_providers\x18\x06 \x03(\x0e\x32\x36.google.cloud.cloudsecuritycompliance.v1.CloudProvider\x12X\n\x14\x66ramework_categories\x18\x07 \x03(\x0e\x32:.google.cloud.cloudsecuritycompliance.v1.FrameworkCategory\x12#\n\x16\x66ramework_display_name\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04name\x18\t \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x11major_revision_id\x18\n \x01(\x03\x12\x19\n\x11minor_revision_id\x18\x0b \x01(\x03\x12_\n\x17target_resource_details\x18\x0c \x03(\x0b\x32>.google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails:\xab\x03\xea\x41\xa7\x03\n@cloudsecuritycompliance.googleapis.com/FrameworkComplianceReport\x12`projects/{project}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}\x12^folders/{folder}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}\x12jorganizations/{organization}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}*\x1a\x66rameworkComplianceReports2\x19\x66rameworkComplianceReport\"\xc7\x01\n%FetchFrameworkComplianceReportRequest\x12V\n\x04name\x18\x01 \x01(\tBH\xe0\x41\x02\xfa\x41\x42\n@cloudsecuritycompliance.googleapis.com/FrameworkComplianceReport\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xe7\x01\n\x1bListFindingSummariesRequest\x12M\n\x06parent\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\x12\x35\x63loudsecuritycompliance.googleapis.com/FindingSummary\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x33\n\x08\x65nd_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x05\x18\x01\xe0\x41\x01\"\x90\x01\n\x1cListFindingSummariesResponse\x12R\n\x11\x66inding_summaries\x18\x01 \x03(\x0b\x32\x37.google.cloud.cloudsecuritycompliance.v1.FindingSummary\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x03\"\xfb\x01\n%ListControlComplianceSummariesRequest\x12W\n\x06parent\x18\x01 \x01(\tBG\xe0\x41\x02\xfa\x41\x41\x12?cloudsecuritycompliance.googleapis.com/ControlComplianceSummary\x12\x33\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x05\x18\x01\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xaf\x01\n&ListControlComplianceSummariesResponse\x12g\n\x1c\x63ontrol_compliance_summaries\x18\x01 \x03(\x0b\x32\x41.google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x03\"\xc6\x01\n)AggregateFrameworkComplianceReportRequest\x12V\n\x04name\x18\x01 \x01(\tBH\xe0\x41\x02\xfa\x41\x42\n@cloudsecuritycompliance.googleapis.com/FrameworkComplianceReport\x12,\n\x08interval\x18\x02 \x01(\x0b\x32\x15.google.type.IntervalB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x98\x01\n*AggregateFrameworkComplianceReportResponse\x12j\n\x1d\x61ggregated_compliance_reports\x18\x01 \x03(\x0b\x32\x43.google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport\"\x90\x01\n\x18\x43ontrolAssessmentDetails\x12\x18\n\x10passing_controls\x18\x01 \x01(\x05\x12\x18\n\x10\x66\x61iling_controls\x18\x02 \x01(\x05\x12!\n\x19\x61ssessed_passing_controls\x18\x03 \x01(\x05\x12\x1d\n\x15not_assessed_controls\x18\x04 \x01(\x05\"\xa0\t\n\x1a\x46rameworkComplianceSummary\x12\x11\n\tframework\x18\x01 \x01(\t\x12\x65\n\x1a\x63ontrol_assessment_details\x18\x02 \x01(\x0b\x32\x41.google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails\x12X\n\x0e\x66ramework_type\x18\x03 \x01(\x0e\x32@.google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType\x12Y\n\x19supported_cloud_providers\x18\x04 \x03(\x0e\x32\x36.google.cloud.cloudsecuritycompliance.v1.CloudProvider\x12X\n\x14\x66ramework_categories\x18\x05 \x03(\x0e\x32:.google.cloud.cloudsecuritycompliance.v1.FrameworkCategory\x12#\n\x16\x66ramework_display_name\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04name\x18\x07 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x11major_revision_id\x18\x08 \x01(\x03\x12\x19\n\x11minor_revision_id\x18\t \x01(\x03\x12_\n\x17target_resource_details\x18\n \x03(\x0b\x32>.google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails\x12\x1a\n\rfinding_count\x18\x0b \x01(\x03\x42\x03\xe0\x41\x03\x12S\n\x16\x63ontrols_passing_trend\x18\x0c \x01(\x0b\x32..google.cloud.cloudsecuritycompliance.v1.TrendB\x03\xe0\x41\x03:\xb8\x03\xea\x41\xb4\x03\nAcloudsecuritycompliance.googleapis.com/FrameworkComplianceSummary\x12\x63projects/{project}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}\x12\x61\x66olders/{folder}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}\x12morganizations/{organization}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}*\x1c\x66rameworkComplianceSummaries2\x1a\x66rameworkComplianceSummary\"\x8a\x05\n\x0e\x46indingSummary\x12\x18\n\x10\x66inding_category\x18\x01 \x01(\t\x12L\n\rfinding_class\x18\x02 \x01(\x0e\x32\x35.google.cloud.cloudsecuritycompliance.v1.FindingClass\x12\x43\n\x08severity\x18\x03 \x01(\x0e\x32\x31.google.cloud.cloudsecuritycompliance.v1.Severity\x12\x15\n\rfinding_count\x18\x04 \x01(\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1f\n\x12related_frameworks\x18\x06 \x03(\tB\x03\xe0\x41\x01\x12\x11\n\x04name\x18\x07 \x01(\tB\x03\xe0\x41\x08:\xc9\x02\xea\x41\xc5\x02\n5cloudsecuritycompliance.googleapis.com/FindingSummary\x12Jprojects/{project}/locations/{location}/findingSummaries/{finding_summary}\x12Hfolders/{folder}/locations/{location}/findingSummaries/{finding_summary}\x12Torganizations/{organization}/locations/{location}/findingSummaries/{finding_summary}*\x10\x66indingSummaries2\x0e\x66indingSummary\"\x9a\t\n\x18\x43ontrolComplianceSummary\x12\x0f\n\x07\x63ontrol\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12_\n\x18overall_evaluation_state\x18\x04 \x01(\x0e\x32\x38.google.cloud.cloudsecuritycompliance.v1.EvaluationStateB\x03\xe0\x41\x03\x12\x1c\n\x14total_findings_count\x18\x05 \x01(\x05\x12\x1d\n\x15\x63ompliance_frameworks\x18\x06 \x03(\t\x12R\n\x10similar_controls\x18\x07 \x03(\x0b\x32\x38.google.cloud.cloudsecuritycompliance.v1.SimilarControls\x12Z\n\x15\x63loud_control_reports\x18\x08 \x03(\x0b\x32;.google.cloud.cloudsecuritycompliance.v1.CloudControlReport\x12q\n\x1b\x63ontrol_responsibility_type\x18\t \x01(\x0e\x32L.google.cloud.cloudsecuritycompliance.v1.RegulatoryControlResponsibilityType\x12\x17\n\x0fis_fake_control\x18\n \x01(\x08\x12\x11\n\x04name\x18\x0b \x01(\tB\x03\xe0\x41\x08:\xd4\x04\xea\x41\xd0\x04\n?cloudsecuritycompliance.googleapis.com/ControlComplianceSummary\x12\x98\x01projects/{project}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}/controlComplianceSummaries/{control_compliance_summary}\x12\x96\x01\x66olders/{folder}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}/controlComplianceSummaries/{control_compliance_summary}\x12\xa2\x01organizations/{organization}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}/controlComplianceSummaries/{control_compliance_summary}*\x1a\x63ontrolComplianceSummaries2\x18\x63ontrolComplianceSummary\"\x98\x07\n\x12\x43loudControlReport\x12\x7f\n\'manual_cloud_control_assessment_details\x18\r \x01(\x0b\x32L.google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetailsH\x00\x12r\n cloud_control_assessment_details\x18\x0e \x01(\x0b\x32\x46.google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetailsH\x00\x12\x15\n\rcloud_control\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x12\n\ncategories\x18\x06 \x03(\t\x12R\n\x10similar_controls\x18\t \x03(\x0b\x32\x38.google.cloud.cloudsecuritycompliance.v1.SimilarControls\x12V\n\x12\x63loud_control_type\x18\n \x01(\x0e\x32:.google.cloud.cloudsecuritycompliance.v1.CloudControl.Type\x12\x18\n\x10\x66inding_category\x18\x0b \x01(\t\x12<\n\x05rules\x18\x0c \x03(\x0b\x32-.google.cloud.cloudsecuritycompliance.v1.Rule\x12K\n\x10\x66inding_severity\x18\x0f \x01(\x0e\x32\x31.google.cloud.cloudsecuritycompliance.v1.Severity\x12R\n\x10\x65nforcement_mode\x18\x10 \x01(\x0e\x32\x38.google.cloud.cloudsecuritycompliance.v1.EnforcementMode\x12 \n\x18\x63loud_control_deployment\x18\x11 \x01(\t\x12\x19\n\x11major_revision_id\x18\x12 \x01(\x03\x12\x19\n\x11minor_revision_id\x18\x13 \x01(\x03\x12$\n\x1c\x66ramework_major_revision_ids\x18\x14 \x03(\x03\x42\x14\n\x12\x61ssessment_details\"I\n#ManualCloudControlAssessmentDetails\x12\"\n\x1amanual_cloud_control_guide\x18\x01 \x03(\t\"\x90\x01\n\x1d\x43loudControlAssessmentDetails\x12\x16\n\x0e\x66indings_count\x18\x01 \x01(\x05\x12W\n\x10\x65valuation_state\x18\x02 \x01(\x0e\x32\x38.google.cloud.cloudsecuritycompliance.v1.EvaluationStateB\x03\xe0\x41\x03\"8\n\x0fSimilarControls\x12\x11\n\tframework\x18\x01 \x01(\t\x12\x12\n\ncontrol_id\x18\x02 \x01(\t\"\xb4\x01\n\x1a\x41ggregatedComplianceReport\x12\x65\n\x1a\x63ontrol_assessment_details\x18\x01 \x01(\x0b\x32\x41.google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails\x12/\n\x0breport_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x8c\x02\n\x15TargetResourceDetails\x12\x1c\n\x14\x66ramework_deployment\x18\x01 \x01(\t\x12$\n\x1ctarget_resource_display_name\x18\x02 \x01(\t\x12\x17\n\x0ftarget_resource\x18\x03 \x01(\t\x12/\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x19\n\x11major_revision_id\x18\x06 \x01(\x03\x12\x19\n\x11minor_revision_id\x18\x07 \x01(\x03\"U\n\x05Trend\x12\x30\n\x08\x64uration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\x12\x1a\n\rvalue_percent\x18\x02 \x01(\x01\x42\x03\xe0\x41\x03*\x90\x01\n\x0f\x45valuationState\x12 \n\x1c\x45VALUATION_STATE_UNSPECIFIED\x10\x00\x12\x1b\n\x17\x45VALUATION_STATE_PASSED\x10\x01\x12\x1b\n\x17\x45VALUATION_STATE_FAILED\x10\x02\x12!\n\x1d\x45VALUATION_STATE_NOT_ASSESSED\x10\x03*\xd9\x01\n\x0c\x46indingClass\x12\x1d\n\x19\x46INDING_CLASS_UNSPECIFIED\x10\x00\x12\n\n\x06THREAT\x10\x01\x12\x11\n\rVULNERABILITY\x10\x02\x12\x14\n\x10MISCONFIGURATION\x10\x03\x12\x0f\n\x0bOBSERVATION\x10\x04\x12\r\n\tSCC_ERROR\x10\x05\x12\x15\n\x11POSTURE_VIOLATION\x10\x06\x12\x15\n\x11TOXIC_COMBINATION\x10\x07\x12\x17\n\x13SENSITIVE_DATA_RISK\x10\x08\x12\x0e\n\nCHOKEPOINT\x10\t*\xac\x01\n\x1e\x46rameworkComplianceSummaryView\x12\x31\n-FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_UNSPECIFIED\x10\x00\x12+\n\'FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_BASIC\x10\x01\x12*\n&FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_FULL\x10\x02\x32\xd5\x11\n\nMonitoring\x12\xa8\x03\n ListFrameworkComplianceSummaries\x12P.google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest\x1aQ.google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse\"\xde\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xce\x01\x12\x45/v1/{parent=organizations/*/locations/*}/frameworkComplianceSummariesZA\x12?/v1/{parent=folders/*/locations/*}/frameworkComplianceSummariesZB\x12@/v1/{parent=projects/*/locations/*}/frameworkComplianceSummaries\x12\xe0\x02\n\x14ListFindingSummaries\x12\x44.google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest\x1a\x45.google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse\"\xba\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xaa\x01\x12\x39/v1/{parent=organizations/*/locations/*}/findingSummariesZ5\x12\x33/v1/{parent=folders/*/locations/*}/findingSummariesZ6\x12\x34/v1/{parent=projects/*/locations/*}/findingSummaries\x12\x9f\x03\n\x1e\x46\x65tchFrameworkComplianceReport\x12N.google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest\x1a\x42.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport\"\xe8\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xda\x01\x12I/v1/{name=organizations/*/locations/*/frameworkComplianceReports/*}:fetchZE\x12\x43/v1/{name=folders/*/locations/*/frameworkComplianceReports/*}:fetchZF\x12\x44/v1/{name=projects/*/locations/*/frameworkComplianceReports/*}:fetch\x12\xf3\x03\n\x1eListControlComplianceSummaries\x12N.google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest\x1aO.google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse\"\xaf\x02\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x9f\x02\x12`/v1/{parent=organizations/*/locations/*/frameworkComplianceReports/*}/controlComplianceSummariesZ\\\x12Z/v1/{parent=folders/*/locations/*/frameworkComplianceReports/*}/controlComplianceSummariesZ]\x12[/v1/{parent=projects/*/locations/*/frameworkComplianceReports/*}/controlComplianceSummaries\x12\xc4\x03\n\"AggregateFrameworkComplianceReport\x12R.google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest\x1aS.google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse\"\xf4\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xe6\x01\x12M/v1/{name=organizations/*/locations/*/frameworkComplianceReports/*}:aggregateZI\x12G/v1/{name=folders/*/locations/*/frameworkComplianceReports/*}:aggregateZJ\x12H/v1/{name=projects/*/locations/*/frameworkComplianceReports/*}:aggregate\x1aZ\xca\x41&cloudsecuritycompliance.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x89\x03\n+com.google.cloud.cloudsecuritycompliance.v1B\x0fMonitoringProtoP\x01Zecloud.google.com/go/cloudsecuritycompliance/apiv1/cloudsecuritycompliancepb;cloudsecuritycompliancepb\xaa\x02\'Google.Cloud.CloudSecurityCompliance.V1\xca\x02\'Google\\Cloud\\CloudSecurityCompliance\\V1\xea\x02*Google::Cloud::CloudSecurityCompliance::V1\xea\x41^\n5cloudsecuritycompliance.googleapis.com/FolderLocation\x12%folders/{folder}/locations/{location}b\x06proto3" pool = ::Google::Protobuf::DescriptorPool.generated_pool pool.add_serialized_file(descriptor_data) @@ -42,8 +43,10 @@ module V1 SimilarControls = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.SimilarControls").msgclass AggregatedComplianceReport = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport").msgclass TargetResourceDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails").msgclass + Trend = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.Trend").msgclass EvaluationState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.EvaluationState").enummodule FindingClass = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.FindingClass").enummodule + FrameworkComplianceSummaryView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummaryView").enummodule end end end diff --git a/google-cloud-cloud_security_compliance-v1/proto_docs/google/api/client.rb b/google-cloud-cloud_security_compliance-v1/proto_docs/google/api/client.rb index 25b227e61cdc..30c954fb0d5c 100644 --- a/google-cloud-cloud_security_compliance-v1/proto_docs/google/api/client.rb +++ b/google-cloud-cloud_security_compliance-v1/proto_docs/google/api/client.rb @@ -31,6 +31,8 @@ module Api # @!attribute [rw] selective_gapic_generation # @return [::Google::Api::SelectiveGapicGeneration] # Configuration for which RPCs should be generated in the GAPIC client. + # + # Note: This field should not be used in most cases. class CommonLanguageSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -441,6 +443,8 @@ class LongRunning # This message is used to configure the generation of a subset of the RPCs in # a service for client libraries. + # + # Note: This feature should not be used in most cases. # @!attribute [rw] methods # @return [::Array<::String>] # An allowlist of the fully qualified names of RPCs that should be included diff --git a/google-cloud-cloud_security_compliance-v1/proto_docs/google/cloud/cloudsecuritycompliance/v1/common.rb b/google-cloud-cloud_security_compliance-v1/proto_docs/google/cloud/cloudsecuritycompliance/v1/common.rb index 4cb9bf6eb0b1..b803e1f6d3e1 100644 --- a/google-cloud-cloud_security_compliance-v1/proto_docs/google/cloud/cloudsecuritycompliance/v1/common.rb +++ b/google-cloud-cloud_security_compliance-v1/proto_docs/google/cloud/cloudsecuritycompliance/v1/common.rb @@ -26,8 +26,12 @@ module V1 # FedRAMP or NIST. # @!attribute [rw] name # @return [::String] - # Required. Identifier. The name of the framework, in the format - # `organizations/{organization}/locations/{location}/frameworks/{framework_id}`. + # Required. Identifier. The name of the framework, in one of the following + # formats: + # `organizations/{organization}/locations/{location}/frameworks/{framework}` + # or + # `projects/{project}/locations/{location}/frameworks/{framework}`. + # # The only supported location is `global`. # @!attribute [r] major_revision_id # @return [::Integer] @@ -80,8 +84,11 @@ module FrameworkType # The details of a cloud control. # @!attribute [rw] name # @return [::String] - # Required. The name of the cloud control, in the format - # `organizations/{organization}/locations/{location}/cloudControls/{cloud-control}`. + # Required. The name of the cloud control, in one of the following formats: + # `organizations/{organization}/locations/{location}/cloudControls/{cloud_control}` + # or + # `projects/{project}/locations/{location}/cloudControls/{cloud_control}`. + # # The only supported location is `global`. # @!attribute [rw] major_revision_id # @return [::Integer] @@ -97,8 +104,10 @@ class CloudControlDetails extend ::Google::Protobuf::MessageExts::ClassMethods end - # The reference of a framework, in the format - # `organizations/{organization}/locations/{location}/frameworks/{framework}`. + # The reference of a framework, in one of the following formats: + # - `organizations/{organization}/locations/{location}/frameworks/{framework}` + # - `projects/{project}/locations/{location}/frameworks/{framework}`. + # # The only supported location is `global`. # @!attribute [rw] framework # @return [::String] @@ -131,8 +140,12 @@ class Parameter # use to define your organization's security or compliance intent. # @!attribute [rw] name # @return [::String] - # Required. Identifier. The name of the cloud control, in the format - # `organizations/{organization}/locations/{location}/cloudControls/{cloud_control_id}`. + # Required. Identifier. The name of the cloud control, in either of the + # formats: + # `organizations/{organization}/locations/{location}/cloudControls/{cloud_control}` + # or + # `projects/{project}/locations/{location}/cloudControls/{cloud_control}`. + # # The only supported location is `global`. # @!attribute [r] major_revision_id # @return [::Integer] @@ -324,27 +337,27 @@ class StringList # The possible parameter value types. # @!attribute [rw] string_value # @return [::String] - # A string value. + # Optional. A string value. # # Note: The following fields are mutually exclusive: `string_value`, `bool_value`, `string_list_value`, `number_value`, `oneof_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] bool_value # @return [::Boolean] - # A boolean value. + # Optional. A boolean value. # # Note: The following fields are mutually exclusive: `bool_value`, `string_value`, `string_list_value`, `number_value`, `oneof_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] string_list_value # @return [::Google::Cloud::CloudSecurityCompliance::V1::StringList] - # A repeated string. + # Optional. A repeated string. # # Note: The following fields are mutually exclusive: `string_list_value`, `string_value`, `bool_value`, `number_value`, `oneof_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] number_value # @return [::Float] - # A double value. + # Optional. A double value. # # Note: The following fields are mutually exclusive: `number_value`, `string_value`, `bool_value`, `string_list_value`, `oneof_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] oneof_value # @return [::Google::Cloud::CloudSecurityCompliance::V1::Parameter] - # Sub-parameter values. + # Optional. Sub-parameter values. # # Note: The following fields are mutually exclusive: `oneof_value`, `string_value`, `bool_value`, `string_list_value`, `number_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. class ParamValue @@ -449,6 +462,122 @@ class OperationMetadata extend ::Google::Protobuf::MessageExts::ClassMethods end + # The regulatory control. + # @!attribute [r] name + # @return [::String] + # Output only. The name of a regulatory control, in one of the following + # formats: + # - `organizations/{organization}/locations/{location}/controls/{control}` + # - `projects/{project}/locations/{location}/controls/{control}`. + # + # The only supported location is `global`. + # @!attribute [r] display_name + # @return [::String] + # Output only. The friendly name for the regulatory control. + # @!attribute [r] description + # @return [::String] + # Output only. The description of the regulatory control. + # @!attribute [r] family + # @return [::Google::Cloud::CloudSecurityCompliance::V1::Control::Family] + # Output only. The regulatory group that the control belongs to. + # @!attribute [r] control_family + # @return [::Google::Cloud::CloudSecurityCompliance::V1::ControlFamily] + # Output only. The regulatory family that the control belongs to. + # @!attribute [r] responsibility_type + # @return [::Google::Cloud::CloudSecurityCompliance::V1::RegulatoryControlResponsibilityType] + # Output only. The entity that's responsible for the control, whether Google, + # you as the customer, or both. + # @!attribute [r] google_responsibility_description + # @return [::String] + # Output only. A description of Google's responsibility for the regulatory + # control. + # @!attribute [r] google_responsibility_implementation + # @return [::String] + # Output only. A description of Google's responsibility for implementing the + # regulatory control. + # @!attribute [r] customer_responsibility_description + # @return [::String] + # Output only. A description of your responsibility for the regulatory + # control. + # @!attribute [r] customer_responsibility_implementation + # @return [::String] + # Output only. A description of the your responsibility for implementing the + # regulatory control. + # @!attribute [r] shared_responsibility_description + # @return [::String] + # Output only. A description of the responsibility that's shared between + # Google and you in implementing this control. + # @!attribute [r] additional_content_uri + # @return [::String] + # Output only. A link to the documentation that's related to this control. + # @!attribute [r] related_frameworks + # @return [::Array<::String>] + # Output only. The frameworks that include this control. + class Control + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The regulatory control family. + module Family + # Default value. This value is unused. + FAMILY_UNSPECIFIED = 0 + + # Access control + AC = 1 + + # Awareness and araining + AT = 2 + + # Audit and accountability + AU = 3 + + # Certification, accreditation, and security assessments + CA = 4 + + # Configuration management + CM = 5 + + # Contingency planning + CP = 6 + + # Identification and authentication + IA = 7 + + # Incident response + IR = 8 + + # Maintenance + MA = 9 + + # Media protection + MP = 10 + + # Physical and environmental protection + PE = 11 + + # Security planning + PL = 12 + + # Personnel aecurity + PS = 13 + + # Risk assessment + RA = 14 + + # System services and acquisition + SA = 15 + + # System and communications protection + SC = 16 + + # System and information integrity + SI = 17 + + # Supply chain risk management + SR = 18 + end + end + # The regulatory family of the control. # @!attribute [rw] family_id # @return [::String] @@ -561,6 +690,18 @@ module CloudControlCategory # The business continuity and disaster recovery (BCDR) category. CC_CATEGORY_BCDR = 15 + + # The admin access category. + CC_CATEGORY_ADMIN_ACCESS = 16 + + # DRZ (Data Residency). + CC_CATEGORY_DATA_RESIDENCY = 17 + + # RUR (Resource Usage Restriction). + CC_CATEGORY_RESOURCE_USAGE_RESTRICTION = 18 + + # SERVICE SPECIFIC + CC_CATEGORY_SERVICE_SPECIFIC = 19 end # The cloud provider that's associated with the cloud control. diff --git a/google-cloud-cloud_security_compliance-v1/proto_docs/google/cloud/cloudsecuritycompliance/v1/config.rb b/google-cloud-cloud_security_compliance-v1/proto_docs/google/cloud/cloudsecuritycompliance/v1/config.rb index 329f7e841766..00e85dd5de7e 100644 --- a/google-cloud-cloud_security_compliance-v1/proto_docs/google/cloud/cloudsecuritycompliance/v1/config.rb +++ b/google-cloud-cloud_security_compliance-v1/proto_docs/google/cloud/cloudsecuritycompliance/v1/config.rb @@ -24,8 +24,10 @@ module V1 # Request message for [ListFrameworks][]. # @!attribute [rw] parent # @return [::String] - # Required. The parent resource name, in the format - # `organizations/{organization}/locations/{location}`. + # Required. The parent resource name, in one of the following formats: + # - `organizations/{organization}/locations/{location}` + # - `projects/{project}/locations/{location}`. + # # The only supported location is `global`. # @!attribute [rw] page_size # @return [::Integer] @@ -60,8 +62,12 @@ class ListFrameworksResponse # The request message for [GetFramework][]. # @!attribute [rw] name # @return [::String] - # Required. The name of the framework to retrieve, in the format - # `organizations/{organization}/locations/{location}/frameworks/{framework_id}` + # Required. The name of the framework to retrieve, in one of the following + # formats: + # `organizations/{organization}/locations/{location}/frameworks/{framework}` + # or + # `projects/{project}/locations/{location}/frameworks/{framework}`. + # # The only supported location is `global`. # @!attribute [rw] major_revision_id # @return [::Integer] @@ -75,8 +81,10 @@ class GetFrameworkRequest # The request message for [CreateFramework][]. # @!attribute [rw] parent # @return [::String] - # Required. The parent resource name, in the format - # `organizations/{organization}/locations/{location}`. + # Required. The parent resource name, in one of the following formats: + # - `organizations/{organization}/locations/{location}` + # - `projects/{project}/locations/{location}`. + # # The only supported location is `global`. # @!attribute [rw] framework_id # @return [::String] @@ -112,8 +120,11 @@ class UpdateFrameworkRequest # Request message for [DeleteFramework][]. # @!attribute [rw] name # @return [::String] - # Required. The name of the resource, in the format - # `organizations/{organization}/locations/{location}/frameworks/{framework}`. + # Required. The name of the resource, in one of the following formats: + # `organizations/{organization}/locations/{location}/frameworks/{framework}` + # or + # `projects/{project}/locations/{location}/frameworks/{framework}`. + # # The only supported location is `global`. class DeleteFrameworkRequest include ::Google::Protobuf::MessageExts @@ -123,8 +134,10 @@ class DeleteFrameworkRequest # Request message for [ListCloudControls][]. # @!attribute [rw] parent # @return [::String] - # Required. The parent resource name, in the format - # `organizations/{organization}/locations/{location}`. + # Required. The parent resource name, in one of the following formats: + # - `organizations/{organization}/locations/{location}` + # - `projects/{project}/locations/{location}`. + # # The only supported location is `global`. # @!attribute [rw] page_size # @return [::Integer] @@ -163,8 +176,12 @@ class ListCloudControlsResponse # The request message for [GetCloudControl][]. # @!attribute [rw] name # @return [::String] - # Required. The name of the cloud control to retrieve, in the format - # `organizations/{organization}/locations/{location}/cloudControls/{cloud_control}`. + # Required. The name of the cloud control to retrieve, in one of the + # following formats: + # `organizations/{organization}/locations/{location}/cloudControls/{cloud_control}` + # or + # `projects/{project}/locations/{location}/cloudControls/{cloud_control}`. + # # The only supported location is `global`. # @!attribute [rw] major_revision_id # @return [::Integer] @@ -178,8 +195,10 @@ class GetCloudControlRequest # The request message for [CreateCloudControl][]. # @!attribute [rw] parent # @return [::String] - # Required. The parent resource name, in the format - # `organizations/{organization}/locations/{location}`. + # Required. The parent resource name, in one of the following formats: + # - `organizations/{organization}/locations/{location}`. + # - `projects/{project}/locations/{location}`. + # # The only supported location is `global`. # @!attribute [rw] cloud_control_id # @return [::String] @@ -222,8 +241,12 @@ class UpdateCloudControlRequest # The request message for [DeleteCloudControl][]. # @!attribute [rw] name # @return [::String] - # Required. The name of the cloud control to delete, in the format - # `organizations/{organization}/locations/{location}/CloudControls/{CloudControl}`. + # Required. The name of the cloud control to delete, in one of the following + # formats: + # `organizations/{organization}/locations/{location}/CloudControls/{CloudControl}` + # or + # `projects/{project}/locations/{location}/CloudControls/{CloudControl}`. + # # The only supported location is `global`. class DeleteCloudControlRequest include ::Google::Protobuf::MessageExts diff --git a/google-cloud-cloud_security_compliance-v1/proto_docs/google/cloud/cloudsecuritycompliance/v1/deployment.rb b/google-cloud-cloud_security_compliance-v1/proto_docs/google/cloud/cloudsecuritycompliance/v1/deployment.rb index d5b0aecba40a..80a734eac612 100644 --- a/google-cloud-cloud_security_compliance-v1/proto_docs/google/cloud/cloudsecuritycompliance/v1/deployment.rb +++ b/google-cloud-cloud_security_compliance-v1/proto_docs/google/cloud/cloudsecuritycompliance/v1/deployment.rb @@ -27,7 +27,9 @@ module V1 # @!attribute [rw] name # @return [::String] # Identifier. The name of the framework deployment, in the format - # `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment_id}`. + # `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}` + # or + # `projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}`. # The only supported location is `global`. # @!attribute [rw] target_resource_config # @return [::Google::Cloud::CloudSecurityCompliance::V1::TargetResourceConfig] @@ -103,7 +105,9 @@ class FrameworkDeployment # @!attribute [rw] name # @return [::String] # Identifier. The name for the cloud control deployment, in the format - # `organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment_id}`. + # `organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}` + # or + # `projects/{project}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}`. # The only supported location is `global`. # @!attribute [rw] target_resource_config # @return [::Google::Cloud::CloudSecurityCompliance::V1::TargetResourceConfig] @@ -241,7 +245,9 @@ class CloudControlMetadata # @!attribute [rw] parent # @return [::String] # Required. The parent resource of the framework deployment in the format - # `organizations/{organization}/locations/{location}`. + # `organizations/{organization}/locations/{location}` + # or + # `projects/{project}/locations/{location}`. # Only the global location is supported. # @!attribute [rw] framework_deployment_id # @return [::String] @@ -261,7 +267,9 @@ class CreateFrameworkDeploymentRequest # @return [::String] # Required. The name of the framework deployment that you want to delete, # in the format - # `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment_id}`. + # `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}` + # or + # `projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}`. # The only supported location is `global`. # @!attribute [rw] etag # @return [::String] @@ -282,7 +290,9 @@ class DeleteFrameworkDeploymentRequest # @!attribute [rw] name # @return [::String] # Required. The name of the framework deployment, in the format - # `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment_id}`. + # `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}` + # or + # `projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}`. # The only supported location is `global`. class GetFrameworkDeploymentRequest include ::Google::Protobuf::MessageExts @@ -293,7 +303,9 @@ class GetFrameworkDeploymentRequest # @!attribute [rw] parent # @return [::String] # Required. The parent resource of the framework deployment, in the format - # `organizations/{organization}/locations/{location}`. + # `organizations/{organization}/locations/{location}` + # or + # `projects/{project}/locations/{location}`. # The only supported location is `global`. # @!attribute [rw] page_size # @return [::Integer] @@ -339,7 +351,9 @@ class ListFrameworkDeploymentsResponse # @!attribute [rw] name # @return [::String] # Required. The name for the cloud control deployment, in the format - # `organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment_id}`. + # `organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}` + # or + # `projects/{project}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}`. # The only supported location is `global`. class GetCloudControlDeploymentRequest include ::Google::Protobuf::MessageExts @@ -350,8 +364,9 @@ class GetCloudControlDeploymentRequest # @!attribute [rw] parent # @return [::String] # Required. The parent resource for the cloud control deployment, in the - # format `organizations/{organization}/locations/{location}`. The only - # supported location is `global`. + # format `organizations/{organization}/locations/{location}` or + # `projects/{project}/locations/{location}`. + # The only supported location is `global`. # @!attribute [rw] page_size # @return [::Integer] # Optional. The requested page size. The server might return fewer items than @@ -396,7 +411,9 @@ class ListCloudControlDeploymentsResponse # @!attribute [r] cloud_control_deployment # @return [::String] # Output only. The name of the CloudControlDeployment. The format is - # `organizations/{org}/locations/{location}/cloudControlDeployments/{cloud_control_deployment_id}`. + # `organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}` + # or + # `projects/{project}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}`. # The only supported location is `global`. class CloudControlDeploymentReference include ::Google::Protobuf::MessageExts @@ -407,7 +424,9 @@ class CloudControlDeploymentReference # @!attribute [r] framework_deployment # @return [::String] # Output only. The name of the framework deployment, in the format - # `organizations/{org}/locations/{location}/frameworkDeployments/{framework_deployment_id}`. + # `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}` + # or + # `projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}`. # The only supported location is `global`. # @!attribute [rw] framework_reference # @return [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkReference] @@ -417,7 +436,7 @@ class CloudControlDeploymentReference # ``` # { # framework: - # "organizations/\\{org}/locations/\\{location}/frameworks/\\{framework}", + # "organizations/\\{organization}/locations/\\{location}/frameworks/\\{framework}", # major_revision_id: 1 # } # ``` @@ -446,6 +465,9 @@ module DeploymentState # Deployment is being deleted. DEPLOYMENT_STATE_DELETING = 3 + # Deployment is being updated. + DEPLOYMENT_STATE_UPDATING = 8 + # Deployment has failed. All the changes made by the deployment were # successfully rolled back. You can retry or delete a deployment that's # in this state. diff --git a/google-cloud-cloud_security_compliance-v1/proto_docs/google/cloud/cloudsecuritycompliance/v1/monitoring.rb b/google-cloud-cloud_security_compliance-v1/proto_docs/google/cloud/cloudsecuritycompliance/v1/monitoring.rb index 596d8c150335..1d77941fee16 100644 --- a/google-cloud-cloud_security_compliance-v1/proto_docs/google/cloud/cloudsecuritycompliance/v1/monitoring.rb +++ b/google-cloud-cloud_security_compliance-v1/proto_docs/google/cloud/cloudsecuritycompliance/v1/monitoring.rb @@ -37,6 +37,9 @@ module V1 # @!attribute [rw] filter # @return [::String] # Optional. The filtering results. + # @!attribute [rw] view + # @return [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkComplianceSummaryView] + # Optional. Specifies the level of detail to return in the response. class ListFrameworkComplianceSummariesRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -104,6 +107,9 @@ class FrameworkComplianceReport # @!attribute [rw] end_time # @return [::Google::Protobuf::Timestamp] # Optional. The end time of the report. + # @!attribute [rw] filter + # @return [::String] + # Optional. The filtering results. class FetchFrameworkComplianceReportRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -260,6 +266,12 @@ class ControlAssessmentDetails # @!attribute [rw] target_resource_details # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::TargetResourceDetails>] # The target resource details for the framework. + # @!attribute [r] finding_count + # @return [::Integer] + # Output only. The count of the findings generated against the framework. + # @!attribute [r] controls_passing_trend + # @return [::Google::Cloud::CloudSecurityCompliance::V1::Trend] + # Output only. The trend of controls that are passing for the given duration. class FrameworkComplianceSummary include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -467,6 +479,19 @@ class TargetResourceDetails extend ::Google::Protobuf::MessageExts::ClassMethods end + # The trend of a compliance metric. + # @!attribute [r] duration + # @return [::Google::Protobuf::Duration] + # Output only. The duration for the trend. + # @!attribute [r] value_percent + # @return [::Float] + # Output only. The trend value as a percentage. The value can be positive or + # negative. + class Trend + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # The evaluation state of the control. module EvaluationState # Default value. This value is unused. @@ -521,6 +546,23 @@ module FindingClass # converge, based on attack path simulations (APS). CHOKEPOINT = 9 end + + # Specifies the view of the framework compliance summary to be returned. + # New values may be added in the future. + module FrameworkComplianceSummaryView + # The default / unset value. The API will default to the BASIC view. + FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_UNSPECIFIED = 0 + + # Includes basic compliance metadata, but omits trend data. + FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_BASIC = 1 + + # Includes all information, including + # [finding_count][google.cloud.cloudsecuritycompliance.v1main.FrameworkComplianceSummary.finding_count] + # and + # [controls_passing_trend][google.cloud.cloudsecuritycompliance.v1main.FrameworkComplianceSummary.controls_passing_trend]. + # Trend data is provided for the last 30 days. + FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_FULL = 2 + end end end end diff --git a/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/config_paths_test.rb b/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/config_paths_test.rb index d90bf5d2c53b..e5acce0af6e7 100644 --- a/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/config_paths_test.rb +++ b/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/config_paths_test.rb @@ -50,6 +50,9 @@ def test_cloud_control_path path = client.cloud_control_path organization: "value0", location: "value1", cloud_control: "value2" assert_equal "organizations/value0/locations/value1/cloudControls/value2", path + + path = client.cloud_control_path project: "value0", location: "value1", cloud_control: "value2" + assert_equal "projects/value0/locations/value1/cloudControls/value2", path end end @@ -62,6 +65,21 @@ def test_framework_path path = client.framework_path organization: "value0", location: "value1", framework: "value2" assert_equal "organizations/value0/locations/value1/frameworks/value2", path + + path = client.framework_path project: "value0", location: "value1", framework: "value2" + assert_equal "projects/value0/locations/value1/frameworks/value2", path + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1", path end end diff --git a/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/deployment_paths_test.rb b/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/deployment_paths_test.rb index fa6b2db33a74..f3d1a2c04927 100644 --- a/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/deployment_paths_test.rb +++ b/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/deployment_paths_test.rb @@ -50,6 +50,24 @@ def test_cloud_control_deployment_path path = client.cloud_control_deployment_path organization: "value0", location: "value1", cloud_control_deployment: "value2" assert_equal "organizations/value0/locations/value1/cloudControlDeployments/value2", path + + path = client.cloud_control_deployment_path project: "value0", location: "value1", cloud_control_deployment: "value2" + assert_equal "projects/value0/locations/value1/cloudControlDeployments/value2", path + end + end + + def test_framework_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.framework_path organization: "value0", location: "value1", framework: "value2" + assert_equal "organizations/value0/locations/value1/frameworks/value2", path + + path = client.framework_path project: "value0", location: "value1", framework: "value2" + assert_equal "projects/value0/locations/value1/frameworks/value2", path end end @@ -62,6 +80,21 @@ def test_framework_deployment_path path = client.framework_deployment_path organization: "value0", location: "value1", framework_deployment: "value2" assert_equal "organizations/value0/locations/value1/frameworkDeployments/value2", path + + path = client.framework_deployment_path project: "value0", location: "value1", framework_deployment: "value2" + assert_equal "projects/value0/locations/value1/frameworkDeployments/value2", path + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1", path end end diff --git a/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/monitoring_rest_test.rb b/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/monitoring_rest_test.rb index a64db7e5d4c6..a977a75f3c29 100644 --- a/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/monitoring_rest_test.rb +++ b/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/monitoring_rest_test.rb @@ -90,6 +90,7 @@ def test_list_framework_compliance_summaries page_size = 42 page_token = "hello world" filter = "hello world" + view = :FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_UNSPECIFIED list_framework_compliance_summaries_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| assert options.metadata.key? :"x-goog-api-client" @@ -105,27 +106,27 @@ def test_list_framework_compliance_summaries end # Use hash object - client.list_framework_compliance_summaries({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + client.list_framework_compliance_summaries({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view }) do |_result, response| assert_equal http_response, response.underlying_op end # Use named arguments - client.list_framework_compliance_summaries parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + client.list_framework_compliance_summaries parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object - client.list_framework_compliance_summaries ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkComplianceSummariesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + client.list_framework_compliance_summaries ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkComplianceSummariesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view) do |_result, response| assert_equal http_response, response.underlying_op end # Use hash object with options - client.list_framework_compliance_summaries({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + client.list_framework_compliance_summaries({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view }, call_options) do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object with options - client.list_framework_compliance_summaries(::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkComplianceSummariesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + client.list_framework_compliance_summaries(::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkComplianceSummariesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view), call_options) do |_result, response| assert_equal http_response, response.underlying_op end @@ -203,6 +204,7 @@ def test_fetch_framework_compliance_report # Create request parameters for a unary method. name = "hello world" end_time = {} + filter = "hello world" fetch_framework_compliance_report_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| assert options.metadata.key? :"x-goog-api-client" @@ -218,27 +220,27 @@ def test_fetch_framework_compliance_report end # Use hash object - client.fetch_framework_compliance_report({ name: name, end_time: end_time }) do |_result, response| + client.fetch_framework_compliance_report({ name: name, end_time: end_time, filter: filter }) do |_result, response| assert_equal http_response, response.underlying_op end # Use named arguments - client.fetch_framework_compliance_report name: name, end_time: end_time do |_result, response| + client.fetch_framework_compliance_report name: name, end_time: end_time, filter: filter do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object - client.fetch_framework_compliance_report ::Google::Cloud::CloudSecurityCompliance::V1::FetchFrameworkComplianceReportRequest.new(name: name, end_time: end_time) do |_result, response| + client.fetch_framework_compliance_report ::Google::Cloud::CloudSecurityCompliance::V1::FetchFrameworkComplianceReportRequest.new(name: name, end_time: end_time, filter: filter) do |_result, response| assert_equal http_response, response.underlying_op end # Use hash object with options - client.fetch_framework_compliance_report({ name: name, end_time: end_time }, call_options) do |_result, response| + client.fetch_framework_compliance_report({ name: name, end_time: end_time, filter: filter }, call_options) do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object with options - client.fetch_framework_compliance_report(::Google::Cloud::CloudSecurityCompliance::V1::FetchFrameworkComplianceReportRequest.new(name: name, end_time: end_time), call_options) do |_result, response| + client.fetch_framework_compliance_report(::Google::Cloud::CloudSecurityCompliance::V1::FetchFrameworkComplianceReportRequest.new(name: name, end_time: end_time, filter: filter), call_options) do |_result, response| assert_equal http_response, response.underlying_op end diff --git a/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/monitoring_test.rb b/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/monitoring_test.rb index 219e9b8b6d0c..be9a3f94a702 100644 --- a/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/monitoring_test.rb +++ b/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/monitoring_test.rb @@ -75,6 +75,7 @@ def test_list_framework_compliance_summaries page_size = 42 page_token = "hello world" filter = "hello world" + view = :FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_UNSPECIFIED list_framework_compliance_summaries_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| assert_equal :list_framework_compliance_summaries, name @@ -83,6 +84,7 @@ def test_list_framework_compliance_summaries assert_equal 42, request["page_size"] assert_equal "hello world", request["page_token"] assert_equal "hello world", request["filter"] + assert_equal :FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_UNSPECIFIED, request["view"] refute_nil options end @@ -93,35 +95,35 @@ def test_list_framework_compliance_summaries end # Use hash object - client.list_framework_compliance_summaries({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + client.list_framework_compliance_summaries({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view }) do |response, operation| assert_kind_of Gapic::PagedEnumerable, response assert_equal grpc_response, response.response assert_equal grpc_operation, operation end # Use named arguments - client.list_framework_compliance_summaries parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + client.list_framework_compliance_summaries parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view do |response, operation| assert_kind_of Gapic::PagedEnumerable, response assert_equal grpc_response, response.response assert_equal grpc_operation, operation end # Use protobuf object - client.list_framework_compliance_summaries ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkComplianceSummariesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| + client.list_framework_compliance_summaries ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkComplianceSummariesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view) do |response, operation| assert_kind_of Gapic::PagedEnumerable, response assert_equal grpc_response, response.response assert_equal grpc_operation, operation end # Use hash object with options - client.list_framework_compliance_summaries({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| + client.list_framework_compliance_summaries({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view }, grpc_options) do |response, operation| assert_kind_of Gapic::PagedEnumerable, response assert_equal grpc_response, response.response assert_equal grpc_operation, operation end # Use protobuf object with options - client.list_framework_compliance_summaries(::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkComplianceSummariesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| + client.list_framework_compliance_summaries(::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkComplianceSummariesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view), grpc_options) do |response, operation| assert_kind_of Gapic::PagedEnumerable, response assert_equal grpc_response, response.response assert_equal grpc_operation, operation @@ -213,12 +215,14 @@ def test_fetch_framework_compliance_report # Create request parameters for a unary method. name = "hello world" end_time = {} + filter = "hello world" fetch_framework_compliance_report_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| assert_equal :fetch_framework_compliance_report, name assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::FetchFrameworkComplianceReportRequest, request assert_equal "hello world", request["name"] assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["end_time"] + assert_equal "hello world", request["filter"] refute_nil options end @@ -229,31 +233,31 @@ def test_fetch_framework_compliance_report end # Use hash object - client.fetch_framework_compliance_report({ name: name, end_time: end_time }) do |response, operation| + client.fetch_framework_compliance_report({ name: name, end_time: end_time, filter: filter }) do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use named arguments - client.fetch_framework_compliance_report name: name, end_time: end_time do |response, operation| + client.fetch_framework_compliance_report name: name, end_time: end_time, filter: filter do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use protobuf object - client.fetch_framework_compliance_report ::Google::Cloud::CloudSecurityCompliance::V1::FetchFrameworkComplianceReportRequest.new(name: name, end_time: end_time) do |response, operation| + client.fetch_framework_compliance_report ::Google::Cloud::CloudSecurityCompliance::V1::FetchFrameworkComplianceReportRequest.new(name: name, end_time: end_time, filter: filter) do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use hash object with options - client.fetch_framework_compliance_report({ name: name, end_time: end_time }, grpc_options) do |response, operation| + client.fetch_framework_compliance_report({ name: name, end_time: end_time, filter: filter }, grpc_options) do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use protobuf object with options - client.fetch_framework_compliance_report(::Google::Cloud::CloudSecurityCompliance::V1::FetchFrameworkComplianceReportRequest.new(name: name, end_time: end_time), grpc_options) do |response, operation| + client.fetch_framework_compliance_report(::Google::Cloud::CloudSecurityCompliance::V1::FetchFrameworkComplianceReportRequest.new(name: name, end_time: end_time, filter: filter), grpc_options) do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/.gitignore b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/.repo-metadata.json deleted file mode 100644 index b81573b51d64..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "cloudsecuritycompliance.googleapis.com", - "api_shortname": "cloudsecuritycompliance", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-cloud_security_compliance-v1/latest", - "distribution_name": "google-cloud-cloud_security_compliance-v1", - "is_cloud": true, - "language": "ruby", - "name": "cloudsecuritycompliance", - "name_pretty": "Cloud Security Compliance V1 API", - "product_documentation": "https://cloud.google.com/security-command-center/docs/compliance-manager-overview", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "google-cloud-cloud_security_compliance-v1 is the official client library for the Cloud Security Compliance V1 API. Note that google-cloud-cloud_security_compliance-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-cloud_security_compliance instead. See the readme for more details.", - "ruby-cloud-product-url": "https://cloud.google.com/security-command-center/docs/compliance-manager-overview", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/.rubocop.yml b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/.rubocop.yml deleted file mode 100644 index 16ae582e9c51..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-cloud_security_compliance-v1.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-cloud-cloud_security_compliance-v1.rb" diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/.toys.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/.yardopts b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/.yardopts deleted file mode 100644 index 656b6b310703..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Cloud Security Compliance V1 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/AUTHENTICATION.md deleted file mode 100644 index 151c89ed0b9a..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-cloud_security_compliance-v1 library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-cloud-cloud_security_compliance-v1 library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/cloud/cloud_security_compliance/v1" - -client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/cloud_security_compliance/v1" - -::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client.new -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-cloud-cloud_security_compliance-v1 -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/cloud/cloud_security_compliance/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client.new -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/Gemfile b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/Gemfile +++ /dev/null @@ -1,14 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/LICENSE.md b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/README.md b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/README.md deleted file mode 100644 index 89c2e7decfb0..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Cloud Security Compliance V1 API - -API Client library for the Cloud Security Compliance V1 API - -google-cloud-cloud_security_compliance-v1 is the official client library for the Cloud Security Compliance V1 API. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Cloud Security Compliance V1 API. Most users should consider using -the main client gem, -[google-cloud-cloud_security_compliance](https://rubygems.org/gems/google-cloud-cloud_security_compliance). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-cloud_security_compliance-v1 -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/cloudsecuritycompliance.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/cloud_security_compliance/v1" - -client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client.new -request = ::Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportRequest.new # (request fields as keyword arguments...) -response = client.generate_framework_audit_scope_report request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-cloud_security_compliance-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/security-command-center/docs/compliance-manager-overview) -for general usage information. - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -You can customize logging by modifying the `logger` configuration when -constructing a client object. For example: - -```ruby -require "google/cloud/cloud_security_compliance/v1" -require "logger" - -client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.0+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-cloud_security_compliance`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-cloud_security_compliance-v1`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-cloud-cloud_security_compliance`. -The main client is recommended because it will embody the best practices for -accessing the service, and may also provide more convenient interfaces or -tighter integration into frameworks and third-party libraries. In addition, the -documentation and samples published by Google will generally demonstrate use of -the main client. - -### Why would I want to use a versioned client? - -You can use a versioned client if you are content with a possibly lower-level -class interface, you explicitly want to avoid features provided by the main -client, or you want to access a specific service version not be covered by the -main client. You can identify versioned client gems because the service version -is part of the name, e.g. `google-cloud-cloud_security_compliance-v1`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/Rakefile b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/Rakefile deleted file mode 100644 index 14af38bc5501..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-cloud_security_compliance-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["GOOGLE_CLOUD_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/cloud_security_compliance/v1/audit/credentials" - ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["GOOGLE_CLOUD_PROJECT"] = project - ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project - ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile - - Rake::Task["acceptance:run"].invoke -end - -namespace :acceptance do - task :run do - if File.directory? "acceptance" - Rake::Task[:smoke_test].invoke - else - puts "The google-cloud-cloud_security_compliance-v1 gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-cloud_security_compliance-v1 gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-cloud_security_compliance-v1 gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-cloud_security_compliance-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-cloud_security_compliance-v1" - header "google-cloud-cloud_security_compliance-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-cloud_security_compliance-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-cloud_security_compliance-v1 test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-cloud-cloud_security_compliance-v1 smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-cloud-cloud_security_compliance-v1 acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/gapic_metadata.json deleted file mode 100644 index a789695493ca..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/gapic_metadata.json +++ /dev/null @@ -1,189 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.cloudsecuritycompliance.v1", - "libraryPackage": "::Google::Cloud::CloudSecurityCompliance::V1", - "services": { - "Audit": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client", - "rpcs": { - "GenerateFrameworkAuditScopeReport": { - "methods": [ - "generate_framework_audit_scope_report" - ] - }, - "CreateFrameworkAudit": { - "methods": [ - "create_framework_audit" - ] - }, - "ListFrameworkAudits": { - "methods": [ - "list_framework_audits" - ] - }, - "GetFrameworkAudit": { - "methods": [ - "get_framework_audit" - ] - } - } - } - } - }, - "CmEnrollmentService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Client", - "rpcs": { - "UpdateCmEnrollment": { - "methods": [ - "update_cm_enrollment" - ] - }, - "CalculateEffectiveCmEnrollment": { - "methods": [ - "calculate_effective_cm_enrollment" - ] - } - } - } - } - }, - "Config": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::CloudSecurityCompliance::V1::Config::Client", - "rpcs": { - "ListFrameworks": { - "methods": [ - "list_frameworks" - ] - }, - "GetFramework": { - "methods": [ - "get_framework" - ] - }, - "CreateFramework": { - "methods": [ - "create_framework" - ] - }, - "UpdateFramework": { - "methods": [ - "update_framework" - ] - }, - "DeleteFramework": { - "methods": [ - "delete_framework" - ] - }, - "ListCloudControls": { - "methods": [ - "list_cloud_controls" - ] - }, - "GetCloudControl": { - "methods": [ - "get_cloud_control" - ] - }, - "CreateCloudControl": { - "methods": [ - "create_cloud_control" - ] - }, - "UpdateCloudControl": { - "methods": [ - "update_cloud_control" - ] - }, - "DeleteCloudControl": { - "methods": [ - "delete_cloud_control" - ] - } - } - } - } - }, - "Deployment": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client", - "rpcs": { - "CreateFrameworkDeployment": { - "methods": [ - "create_framework_deployment" - ] - }, - "DeleteFrameworkDeployment": { - "methods": [ - "delete_framework_deployment" - ] - }, - "GetFrameworkDeployment": { - "methods": [ - "get_framework_deployment" - ] - }, - "ListFrameworkDeployments": { - "methods": [ - "list_framework_deployments" - ] - }, - "GetCloudControlDeployment": { - "methods": [ - "get_cloud_control_deployment" - ] - }, - "ListCloudControlDeployments": { - "methods": [ - "list_cloud_control_deployments" - ] - } - } - } - } - }, - "Monitoring": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client", - "rpcs": { - "ListFrameworkComplianceSummaries": { - "methods": [ - "list_framework_compliance_summaries" - ] - }, - "ListFindingSummaries": { - "methods": [ - "list_finding_summaries" - ] - }, - "FetchFrameworkComplianceReport": { - "methods": [ - "fetch_framework_compliance_report" - ] - }, - "ListControlComplianceSummaries": { - "methods": [ - "list_control_compliance_summaries" - ] - }, - "AggregateFrameworkComplianceReport": { - "methods": [ - "aggregate_framework_compliance_report" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/google-cloud-cloud_security_compliance-v1.gemspec b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/google-cloud-cloud_security_compliance-v1.gemspec deleted file mode 100644 index a61c2d1d8302..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/google-cloud-cloud_security_compliance-v1.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/cloud_security_compliance/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-cloud_security_compliance-v1" - gem.version = Google::Cloud::CloudSecurityCompliance::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "google-cloud-cloud_security_compliance-v1 is the official client library for the Cloud Security Compliance V1 API. Note that google-cloud-cloud_security_compliance-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-cloud_security_compliance instead. See the readme for more details." - gem.summary = "API Client library for the Cloud Security Compliance V1 API" - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-cloud-location", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google-cloud-cloud_security_compliance-v1.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google-cloud-cloud_security_compliance-v1.rb deleted file mode 100644 index 5e2696da56de..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google-cloud-cloud_security_compliance-v1.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/cloud_security_compliance/v1" diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1.rb deleted file mode 100644 index 76b0323f5e7e..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/cloud_security_compliance/v1/audit" -require "google/cloud/cloud_security_compliance/v1/cm_enrollment_service" -require "google/cloud/cloud_security_compliance/v1/config" -require "google/cloud/cloud_security_compliance/v1/deployment" -require "google/cloud/cloud_security_compliance/v1/monitoring" -require "google/cloud/cloud_security_compliance/v1/version" - -module Google - module Cloud - module CloudSecurityCompliance - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/cloud_security_compliance/v1" - # client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/cloud_security_compliance/v1" - # client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/cloud_security_compliance/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit.rb deleted file mode 100644 index c4e93d3c03ba..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/cloud_security_compliance/v1/version" - -require "google/cloud/cloud_security_compliance/v1/audit/credentials" -require "google/cloud/cloud_security_compliance/v1/audit/paths" -require "google/cloud/cloud_security_compliance/v1/audit/operations" -require "google/cloud/cloud_security_compliance/v1/audit/client" -require "google/cloud/cloud_security_compliance/v1/audit/rest" - -module Google - module Cloud - module CloudSecurityCompliance - module V1 - ## - # Service describing handlers for resources - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/cloud_security_compliance/v1/audit" - # client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/cloud_security_compliance/v1/audit/rest" - # client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Rest::Client.new - # - module Audit - end - end - end - end -end - -helper_path = ::File.join __dir__, "audit", "helpers.rb" -require "google/cloud/cloud_security_compliance/v1/audit/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/client.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/client.rb deleted file mode 100644 index a7742a3b55c3..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/client.rb +++ /dev/null @@ -1,859 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/cloudsecuritycompliance/v1/audit_pb" -require "google/cloud/location" - -module Google - module Cloud - module CloudSecurityCompliance - module V1 - module Audit - ## - # Client for the Audit service. - # - # Service describing handlers for resources - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudsecuritycompliance.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :audit_stub - - ## - # Configure the Audit Client class. - # - # See {::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all Audit clients - # ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "CloudSecurityCompliance", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.generate_framework_audit_scope_report.timeout = 60.0 - - default_config.rpcs.create_framework_audit.timeout = 60.0 - - default_config.rpcs.list_framework_audits.timeout = 60.0 - default_config.rpcs.list_framework_audits.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_framework_audit.timeout = 60.0 - default_config.rpcs.get_framework_audit.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the Audit Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @audit_stub.universe_domain - end - - ## - # Create a new Audit client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Audit client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/cloudsecuritycompliance/v1/audit_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @audit_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @audit_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @audit_stub.endpoint - config.universe_domain = @audit_stub.universe_domain - config.logger = @audit_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::CloudSecurityCompliance::V1::Audit::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Client] - # - attr_reader :location_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @audit_stub.logger - end - - # Service calls - - ## - # Generates an audit scope report for a framework. - # - # @overload generate_framework_audit_scope_report(request, options = nil) - # Pass arguments to `generate_framework_audit_scope_report` via a request object, either of type - # {::Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload generate_framework_audit_scope_report(scope: nil, report_format: nil, compliance_framework: nil) - # Pass arguments to `generate_framework_audit_scope_report` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param scope [::String] - # Required. The organization, folder or project for the audit report. - # - # Supported formats are the following: - # - # * `projects/{project_id}/locations/{location}` - # * `folders/{folder_id}/locations/{location}` - # * `organizations/{organization_id}/locations/{location}` - # @param report_format [::Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportRequest::Format] - # Required. The format that the scope report bytes is returned in. - # @param compliance_framework [::String] - # Required. The compliance framework that the scope report is generated for. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/cloud_security_compliance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudSecurityCompliance::V1::Audit::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportRequest.new - # - # # Call the generate_framework_audit_scope_report method. - # result = client.generate_framework_audit_scope_report request - # - # # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportResponse. - # p result - # - def generate_framework_audit_scope_report request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.generate_framework_audit_scope_report.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.scope - header_params["scope"] = request.scope - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.generate_framework_audit_scope_report.timeout, - metadata: metadata, - retry_policy: @config.rpcs.generate_framework_audit_scope_report.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @audit_stub.call_rpc :generate_framework_audit_scope_report, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an audit scope report for a framework. - # - # @overload create_framework_audit(request, options = nil) - # Pass arguments to `create_framework_audit` via a request object, either of type - # {::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkAuditRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkAuditRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_framework_audit(parent: nil, framework_audit_id: nil, framework_audit: nil) - # Pass arguments to `create_framework_audit` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource where this framework audit is created. - # - # Supported formats are the following: - # - # * `organizations/{organization_id}/locations/{location}` - # * `folders/{folder_id}/locations/{location}` - # * `projects/{project_id}/locations/{location}` - # @param framework_audit_id [::String] - # Optional. The ID to use for the framework audit. The ID becomes the final - # component of the framework audit's full resource name. - # - # The ID must be between 4-63 characters, and valid characters - # are `\[a-z][0-9]-\`. - # @param framework_audit [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkAudit, ::Hash] - # Required. The framework audit to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/cloud_security_compliance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudSecurityCompliance::V1::Audit::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkAuditRequest.new - # - # # Call the create_framework_audit method. - # result = client.create_framework_audit request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_framework_audit request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkAuditRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_framework_audit.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_framework_audit.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_framework_audit.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @audit_stub.call_rpc :create_framework_audit, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the framework audits for a given organization, folder, or project. - # - # @overload list_framework_audits(request, options = nil) - # Pass arguments to `list_framework_audits` via a request object, either of type - # {::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkAuditsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkAuditsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_framework_audits(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_framework_audits` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource where the framework audits are listed. - # - # Supported formats are the following: - # - # * `organizations/{organization_id}/locations/{location}` - # * `folders/{folder_id}/locations/{location}` - # * `projects/{project_id}/locations/{location}` - # @param page_size [::Integer] - # Optional. The maximum number of framework audits to return. The service - # might return fewer audits than this value. If unspecified, a maximum of 10 - # framework audits are returned. The maximum value is 50; values above 50 are - # limited to 50. - # @param page_token [::String] - # Optional. The `next_page_token` value that's returned from a previous list - # request, if any. - # @param filter [::String] - # Optional. The filters to apply to the framework audits. - # Supported filters are `compliance_framework`, `compliance_state`, - # `create_time,` and `framework_audit_name`. If the filter is invalid, an - # invalid argument error is returned. - # For syntax details, see [AIP-160][https://google.aip.dev/160]. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::FrameworkAudit>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::FrameworkAudit>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/cloud_security_compliance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudSecurityCompliance::V1::Audit::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkAuditsRequest.new - # - # # Call the list_framework_audits method. - # result = client.list_framework_audits request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::CloudSecurityCompliance::V1::FrameworkAudit. - # p item - # end - # - def list_framework_audits request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkAuditsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_framework_audits.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_framework_audits.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_framework_audits.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @audit_stub.call_rpc :list_framework_audits, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @audit_stub, :list_framework_audits, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the details for a framework audit. - # - # @overload get_framework_audit(request, options = nil) - # Pass arguments to `get_framework_audit` via a request object, either of type - # {::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkAuditRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkAuditRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_framework_audit(name: nil) - # Pass arguments to `get_framework_audit` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the framework audit to retrieve. - # - # Supported formats are the following: - # - # * `organizations/{organization_id}/locations/{location}/frameworkAudits/{frameworkAuditName}` - # * `folders/{folder_id}/locations/{location}/frameworkAudits/{frameworkAuditName}` - # * `projects/{project_id}/locations/{location}/frameworkAudits/{frameworkAuditName}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkAudit] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkAudit] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/cloud_security_compliance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudSecurityCompliance::V1::Audit::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkAuditRequest.new - # - # # Call the get_framework_audit method. - # result = client.get_framework_audit request - # - # # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::FrameworkAudit. - # p result - # - def get_framework_audit request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkAuditRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_framework_audit.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_framework_audit.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_framework_audit.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @audit_stub.call_rpc :get_framework_audit, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Audit API. - # - # This class represents the configuration for Audit, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # generate_framework_audit_scope_report to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.generate_framework_audit_scope_report.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.generate_framework_audit_scope_report.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "cloudsecuritycompliance.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Audit API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `generate_framework_audit_scope_report` - # @return [::Gapic::Config::Method] - # - attr_reader :generate_framework_audit_scope_report - ## - # RPC-specific configuration for `create_framework_audit` - # @return [::Gapic::Config::Method] - # - attr_reader :create_framework_audit - ## - # RPC-specific configuration for `list_framework_audits` - # @return [::Gapic::Config::Method] - # - attr_reader :list_framework_audits - ## - # RPC-specific configuration for `get_framework_audit` - # @return [::Gapic::Config::Method] - # - attr_reader :get_framework_audit - - # @private - def initialize parent_rpcs = nil - generate_framework_audit_scope_report_config = parent_rpcs.generate_framework_audit_scope_report if parent_rpcs.respond_to? :generate_framework_audit_scope_report - @generate_framework_audit_scope_report = ::Gapic::Config::Method.new generate_framework_audit_scope_report_config - create_framework_audit_config = parent_rpcs.create_framework_audit if parent_rpcs.respond_to? :create_framework_audit - @create_framework_audit = ::Gapic::Config::Method.new create_framework_audit_config - list_framework_audits_config = parent_rpcs.list_framework_audits if parent_rpcs.respond_to? :list_framework_audits - @list_framework_audits = ::Gapic::Config::Method.new list_framework_audits_config - get_framework_audit_config = parent_rpcs.get_framework_audit if parent_rpcs.respond_to? :get_framework_audit - @get_framework_audit = ::Gapic::Config::Method.new get_framework_audit_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/credentials.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/credentials.rb deleted file mode 100644 index 81bf2d420b1f..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module CloudSecurityCompliance - module V1 - module Audit - # Credentials for the Audit API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/operations.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/operations.rb deleted file mode 100644 index 92f86c503b05..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/operations.rb +++ /dev/null @@ -1,841 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module CloudSecurityCompliance - module V1 - module Audit - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudsecuritycompliance.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the Audit Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the Audit Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/longrunning/operations_services_pb" - - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = ::Gapic::ServiceStub.new( - ::Google::Longrunning::Operations::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| - wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } - response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Waits until the specified long-running operation is done or reaches at most - # a specified timeout, returning the latest state. If the operation is - # already done, the latest state is immediately returned. If the timeout - # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - # timeout is used. If the server does not support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # Note that this method is on a best-effort basis. It may return the latest - # state before the specified timeout (including immediately), meaning even an - # immediate response is no guarantee that the operation is done. - # - # @overload wait_operation(request, options = nil) - # Pass arguments to `wait_operation` via a request object, either of type - # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload wait_operation(name: nil, timeout: nil) - # Pass arguments to `wait_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to wait on. - # @param timeout [::Google::Protobuf::Duration, ::Hash] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::WaitOperationRequest.new - # - # # Call the wait_operation method. - # result = client.wait_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def wait_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.wait_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "cloudsecuritycompliance.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/paths.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/paths.rb deleted file mode 100644 index 6df27ab421be..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/paths.rb +++ /dev/null @@ -1,110 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module CloudSecurityCompliance - module V1 - module Audit - # Path helper methods for the Audit API. - module Paths - ## - # Create a fully-qualified FrameworkAudit resource string. - # - # @overload framework_audit_path(project:, location:, framework_audit:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/frameworkAudits/{framework_audit}` - # - # @param project [String] - # @param location [String] - # @param framework_audit [String] - # - # @overload framework_audit_path(organization:, location:, framework_audit:) - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/frameworkAudits/{framework_audit}` - # - # @param organization [String] - # @param location [String] - # @param framework_audit [String] - # - # @return [::String] - def framework_audit_path **args - resources = { - "framework_audit:location:project" => (proc do |project:, location:, framework_audit:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/frameworkAudits/#{framework_audit}" - end), - "framework_audit:location:organization" => (proc do |organization:, location:, framework_audit:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/frameworkAudits/#{framework_audit}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - ## - # Create a fully-qualified OrganizationLocation resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}` - # - # @param organization [String] - # @param location [String] - # - # @return [::String] - def organization_location_path organization:, location: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/rest.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/rest.rb deleted file mode 100644 index f4f350e0fbd7..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/rest.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/cloud_security_compliance/v1/version" -require "google/cloud/cloud_security_compliance/v1/bindings_override" - -require "google/cloud/cloud_security_compliance/v1/audit/credentials" -require "google/cloud/cloud_security_compliance/v1/audit/paths" -require "google/cloud/cloud_security_compliance/v1/audit/rest/operations" -require "google/cloud/cloud_security_compliance/v1/audit/rest/client" - -module Google - module Cloud - module CloudSecurityCompliance - module V1 - ## - # Service describing handlers for resources - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/cloud_security_compliance/v1/audit/rest" - # client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Rest::Client.new - # - module Audit - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/cloud_security_compliance/v1/audit/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/rest/client.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/rest/client.rb deleted file mode 100644 index 10a21a6f2e15..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/rest/client.rb +++ /dev/null @@ -1,796 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/cloudsecuritycompliance/v1/audit_pb" -require "google/cloud/cloud_security_compliance/v1/audit/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Cloud - module CloudSecurityCompliance - module V1 - module Audit - module Rest - ## - # REST client for the Audit service. - # - # Service describing handlers for resources - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudsecuritycompliance.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :audit_stub - - ## - # Configure the Audit Client class. - # - # See {::Google::Cloud::CloudSecurityCompliance::V1::Audit::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all Audit clients - # ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "CloudSecurityCompliance", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.generate_framework_audit_scope_report.timeout = 60.0 - - default_config.rpcs.create_framework_audit.timeout = 60.0 - - default_config.rpcs.list_framework_audits.timeout = 60.0 - default_config.rpcs.list_framework_audits.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_framework_audit.timeout = 60.0 - default_config.rpcs.get_framework_audit.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the Audit Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::CloudSecurityCompliance::V1::Audit::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @audit_stub.universe_domain - end - - ## - # Create a new Audit REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Audit client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Rest::Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @audit_stub = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @audit_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @audit_stub.endpoint - config.universe_domain = @audit_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @audit_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::CloudSecurityCompliance::V1::Audit::Rest::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Rest::Client] - # - attr_reader :location_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @audit_stub.logger - end - - # Service calls - - ## - # Generates an audit scope report for a framework. - # - # @overload generate_framework_audit_scope_report(request, options = nil) - # Pass arguments to `generate_framework_audit_scope_report` via a request object, either of type - # {::Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload generate_framework_audit_scope_report(scope: nil, report_format: nil, compliance_framework: nil) - # Pass arguments to `generate_framework_audit_scope_report` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param scope [::String] - # Required. The organization, folder or project for the audit report. - # - # Supported formats are the following: - # - # * `projects/{project_id}/locations/{location}` - # * `folders/{folder_id}/locations/{location}` - # * `organizations/{organization_id}/locations/{location}` - # @param report_format [::Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportRequest::Format] - # Required. The format that the scope report bytes is returned in. - # @param compliance_framework [::String] - # Required. The compliance framework that the scope report is generated for. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/cloud_security_compliance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudSecurityCompliance::V1::Audit::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportRequest.new - # - # # Call the generate_framework_audit_scope_report method. - # result = client.generate_framework_audit_scope_report request - # - # # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportResponse. - # p result - # - def generate_framework_audit_scope_report request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.generate_framework_audit_scope_report.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.generate_framework_audit_scope_report.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.generate_framework_audit_scope_report.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @audit_stub.generate_framework_audit_scope_report request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an audit scope report for a framework. - # - # @overload create_framework_audit(request, options = nil) - # Pass arguments to `create_framework_audit` via a request object, either of type - # {::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkAuditRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkAuditRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_framework_audit(parent: nil, framework_audit_id: nil, framework_audit: nil) - # Pass arguments to `create_framework_audit` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource where this framework audit is created. - # - # Supported formats are the following: - # - # * `organizations/{organization_id}/locations/{location}` - # * `folders/{folder_id}/locations/{location}` - # * `projects/{project_id}/locations/{location}` - # @param framework_audit_id [::String] - # Optional. The ID to use for the framework audit. The ID becomes the final - # component of the framework audit's full resource name. - # - # The ID must be between 4-63 characters, and valid characters - # are `\[a-z][0-9]-\`. - # @param framework_audit [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkAudit, ::Hash] - # Required. The framework audit to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/cloud_security_compliance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudSecurityCompliance::V1::Audit::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkAuditRequest.new - # - # # Call the create_framework_audit method. - # result = client.create_framework_audit request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_framework_audit request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkAuditRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_framework_audit.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_framework_audit.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_framework_audit.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @audit_stub.create_framework_audit request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the framework audits for a given organization, folder, or project. - # - # @overload list_framework_audits(request, options = nil) - # Pass arguments to `list_framework_audits` via a request object, either of type - # {::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkAuditsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkAuditsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_framework_audits(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_framework_audits` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource where the framework audits are listed. - # - # Supported formats are the following: - # - # * `organizations/{organization_id}/locations/{location}` - # * `folders/{folder_id}/locations/{location}` - # * `projects/{project_id}/locations/{location}` - # @param page_size [::Integer] - # Optional. The maximum number of framework audits to return. The service - # might return fewer audits than this value. If unspecified, a maximum of 10 - # framework audits are returned. The maximum value is 50; values above 50 are - # limited to 50. - # @param page_token [::String] - # Optional. The `next_page_token` value that's returned from a previous list - # request, if any. - # @param filter [::String] - # Optional. The filters to apply to the framework audits. - # Supported filters are `compliance_framework`, `compliance_state`, - # `create_time,` and `framework_audit_name`. If the filter is invalid, an - # invalid argument error is returned. - # For syntax details, see [AIP-160][https://google.aip.dev/160]. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::FrameworkAudit>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::FrameworkAudit>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/cloud_security_compliance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudSecurityCompliance::V1::Audit::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkAuditsRequest.new - # - # # Call the list_framework_audits method. - # result = client.list_framework_audits request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::CloudSecurityCompliance::V1::FrameworkAudit. - # p item - # end - # - def list_framework_audits request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkAuditsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_framework_audits.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_framework_audits.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_framework_audits.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @audit_stub.list_framework_audits request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @audit_stub, :list_framework_audits, "framework_audits", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the details for a framework audit. - # - # @overload get_framework_audit(request, options = nil) - # Pass arguments to `get_framework_audit` via a request object, either of type - # {::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkAuditRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkAuditRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_framework_audit(name: nil) - # Pass arguments to `get_framework_audit` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the framework audit to retrieve. - # - # Supported formats are the following: - # - # * `organizations/{organization_id}/locations/{location}/frameworkAudits/{frameworkAuditName}` - # * `folders/{folder_id}/locations/{location}/frameworkAudits/{frameworkAuditName}` - # * `projects/{project_id}/locations/{location}/frameworkAudits/{frameworkAuditName}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkAudit] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkAudit] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/cloud_security_compliance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudSecurityCompliance::V1::Audit::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkAuditRequest.new - # - # # Call the get_framework_audit method. - # result = client.get_framework_audit request - # - # # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::FrameworkAudit. - # p result - # - def get_framework_audit request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkAuditRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_framework_audit.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_framework_audit.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_framework_audit.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @audit_stub.get_framework_audit request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Audit REST API. - # - # This class represents the configuration for Audit REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::CloudSecurityCompliance::V1::Audit::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # generate_framework_audit_scope_report to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.generate_framework_audit_scope_report.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.generate_framework_audit_scope_report.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "cloudsecuritycompliance.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - # Overrides for http bindings for the RPCs of this service - # are only used when this service is used as mixin, and only - # by the host service. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Audit API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `generate_framework_audit_scope_report` - # @return [::Gapic::Config::Method] - # - attr_reader :generate_framework_audit_scope_report - ## - # RPC-specific configuration for `create_framework_audit` - # @return [::Gapic::Config::Method] - # - attr_reader :create_framework_audit - ## - # RPC-specific configuration for `list_framework_audits` - # @return [::Gapic::Config::Method] - # - attr_reader :list_framework_audits - ## - # RPC-specific configuration for `get_framework_audit` - # @return [::Gapic::Config::Method] - # - attr_reader :get_framework_audit - - # @private - def initialize parent_rpcs = nil - generate_framework_audit_scope_report_config = parent_rpcs.generate_framework_audit_scope_report if parent_rpcs.respond_to? :generate_framework_audit_scope_report - @generate_framework_audit_scope_report = ::Gapic::Config::Method.new generate_framework_audit_scope_report_config - create_framework_audit_config = parent_rpcs.create_framework_audit if parent_rpcs.respond_to? :create_framework_audit - @create_framework_audit = ::Gapic::Config::Method.new create_framework_audit_config - list_framework_audits_config = parent_rpcs.list_framework_audits if parent_rpcs.respond_to? :list_framework_audits - @list_framework_audits = ::Gapic::Config::Method.new list_framework_audits_config - get_framework_audit_config = parent_rpcs.get_framework_audit if parent_rpcs.respond_to? :get_framework_audit - @get_framework_audit = ::Gapic::Config::Method.new get_framework_audit_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/rest/operations.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/rest/operations.rb deleted file mode 100644 index c0e447f12d53..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/rest/operations.rb +++ /dev/null @@ -1,954 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module CloudSecurityCompliance - module V1 - module Audit - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudsecuritycompliance.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the Audit Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the Audit Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = OperationsServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.list_operations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.get_operation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.delete_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "cloudsecuritycompliance.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}/operations", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}/operations", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/rest/service_stub.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/rest/service_stub.rb deleted file mode 100644 index 093f7a5208b3..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/audit/rest/service_stub.rb +++ /dev/null @@ -1,387 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/cloudsecuritycompliance/v1/audit_pb" - -module Google - module Cloud - module CloudSecurityCompliance - module V1 - module Audit - module Rest - ## - # REST service stub for the Audit service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the generate_framework_audit_scope_report REST call - # - # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportResponse] - # A result object deserialized from the server's reply - def generate_framework_audit_scope_report request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_generate_framework_audit_scope_report_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "generate_framework_audit_scope_report", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_framework_audit REST call - # - # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkAuditRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_framework_audit request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_framework_audit_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_framework_audit", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_framework_audits REST call - # - # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkAuditsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkAuditsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkAuditsResponse] - # A result object deserialized from the server's reply - def list_framework_audits request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_framework_audits_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_framework_audits", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkAuditsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_framework_audit REST call - # - # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkAuditRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkAudit] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkAudit] - # A result object deserialized from the server's reply - def get_framework_audit request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_framework_audit_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_framework_audit", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CloudSecurityCompliance::V1::FrameworkAudit.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the generate_framework_audit_scope_report REST call - # - # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_generate_framework_audit_scope_report_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{scope}/frameworkAuditScopeReports:generateFrameworkAuditScopeReport", - body: "*", - matches: [ - ["scope", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{scope}/frameworkAuditScopeReports:generateFrameworkAuditScopeReport", - body: "*", - matches: [ - ["scope", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{scope}/frameworkAuditScopeReports:generateFrameworkAuditScopeReport", - body: "*", - matches: [ - ["scope", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_framework_audit REST call - # - # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkAuditRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_framework_audit_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/frameworkAudits", - body: "framework_audit", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/frameworkAudits", - body: "framework_audit", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/frameworkAudits", - body: "framework_audit", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_framework_audits REST call - # - # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkAuditsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_framework_audits_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/frameworkAudits", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/frameworkAudits", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/frameworkAudits", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_framework_audit REST call - # - # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkAuditRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_framework_audit_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/frameworkAudits/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/frameworkAudits/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/frameworkAudits/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/bindings_override.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/bindings_override.rb deleted file mode 100644 index a417a8b9df1f..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/bindings_override.rb +++ /dev/null @@ -1,91 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" - -module Google - module Cloud - module CloudSecurityCompliance - ## - # @example Loading just the REST part of this package, including all its services, and instantiating a REST client - # - # require "google/cloud/cloud_security_compliance/v1/rest" - # client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Rest::Client.new - # - module V1 - ## - # @private - # Initialize the mixin bindings configuration - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "CloudSecurityCompliance"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - - default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config - default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{name}/locations", - matches: [ - ["name", %r{^organizations/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{name}/locations", - matches: [ - ["name", %r{^projects/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config - end - yield @configure if block_given? - @configure - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/cm_enrollment_service.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/cm_enrollment_service.rb deleted file mode 100644 index 28b1c5c5639c..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/cm_enrollment_service.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/cloud_security_compliance/v1/version" - -require "google/cloud/cloud_security_compliance/v1/cm_enrollment_service/credentials" -require "google/cloud/cloud_security_compliance/v1/cm_enrollment_service/paths" -require "google/cloud/cloud_security_compliance/v1/cm_enrollment_service/client" -require "google/cloud/cloud_security_compliance/v1/cm_enrollment_service/rest" - -module Google - module Cloud - module CloudSecurityCompliance - module V1 - ## - # Service describing CmEnrollment related RPCs for - # complianceManager. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/cloud_security_compliance/v1/cm_enrollment_service" - # client = ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/cloud_security_compliance/v1/cm_enrollment_service/rest" - # client = ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Rest::Client.new - # - module CmEnrollmentService - end - end - end - end -end - -helper_path = ::File.join __dir__, "cm_enrollment_service", "helpers.rb" -require "google/cloud/cloud_security_compliance/v1/cm_enrollment_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/cm_enrollment_service/client.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/cm_enrollment_service/client.rb deleted file mode 100644 index abf743faabce..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/cm_enrollment_service/client.rb +++ /dev/null @@ -1,608 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/cloudsecuritycompliance/v1/cm_enrollment_service_pb" -require "google/cloud/location" - -module Google - module Cloud - module CloudSecurityCompliance - module V1 - module CmEnrollmentService - ## - # Client for the CmEnrollmentService service. - # - # Service describing CmEnrollment related RPCs for - # complianceManager. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudsecuritycompliance.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :cm_enrollment_service_stub - - ## - # Configure the CmEnrollmentService Client class. - # - # See {::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CmEnrollmentService clients - # ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "CloudSecurityCompliance", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.update_cm_enrollment.timeout = 60.0 - default_config.rpcs.update_cm_enrollment.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.calculate_effective_cm_enrollment.timeout = 60.0 - default_config.rpcs.calculate_effective_cm_enrollment.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the CmEnrollmentService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @cm_enrollment_service_stub.universe_domain - end - - ## - # Create a new CmEnrollmentService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CmEnrollmentService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/cloudsecuritycompliance/v1/cm_enrollment_service_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @cm_enrollment_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @cm_enrollment_service_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @cm_enrollment_service_stub.endpoint - config.universe_domain = @cm_enrollment_service_stub.universe_domain - config.logger = @cm_enrollment_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Client] - # - attr_reader :location_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @cm_enrollment_service_stub.logger - end - - # Service calls - - ## - # Updates the Compliance Manager enrollment for a resource to facilitate - # an audit. - # Use this method to enroll a resource in Compliance Manager or to - # create or update feature-specific configurations. - # - # @overload update_cm_enrollment(request, options = nil) - # Pass arguments to `update_cm_enrollment` via a request object, either of type - # {::Google::Cloud::CloudSecurityCompliance::V1::UpdateCmEnrollmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudSecurityCompliance::V1::UpdateCmEnrollmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_cm_enrollment(cm_enrollment: nil, update_mask: nil) - # Pass arguments to `update_cm_enrollment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param cm_enrollment [::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollment, ::Hash] - # Required. The Compliance Manager enrollment to update. - # The `name` field is used to identify the settings that you want to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of fields that you want to update. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollment] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollment] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/cloud_security_compliance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudSecurityCompliance::V1::UpdateCmEnrollmentRequest.new - # - # # Call the update_cm_enrollment method. - # result = client.update_cm_enrollment request - # - # # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::CmEnrollment. - # p result - # - def update_cm_enrollment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::UpdateCmEnrollmentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_cm_enrollment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.cm_enrollment&.name - header_params["cm_enrollment.name"] = request.cm_enrollment.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_cm_enrollment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_cm_enrollment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cm_enrollment_service_stub.call_rpc :update_cm_enrollment, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Calculates the effective Compliance Manager enrollment for a resource. - # An effective enrollment is either a direct enrollment of a - # resource (if it exists), or an enrollment of the closest parent of a - # resource that's enrolled in Compliance Manager. - # - # @overload calculate_effective_cm_enrollment(request, options = nil) - # Pass arguments to `calculate_effective_cm_enrollment` via a request object, either of type - # {::Google::Cloud::CloudSecurityCompliance::V1::CalculateEffectiveCmEnrollmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudSecurityCompliance::V1::CalculateEffectiveCmEnrollmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload calculate_effective_cm_enrollment(name: nil) - # Pass arguments to `calculate_effective_cm_enrollment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the Compliance Manager enrollment to calculate. - # - # Supported formats are the following: - # - # * `organizations/{organization_id}/locations/{location}/cmEnrollment` - # * `folders/{folder_id}/locations/{location}/cmEnrollment` - # * `projects/{project_id}/locations/{location}/cmEnrollment` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::CloudSecurityCompliance::V1::CalculateEffectiveCmEnrollmentResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::CloudSecurityCompliance::V1::CalculateEffectiveCmEnrollmentResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/cloud_security_compliance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudSecurityCompliance::V1::CalculateEffectiveCmEnrollmentRequest.new - # - # # Call the calculate_effective_cm_enrollment method. - # result = client.calculate_effective_cm_enrollment request - # - # # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::CalculateEffectiveCmEnrollmentResponse. - # p result - # - def calculate_effective_cm_enrollment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::CalculateEffectiveCmEnrollmentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.calculate_effective_cm_enrollment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.calculate_effective_cm_enrollment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.calculate_effective_cm_enrollment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cm_enrollment_service_stub.call_rpc :calculate_effective_cm_enrollment, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the CmEnrollmentService API. - # - # This class represents the configuration for CmEnrollmentService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # update_cm_enrollment to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.update_cm_enrollment.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.update_cm_enrollment.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "cloudsecuritycompliance.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the CmEnrollmentService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `update_cm_enrollment` - # @return [::Gapic::Config::Method] - # - attr_reader :update_cm_enrollment - ## - # RPC-specific configuration for `calculate_effective_cm_enrollment` - # @return [::Gapic::Config::Method] - # - attr_reader :calculate_effective_cm_enrollment - - # @private - def initialize parent_rpcs = nil - update_cm_enrollment_config = parent_rpcs.update_cm_enrollment if parent_rpcs.respond_to? :update_cm_enrollment - @update_cm_enrollment = ::Gapic::Config::Method.new update_cm_enrollment_config - calculate_effective_cm_enrollment_config = parent_rpcs.calculate_effective_cm_enrollment if parent_rpcs.respond_to? :calculate_effective_cm_enrollment - @calculate_effective_cm_enrollment = ::Gapic::Config::Method.new calculate_effective_cm_enrollment_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/cm_enrollment_service/credentials.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/cm_enrollment_service/credentials.rb deleted file mode 100644 index a90c60f1296a..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/cm_enrollment_service/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module CloudSecurityCompliance - module V1 - module CmEnrollmentService - # Credentials for the CmEnrollmentService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/cm_enrollment_service/paths.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/cm_enrollment_service/paths.rb deleted file mode 100644 index 4bea24069860..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/cm_enrollment_service/paths.rb +++ /dev/null @@ -1,72 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module CloudSecurityCompliance - module V1 - module CmEnrollmentService - # Path helper methods for the CmEnrollmentService API. - module Paths - ## - # Create a fully-qualified CmEnrollment resource string. - # - # @overload cm_enrollment_path(organization:, location:) - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/cmEnrollment` - # - # @param organization [String] - # @param location [String] - # - # @overload cm_enrollment_path(project:, location:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/cmEnrollment` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def cm_enrollment_path **args - resources = { - "location:organization" => (proc do |organization:, location:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/cmEnrollment" - end), - "location:project" => (proc do |project:, location:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}/cmEnrollment" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/cm_enrollment_service/rest.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/cm_enrollment_service/rest.rb deleted file mode 100644 index 5a342cc1a8b3..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/cm_enrollment_service/rest.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/cloud_security_compliance/v1/version" -require "google/cloud/cloud_security_compliance/v1/bindings_override" - -require "google/cloud/cloud_security_compliance/v1/cm_enrollment_service/credentials" -require "google/cloud/cloud_security_compliance/v1/cm_enrollment_service/paths" -require "google/cloud/cloud_security_compliance/v1/cm_enrollment_service/rest/client" - -module Google - module Cloud - module CloudSecurityCompliance - module V1 - ## - # Service describing CmEnrollment related RPCs for - # complianceManager. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/cloud_security_compliance/v1/cm_enrollment_service/rest" - # client = ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Rest::Client.new - # - module CmEnrollmentService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/cloud_security_compliance/v1/cm_enrollment_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/cm_enrollment_service/rest/client.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/cm_enrollment_service/rest/client.rb deleted file mode 100644 index f09623f4d643..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/cm_enrollment_service/rest/client.rb +++ /dev/null @@ -1,559 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/cloudsecuritycompliance/v1/cm_enrollment_service_pb" -require "google/cloud/cloud_security_compliance/v1/cm_enrollment_service/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Cloud - module CloudSecurityCompliance - module V1 - module CmEnrollmentService - module Rest - ## - # REST client for the CmEnrollmentService service. - # - # Service describing CmEnrollment related RPCs for - # complianceManager. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudsecuritycompliance.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :cm_enrollment_service_stub - - ## - # Configure the CmEnrollmentService Client class. - # - # See {::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CmEnrollmentService clients - # ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "CloudSecurityCompliance", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.update_cm_enrollment.timeout = 60.0 - default_config.rpcs.update_cm_enrollment.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.calculate_effective_cm_enrollment.timeout = 60.0 - default_config.rpcs.calculate_effective_cm_enrollment.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the CmEnrollmentService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @cm_enrollment_service_stub.universe_domain - end - - ## - # Create a new CmEnrollmentService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CmEnrollmentService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @cm_enrollment_service_stub = ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @cm_enrollment_service_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @cm_enrollment_service_stub.endpoint - config.universe_domain = @cm_enrollment_service_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @cm_enrollment_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Rest::Client] - # - attr_reader :location_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @cm_enrollment_service_stub.logger - end - - # Service calls - - ## - # Updates the Compliance Manager enrollment for a resource to facilitate - # an audit. - # Use this method to enroll a resource in Compliance Manager or to - # create or update feature-specific configurations. - # - # @overload update_cm_enrollment(request, options = nil) - # Pass arguments to `update_cm_enrollment` via a request object, either of type - # {::Google::Cloud::CloudSecurityCompliance::V1::UpdateCmEnrollmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudSecurityCompliance::V1::UpdateCmEnrollmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_cm_enrollment(cm_enrollment: nil, update_mask: nil) - # Pass arguments to `update_cm_enrollment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param cm_enrollment [::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollment, ::Hash] - # Required. The Compliance Manager enrollment to update. - # The `name` field is used to identify the settings that you want to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of fields that you want to update. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollment] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/cloud_security_compliance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudSecurityCompliance::V1::UpdateCmEnrollmentRequest.new - # - # # Call the update_cm_enrollment method. - # result = client.update_cm_enrollment request - # - # # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::CmEnrollment. - # p result - # - def update_cm_enrollment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::UpdateCmEnrollmentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_cm_enrollment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_cm_enrollment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_cm_enrollment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cm_enrollment_service_stub.update_cm_enrollment request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Calculates the effective Compliance Manager enrollment for a resource. - # An effective enrollment is either a direct enrollment of a - # resource (if it exists), or an enrollment of the closest parent of a - # resource that's enrolled in Compliance Manager. - # - # @overload calculate_effective_cm_enrollment(request, options = nil) - # Pass arguments to `calculate_effective_cm_enrollment` via a request object, either of type - # {::Google::Cloud::CloudSecurityCompliance::V1::CalculateEffectiveCmEnrollmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudSecurityCompliance::V1::CalculateEffectiveCmEnrollmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload calculate_effective_cm_enrollment(name: nil) - # Pass arguments to `calculate_effective_cm_enrollment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the Compliance Manager enrollment to calculate. - # - # Supported formats are the following: - # - # * `organizations/{organization_id}/locations/{location}/cmEnrollment` - # * `folders/{folder_id}/locations/{location}/cmEnrollment` - # * `projects/{project_id}/locations/{location}/cmEnrollment` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::CalculateEffectiveCmEnrollmentResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudSecurityCompliance::V1::CalculateEffectiveCmEnrollmentResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/cloud_security_compliance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudSecurityCompliance::V1::CalculateEffectiveCmEnrollmentRequest.new - # - # # Call the calculate_effective_cm_enrollment method. - # result = client.calculate_effective_cm_enrollment request - # - # # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::CalculateEffectiveCmEnrollmentResponse. - # p result - # - def calculate_effective_cm_enrollment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::CalculateEffectiveCmEnrollmentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.calculate_effective_cm_enrollment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.calculate_effective_cm_enrollment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.calculate_effective_cm_enrollment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cm_enrollment_service_stub.calculate_effective_cm_enrollment request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the CmEnrollmentService REST API. - # - # This class represents the configuration for CmEnrollmentService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # update_cm_enrollment to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.update_cm_enrollment.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.update_cm_enrollment.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "cloudsecuritycompliance.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - # Overrides for http bindings for the RPCs of this service - # are only used when this service is used as mixin, and only - # by the host service. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the CmEnrollmentService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `update_cm_enrollment` - # @return [::Gapic::Config::Method] - # - attr_reader :update_cm_enrollment - ## - # RPC-specific configuration for `calculate_effective_cm_enrollment` - # @return [::Gapic::Config::Method] - # - attr_reader :calculate_effective_cm_enrollment - - # @private - def initialize parent_rpcs = nil - update_cm_enrollment_config = parent_rpcs.update_cm_enrollment if parent_rpcs.respond_to? :update_cm_enrollment - @update_cm_enrollment = ::Gapic::Config::Method.new update_cm_enrollment_config - calculate_effective_cm_enrollment_config = parent_rpcs.calculate_effective_cm_enrollment if parent_rpcs.respond_to? :calculate_effective_cm_enrollment - @calculate_effective_cm_enrollment = ::Gapic::Config::Method.new calculate_effective_cm_enrollment_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/cm_enrollment_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/cm_enrollment_service/rest/service_stub.rb deleted file mode 100644 index a28e2c1c8efd..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/cm_enrollment_service/rest/service_stub.rb +++ /dev/null @@ -1,234 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/cloudsecuritycompliance/v1/cm_enrollment_service_pb" - -module Google - module Cloud - module CloudSecurityCompliance - module V1 - module CmEnrollmentService - module Rest - ## - # REST service stub for the CmEnrollmentService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the update_cm_enrollment REST call - # - # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::UpdateCmEnrollmentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollment] - # A result object deserialized from the server's reply - def update_cm_enrollment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_cm_enrollment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_cm_enrollment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollment.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the calculate_effective_cm_enrollment REST call - # - # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::CalculateEffectiveCmEnrollmentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::CalculateEffectiveCmEnrollmentResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudSecurityCompliance::V1::CalculateEffectiveCmEnrollmentResponse] - # A result object deserialized from the server's reply - def calculate_effective_cm_enrollment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_calculate_effective_cm_enrollment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "calculate_effective_cm_enrollment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CloudSecurityCompliance::V1::CalculateEffectiveCmEnrollmentResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the update_cm_enrollment REST call - # - # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::UpdateCmEnrollmentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_cm_enrollment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{cm_enrollment.name}", - body: "cm_enrollment", - matches: [ - ["cm_enrollment.name", %r{^organizations/[^/]+/locations/[^/]+/cmEnrollment/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{cm_enrollment.name}", - body: "cm_enrollment", - matches: [ - ["cm_enrollment.name", %r{^folders/[^/]+/locations/[^/]+/cmEnrollment/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{cm_enrollment.name}", - body: "cm_enrollment", - matches: [ - ["cm_enrollment.name", %r{^projects/[^/]+/locations/[^/]+/cmEnrollment/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the calculate_effective_cm_enrollment REST call - # - # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::CalculateEffectiveCmEnrollmentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_calculate_effective_cm_enrollment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}:calculate", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/cmEnrollment/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}:calculate", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/cmEnrollment/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}:calculate", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/cmEnrollment/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config.rb deleted file mode 100644 index e8244bceeddf..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/cloud_security_compliance/v1/version" - -require "google/cloud/cloud_security_compliance/v1/config/credentials" -require "google/cloud/cloud_security_compliance/v1/config/paths" -require "google/cloud/cloud_security_compliance/v1/config/client" -require "google/cloud/cloud_security_compliance/v1/config/rest" - -module Google - module Cloud - module CloudSecurityCompliance - module V1 - ## - # Config Service manages compliance frameworks, cloud controls, and their - # configurations. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/cloud_security_compliance/v1/config" - # client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/cloud_security_compliance/v1/config/rest" - # client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::Client.new - # - module Config - end - end - end - end -end - -helper_path = ::File.join __dir__, "config", "helpers.rb" -require "google/cloud/cloud_security_compliance/v1/config/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config/client.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config/client.rb deleted file mode 100644 index 8db42b376383..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config/client.rb +++ /dev/null @@ -1,1521 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/cloudsecuritycompliance/v1/config_pb" -require "google/cloud/location" - -module Google - module Cloud - module CloudSecurityCompliance - module V1 - module Config - ## - # Client for the Config service. - # - # Config Service manages compliance frameworks, cloud controls, and their - # configurations. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudsecuritycompliance.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :config_stub - - ## - # Configure the Config Client class. - # - # See {::Google::Cloud::CloudSecurityCompliance::V1::Config::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all Config clients - # ::Google::Cloud::CloudSecurityCompliance::V1::Config::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "CloudSecurityCompliance", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.list_frameworks.timeout = 60.0 - default_config.rpcs.list_frameworks.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_framework.timeout = 60.0 - default_config.rpcs.get_framework.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_framework.timeout = 60.0 - - default_config.rpcs.update_framework.timeout = 60.0 - - default_config.rpcs.delete_framework.timeout = 60.0 - - default_config.rpcs.list_cloud_controls.timeout = 60.0 - default_config.rpcs.list_cloud_controls.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_cloud_control.timeout = 60.0 - default_config.rpcs.get_cloud_control.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_cloud_control.timeout = 60.0 - - default_config.rpcs.update_cloud_control.timeout = 60.0 - - default_config.rpcs.delete_cloud_control.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the Config Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::CloudSecurityCompliance::V1::Config::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @config_stub.universe_domain - end - - ## - # Create a new Config client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Config client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/cloudsecuritycompliance/v1/config_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @config_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::CloudSecurityCompliance::V1::Config::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @config_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config_stub.endpoint - config.universe_domain = @config_stub.universe_domain - config.logger = @config_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Client] - # - attr_reader :location_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @config_stub.logger - end - - # Service calls - - ## - # Lists the frameworks (both built-in and custom) that are available within - # the parent resource. The latest major version of each framework is - # returned. - # This method supports pagination. - # - # @overload list_frameworks(request, options = nil) - # Pass arguments to `list_frameworks` via a request object, either of type - # {::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworksRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworksRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_frameworks(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_frameworks` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource name, in one of the following formats: - # - `organizations/{organization}/locations/{location}` - # - `projects/{project}/locations/{location}`. - # - # The only supported location is `global`. - # @param page_size [::Integer] - # Optional. The maximum number of frameworks to return. The default value is - # `500`. - # - # If you exceed the maximum value of `1000`, then the service uses the - # maximum value. - # @param page_token [::String] - # Optional. A pagination token returned from a previous request to list - # frameworks. Provide this token to retrieve the next page of results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::Framework>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::Framework>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/cloud_security_compliance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudSecurityCompliance::V1::ListFrameworksRequest.new - # - # # Call the list_frameworks method. - # result = client.list_frameworks request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::CloudSecurityCompliance::V1::Framework. - # p item - # end - # - def list_frameworks request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworksRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_frameworks.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_frameworks.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_frameworks.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @config_stub.call_rpc :list_frameworks, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @config_stub, :list_frameworks, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details about a framework. - # This method retrieves the latest major version of the framework. - # - # To retrieve a specific major version, include `major_revision_id` in - # the request. - # - # @overload get_framework(request, options = nil) - # Pass arguments to `get_framework` via a request object, either of type - # {::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_framework(name: nil, major_revision_id: nil) - # Pass arguments to `get_framework` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the framework to retrieve, in one of the following - # formats: - # `organizations/{organization}/locations/{location}/frameworks/{framework}` - # or - # `projects/{project}/locations/{location}/frameworks/{framework}`. - # - # The only supported location is `global`. - # @param major_revision_id [::Integer] - # Optional. The framework major version to retrieve. If not specified, the - # most recently updated `revision_id` is retrieved. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::CloudSecurityCompliance::V1::Framework] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::CloudSecurityCompliance::V1::Framework] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/cloud_security_compliance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkRequest.new - # - # # Call the get_framework method. - # result = client.get_framework request - # - # # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::Framework. - # p result - # - def get_framework request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_framework.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_framework.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_framework.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @config_stub.call_rpc :get_framework, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a custom framework in a given parent resource. - # You can't create built-in frameworks because those are managed by - # Google. - # - # @overload create_framework(request, options = nil) - # Pass arguments to `create_framework` via a request object, either of type - # {::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_framework(parent: nil, framework_id: nil, framework: nil) - # Pass arguments to `create_framework` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource name, in one of the following formats: - # - `organizations/{organization}/locations/{location}` - # - `projects/{project}/locations/{location}`. - # - # The only supported location is `global`. - # @param framework_id [::String] - # Required. The identifier (ID) of the framework. The ID is not the full name - # of the framework; it's the last part of the full name of the framework. - # @param framework [::Google::Cloud::CloudSecurityCompliance::V1::Framework, ::Hash] - # Required. The resource being created. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::CloudSecurityCompliance::V1::Framework] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::CloudSecurityCompliance::V1::Framework] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/cloud_security_compliance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkRequest.new - # - # # Call the create_framework method. - # result = client.create_framework request - # - # # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::Framework. - # p result - # - def create_framework request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_framework.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_framework.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_framework.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @config_stub.call_rpc :create_framework, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a custom framework. - # This method allows for partial updates of a framework. Use the - # `update_mask` to specify which fields to update. Consider the following: - # - # - If you provide an `update_mask`, only the fields that are specified - # in the mask are updated. - # - If you don't provide an `update_mask`, all the fields that are present - # in the request's `framework` body are used to overwrite the existing - # resource. - # - # You can only update frameworks with the `CUSTOM` type. - # A successful update creates a new version of the framework. - # - # @overload update_framework(request, options = nil) - # Pass arguments to `update_framework` via a request object, either of type - # {::Google::Cloud::CloudSecurityCompliance::V1::UpdateFrameworkRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudSecurityCompliance::V1::UpdateFrameworkRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_framework(update_mask: nil, framework: nil, major_revision_id: nil) - # Pass arguments to `update_framework` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. A field mask is used to specify the fields to be overwritten in - # the framework resource by the update. The fields specified in the - # `update_mask` are relative to the resource, not the full request. A field - # is overwritten if it is in the mask. If you don't provide a mask then all - # fields present in the request will be overwritten. - # @param framework [::Google::Cloud::CloudSecurityCompliance::V1::Framework, ::Hash] - # Required. The resource that is being updated. - # @param major_revision_id [::Integer] - # Optional. The major version ID of the framework to update. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::CloudSecurityCompliance::V1::Framework] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::CloudSecurityCompliance::V1::Framework] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/cloud_security_compliance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudSecurityCompliance::V1::UpdateFrameworkRequest.new - # - # # Call the update_framework method. - # result = client.update_framework request - # - # # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::Framework. - # p result - # - def update_framework request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::UpdateFrameworkRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_framework.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.framework&.name - header_params["framework.name"] = request.framework.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_framework.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_framework.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @config_stub.call_rpc :update_framework, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a custom framework, including all its major and - # minor revisions. Consider the following: - # - # - You can't delete built-in frameworks. You can only delete frameworks - # with type `CUSTOM`. - # - You can't delete frameworks that are deployed to a resource. - # - You can't restore a deleted framework. This action is permanent. - # - # @overload delete_framework(request, options = nil) - # Pass arguments to `delete_framework` via a request object, either of type - # {::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_framework(name: nil) - # Pass arguments to `delete_framework` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the resource, in one of the following formats: - # `organizations/{organization}/locations/{location}/frameworks/{framework}` - # or - # `projects/{project}/locations/{location}/frameworks/{framework}`. - # - # The only supported location is `global`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/cloud_security_compliance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkRequest.new - # - # # Call the delete_framework method. - # result = client.delete_framework request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_framework request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_framework.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_framework.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_framework.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @config_stub.call_rpc :delete_framework, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the cloud controls (both built-in and custom) that are available - # in a given parent resource. The latest major version of each cloud control - # is returned. - # This method supports pagination. - # - # @overload list_cloud_controls(request, options = nil) - # Pass arguments to `list_cloud_controls` via a request object, either of type - # {::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_cloud_controls(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_cloud_controls` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource name, in one of the following formats: - # - `organizations/{organization}/locations/{location}` - # - `projects/{project}/locations/{location}`. - # - # The only supported location is `global`. - # @param page_size [::Integer] - # Optional. The maximum number of cloud controls to return. The default value - # is `500`. - # - # If you exceed the maximum value of `1000`, then the service uses the - # maximum value. - # @param page_token [::String] - # Optional. A pagination token that's returned from a previous request to - # list cloud controls. Provide this token to retrieve the next page of - # results. - # - # When paginating, the parent that you provide to the - # {::Google::Cloud::CloudSecurityCompliance::V1::Config::Client#list_cloud_controls ListCloudControls} - # request must match the call that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::CloudControl>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::CloudControl>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/cloud_security_compliance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlsRequest.new - # - # # Call the list_cloud_controls method. - # result = client.list_cloud_controls request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::CloudSecurityCompliance::V1::CloudControl. - # p item - # end - # - def list_cloud_controls request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_cloud_controls.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_cloud_controls.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_cloud_controls.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @config_stub.call_rpc :list_cloud_controls, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @config_stub, :list_cloud_controls, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details about a cloud control. - # This method retrieves the latest major version of a cloud control that - # you identify by name. - # - # By default, the latest major version of the cloud control is returned. - # To retrieve a specific major version, include `major_revision_id` in - # the request. - # - # @overload get_cloud_control(request, options = nil) - # Pass arguments to `get_cloud_control` via a request object, either of type - # {::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_cloud_control(name: nil, major_revision_id: nil) - # Pass arguments to `get_cloud_control` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the cloud control to retrieve, in one of the - # following formats: - # `organizations/{organization}/locations/{location}/cloudControls/{cloud_control}` - # or - # `projects/{project}/locations/{location}/cloudControls/{cloud_control}`. - # - # The only supported location is `global`. - # @param major_revision_id [::Integer] - # Optional. The major version of the cloud control to retrieve. If not - # specified, the most recently updated `revision_id` is retrieved. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::CloudSecurityCompliance::V1::CloudControl] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::CloudSecurityCompliance::V1::CloudControl] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/cloud_security_compliance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlRequest.new - # - # # Call the get_cloud_control method. - # result = client.get_cloud_control request - # - # # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::CloudControl. - # p result - # - def get_cloud_control request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_cloud_control.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_cloud_control.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_cloud_control.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @config_stub.call_rpc :get_cloud_control, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a custom cloud control in a given parent - # resource. - # You can't create built-in cloud controls because those are managed by - # Google. - # - # @overload create_cloud_control(request, options = nil) - # Pass arguments to `create_cloud_control` via a request object, either of type - # {::Google::Cloud::CloudSecurityCompliance::V1::CreateCloudControlRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudSecurityCompliance::V1::CreateCloudControlRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_cloud_control(parent: nil, cloud_control_id: nil, cloud_control: nil) - # Pass arguments to `create_cloud_control` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource name, in one of the following formats: - # - `organizations/{organization}/locations/{location}`. - # - `projects/{project}/locations/{location}`. - # - # The only supported location is `global`. - # @param cloud_control_id [::String] - # Required. The identifier for the cloud control, which is the last segment - # of the cloud control name. The format is - # `^[a-zA-Z][a-zA-Z0-9-]{0,61}[a-zA-Z0-9]$`. - # @param cloud_control [::Google::Cloud::CloudSecurityCompliance::V1::CloudControl, ::Hash] - # Required. The cloud control that's being created. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::CloudSecurityCompliance::V1::CloudControl] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::CloudSecurityCompliance::V1::CloudControl] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/cloud_security_compliance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudSecurityCompliance::V1::CreateCloudControlRequest.new - # - # # Call the create_cloud_control method. - # result = client.create_cloud_control request - # - # # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::CloudControl. - # p result - # - def create_cloud_control request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::CreateCloudControlRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_cloud_control.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_cloud_control.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_cloud_control.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @config_stub.call_rpc :create_cloud_control, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a custom cloud control. - # This method allows for partial updates of a cloud control. Use the - # `update_mask` to specify which fields to update. Consider the following: - # - # - If you provide an `update_mask`, only the fields that are specified - # in the mask are updated. - # - If you don't provide an `update_mask`, all the fields that are present - # in the request's `cloud_control` body are used to overwrite the existing - # resource. - # - # You can only update cloud controls with the `CUSTOM` type. - # A successful update creates a new version of the cloud control. - # - # @overload update_cloud_control(request, options = nil) - # Pass arguments to `update_cloud_control` via a request object, either of type - # {::Google::Cloud::CloudSecurityCompliance::V1::UpdateCloudControlRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudSecurityCompliance::V1::UpdateCloudControlRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_cloud_control(update_mask: nil, cloud_control: nil) - # Pass arguments to `update_cloud_control` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Use a field mask to specify the fields to be overwritten in the - # cloud control during the update. - # The fields that you specify in the `update_mask` are relative to the - # cloud control, not the full request. A field is overwritten if it is in - # the mask. If you don't provide a mask, all fields in the request - # are updated. - # - # You can update the following fields: - # - # - Display name - # - Description - # - Parameters - # - Rules - # - Parameter specification - # @param cloud_control [::Google::Cloud::CloudSecurityCompliance::V1::CloudControl, ::Hash] - # Required. The cloud control that you're updating. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::CloudSecurityCompliance::V1::CloudControl] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::CloudSecurityCompliance::V1::CloudControl] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/cloud_security_compliance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudSecurityCompliance::V1::UpdateCloudControlRequest.new - # - # # Call the update_cloud_control method. - # result = client.update_cloud_control request - # - # # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::CloudControl. - # p result - # - def update_cloud_control request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::UpdateCloudControlRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_cloud_control.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.cloud_control&.name - header_params["cloud_control.name"] = request.cloud_control.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_cloud_control.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_cloud_control.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @config_stub.call_rpc :update_cloud_control, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a custom cloud control, including all its - # major and minor revisions. Consider the following: - # - # - You can't delete built-in cloud controls. You can only delete cloud - # controls with type `CUSTOM`. - # - You can't delete cloud controls if any of the versions are referenced - # by a framework. - # - You can't restore a deleted cloud control. This action is permanent. - # - # @overload delete_cloud_control(request, options = nil) - # Pass arguments to `delete_cloud_control` via a request object, either of type - # {::Google::Cloud::CloudSecurityCompliance::V1::DeleteCloudControlRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudSecurityCompliance::V1::DeleteCloudControlRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_cloud_control(name: nil) - # Pass arguments to `delete_cloud_control` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the cloud control to delete, in one of the following - # formats: - # `organizations/{organization}/locations/{location}/CloudControls/{CloudControl}` - # or - # `projects/{project}/locations/{location}/CloudControls/{CloudControl}`. - # - # The only supported location is `global`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/cloud_security_compliance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudSecurityCompliance::V1::DeleteCloudControlRequest.new - # - # # Call the delete_cloud_control method. - # result = client.delete_cloud_control request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_cloud_control request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::DeleteCloudControlRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_cloud_control.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_cloud_control.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_cloud_control.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @config_stub.call_rpc :delete_cloud_control, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Config API. - # - # This class represents the configuration for Config, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::CloudSecurityCompliance::V1::Config::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_frameworks to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::CloudSecurityCompliance::V1::Config::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_frameworks.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_frameworks.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "cloudsecuritycompliance.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Config API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_frameworks` - # @return [::Gapic::Config::Method] - # - attr_reader :list_frameworks - ## - # RPC-specific configuration for `get_framework` - # @return [::Gapic::Config::Method] - # - attr_reader :get_framework - ## - # RPC-specific configuration for `create_framework` - # @return [::Gapic::Config::Method] - # - attr_reader :create_framework - ## - # RPC-specific configuration for `update_framework` - # @return [::Gapic::Config::Method] - # - attr_reader :update_framework - ## - # RPC-specific configuration for `delete_framework` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_framework - ## - # RPC-specific configuration for `list_cloud_controls` - # @return [::Gapic::Config::Method] - # - attr_reader :list_cloud_controls - ## - # RPC-specific configuration for `get_cloud_control` - # @return [::Gapic::Config::Method] - # - attr_reader :get_cloud_control - ## - # RPC-specific configuration for `create_cloud_control` - # @return [::Gapic::Config::Method] - # - attr_reader :create_cloud_control - ## - # RPC-specific configuration for `update_cloud_control` - # @return [::Gapic::Config::Method] - # - attr_reader :update_cloud_control - ## - # RPC-specific configuration for `delete_cloud_control` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_cloud_control - - # @private - def initialize parent_rpcs = nil - list_frameworks_config = parent_rpcs.list_frameworks if parent_rpcs.respond_to? :list_frameworks - @list_frameworks = ::Gapic::Config::Method.new list_frameworks_config - get_framework_config = parent_rpcs.get_framework if parent_rpcs.respond_to? :get_framework - @get_framework = ::Gapic::Config::Method.new get_framework_config - create_framework_config = parent_rpcs.create_framework if parent_rpcs.respond_to? :create_framework - @create_framework = ::Gapic::Config::Method.new create_framework_config - update_framework_config = parent_rpcs.update_framework if parent_rpcs.respond_to? :update_framework - @update_framework = ::Gapic::Config::Method.new update_framework_config - delete_framework_config = parent_rpcs.delete_framework if parent_rpcs.respond_to? :delete_framework - @delete_framework = ::Gapic::Config::Method.new delete_framework_config - list_cloud_controls_config = parent_rpcs.list_cloud_controls if parent_rpcs.respond_to? :list_cloud_controls - @list_cloud_controls = ::Gapic::Config::Method.new list_cloud_controls_config - get_cloud_control_config = parent_rpcs.get_cloud_control if parent_rpcs.respond_to? :get_cloud_control - @get_cloud_control = ::Gapic::Config::Method.new get_cloud_control_config - create_cloud_control_config = parent_rpcs.create_cloud_control if parent_rpcs.respond_to? :create_cloud_control - @create_cloud_control = ::Gapic::Config::Method.new create_cloud_control_config - update_cloud_control_config = parent_rpcs.update_cloud_control if parent_rpcs.respond_to? :update_cloud_control - @update_cloud_control = ::Gapic::Config::Method.new update_cloud_control_config - delete_cloud_control_config = parent_rpcs.delete_cloud_control if parent_rpcs.respond_to? :delete_cloud_control - @delete_cloud_control = ::Gapic::Config::Method.new delete_cloud_control_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config/credentials.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config/credentials.rb deleted file mode 100644 index d15759154580..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module CloudSecurityCompliance - module V1 - module Config - # Credentials for the Config API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config/paths.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config/paths.rb deleted file mode 100644 index eec9d1315b06..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config/paths.rb +++ /dev/null @@ -1,153 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module CloudSecurityCompliance - module V1 - module Config - # Path helper methods for the Config API. - module Paths - ## - # Create a fully-qualified CloudControl resource string. - # - # @overload cloud_control_path(organization:, location:, cloud_control:) - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/cloudControls/{cloud_control}` - # - # @param organization [String] - # @param location [String] - # @param cloud_control [String] - # - # @overload cloud_control_path(project:, location:, cloud_control:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/cloudControls/{cloud_control}` - # - # @param project [String] - # @param location [String] - # @param cloud_control [String] - # - # @return [::String] - def cloud_control_path **args - resources = { - "cloud_control:location:organization" => (proc do |organization:, location:, cloud_control:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/cloudControls/#{cloud_control}" - end), - "cloud_control:location:project" => (proc do |project:, location:, cloud_control:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/cloudControls/#{cloud_control}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified Framework resource string. - # - # @overload framework_path(organization:, location:, framework:) - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/frameworks/{framework}` - # - # @param organization [String] - # @param location [String] - # @param framework [String] - # - # @overload framework_path(project:, location:, framework:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/frameworks/{framework}` - # - # @param project [String] - # @param location [String] - # @param framework [String] - # - # @return [::String] - def framework_path **args - resources = { - "framework:location:organization" => (proc do |organization:, location:, framework:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/frameworks/#{framework}" - end), - "framework:location:project" => (proc do |project:, location:, framework:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/frameworks/#{framework}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - ## - # Create a fully-qualified OrganizationLocation resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}` - # - # @param organization [String] - # @param location [String] - # - # @return [::String] - def organization_location_path organization:, location: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config/rest.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config/rest.rb deleted file mode 100644 index aaf601c08fe2..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config/rest.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/cloud_security_compliance/v1/version" -require "google/cloud/cloud_security_compliance/v1/bindings_override" - -require "google/cloud/cloud_security_compliance/v1/config/credentials" -require "google/cloud/cloud_security_compliance/v1/config/paths" -require "google/cloud/cloud_security_compliance/v1/config/rest/client" - -module Google - module Cloud - module CloudSecurityCompliance - module V1 - ## - # Config Service manages compliance frameworks, cloud controls, and their - # configurations. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/cloud_security_compliance/v1/config/rest" - # client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::Client.new - # - module Config - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/cloud_security_compliance/v1/config/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config/rest/client.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config/rest/client.rb deleted file mode 100644 index a0bf7f60d36e..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config/rest/client.rb +++ /dev/null @@ -1,1416 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/cloudsecuritycompliance/v1/config_pb" -require "google/cloud/cloud_security_compliance/v1/config/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Cloud - module CloudSecurityCompliance - module V1 - module Config - module Rest - ## - # REST client for the Config service. - # - # Config Service manages compliance frameworks, cloud controls, and their - # configurations. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudsecuritycompliance.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :config_stub - - ## - # Configure the Config Client class. - # - # See {::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all Config clients - # ::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "CloudSecurityCompliance", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.list_frameworks.timeout = 60.0 - default_config.rpcs.list_frameworks.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_framework.timeout = 60.0 - default_config.rpcs.get_framework.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_framework.timeout = 60.0 - - default_config.rpcs.update_framework.timeout = 60.0 - - default_config.rpcs.delete_framework.timeout = 60.0 - - default_config.rpcs.list_cloud_controls.timeout = 60.0 - default_config.rpcs.list_cloud_controls.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_cloud_control.timeout = 60.0 - default_config.rpcs.get_cloud_control.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_cloud_control.timeout = 60.0 - - default_config.rpcs.update_cloud_control.timeout = 60.0 - - default_config.rpcs.delete_cloud_control.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the Config Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @config_stub.universe_domain - end - - ## - # Create a new Config REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Config client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @config_stub = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @config_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config_stub.endpoint - config.universe_domain = @config_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @config_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Rest::Client] - # - attr_reader :location_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @config_stub.logger - end - - # Service calls - - ## - # Lists the frameworks (both built-in and custom) that are available within - # the parent resource. The latest major version of each framework is - # returned. - # This method supports pagination. - # - # @overload list_frameworks(request, options = nil) - # Pass arguments to `list_frameworks` via a request object, either of type - # {::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworksRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworksRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_frameworks(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_frameworks` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource name, in one of the following formats: - # - `organizations/{organization}/locations/{location}` - # - `projects/{project}/locations/{location}`. - # - # The only supported location is `global`. - # @param page_size [::Integer] - # Optional. The maximum number of frameworks to return. The default value is - # `500`. - # - # If you exceed the maximum value of `1000`, then the service uses the - # maximum value. - # @param page_token [::String] - # Optional. A pagination token returned from a previous request to list - # frameworks. Provide this token to retrieve the next page of results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::Framework>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::Framework>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/cloud_security_compliance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudSecurityCompliance::V1::ListFrameworksRequest.new - # - # # Call the list_frameworks method. - # result = client.list_frameworks request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::CloudSecurityCompliance::V1::Framework. - # p item - # end - # - def list_frameworks request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworksRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_frameworks.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_frameworks.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_frameworks.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @config_stub.list_frameworks request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @config_stub, :list_frameworks, "frameworks", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details about a framework. - # This method retrieves the latest major version of the framework. - # - # To retrieve a specific major version, include `major_revision_id` in - # the request. - # - # @overload get_framework(request, options = nil) - # Pass arguments to `get_framework` via a request object, either of type - # {::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_framework(name: nil, major_revision_id: nil) - # Pass arguments to `get_framework` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the framework to retrieve, in one of the following - # formats: - # `organizations/{organization}/locations/{location}/frameworks/{framework}` - # or - # `projects/{project}/locations/{location}/frameworks/{framework}`. - # - # The only supported location is `global`. - # @param major_revision_id [::Integer] - # Optional. The framework major version to retrieve. If not specified, the - # most recently updated `revision_id` is retrieved. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::Framework] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudSecurityCompliance::V1::Framework] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/cloud_security_compliance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkRequest.new - # - # # Call the get_framework method. - # result = client.get_framework request - # - # # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::Framework. - # p result - # - def get_framework request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_framework.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_framework.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_framework.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @config_stub.get_framework request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a custom framework in a given parent resource. - # You can't create built-in frameworks because those are managed by - # Google. - # - # @overload create_framework(request, options = nil) - # Pass arguments to `create_framework` via a request object, either of type - # {::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_framework(parent: nil, framework_id: nil, framework: nil) - # Pass arguments to `create_framework` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource name, in one of the following formats: - # - `organizations/{organization}/locations/{location}` - # - `projects/{project}/locations/{location}`. - # - # The only supported location is `global`. - # @param framework_id [::String] - # Required. The identifier (ID) of the framework. The ID is not the full name - # of the framework; it's the last part of the full name of the framework. - # @param framework [::Google::Cloud::CloudSecurityCompliance::V1::Framework, ::Hash] - # Required. The resource being created. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::Framework] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudSecurityCompliance::V1::Framework] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/cloud_security_compliance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkRequest.new - # - # # Call the create_framework method. - # result = client.create_framework request - # - # # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::Framework. - # p result - # - def create_framework request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_framework.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_framework.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_framework.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @config_stub.create_framework request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a custom framework. - # This method allows for partial updates of a framework. Use the - # `update_mask` to specify which fields to update. Consider the following: - # - # - If you provide an `update_mask`, only the fields that are specified - # in the mask are updated. - # - If you don't provide an `update_mask`, all the fields that are present - # in the request's `framework` body are used to overwrite the existing - # resource. - # - # You can only update frameworks with the `CUSTOM` type. - # A successful update creates a new version of the framework. - # - # @overload update_framework(request, options = nil) - # Pass arguments to `update_framework` via a request object, either of type - # {::Google::Cloud::CloudSecurityCompliance::V1::UpdateFrameworkRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudSecurityCompliance::V1::UpdateFrameworkRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_framework(update_mask: nil, framework: nil, major_revision_id: nil) - # Pass arguments to `update_framework` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. A field mask is used to specify the fields to be overwritten in - # the framework resource by the update. The fields specified in the - # `update_mask` are relative to the resource, not the full request. A field - # is overwritten if it is in the mask. If you don't provide a mask then all - # fields present in the request will be overwritten. - # @param framework [::Google::Cloud::CloudSecurityCompliance::V1::Framework, ::Hash] - # Required. The resource that is being updated. - # @param major_revision_id [::Integer] - # Optional. The major version ID of the framework to update. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::Framework] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudSecurityCompliance::V1::Framework] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/cloud_security_compliance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudSecurityCompliance::V1::UpdateFrameworkRequest.new - # - # # Call the update_framework method. - # result = client.update_framework request - # - # # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::Framework. - # p result - # - def update_framework request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::UpdateFrameworkRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_framework.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_framework.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_framework.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @config_stub.update_framework request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a custom framework, including all its major and - # minor revisions. Consider the following: - # - # - You can't delete built-in frameworks. You can only delete frameworks - # with type `CUSTOM`. - # - You can't delete frameworks that are deployed to a resource. - # - You can't restore a deleted framework. This action is permanent. - # - # @overload delete_framework(request, options = nil) - # Pass arguments to `delete_framework` via a request object, either of type - # {::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_framework(name: nil) - # Pass arguments to `delete_framework` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the resource, in one of the following formats: - # `organizations/{organization}/locations/{location}/frameworks/{framework}` - # or - # `projects/{project}/locations/{location}/frameworks/{framework}`. - # - # The only supported location is `global`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/cloud_security_compliance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkRequest.new - # - # # Call the delete_framework method. - # result = client.delete_framework request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_framework request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_framework.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_framework.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_framework.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @config_stub.delete_framework request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the cloud controls (both built-in and custom) that are available - # in a given parent resource. The latest major version of each cloud control - # is returned. - # This method supports pagination. - # - # @overload list_cloud_controls(request, options = nil) - # Pass arguments to `list_cloud_controls` via a request object, either of type - # {::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_cloud_controls(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_cloud_controls` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource name, in one of the following formats: - # - `organizations/{organization}/locations/{location}` - # - `projects/{project}/locations/{location}`. - # - # The only supported location is `global`. - # @param page_size [::Integer] - # Optional. The maximum number of cloud controls to return. The default value - # is `500`. - # - # If you exceed the maximum value of `1000`, then the service uses the - # maximum value. - # @param page_token [::String] - # Optional. A pagination token that's returned from a previous request to - # list cloud controls. Provide this token to retrieve the next page of - # results. - # - # When paginating, the parent that you provide to the - # {::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::Client#list_cloud_controls ListCloudControls} - # request must match the call that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::CloudControl>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::CloudControl>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/cloud_security_compliance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlsRequest.new - # - # # Call the list_cloud_controls method. - # result = client.list_cloud_controls request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::CloudSecurityCompliance::V1::CloudControl. - # p item - # end - # - def list_cloud_controls request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_cloud_controls.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_cloud_controls.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_cloud_controls.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @config_stub.list_cloud_controls request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @config_stub, :list_cloud_controls, "cloud_controls", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details about a cloud control. - # This method retrieves the latest major version of a cloud control that - # you identify by name. - # - # By default, the latest major version of the cloud control is returned. - # To retrieve a specific major version, include `major_revision_id` in - # the request. - # - # @overload get_cloud_control(request, options = nil) - # Pass arguments to `get_cloud_control` via a request object, either of type - # {::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_cloud_control(name: nil, major_revision_id: nil) - # Pass arguments to `get_cloud_control` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the cloud control to retrieve, in one of the - # following formats: - # `organizations/{organization}/locations/{location}/cloudControls/{cloud_control}` - # or - # `projects/{project}/locations/{location}/cloudControls/{cloud_control}`. - # - # The only supported location is `global`. - # @param major_revision_id [::Integer] - # Optional. The major version of the cloud control to retrieve. If not - # specified, the most recently updated `revision_id` is retrieved. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::CloudControl] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudSecurityCompliance::V1::CloudControl] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/cloud_security_compliance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlRequest.new - # - # # Call the get_cloud_control method. - # result = client.get_cloud_control request - # - # # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::CloudControl. - # p result - # - def get_cloud_control request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_cloud_control.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_cloud_control.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_cloud_control.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @config_stub.get_cloud_control request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a custom cloud control in a given parent - # resource. - # You can't create built-in cloud controls because those are managed by - # Google. - # - # @overload create_cloud_control(request, options = nil) - # Pass arguments to `create_cloud_control` via a request object, either of type - # {::Google::Cloud::CloudSecurityCompliance::V1::CreateCloudControlRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudSecurityCompliance::V1::CreateCloudControlRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_cloud_control(parent: nil, cloud_control_id: nil, cloud_control: nil) - # Pass arguments to `create_cloud_control` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource name, in one of the following formats: - # - `organizations/{organization}/locations/{location}`. - # - `projects/{project}/locations/{location}`. - # - # The only supported location is `global`. - # @param cloud_control_id [::String] - # Required. The identifier for the cloud control, which is the last segment - # of the cloud control name. The format is - # `^[a-zA-Z][a-zA-Z0-9-]{0,61}[a-zA-Z0-9]$`. - # @param cloud_control [::Google::Cloud::CloudSecurityCompliance::V1::CloudControl, ::Hash] - # Required. The cloud control that's being created. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::CloudControl] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudSecurityCompliance::V1::CloudControl] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/cloud_security_compliance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudSecurityCompliance::V1::CreateCloudControlRequest.new - # - # # Call the create_cloud_control method. - # result = client.create_cloud_control request - # - # # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::CloudControl. - # p result - # - def create_cloud_control request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::CreateCloudControlRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_cloud_control.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_cloud_control.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_cloud_control.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @config_stub.create_cloud_control request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a custom cloud control. - # This method allows for partial updates of a cloud control. Use the - # `update_mask` to specify which fields to update. Consider the following: - # - # - If you provide an `update_mask`, only the fields that are specified - # in the mask are updated. - # - If you don't provide an `update_mask`, all the fields that are present - # in the request's `cloud_control` body are used to overwrite the existing - # resource. - # - # You can only update cloud controls with the `CUSTOM` type. - # A successful update creates a new version of the cloud control. - # - # @overload update_cloud_control(request, options = nil) - # Pass arguments to `update_cloud_control` via a request object, either of type - # {::Google::Cloud::CloudSecurityCompliance::V1::UpdateCloudControlRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudSecurityCompliance::V1::UpdateCloudControlRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_cloud_control(update_mask: nil, cloud_control: nil) - # Pass arguments to `update_cloud_control` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Use a field mask to specify the fields to be overwritten in the - # cloud control during the update. - # The fields that you specify in the `update_mask` are relative to the - # cloud control, not the full request. A field is overwritten if it is in - # the mask. If you don't provide a mask, all fields in the request - # are updated. - # - # You can update the following fields: - # - # - Display name - # - Description - # - Parameters - # - Rules - # - Parameter specification - # @param cloud_control [::Google::Cloud::CloudSecurityCompliance::V1::CloudControl, ::Hash] - # Required. The cloud control that you're updating. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::CloudControl] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudSecurityCompliance::V1::CloudControl] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/cloud_security_compliance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudSecurityCompliance::V1::UpdateCloudControlRequest.new - # - # # Call the update_cloud_control method. - # result = client.update_cloud_control request - # - # # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::CloudControl. - # p result - # - def update_cloud_control request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::UpdateCloudControlRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_cloud_control.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_cloud_control.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_cloud_control.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @config_stub.update_cloud_control request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a custom cloud control, including all its - # major and minor revisions. Consider the following: - # - # - You can't delete built-in cloud controls. You can only delete cloud - # controls with type `CUSTOM`. - # - You can't delete cloud controls if any of the versions are referenced - # by a framework. - # - You can't restore a deleted cloud control. This action is permanent. - # - # @overload delete_cloud_control(request, options = nil) - # Pass arguments to `delete_cloud_control` via a request object, either of type - # {::Google::Cloud::CloudSecurityCompliance::V1::DeleteCloudControlRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudSecurityCompliance::V1::DeleteCloudControlRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_cloud_control(name: nil) - # Pass arguments to `delete_cloud_control` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the cloud control to delete, in one of the following - # formats: - # `organizations/{organization}/locations/{location}/CloudControls/{CloudControl}` - # or - # `projects/{project}/locations/{location}/CloudControls/{CloudControl}`. - # - # The only supported location is `global`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/cloud_security_compliance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudSecurityCompliance::V1::DeleteCloudControlRequest.new - # - # # Call the delete_cloud_control method. - # result = client.delete_cloud_control request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_cloud_control request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::DeleteCloudControlRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_cloud_control.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_cloud_control.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_cloud_control.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @config_stub.delete_cloud_control request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Config REST API. - # - # This class represents the configuration for Config REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_frameworks to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_frameworks.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_frameworks.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "cloudsecuritycompliance.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - # Overrides for http bindings for the RPCs of this service - # are only used when this service is used as mixin, and only - # by the host service. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Config API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_frameworks` - # @return [::Gapic::Config::Method] - # - attr_reader :list_frameworks - ## - # RPC-specific configuration for `get_framework` - # @return [::Gapic::Config::Method] - # - attr_reader :get_framework - ## - # RPC-specific configuration for `create_framework` - # @return [::Gapic::Config::Method] - # - attr_reader :create_framework - ## - # RPC-specific configuration for `update_framework` - # @return [::Gapic::Config::Method] - # - attr_reader :update_framework - ## - # RPC-specific configuration for `delete_framework` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_framework - ## - # RPC-specific configuration for `list_cloud_controls` - # @return [::Gapic::Config::Method] - # - attr_reader :list_cloud_controls - ## - # RPC-specific configuration for `get_cloud_control` - # @return [::Gapic::Config::Method] - # - attr_reader :get_cloud_control - ## - # RPC-specific configuration for `create_cloud_control` - # @return [::Gapic::Config::Method] - # - attr_reader :create_cloud_control - ## - # RPC-specific configuration for `update_cloud_control` - # @return [::Gapic::Config::Method] - # - attr_reader :update_cloud_control - ## - # RPC-specific configuration for `delete_cloud_control` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_cloud_control - - # @private - def initialize parent_rpcs = nil - list_frameworks_config = parent_rpcs.list_frameworks if parent_rpcs.respond_to? :list_frameworks - @list_frameworks = ::Gapic::Config::Method.new list_frameworks_config - get_framework_config = parent_rpcs.get_framework if parent_rpcs.respond_to? :get_framework - @get_framework = ::Gapic::Config::Method.new get_framework_config - create_framework_config = parent_rpcs.create_framework if parent_rpcs.respond_to? :create_framework - @create_framework = ::Gapic::Config::Method.new create_framework_config - update_framework_config = parent_rpcs.update_framework if parent_rpcs.respond_to? :update_framework - @update_framework = ::Gapic::Config::Method.new update_framework_config - delete_framework_config = parent_rpcs.delete_framework if parent_rpcs.respond_to? :delete_framework - @delete_framework = ::Gapic::Config::Method.new delete_framework_config - list_cloud_controls_config = parent_rpcs.list_cloud_controls if parent_rpcs.respond_to? :list_cloud_controls - @list_cloud_controls = ::Gapic::Config::Method.new list_cloud_controls_config - get_cloud_control_config = parent_rpcs.get_cloud_control if parent_rpcs.respond_to? :get_cloud_control - @get_cloud_control = ::Gapic::Config::Method.new get_cloud_control_config - create_cloud_control_config = parent_rpcs.create_cloud_control if parent_rpcs.respond_to? :create_cloud_control - @create_cloud_control = ::Gapic::Config::Method.new create_cloud_control_config - update_cloud_control_config = parent_rpcs.update_cloud_control if parent_rpcs.respond_to? :update_cloud_control - @update_cloud_control = ::Gapic::Config::Method.new update_cloud_control_config - delete_cloud_control_config = parent_rpcs.delete_cloud_control if parent_rpcs.respond_to? :delete_cloud_control - @delete_cloud_control = ::Gapic::Config::Method.new delete_cloud_control_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config/rest/service_stub.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config/rest/service_stub.rb deleted file mode 100644 index c7621f189d3a..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/config/rest/service_stub.rb +++ /dev/null @@ -1,769 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/cloudsecuritycompliance/v1/config_pb" - -module Google - module Cloud - module CloudSecurityCompliance - module V1 - module Config - module Rest - ## - # REST service stub for the Config service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the list_frameworks REST call - # - # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworksRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworksResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworksResponse] - # A result object deserialized from the server's reply - def list_frameworks request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_frameworks_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_frameworks", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworksResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_framework REST call - # - # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::Framework] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudSecurityCompliance::V1::Framework] - # A result object deserialized from the server's reply - def get_framework request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_framework_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_framework", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CloudSecurityCompliance::V1::Framework.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_framework REST call - # - # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::Framework] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudSecurityCompliance::V1::Framework] - # A result object deserialized from the server's reply - def create_framework request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_framework_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_framework", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CloudSecurityCompliance::V1::Framework.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_framework REST call - # - # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::UpdateFrameworkRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::Framework] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudSecurityCompliance::V1::Framework] - # A result object deserialized from the server's reply - def update_framework request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_framework_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_framework", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CloudSecurityCompliance::V1::Framework.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_framework REST call - # - # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_framework request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_framework_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_framework", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_cloud_controls REST call - # - # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlsResponse] - # A result object deserialized from the server's reply - def list_cloud_controls request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_cloud_controls_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_cloud_controls", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_cloud_control REST call - # - # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::CloudControl] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudSecurityCompliance::V1::CloudControl] - # A result object deserialized from the server's reply - def get_cloud_control request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_cloud_control_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_cloud_control", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CloudSecurityCompliance::V1::CloudControl.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_cloud_control REST call - # - # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::CreateCloudControlRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::CloudControl] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudSecurityCompliance::V1::CloudControl] - # A result object deserialized from the server's reply - def create_cloud_control request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_cloud_control_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_cloud_control", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CloudSecurityCompliance::V1::CloudControl.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_cloud_control REST call - # - # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::UpdateCloudControlRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::CloudControl] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudSecurityCompliance::V1::CloudControl] - # A result object deserialized from the server's reply - def update_cloud_control request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_cloud_control_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_cloud_control", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CloudSecurityCompliance::V1::CloudControl.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_cloud_control REST call - # - # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::DeleteCloudControlRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_cloud_control request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_cloud_control_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_cloud_control", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_frameworks REST call - # - # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworksRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_frameworks_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/frameworks", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/frameworks", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_framework REST call - # - # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_framework_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/frameworks/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/frameworks/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_framework REST call - # - # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_framework_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/frameworks", - body: "framework", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/frameworks", - body: "framework", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_framework REST call - # - # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::UpdateFrameworkRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_framework_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{framework.name}", - body: "framework", - matches: [ - ["framework.name", %r{^organizations/[^/]+/locations/[^/]+/frameworks/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{framework.name}", - body: "framework", - matches: [ - ["framework.name", %r{^projects/[^/]+/locations/[^/]+/frameworks/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_framework REST call - # - # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_framework_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/frameworks/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/frameworks/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_cloud_controls REST call - # - # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_cloud_controls_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/cloudControls", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/cloudControls", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_cloud_control REST call - # - # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_cloud_control_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/cloudControls/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/cloudControls/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_cloud_control REST call - # - # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::CreateCloudControlRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_cloud_control_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/cloudControls", - body: "cloud_control", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/cloudControls", - body: "cloud_control", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_cloud_control REST call - # - # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::UpdateCloudControlRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_cloud_control_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{cloud_control.name}", - body: "cloud_control", - matches: [ - ["cloud_control.name", %r{^organizations/[^/]+/locations/[^/]+/cloudControls/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{cloud_control.name}", - body: "cloud_control", - matches: [ - ["cloud_control.name", %r{^projects/[^/]+/locations/[^/]+/cloudControls/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_cloud_control REST call - # - # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::DeleteCloudControlRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_cloud_control_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/cloudControls/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/cloudControls/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment.rb deleted file mode 100644 index 38b0b5a7331a..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/cloud_security_compliance/v1/version" - -require "google/cloud/cloud_security_compliance/v1/deployment/credentials" -require "google/cloud/cloud_security_compliance/v1/deployment/paths" -require "google/cloud/cloud_security_compliance/v1/deployment/operations" -require "google/cloud/cloud_security_compliance/v1/deployment/client" -require "google/cloud/cloud_security_compliance/v1/deployment/rest" - -module Google - module Cloud - module CloudSecurityCompliance - module V1 - ## - # Deployment service allows users to manage deployments of Frameworks and - # Cloud Controls on a target resource. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/cloud_security_compliance/v1/deployment" - # client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/cloud_security_compliance/v1/deployment/rest" - # client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Client.new - # - module Deployment - end - end - end - end -end - -helper_path = ::File.join __dir__, "deployment", "helpers.rb" -require "google/cloud/cloud_security_compliance/v1/deployment/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/client.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/client.rb deleted file mode 100644 index 5eb510a30421..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/client.rb +++ /dev/null @@ -1,1097 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/cloudsecuritycompliance/v1/deployment_pb" -require "google/cloud/location" - -module Google - module Cloud - module CloudSecurityCompliance - module V1 - module Deployment - ## - # Client for the Deployment service. - # - # Deployment service allows users to manage deployments of Frameworks and - # Cloud Controls on a target resource. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudsecuritycompliance.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :deployment_stub - - ## - # Configure the Deployment Client class. - # - # See {::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all Deployment clients - # ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "CloudSecurityCompliance", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.create_framework_deployment.timeout = 60.0 - - default_config.rpcs.delete_framework_deployment.timeout = 60.0 - - default_config.rpcs.get_framework_deployment.timeout = 60.0 - default_config.rpcs.get_framework_deployment.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_framework_deployments.timeout = 60.0 - default_config.rpcs.list_framework_deployments.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_cloud_control_deployment.timeout = 60.0 - default_config.rpcs.get_cloud_control_deployment.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_cloud_control_deployments.timeout = 60.0 - default_config.rpcs.list_cloud_control_deployments.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the Deployment Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @deployment_stub.universe_domain - end - - ## - # Create a new Deployment client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Deployment client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/cloudsecuritycompliance/v1/deployment_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @deployment_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @deployment_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @deployment_stub.endpoint - config.universe_domain = @deployment_stub.universe_domain - config.logger = @deployment_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Client] - # - attr_reader :location_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @deployment_stub.logger - end - - # Service calls - - ## - # Creates a framework deployment in a given parent resource. A - # framework deployment lets you assign a particular framework version to an - # organization, folder, or project so that you can control and monitor - # those resources using the framework's cloud controls. - # - # @overload create_framework_deployment(request, options = nil) - # Pass arguments to `create_framework_deployment` via a request object, either of type - # {::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkDeploymentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkDeploymentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_framework_deployment(parent: nil, framework_deployment_id: nil, framework_deployment: nil) - # Pass arguments to `create_framework_deployment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource of the framework deployment in the format - # `organizations/{organization}/locations/{location}` - # or - # `projects/{project}/locations/{location}`. - # Only the global location is supported. - # @param framework_deployment_id [::String] - # Optional. An identifier for the framework deployment that's unique in scope - # of the parent. If you don't specify a value, then a random UUID is - # generated. - # @param framework_deployment [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment, ::Hash] - # Required. The framework deployment that you're creating. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/cloud_security_compliance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkDeploymentRequest.new - # - # # Call the create_framework_deployment method. - # result = client.create_framework_deployment request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_framework_deployment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkDeploymentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_framework_deployment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_framework_deployment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_framework_deployment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @deployment_stub.call_rpc :create_framework_deployment, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a framework deployment. - # - # @overload delete_framework_deployment(request, options = nil) - # Pass arguments to `delete_framework_deployment` via a request object, either of type - # {::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkDeploymentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkDeploymentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_framework_deployment(name: nil, etag: nil) - # Pass arguments to `delete_framework_deployment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the framework deployment that you want to delete, - # in the format - # `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}` - # or - # `projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}`. - # The only supported location is `global`. - # @param etag [::String] - # Optional. An opaque identifier for the current version of the resource. - # - # If you provide this value, then it must match the existing value. If the - # values don't match, then the request fails with an - # [`ABORTED`][google.rpc.Code.ABORTED] error. - # - # If you omit this value, then the resource is deleted regardless of its - # current `etag` value. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/cloud_security_compliance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkDeploymentRequest.new - # - # # Call the delete_framework_deployment method. - # result = client.delete_framework_deployment request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_framework_deployment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkDeploymentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_framework_deployment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_framework_deployment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_framework_deployment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @deployment_stub.call_rpc :delete_framework_deployment, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details about a framework deployment. - # - # @overload get_framework_deployment(request, options = nil) - # Pass arguments to `get_framework_deployment` via a request object, either of type - # {::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkDeploymentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkDeploymentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_framework_deployment(name: nil) - # Pass arguments to `get_framework_deployment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the framework deployment, in the format - # `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}` - # or - # `projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}`. - # The only supported location is `global`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/cloud_security_compliance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkDeploymentRequest.new - # - # # Call the get_framework_deployment method. - # result = client.get_framework_deployment request - # - # # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment. - # p result - # - def get_framework_deployment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkDeploymentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_framework_deployment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_framework_deployment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_framework_deployment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @deployment_stub.call_rpc :get_framework_deployment, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the framework deployments in a given parent resource. - # - # @overload list_framework_deployments(request, options = nil) - # Pass arguments to `list_framework_deployments` via a request object, either of type - # {::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkDeploymentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkDeploymentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_framework_deployments(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_framework_deployments` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource of the framework deployment, in the format - # `organizations/{organization}/locations/{location}` - # or - # `projects/{project}/locations/{location}`. - # The only supported location is `global`. - # @param page_size [::Integer] - # Optional. The requested page size. The server might return fewer items than - # requested. - # If unspecified, the server picks an appropriate default. - # @param page_token [::String] - # Optional. A token that identifies a page of results the server should - # return. - # @param filter [::String] - # Optional. The filter to be applied on the resource, as defined by - # [AIP-160: Filtering](https://google.aip.dev/160). - # @param order_by [::String] - # Optional. The sort order for the results. The following values are - # supported: - # - # * `name` - # * `name desc` - # - # If you do not specify a value, then the results are not sorted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/cloud_security_compliance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkDeploymentsRequest.new - # - # # Call the list_framework_deployments method. - # result = client.list_framework_deployments request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment. - # p item - # end - # - def list_framework_deployments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkDeploymentsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_framework_deployments.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_framework_deployments.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_framework_deployments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @deployment_stub.call_rpc :list_framework_deployments, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @deployment_stub, :list_framework_deployments, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details about a cloud control deployment. - # - # @overload get_cloud_control_deployment(request, options = nil) - # Pass arguments to `get_cloud_control_deployment` via a request object, either of type - # {::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlDeploymentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlDeploymentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_cloud_control_deployment(name: nil) - # Pass arguments to `get_cloud_control_deployment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name for the cloud control deployment, in the format - # `organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}` - # or - # `projects/{project}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}`. - # The only supported location is `global`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/cloud_security_compliance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlDeploymentRequest.new - # - # # Call the get_cloud_control_deployment method. - # result = client.get_cloud_control_deployment request - # - # # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment. - # p result - # - def get_cloud_control_deployment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlDeploymentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_cloud_control_deployment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_cloud_control_deployment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_cloud_control_deployment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @deployment_stub.call_rpc :get_cloud_control_deployment, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the cloud conrol deployments in a given parent resource. - # - # @overload list_cloud_control_deployments(request, options = nil) - # Pass arguments to `list_cloud_control_deployments` via a request object, either of type - # {::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlDeploymentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlDeploymentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_cloud_control_deployments(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_cloud_control_deployments` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource for the cloud control deployment, in the - # format `organizations/{organization}/locations/{location}` or - # `projects/{project}/locations/{location}`. - # The only supported location is `global`. - # @param page_size [::Integer] - # Optional. The requested page size. The server might return fewer items than - # you requested. - # If unspecified, the server picks an appropriate default. - # @param page_token [::String] - # Optional. A token that identifies the page of results that the server - # should return. - # @param filter [::String] - # Optional. The filter to apply on the resource, as defined by - # [AIP-160: Filtering](https://google.aip.dev/160). - # @param order_by [::String] - # Optional. The sort order for the results. The following values are - # supported: - # - # * `name` - # * `name desc` - # - # If you do not specify a value, then the results are not sorted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/cloud_security_compliance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlDeploymentsRequest.new - # - # # Call the list_cloud_control_deployments method. - # result = client.list_cloud_control_deployments request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment. - # p item - # end - # - def list_cloud_control_deployments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlDeploymentsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_cloud_control_deployments.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_cloud_control_deployments.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_cloud_control_deployments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @deployment_stub.call_rpc :list_cloud_control_deployments, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @deployment_stub, :list_cloud_control_deployments, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Deployment API. - # - # This class represents the configuration for Deployment, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_framework_deployment to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_framework_deployment.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_framework_deployment.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "cloudsecuritycompliance.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Deployment API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_framework_deployment` - # @return [::Gapic::Config::Method] - # - attr_reader :create_framework_deployment - ## - # RPC-specific configuration for `delete_framework_deployment` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_framework_deployment - ## - # RPC-specific configuration for `get_framework_deployment` - # @return [::Gapic::Config::Method] - # - attr_reader :get_framework_deployment - ## - # RPC-specific configuration for `list_framework_deployments` - # @return [::Gapic::Config::Method] - # - attr_reader :list_framework_deployments - ## - # RPC-specific configuration for `get_cloud_control_deployment` - # @return [::Gapic::Config::Method] - # - attr_reader :get_cloud_control_deployment - ## - # RPC-specific configuration for `list_cloud_control_deployments` - # @return [::Gapic::Config::Method] - # - attr_reader :list_cloud_control_deployments - - # @private - def initialize parent_rpcs = nil - create_framework_deployment_config = parent_rpcs.create_framework_deployment if parent_rpcs.respond_to? :create_framework_deployment - @create_framework_deployment = ::Gapic::Config::Method.new create_framework_deployment_config - delete_framework_deployment_config = parent_rpcs.delete_framework_deployment if parent_rpcs.respond_to? :delete_framework_deployment - @delete_framework_deployment = ::Gapic::Config::Method.new delete_framework_deployment_config - get_framework_deployment_config = parent_rpcs.get_framework_deployment if parent_rpcs.respond_to? :get_framework_deployment - @get_framework_deployment = ::Gapic::Config::Method.new get_framework_deployment_config - list_framework_deployments_config = parent_rpcs.list_framework_deployments if parent_rpcs.respond_to? :list_framework_deployments - @list_framework_deployments = ::Gapic::Config::Method.new list_framework_deployments_config - get_cloud_control_deployment_config = parent_rpcs.get_cloud_control_deployment if parent_rpcs.respond_to? :get_cloud_control_deployment - @get_cloud_control_deployment = ::Gapic::Config::Method.new get_cloud_control_deployment_config - list_cloud_control_deployments_config = parent_rpcs.list_cloud_control_deployments if parent_rpcs.respond_to? :list_cloud_control_deployments - @list_cloud_control_deployments = ::Gapic::Config::Method.new list_cloud_control_deployments_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/credentials.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/credentials.rb deleted file mode 100644 index ce65a7e45eff..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module CloudSecurityCompliance - module V1 - module Deployment - # Credentials for the Deployment API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/operations.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/operations.rb deleted file mode 100644 index 43490de85224..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/operations.rb +++ /dev/null @@ -1,841 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module CloudSecurityCompliance - module V1 - module Deployment - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudsecuritycompliance.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the Deployment Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the Deployment Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/longrunning/operations_services_pb" - - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = ::Gapic::ServiceStub.new( - ::Google::Longrunning::Operations::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| - wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } - response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Waits until the specified long-running operation is done or reaches at most - # a specified timeout, returning the latest state. If the operation is - # already done, the latest state is immediately returned. If the timeout - # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - # timeout is used. If the server does not support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # Note that this method is on a best-effort basis. It may return the latest - # state before the specified timeout (including immediately), meaning even an - # immediate response is no guarantee that the operation is done. - # - # @overload wait_operation(request, options = nil) - # Pass arguments to `wait_operation` via a request object, either of type - # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload wait_operation(name: nil, timeout: nil) - # Pass arguments to `wait_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to wait on. - # @param timeout [::Google::Protobuf::Duration, ::Hash] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::WaitOperationRequest.new - # - # # Call the wait_operation method. - # result = client.wait_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def wait_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.wait_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "cloudsecuritycompliance.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/paths.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/paths.rb deleted file mode 100644 index ab4f2f405023..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/paths.rb +++ /dev/null @@ -1,196 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module CloudSecurityCompliance - module V1 - module Deployment - # Path helper methods for the Deployment API. - module Paths - ## - # Create a fully-qualified CloudControlDeployment resource string. - # - # @overload cloud_control_deployment_path(organization:, location:, cloud_control_deployment:) - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}` - # - # @param organization [String] - # @param location [String] - # @param cloud_control_deployment [String] - # - # @overload cloud_control_deployment_path(project:, location:, cloud_control_deployment:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}` - # - # @param project [String] - # @param location [String] - # @param cloud_control_deployment [String] - # - # @return [::String] - def cloud_control_deployment_path **args - resources = { - "cloud_control_deployment:location:organization" => (proc do |organization:, location:, cloud_control_deployment:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/cloudControlDeployments/#{cloud_control_deployment}" - end), - "cloud_control_deployment:location:project" => (proc do |project:, location:, cloud_control_deployment:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/cloudControlDeployments/#{cloud_control_deployment}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified Framework resource string. - # - # @overload framework_path(organization:, location:, framework:) - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/frameworks/{framework}` - # - # @param organization [String] - # @param location [String] - # @param framework [String] - # - # @overload framework_path(project:, location:, framework:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/frameworks/{framework}` - # - # @param project [String] - # @param location [String] - # @param framework [String] - # - # @return [::String] - def framework_path **args - resources = { - "framework:location:organization" => (proc do |organization:, location:, framework:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/frameworks/#{framework}" - end), - "framework:location:project" => (proc do |project:, location:, framework:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/frameworks/#{framework}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified FrameworkDeployment resource string. - # - # @overload framework_deployment_path(organization:, location:, framework_deployment:) - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}` - # - # @param organization [String] - # @param location [String] - # @param framework_deployment [String] - # - # @overload framework_deployment_path(project:, location:, framework_deployment:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}` - # - # @param project [String] - # @param location [String] - # @param framework_deployment [String] - # - # @return [::String] - def framework_deployment_path **args - resources = { - "framework_deployment:location:organization" => (proc do |organization:, location:, framework_deployment:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/frameworkDeployments/#{framework_deployment}" - end), - "framework_deployment:location:project" => (proc do |project:, location:, framework_deployment:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/frameworkDeployments/#{framework_deployment}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - ## - # Create a fully-qualified OrganizationLocation resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}` - # - # @param organization [String] - # @param location [String] - # - # @return [::String] - def organization_location_path organization:, location: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/rest.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/rest.rb deleted file mode 100644 index c434c71ce036..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/rest.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/cloud_security_compliance/v1/version" -require "google/cloud/cloud_security_compliance/v1/bindings_override" - -require "google/cloud/cloud_security_compliance/v1/deployment/credentials" -require "google/cloud/cloud_security_compliance/v1/deployment/paths" -require "google/cloud/cloud_security_compliance/v1/deployment/rest/operations" -require "google/cloud/cloud_security_compliance/v1/deployment/rest/client" - -module Google - module Cloud - module CloudSecurityCompliance - module V1 - ## - # Deployment service allows users to manage deployments of Frameworks and - # Cloud Controls on a target resource. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/cloud_security_compliance/v1/deployment/rest" - # client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Client.new - # - module Deployment - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/cloud_security_compliance/v1/deployment/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/rest/client.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/rest/client.rb deleted file mode 100644 index 0ab786c1d369..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/rest/client.rb +++ /dev/null @@ -1,1020 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/cloudsecuritycompliance/v1/deployment_pb" -require "google/cloud/cloud_security_compliance/v1/deployment/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Cloud - module CloudSecurityCompliance - module V1 - module Deployment - module Rest - ## - # REST client for the Deployment service. - # - # Deployment service allows users to manage deployments of Frameworks and - # Cloud Controls on a target resource. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudsecuritycompliance.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :deployment_stub - - ## - # Configure the Deployment Client class. - # - # See {::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all Deployment clients - # ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "CloudSecurityCompliance", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.create_framework_deployment.timeout = 60.0 - - default_config.rpcs.delete_framework_deployment.timeout = 60.0 - - default_config.rpcs.get_framework_deployment.timeout = 60.0 - default_config.rpcs.get_framework_deployment.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_framework_deployments.timeout = 60.0 - default_config.rpcs.list_framework_deployments.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_cloud_control_deployment.timeout = 60.0 - default_config.rpcs.get_cloud_control_deployment.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_cloud_control_deployments.timeout = 60.0 - default_config.rpcs.list_cloud_control_deployments.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the Deployment Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @deployment_stub.universe_domain - end - - ## - # Create a new Deployment REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Deployment client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @deployment_stub = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @deployment_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @deployment_stub.endpoint - config.universe_domain = @deployment_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @deployment_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Rest::Client] - # - attr_reader :location_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @deployment_stub.logger - end - - # Service calls - - ## - # Creates a framework deployment in a given parent resource. A - # framework deployment lets you assign a particular framework version to an - # organization, folder, or project so that you can control and monitor - # those resources using the framework's cloud controls. - # - # @overload create_framework_deployment(request, options = nil) - # Pass arguments to `create_framework_deployment` via a request object, either of type - # {::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkDeploymentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkDeploymentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_framework_deployment(parent: nil, framework_deployment_id: nil, framework_deployment: nil) - # Pass arguments to `create_framework_deployment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource of the framework deployment in the format - # `organizations/{organization}/locations/{location}` - # or - # `projects/{project}/locations/{location}`. - # Only the global location is supported. - # @param framework_deployment_id [::String] - # Optional. An identifier for the framework deployment that's unique in scope - # of the parent. If you don't specify a value, then a random UUID is - # generated. - # @param framework_deployment [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment, ::Hash] - # Required. The framework deployment that you're creating. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/cloud_security_compliance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkDeploymentRequest.new - # - # # Call the create_framework_deployment method. - # result = client.create_framework_deployment request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_framework_deployment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkDeploymentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_framework_deployment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_framework_deployment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_framework_deployment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @deployment_stub.create_framework_deployment request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a framework deployment. - # - # @overload delete_framework_deployment(request, options = nil) - # Pass arguments to `delete_framework_deployment` via a request object, either of type - # {::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkDeploymentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkDeploymentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_framework_deployment(name: nil, etag: nil) - # Pass arguments to `delete_framework_deployment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the framework deployment that you want to delete, - # in the format - # `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}` - # or - # `projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}`. - # The only supported location is `global`. - # @param etag [::String] - # Optional. An opaque identifier for the current version of the resource. - # - # If you provide this value, then it must match the existing value. If the - # values don't match, then the request fails with an - # [`ABORTED`][google.rpc.Code.ABORTED] error. - # - # If you omit this value, then the resource is deleted regardless of its - # current `etag` value. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/cloud_security_compliance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkDeploymentRequest.new - # - # # Call the delete_framework_deployment method. - # result = client.delete_framework_deployment request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_framework_deployment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkDeploymentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_framework_deployment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_framework_deployment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_framework_deployment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @deployment_stub.delete_framework_deployment request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details about a framework deployment. - # - # @overload get_framework_deployment(request, options = nil) - # Pass arguments to `get_framework_deployment` via a request object, either of type - # {::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkDeploymentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkDeploymentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_framework_deployment(name: nil) - # Pass arguments to `get_framework_deployment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the framework deployment, in the format - # `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}` - # or - # `projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}`. - # The only supported location is `global`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/cloud_security_compliance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkDeploymentRequest.new - # - # # Call the get_framework_deployment method. - # result = client.get_framework_deployment request - # - # # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment. - # p result - # - def get_framework_deployment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkDeploymentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_framework_deployment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_framework_deployment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_framework_deployment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @deployment_stub.get_framework_deployment request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the framework deployments in a given parent resource. - # - # @overload list_framework_deployments(request, options = nil) - # Pass arguments to `list_framework_deployments` via a request object, either of type - # {::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkDeploymentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkDeploymentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_framework_deployments(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_framework_deployments` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource of the framework deployment, in the format - # `organizations/{organization}/locations/{location}` - # or - # `projects/{project}/locations/{location}`. - # The only supported location is `global`. - # @param page_size [::Integer] - # Optional. The requested page size. The server might return fewer items than - # requested. - # If unspecified, the server picks an appropriate default. - # @param page_token [::String] - # Optional. A token that identifies a page of results the server should - # return. - # @param filter [::String] - # Optional. The filter to be applied on the resource, as defined by - # [AIP-160: Filtering](https://google.aip.dev/160). - # @param order_by [::String] - # Optional. The sort order for the results. The following values are - # supported: - # - # * `name` - # * `name desc` - # - # If you do not specify a value, then the results are not sorted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/cloud_security_compliance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkDeploymentsRequest.new - # - # # Call the list_framework_deployments method. - # result = client.list_framework_deployments request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment. - # p item - # end - # - def list_framework_deployments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkDeploymentsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_framework_deployments.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_framework_deployments.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_framework_deployments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @deployment_stub.list_framework_deployments request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @deployment_stub, :list_framework_deployments, "framework_deployments", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details about a cloud control deployment. - # - # @overload get_cloud_control_deployment(request, options = nil) - # Pass arguments to `get_cloud_control_deployment` via a request object, either of type - # {::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlDeploymentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlDeploymentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_cloud_control_deployment(name: nil) - # Pass arguments to `get_cloud_control_deployment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name for the cloud control deployment, in the format - # `organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}` - # or - # `projects/{project}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}`. - # The only supported location is `global`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/cloud_security_compliance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlDeploymentRequest.new - # - # # Call the get_cloud_control_deployment method. - # result = client.get_cloud_control_deployment request - # - # # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment. - # p result - # - def get_cloud_control_deployment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlDeploymentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_cloud_control_deployment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_cloud_control_deployment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_cloud_control_deployment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @deployment_stub.get_cloud_control_deployment request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the cloud conrol deployments in a given parent resource. - # - # @overload list_cloud_control_deployments(request, options = nil) - # Pass arguments to `list_cloud_control_deployments` via a request object, either of type - # {::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlDeploymentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlDeploymentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_cloud_control_deployments(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_cloud_control_deployments` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource for the cloud control deployment, in the - # format `organizations/{organization}/locations/{location}` or - # `projects/{project}/locations/{location}`. - # The only supported location is `global`. - # @param page_size [::Integer] - # Optional. The requested page size. The server might return fewer items than - # you requested. - # If unspecified, the server picks an appropriate default. - # @param page_token [::String] - # Optional. A token that identifies the page of results that the server - # should return. - # @param filter [::String] - # Optional. The filter to apply on the resource, as defined by - # [AIP-160: Filtering](https://google.aip.dev/160). - # @param order_by [::String] - # Optional. The sort order for the results. The following values are - # supported: - # - # * `name` - # * `name desc` - # - # If you do not specify a value, then the results are not sorted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/cloud_security_compliance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlDeploymentsRequest.new - # - # # Call the list_cloud_control_deployments method. - # result = client.list_cloud_control_deployments request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment. - # p item - # end - # - def list_cloud_control_deployments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlDeploymentsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_cloud_control_deployments.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_cloud_control_deployments.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_cloud_control_deployments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @deployment_stub.list_cloud_control_deployments request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @deployment_stub, :list_cloud_control_deployments, "cloud_control_deployments", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Deployment REST API. - # - # This class represents the configuration for Deployment REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_framework_deployment to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_framework_deployment.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_framework_deployment.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "cloudsecuritycompliance.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - # Overrides for http bindings for the RPCs of this service - # are only used when this service is used as mixin, and only - # by the host service. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Deployment API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_framework_deployment` - # @return [::Gapic::Config::Method] - # - attr_reader :create_framework_deployment - ## - # RPC-specific configuration for `delete_framework_deployment` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_framework_deployment - ## - # RPC-specific configuration for `get_framework_deployment` - # @return [::Gapic::Config::Method] - # - attr_reader :get_framework_deployment - ## - # RPC-specific configuration for `list_framework_deployments` - # @return [::Gapic::Config::Method] - # - attr_reader :list_framework_deployments - ## - # RPC-specific configuration for `get_cloud_control_deployment` - # @return [::Gapic::Config::Method] - # - attr_reader :get_cloud_control_deployment - ## - # RPC-specific configuration for `list_cloud_control_deployments` - # @return [::Gapic::Config::Method] - # - attr_reader :list_cloud_control_deployments - - # @private - def initialize parent_rpcs = nil - create_framework_deployment_config = parent_rpcs.create_framework_deployment if parent_rpcs.respond_to? :create_framework_deployment - @create_framework_deployment = ::Gapic::Config::Method.new create_framework_deployment_config - delete_framework_deployment_config = parent_rpcs.delete_framework_deployment if parent_rpcs.respond_to? :delete_framework_deployment - @delete_framework_deployment = ::Gapic::Config::Method.new delete_framework_deployment_config - get_framework_deployment_config = parent_rpcs.get_framework_deployment if parent_rpcs.respond_to? :get_framework_deployment - @get_framework_deployment = ::Gapic::Config::Method.new get_framework_deployment_config - list_framework_deployments_config = parent_rpcs.list_framework_deployments if parent_rpcs.respond_to? :list_framework_deployments - @list_framework_deployments = ::Gapic::Config::Method.new list_framework_deployments_config - get_cloud_control_deployment_config = parent_rpcs.get_cloud_control_deployment if parent_rpcs.respond_to? :get_cloud_control_deployment - @get_cloud_control_deployment = ::Gapic::Config::Method.new get_cloud_control_deployment_config - list_cloud_control_deployments_config = parent_rpcs.list_cloud_control_deployments if parent_rpcs.respond_to? :list_cloud_control_deployments - @list_cloud_control_deployments = ::Gapic::Config::Method.new list_cloud_control_deployments_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/rest/operations.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/rest/operations.rb deleted file mode 100644 index 31dabb00f199..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/rest/operations.rb +++ /dev/null @@ -1,954 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module CloudSecurityCompliance - module V1 - module Deployment - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudsecuritycompliance.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the Deployment Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the Deployment Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = OperationsServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.list_operations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.get_operation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.delete_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "cloudsecuritycompliance.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}/operations", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}/operations", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/rest/service_stub.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/rest/service_stub.rb deleted file mode 100644 index e9fdc8b8a918..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/deployment/rest/service_stub.rb +++ /dev/null @@ -1,491 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/cloudsecuritycompliance/v1/deployment_pb" - -module Google - module Cloud - module CloudSecurityCompliance - module V1 - module Deployment - module Rest - ## - # REST service stub for the Deployment service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the create_framework_deployment REST call - # - # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkDeploymentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_framework_deployment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_framework_deployment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_framework_deployment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_framework_deployment REST call - # - # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkDeploymentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_framework_deployment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_framework_deployment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_framework_deployment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_framework_deployment REST call - # - # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkDeploymentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment] - # A result object deserialized from the server's reply - def get_framework_deployment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_framework_deployment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_framework_deployment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_framework_deployments REST call - # - # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkDeploymentsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkDeploymentsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkDeploymentsResponse] - # A result object deserialized from the server's reply - def list_framework_deployments request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_framework_deployments_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_framework_deployments", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkDeploymentsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_cloud_control_deployment REST call - # - # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlDeploymentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment] - # A result object deserialized from the server's reply - def get_cloud_control_deployment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_cloud_control_deployment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_cloud_control_deployment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_cloud_control_deployments REST call - # - # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlDeploymentsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlDeploymentsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlDeploymentsResponse] - # A result object deserialized from the server's reply - def list_cloud_control_deployments request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_cloud_control_deployments_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_cloud_control_deployments", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlDeploymentsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the create_framework_deployment REST call - # - # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkDeploymentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_framework_deployment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/frameworkDeployments", - body: "framework_deployment", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/frameworkDeployments", - body: "framework_deployment", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_framework_deployment REST call - # - # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkDeploymentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_framework_deployment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/frameworkDeployments/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/frameworkDeployments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_framework_deployment REST call - # - # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkDeploymentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_framework_deployment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/frameworkDeployments/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/frameworkDeployments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_framework_deployments REST call - # - # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkDeploymentsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_framework_deployments_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/frameworkDeployments", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/frameworkDeployments", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_cloud_control_deployment REST call - # - # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlDeploymentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_cloud_control_deployment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/cloudControlDeployments/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/cloudControlDeployments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_cloud_control_deployments REST call - # - # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlDeploymentsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_cloud_control_deployments_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/cloudControlDeployments", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/cloudControlDeployments", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/monitoring.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/monitoring.rb deleted file mode 100644 index f173f4219c50..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/monitoring.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/cloud_security_compliance/v1/version" - -require "google/cloud/cloud_security_compliance/v1/monitoring/credentials" -require "google/cloud/cloud_security_compliance/v1/monitoring/paths" -require "google/cloud/cloud_security_compliance/v1/monitoring/client" -require "google/cloud/cloud_security_compliance/v1/monitoring/rest" - -module Google - module Cloud - module CloudSecurityCompliance - module V1 - ## - # Service describing handlers for resources - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/cloud_security_compliance/v1/monitoring" - # client = ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/cloud_security_compliance/v1/monitoring/rest" - # client = ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Rest::Client.new - # - module Monitoring - end - end - end - end -end - -helper_path = ::File.join __dir__, "monitoring", "helpers.rb" -require "google/cloud/cloud_security_compliance/v1/monitoring/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/monitoring/client.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/monitoring/client.rb deleted file mode 100644 index b7889ad22a77..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/monitoring/client.rb +++ /dev/null @@ -1,944 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/cloudsecuritycompliance/v1/monitoring_pb" -require "google/cloud/location" - -module Google - module Cloud - module CloudSecurityCompliance - module V1 - module Monitoring - ## - # Client for the Monitoring service. - # - # Service describing handlers for resources - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudsecuritycompliance.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :monitoring_stub - - ## - # Configure the Monitoring Client class. - # - # See {::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all Monitoring clients - # ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "CloudSecurityCompliance", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.list_framework_compliance_summaries.timeout = 60.0 - default_config.rpcs.list_framework_compliance_summaries.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_finding_summaries.timeout = 60.0 - default_config.rpcs.list_finding_summaries.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.fetch_framework_compliance_report.timeout = 60.0 - default_config.rpcs.fetch_framework_compliance_report.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_control_compliance_summaries.timeout = 60.0 - default_config.rpcs.list_control_compliance_summaries.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.aggregate_framework_compliance_report.timeout = 60.0 - default_config.rpcs.aggregate_framework_compliance_report.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the Monitoring Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @monitoring_stub.universe_domain - end - - ## - # Create a new Monitoring client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Monitoring client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/cloudsecuritycompliance/v1/monitoring_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @monitoring_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @monitoring_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @monitoring_stub.endpoint - config.universe_domain = @monitoring_stub.universe_domain - config.logger = @monitoring_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Client] - # - attr_reader :location_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @monitoring_stub.logger - end - - # Service calls - - ## - # Lists the framework compliance summary for a given scope. - # - # @overload list_framework_compliance_summaries(request, options = nil) - # Pass arguments to `list_framework_compliance_summaries` via a request object, either of type - # {::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkComplianceSummariesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkComplianceSummariesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_framework_compliance_summaries(parent: nil, page_size: nil, page_token: nil, filter: nil, view: nil) - # Pass arguments to `list_framework_compliance_summaries` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent scope for the framework compliance summary. - # @param page_size [::Integer] - # Optional. The requested page size. The server might return fewer items than - # requested. If unspecified, the server picks an appropriate default. - # @param page_token [::String] - # Optional. A token that identifies the page of results that the server - # should return. - # @param filter [::String] - # Optional. The filtering results. - # @param view [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkComplianceSummaryView] - # Optional. Specifies the level of detail to return in the response. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::FrameworkComplianceSummary>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::FrameworkComplianceSummary>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/cloud_security_compliance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkComplianceSummariesRequest.new - # - # # Call the list_framework_compliance_summaries method. - # result = client.list_framework_compliance_summaries request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::CloudSecurityCompliance::V1::FrameworkComplianceSummary. - # p item - # end - # - def list_framework_compliance_summaries request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkComplianceSummariesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_framework_compliance_summaries.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_framework_compliance_summaries.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_framework_compliance_summaries.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @monitoring_stub.call_rpc :list_framework_compliance_summaries, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @monitoring_stub, :list_framework_compliance_summaries, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the finding summary by category for a given scope. - # - # @overload list_finding_summaries(request, options = nil) - # Pass arguments to `list_finding_summaries` via a request object, either of type - # {::Google::Cloud::CloudSecurityCompliance::V1::ListFindingSummariesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudSecurityCompliance::V1::ListFindingSummariesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_finding_summaries(parent: nil, page_size: nil, page_token: nil, filter: nil, end_time: nil) - # Pass arguments to `list_finding_summaries` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent scope for the framework overview page. - # @param page_size [::Integer] - # Optional. The requested page size. The server might return fewer items than - # requested. If unspecified, the server picks an appropriate default. - # @param page_token [::String] - # Optional. A token that identifies the page of results that the server - # should return. - # @param filter [::String] - # Optional. The filtering results. - # @param end_time [::Google::Protobuf::Timestamp, ::Hash] - # Optional. The end time of the finding summary. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::FindingSummary>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::FindingSummary>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/cloud_security_compliance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudSecurityCompliance::V1::ListFindingSummariesRequest.new - # - # # Call the list_finding_summaries method. - # result = client.list_finding_summaries request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::CloudSecurityCompliance::V1::FindingSummary. - # p item - # end - # - def list_finding_summaries request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::ListFindingSummariesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_finding_summaries.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_finding_summaries.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_finding_summaries.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @monitoring_stub.call_rpc :list_finding_summaries, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @monitoring_stub, :list_finding_summaries, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Fetches the framework compliance report for a given scope. - # - # @overload fetch_framework_compliance_report(request, options = nil) - # Pass arguments to `fetch_framework_compliance_report` via a request object, either of type - # {::Google::Cloud::CloudSecurityCompliance::V1::FetchFrameworkComplianceReportRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudSecurityCompliance::V1::FetchFrameworkComplianceReportRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload fetch_framework_compliance_report(name: nil, end_time: nil, filter: nil) - # Pass arguments to `fetch_framework_compliance_report` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the framework compliance report to retrieve. - # @param end_time [::Google::Protobuf::Timestamp, ::Hash] - # Optional. The end time of the report. - # @param filter [::String] - # Optional. The filtering results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkComplianceReport] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkComplianceReport] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/cloud_security_compliance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudSecurityCompliance::V1::FetchFrameworkComplianceReportRequest.new - # - # # Call the fetch_framework_compliance_report method. - # result = client.fetch_framework_compliance_report request - # - # # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::FrameworkComplianceReport. - # p result - # - def fetch_framework_compliance_report request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::FetchFrameworkComplianceReportRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.fetch_framework_compliance_report.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.fetch_framework_compliance_report.timeout, - metadata: metadata, - retry_policy: @config.rpcs.fetch_framework_compliance_report.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @monitoring_stub.call_rpc :fetch_framework_compliance_report, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the control compliance summary for a given scope. - # - # @overload list_control_compliance_summaries(request, options = nil) - # Pass arguments to `list_control_compliance_summaries` via a request object, either of type - # {::Google::Cloud::CloudSecurityCompliance::V1::ListControlComplianceSummariesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudSecurityCompliance::V1::ListControlComplianceSummariesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_control_compliance_summaries(parent: nil, end_time: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_control_compliance_summaries` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent scope for the framework overview page. - # @param end_time [::Google::Protobuf::Timestamp, ::Hash] - # Optional. The end time of the control compliance summary. - # @param page_size [::Integer] - # Optional. The requested page size. The server might return fewer items than - # requested. If unspecified, the server picks an appropriate default. - # @param page_token [::String] - # Optional. A token that identifies the page of results that the server - # should return. - # @param filter [::String] - # Optional. The filtering results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::ControlComplianceSummary>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::ControlComplianceSummary>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/cloud_security_compliance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudSecurityCompliance::V1::ListControlComplianceSummariesRequest.new - # - # # Call the list_control_compliance_summaries method. - # result = client.list_control_compliance_summaries request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::CloudSecurityCompliance::V1::ControlComplianceSummary. - # p item - # end - # - def list_control_compliance_summaries request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::ListControlComplianceSummariesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_control_compliance_summaries.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_control_compliance_summaries.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_control_compliance_summaries.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @monitoring_stub.call_rpc :list_control_compliance_summaries, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @monitoring_stub, :list_control_compliance_summaries, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the aggregated compliance report over time for a given scope. - # - # @overload aggregate_framework_compliance_report(request, options = nil) - # Pass arguments to `aggregate_framework_compliance_report` via a request object, either of type - # {::Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload aggregate_framework_compliance_report(name: nil, interval: nil, filter: nil) - # Pass arguments to `aggregate_framework_compliance_report` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the aggregated compliance report over time to - # retrieve. - # - # The supported format is: - # `organizations/{organization_id}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}` - # @param interval [::Google::Type::Interval, ::Hash] - # Optional. The start and end time range for the aggregated compliance - # report. - # @param filter [::String] - # Optional. The filtering results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/cloud_security_compliance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportRequest.new - # - # # Call the aggregate_framework_compliance_report method. - # result = client.aggregate_framework_compliance_report request - # - # # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportResponse. - # p result - # - def aggregate_framework_compliance_report request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.aggregate_framework_compliance_report.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.aggregate_framework_compliance_report.timeout, - metadata: metadata, - retry_policy: @config.rpcs.aggregate_framework_compliance_report.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @monitoring_stub.call_rpc :aggregate_framework_compliance_report, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Monitoring API. - # - # This class represents the configuration for Monitoring, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_framework_compliance_summaries to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_framework_compliance_summaries.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_framework_compliance_summaries.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "cloudsecuritycompliance.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Monitoring API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_framework_compliance_summaries` - # @return [::Gapic::Config::Method] - # - attr_reader :list_framework_compliance_summaries - ## - # RPC-specific configuration for `list_finding_summaries` - # @return [::Gapic::Config::Method] - # - attr_reader :list_finding_summaries - ## - # RPC-specific configuration for `fetch_framework_compliance_report` - # @return [::Gapic::Config::Method] - # - attr_reader :fetch_framework_compliance_report - ## - # RPC-specific configuration for `list_control_compliance_summaries` - # @return [::Gapic::Config::Method] - # - attr_reader :list_control_compliance_summaries - ## - # RPC-specific configuration for `aggregate_framework_compliance_report` - # @return [::Gapic::Config::Method] - # - attr_reader :aggregate_framework_compliance_report - - # @private - def initialize parent_rpcs = nil - list_framework_compliance_summaries_config = parent_rpcs.list_framework_compliance_summaries if parent_rpcs.respond_to? :list_framework_compliance_summaries - @list_framework_compliance_summaries = ::Gapic::Config::Method.new list_framework_compliance_summaries_config - list_finding_summaries_config = parent_rpcs.list_finding_summaries if parent_rpcs.respond_to? :list_finding_summaries - @list_finding_summaries = ::Gapic::Config::Method.new list_finding_summaries_config - fetch_framework_compliance_report_config = parent_rpcs.fetch_framework_compliance_report if parent_rpcs.respond_to? :fetch_framework_compliance_report - @fetch_framework_compliance_report = ::Gapic::Config::Method.new fetch_framework_compliance_report_config - list_control_compliance_summaries_config = parent_rpcs.list_control_compliance_summaries if parent_rpcs.respond_to? :list_control_compliance_summaries - @list_control_compliance_summaries = ::Gapic::Config::Method.new list_control_compliance_summaries_config - aggregate_framework_compliance_report_config = parent_rpcs.aggregate_framework_compliance_report if parent_rpcs.respond_to? :aggregate_framework_compliance_report - @aggregate_framework_compliance_report = ::Gapic::Config::Method.new aggregate_framework_compliance_report_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/monitoring/credentials.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/monitoring/credentials.rb deleted file mode 100644 index 20e7aa8aed39..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/monitoring/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module CloudSecurityCompliance - module V1 - module Monitoring - # Credentials for the Monitoring API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/monitoring/paths.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/monitoring/paths.rb deleted file mode 100644 index fddc55378b2f..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/monitoring/paths.rb +++ /dev/null @@ -1,142 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module CloudSecurityCompliance - module V1 - module Monitoring - # Path helper methods for the Monitoring API. - module Paths - ## - # Create a fully-qualified FolderLocation resource string. - # - # The resource will be in the following format: - # - # `folders/{folder}/locations/{location}` - # - # @param folder [String] - # @param location [String] - # - # @return [::String] - def folder_location_path folder:, location: - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - - "folders/#{folder}/locations/#{location}" - end - - ## - # Create a fully-qualified FrameworkComplianceReport resource string. - # - # @overload framework_compliance_report_path(project:, location:, framework_compliance_report:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}` - # - # @param project [String] - # @param location [String] - # @param framework_compliance_report [String] - # - # @overload framework_compliance_report_path(folder:, location:, framework_compliance_report:) - # The resource will be in the following format: - # - # `folders/{folder}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}` - # - # @param folder [String] - # @param location [String] - # @param framework_compliance_report [String] - # - # @overload framework_compliance_report_path(organization:, location:, framework_compliance_report:) - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}` - # - # @param organization [String] - # @param location [String] - # @param framework_compliance_report [String] - # - # @return [::String] - def framework_compliance_report_path **args - resources = { - "framework_compliance_report:location:project" => (proc do |project:, location:, framework_compliance_report:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/frameworkComplianceReports/#{framework_compliance_report}" - end), - "folder:framework_compliance_report:location" => (proc do |folder:, location:, framework_compliance_report:| - raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "folders/#{folder}/locations/#{location}/frameworkComplianceReports/#{framework_compliance_report}" - end), - "framework_compliance_report:location:organization" => (proc do |organization:, location:, framework_compliance_report:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/frameworkComplianceReports/#{framework_compliance_report}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - ## - # Create a fully-qualified OrganizationLocation resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}` - # - # @param organization [String] - # @param location [String] - # - # @return [::String] - def organization_location_path organization:, location: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/monitoring/rest.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/monitoring/rest.rb deleted file mode 100644 index 6b61e4e1c9c6..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/monitoring/rest.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/cloud_security_compliance/v1/version" -require "google/cloud/cloud_security_compliance/v1/bindings_override" - -require "google/cloud/cloud_security_compliance/v1/monitoring/credentials" -require "google/cloud/cloud_security_compliance/v1/monitoring/paths" -require "google/cloud/cloud_security_compliance/v1/monitoring/rest/client" - -module Google - module Cloud - module CloudSecurityCompliance - module V1 - ## - # Service describing handlers for resources - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/cloud_security_compliance/v1/monitoring/rest" - # client = ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Rest::Client.new - # - module Monitoring - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/cloud_security_compliance/v1/monitoring/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/monitoring/rest/client.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/monitoring/rest/client.rb deleted file mode 100644 index 51b390c36f9a..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/monitoring/rest/client.rb +++ /dev/null @@ -1,874 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/cloudsecuritycompliance/v1/monitoring_pb" -require "google/cloud/cloud_security_compliance/v1/monitoring/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Cloud - module CloudSecurityCompliance - module V1 - module Monitoring - module Rest - ## - # REST client for the Monitoring service. - # - # Service describing handlers for resources - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudsecuritycompliance.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :monitoring_stub - - ## - # Configure the Monitoring Client class. - # - # See {::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all Monitoring clients - # ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "CloudSecurityCompliance", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.list_framework_compliance_summaries.timeout = 60.0 - default_config.rpcs.list_framework_compliance_summaries.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_finding_summaries.timeout = 60.0 - default_config.rpcs.list_finding_summaries.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.fetch_framework_compliance_report.timeout = 60.0 - default_config.rpcs.fetch_framework_compliance_report.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_control_compliance_summaries.timeout = 60.0 - default_config.rpcs.list_control_compliance_summaries.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.aggregate_framework_compliance_report.timeout = 60.0 - default_config.rpcs.aggregate_framework_compliance_report.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the Monitoring Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @monitoring_stub.universe_domain - end - - ## - # Create a new Monitoring REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Monitoring client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @monitoring_stub = ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @monitoring_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @monitoring_stub.endpoint - config.universe_domain = @monitoring_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @monitoring_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Rest::Client] - # - attr_reader :location_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @monitoring_stub.logger - end - - # Service calls - - ## - # Lists the framework compliance summary for a given scope. - # - # @overload list_framework_compliance_summaries(request, options = nil) - # Pass arguments to `list_framework_compliance_summaries` via a request object, either of type - # {::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkComplianceSummariesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkComplianceSummariesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_framework_compliance_summaries(parent: nil, page_size: nil, page_token: nil, filter: nil, view: nil) - # Pass arguments to `list_framework_compliance_summaries` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent scope for the framework compliance summary. - # @param page_size [::Integer] - # Optional. The requested page size. The server might return fewer items than - # requested. If unspecified, the server picks an appropriate default. - # @param page_token [::String] - # Optional. A token that identifies the page of results that the server - # should return. - # @param filter [::String] - # Optional. The filtering results. - # @param view [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkComplianceSummaryView] - # Optional. Specifies the level of detail to return in the response. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::FrameworkComplianceSummary>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::FrameworkComplianceSummary>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/cloud_security_compliance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkComplianceSummariesRequest.new - # - # # Call the list_framework_compliance_summaries method. - # result = client.list_framework_compliance_summaries request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::CloudSecurityCompliance::V1::FrameworkComplianceSummary. - # p item - # end - # - def list_framework_compliance_summaries request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkComplianceSummariesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_framework_compliance_summaries.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_framework_compliance_summaries.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_framework_compliance_summaries.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @monitoring_stub.list_framework_compliance_summaries request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @monitoring_stub, :list_framework_compliance_summaries, "framework_compliance_summaries", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the finding summary by category for a given scope. - # - # @overload list_finding_summaries(request, options = nil) - # Pass arguments to `list_finding_summaries` via a request object, either of type - # {::Google::Cloud::CloudSecurityCompliance::V1::ListFindingSummariesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudSecurityCompliance::V1::ListFindingSummariesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_finding_summaries(parent: nil, page_size: nil, page_token: nil, filter: nil, end_time: nil) - # Pass arguments to `list_finding_summaries` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent scope for the framework overview page. - # @param page_size [::Integer] - # Optional. The requested page size. The server might return fewer items than - # requested. If unspecified, the server picks an appropriate default. - # @param page_token [::String] - # Optional. A token that identifies the page of results that the server - # should return. - # @param filter [::String] - # Optional. The filtering results. - # @param end_time [::Google::Protobuf::Timestamp, ::Hash] - # Optional. The end time of the finding summary. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::FindingSummary>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::FindingSummary>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/cloud_security_compliance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudSecurityCompliance::V1::ListFindingSummariesRequest.new - # - # # Call the list_finding_summaries method. - # result = client.list_finding_summaries request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::CloudSecurityCompliance::V1::FindingSummary. - # p item - # end - # - def list_finding_summaries request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::ListFindingSummariesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_finding_summaries.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_finding_summaries.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_finding_summaries.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @monitoring_stub.list_finding_summaries request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @monitoring_stub, :list_finding_summaries, "finding_summaries", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Fetches the framework compliance report for a given scope. - # - # @overload fetch_framework_compliance_report(request, options = nil) - # Pass arguments to `fetch_framework_compliance_report` via a request object, either of type - # {::Google::Cloud::CloudSecurityCompliance::V1::FetchFrameworkComplianceReportRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudSecurityCompliance::V1::FetchFrameworkComplianceReportRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload fetch_framework_compliance_report(name: nil, end_time: nil, filter: nil) - # Pass arguments to `fetch_framework_compliance_report` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the framework compliance report to retrieve. - # @param end_time [::Google::Protobuf::Timestamp, ::Hash] - # Optional. The end time of the report. - # @param filter [::String] - # Optional. The filtering results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkComplianceReport] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkComplianceReport] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/cloud_security_compliance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudSecurityCompliance::V1::FetchFrameworkComplianceReportRequest.new - # - # # Call the fetch_framework_compliance_report method. - # result = client.fetch_framework_compliance_report request - # - # # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::FrameworkComplianceReport. - # p result - # - def fetch_framework_compliance_report request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::FetchFrameworkComplianceReportRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.fetch_framework_compliance_report.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.fetch_framework_compliance_report.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.fetch_framework_compliance_report.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @monitoring_stub.fetch_framework_compliance_report request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the control compliance summary for a given scope. - # - # @overload list_control_compliance_summaries(request, options = nil) - # Pass arguments to `list_control_compliance_summaries` via a request object, either of type - # {::Google::Cloud::CloudSecurityCompliance::V1::ListControlComplianceSummariesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudSecurityCompliance::V1::ListControlComplianceSummariesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_control_compliance_summaries(parent: nil, end_time: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_control_compliance_summaries` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent scope for the framework overview page. - # @param end_time [::Google::Protobuf::Timestamp, ::Hash] - # Optional. The end time of the control compliance summary. - # @param page_size [::Integer] - # Optional. The requested page size. The server might return fewer items than - # requested. If unspecified, the server picks an appropriate default. - # @param page_token [::String] - # Optional. A token that identifies the page of results that the server - # should return. - # @param filter [::String] - # Optional. The filtering results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::ControlComplianceSummary>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::ControlComplianceSummary>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/cloud_security_compliance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudSecurityCompliance::V1::ListControlComplianceSummariesRequest.new - # - # # Call the list_control_compliance_summaries method. - # result = client.list_control_compliance_summaries request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::CloudSecurityCompliance::V1::ControlComplianceSummary. - # p item - # end - # - def list_control_compliance_summaries request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::ListControlComplianceSummariesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_control_compliance_summaries.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_control_compliance_summaries.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_control_compliance_summaries.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @monitoring_stub.list_control_compliance_summaries request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @monitoring_stub, :list_control_compliance_summaries, "control_compliance_summaries", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the aggregated compliance report over time for a given scope. - # - # @overload aggregate_framework_compliance_report(request, options = nil) - # Pass arguments to `aggregate_framework_compliance_report` via a request object, either of type - # {::Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload aggregate_framework_compliance_report(name: nil, interval: nil, filter: nil) - # Pass arguments to `aggregate_framework_compliance_report` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the aggregated compliance report over time to - # retrieve. - # - # The supported format is: - # `organizations/{organization_id}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}` - # @param interval [::Google::Type::Interval, ::Hash] - # Optional. The start and end time range for the aggregated compliance - # report. - # @param filter [::String] - # Optional. The filtering results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/cloud_security_compliance/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportRequest.new - # - # # Call the aggregate_framework_compliance_report method. - # result = client.aggregate_framework_compliance_report request - # - # # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportResponse. - # p result - # - def aggregate_framework_compliance_report request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.aggregate_framework_compliance_report.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.aggregate_framework_compliance_report.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.aggregate_framework_compliance_report.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @monitoring_stub.aggregate_framework_compliance_report request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Monitoring REST API. - # - # This class represents the configuration for Monitoring REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_framework_compliance_summaries to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_framework_compliance_summaries.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_framework_compliance_summaries.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "cloudsecuritycompliance.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - # Overrides for http bindings for the RPCs of this service - # are only used when this service is used as mixin, and only - # by the host service. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Monitoring API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_framework_compliance_summaries` - # @return [::Gapic::Config::Method] - # - attr_reader :list_framework_compliance_summaries - ## - # RPC-specific configuration for `list_finding_summaries` - # @return [::Gapic::Config::Method] - # - attr_reader :list_finding_summaries - ## - # RPC-specific configuration for `fetch_framework_compliance_report` - # @return [::Gapic::Config::Method] - # - attr_reader :fetch_framework_compliance_report - ## - # RPC-specific configuration for `list_control_compliance_summaries` - # @return [::Gapic::Config::Method] - # - attr_reader :list_control_compliance_summaries - ## - # RPC-specific configuration for `aggregate_framework_compliance_report` - # @return [::Gapic::Config::Method] - # - attr_reader :aggregate_framework_compliance_report - - # @private - def initialize parent_rpcs = nil - list_framework_compliance_summaries_config = parent_rpcs.list_framework_compliance_summaries if parent_rpcs.respond_to? :list_framework_compliance_summaries - @list_framework_compliance_summaries = ::Gapic::Config::Method.new list_framework_compliance_summaries_config - list_finding_summaries_config = parent_rpcs.list_finding_summaries if parent_rpcs.respond_to? :list_finding_summaries - @list_finding_summaries = ::Gapic::Config::Method.new list_finding_summaries_config - fetch_framework_compliance_report_config = parent_rpcs.fetch_framework_compliance_report if parent_rpcs.respond_to? :fetch_framework_compliance_report - @fetch_framework_compliance_report = ::Gapic::Config::Method.new fetch_framework_compliance_report_config - list_control_compliance_summaries_config = parent_rpcs.list_control_compliance_summaries if parent_rpcs.respond_to? :list_control_compliance_summaries - @list_control_compliance_summaries = ::Gapic::Config::Method.new list_control_compliance_summaries_config - aggregate_framework_compliance_report_config = parent_rpcs.aggregate_framework_compliance_report if parent_rpcs.respond_to? :aggregate_framework_compliance_report - @aggregate_framework_compliance_report = ::Gapic::Config::Method.new aggregate_framework_compliance_report_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/monitoring/rest/service_stub.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/monitoring/rest/service_stub.rb deleted file mode 100644 index 197c9a4a37b6..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/monitoring/rest/service_stub.rb +++ /dev/null @@ -1,456 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/cloudsecuritycompliance/v1/monitoring_pb" - -module Google - module Cloud - module CloudSecurityCompliance - module V1 - module Monitoring - module Rest - ## - # REST service stub for the Monitoring service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the list_framework_compliance_summaries REST call - # - # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkComplianceSummariesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkComplianceSummariesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkComplianceSummariesResponse] - # A result object deserialized from the server's reply - def list_framework_compliance_summaries request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_framework_compliance_summaries_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_framework_compliance_summaries", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkComplianceSummariesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_finding_summaries REST call - # - # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::ListFindingSummariesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::ListFindingSummariesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudSecurityCompliance::V1::ListFindingSummariesResponse] - # A result object deserialized from the server's reply - def list_finding_summaries request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_finding_summaries_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_finding_summaries", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CloudSecurityCompliance::V1::ListFindingSummariesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the fetch_framework_compliance_report REST call - # - # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::FetchFrameworkComplianceReportRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkComplianceReport] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkComplianceReport] - # A result object deserialized from the server's reply - def fetch_framework_compliance_report request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_fetch_framework_compliance_report_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "fetch_framework_compliance_report", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CloudSecurityCompliance::V1::FrameworkComplianceReport.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_control_compliance_summaries REST call - # - # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::ListControlComplianceSummariesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::ListControlComplianceSummariesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudSecurityCompliance::V1::ListControlComplianceSummariesResponse] - # A result object deserialized from the server's reply - def list_control_compliance_summaries request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_control_compliance_summaries_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_control_compliance_summaries", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CloudSecurityCompliance::V1::ListControlComplianceSummariesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the aggregate_framework_compliance_report REST call - # - # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportResponse] - # A result object deserialized from the server's reply - def aggregate_framework_compliance_report request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_aggregate_framework_compliance_report_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "aggregate_framework_compliance_report", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_framework_compliance_summaries REST call - # - # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkComplianceSummariesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_framework_compliance_summaries_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/frameworkComplianceSummaries", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/frameworkComplianceSummaries", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/frameworkComplianceSummaries", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_finding_summaries REST call - # - # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::ListFindingSummariesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_finding_summaries_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/findingSummaries", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/findingSummaries", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/findingSummaries", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the fetch_framework_compliance_report REST call - # - # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::FetchFrameworkComplianceReportRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_fetch_framework_compliance_report_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}:fetch", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/frameworkComplianceReports/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}:fetch", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/frameworkComplianceReports/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}:fetch", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/frameworkComplianceReports/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_control_compliance_summaries REST call - # - # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::ListControlComplianceSummariesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_control_compliance_summaries_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/controlComplianceSummaries", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/frameworkComplianceReports/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/controlComplianceSummaries", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/frameworkComplianceReports/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/controlComplianceSummaries", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/frameworkComplianceReports/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the aggregate_framework_compliance_report REST call - # - # @param request_pb [::Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_aggregate_framework_compliance_report_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}:aggregate", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/frameworkComplianceReports/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}:aggregate", - matches: [ - ["name", %r{^folders/[^/]+/locations/[^/]+/frameworkComplianceReports/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}:aggregate", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/frameworkComplianceReports/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/rest.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/rest.rb deleted file mode 100644 index 809bb57c867e..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/rest.rb +++ /dev/null @@ -1,42 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/cloud_security_compliance/v1/audit/rest" -require "google/cloud/cloud_security_compliance/v1/cm_enrollment_service/rest" -require "google/cloud/cloud_security_compliance/v1/config/rest" -require "google/cloud/cloud_security_compliance/v1/deployment/rest" -require "google/cloud/cloud_security_compliance/v1/monitoring/rest" -require "google/cloud/cloud_security_compliance/v1/bindings_override" -require "google/cloud/cloud_security_compliance/v1/version" - -module Google - module Cloud - module CloudSecurityCompliance - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/cloud_security_compliance/v1/rest" - # client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/version.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/version.rb deleted file mode 100644 index 5a4e38466009..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloud_security_compliance/v1/version.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module CloudSecurityCompliance - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/audit_pb.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/audit_pb.rb deleted file mode 100644 index 3d3636b3ccea..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/audit_pb.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/cloudsecuritycompliance/v1/audit.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/cloudsecuritycompliance/v1/common_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n3google/cloud/cloudsecuritycompliance/v1/audit.proto\x12\'google.cloud.cloudsecuritycompliance.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x34google/cloud/cloudsecuritycompliance/v1/common.proto\x1a#google/longrunning/operations.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x82\x02\n(GenerateFrameworkAuditScopeReportRequest\x12\x12\n\x05scope\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12t\n\rreport_format\x18\x02 \x01(\x0e\x32X.google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest.FormatB\x03\xe0\x41\x02\x12!\n\x14\x63ompliance_framework\x18\x03 \x01(\tB\x03\xe0\x41\x02\")\n\x06\x46ormat\x12\x16\n\x12\x46ORMAT_UNSPECIFIED\x10\x00\x12\x07\n\x03ODF\x10\x01\"\xa6\x04\n)GenerateFrameworkAuditScopeReportResponse\x12\x1f\n\x15scope_report_contents\x18\x03 \x01(\x0cH\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12!\n\x14\x63ompliance_framework\x18\x02 \x01(\tB\x03\xe0\x41\x02:\x91\x03\xea\x41\x8d\x03\nPcloudsecuritycompliance.googleapis.com/GenerateFrameworkAuditScopeReportResponse\x12sprojects/{project}/locations/{location}/frameworkAuditScopeReports/{generate_framework_audit_scope_report_response}\x12}organizations/{organization}/locations/{location}/frameworkAuditScopeReports/{generate_framework_audit_scope_report_response}*\x1a\x66rameworkAuditScopeReports2)generateFrameworkAuditScopeReportResponseB\x0e\n\x0c\x61udit_report\"\xa8\x01\n\rReportSummary\x12\x18\n\x0btotal_count\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12\x1c\n\x0f\x63ompliant_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03\x12\x1c\n\x0fviolation_count\x18\x03 \x01(\x05\x42\x03\xe0\x41\x03\x12\'\n\x1amanual_review_needed_count\x18\x04 \x01(\x05\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x65rror_count\x18\x05 \x01(\x05\x42\x03\xe0\x41\x03\"\xe4\x01\n\x1b\x43reateFrameworkAuditRequest\x12M\n\x06parent\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\x12\x35\x63loudsecuritycompliance.googleapis.com/FrameworkAudit\x12\x1f\n\x12\x66ramework_audit_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12U\n\x0f\x66ramework_audit\x18\x03 \x01(\x0b\x32\x37.google.cloud.cloudsecuritycompliance.v1.FrameworkAuditB\x03\xe0\x41\x02\"}\n\x19\x46rameworkAuditDestination\x12L\n\x06\x62ucket\x18\x01 \x01(\x0b\x32:.google.cloud.cloudsecuritycompliance.v1.BucketDestinationH\x00\x42\x12\n\x10\x64\x65stination_type\"\xbf\x01\n\x11\x42ucketDestination\x12\x17\n\nbucket_uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x66\n\x16\x66ramework_audit_format\x18\x03 \x01(\x0e\x32\x41.google.cloud.cloudsecuritycompliance.v1.BucketDestination.FormatB\x03\xe0\x41\x01\")\n\x06\x46ormat\x12\x16\n\x12\x46ORMAT_UNSPECIFIED\x10\x00\x12\x07\n\x03ODF\x10\x01\"\xbd\t\n\x0e\x46rameworkAudit\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x08\xe0\x41\x03\x12\x1f\n\x12\x66ramework_audit_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12!\n\x14\x63ompliance_framework\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x12\n\x05scope\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12l\n\x1b\x66ramework_audit_destination\x18\x05 \x01(\x0b\x32\x42.google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestinationB\x03\xe0\x41\x02\x12\x33\n\nstart_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x66inish_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12W\n\x10\x63ompliance_state\x18\x08 \x01(\x0e\x32\x38.google.cloud.cloudsecuritycompliance.v1.ComplianceStateB\x03\xe0\x41\x03\x12S\n\x0ereport_summary\x18\t \x01(\x0b\x32\x36.google.cloud.cloudsecuritycompliance.v1.ReportSummaryB\x03\xe0\x41\x03\x12v\n!cloud_control_group_audit_details\x18\n \x03(\x0b\x32\x46.google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetailsB\x03\xe0\x41\x01\x12k\n\x1b\x63loud_control_audit_details\x18\x0b \x03(\x0b\x32\x41.google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetailsB\x03\xe0\x41\x01\x12\x19\n\x0coperation_id\x18\x0c \x01(\tB\x03\xe0\x41\x03\x12Q\n\x05state\x18\r \x01(\x0e\x32=.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.StateB\x03\xe0\x41\x03\"d\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\r\n\tSCHEDULED\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\r\n\tUPLOADING\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\x12\r\n\tSUCCEEDED\x10\x05:\xfc\x01\xea\x41\xf8\x01\n5cloudsecuritycompliance.googleapis.com/FrameworkAudit\x12Iprojects/{project}/locations/{location}/frameworkAudits/{framework_audit}\x12Sorganizations/{organization}/locations/{location}/frameworkAudits/{framework_audit}*\x0f\x66rameworkAudits2\x0e\x66rameworkAudit\"\xb1\x01\n\x1aListFrameworkAuditsRequest\x12M\n\x06parent\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\x12\x35\x63loudsecuritycompliance.googleapis.com/FrameworkAudit\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x89\x01\n\x1bListFrameworkAuditsResponse\x12Q\n\x10\x66ramework_audits\x18\x01 \x03(\x0b\x32\x37.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"g\n\x18GetFrameworkAuditRequest\x12K\n\x04name\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\n5cloudsecuritycompliance.googleapis.com/FrameworkAudit\"\xe8\x05\n\x1d\x43loudControlGroupAuditDetails\x12#\n\x16\x63loud_control_group_id\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12 \n\x13responsibility_type\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12.\n!google_responsibility_description\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x31\n$google_responsibility_implementation\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x30\n#customer_responsibility_description\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x33\n&customer_responsibility_implementation\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12W\n\x10\x63ompliance_state\x18\t \x01(\x0e\x32\x38.google.cloud.cloudsecuritycompliance.v1.ComplianceStateB\x03\xe0\x41\x03\x12\x17\n\ncontrol_id\x18\n \x01(\tB\x03\xe0\x41\x03\x12S\n\x0e\x63ontrol_family\x18\x0b \x01(\x0b\x32\x36.google.cloud.cloudsecuritycompliance.v1.ControlFamilyB\x03\xe0\x41\x03\x12\x65\n\x15\x63loud_control_details\x18\x0c \x03(\x0b\x32\x41.google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetailsB\x03\xe0\x41\x03\x12S\n\x0ereport_summary\x18\r \x01(\x0b\x32\x36.google.cloud.cloudsecuritycompliance.v1.ReportSummaryB\x03\xe0\x41\x03\"\xa4\x02\n\x0e\x46indingDetails\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12W\n\x10\x63ompliance_state\x18\x02 \x01(\x0e\x32\x38.google.cloud.cloudsecuritycompliance.v1.ComplianceStateB\x03\xe0\x41\x03\x12U\n\x0bobservation\x18\x03 \x01(\x0b\x32;.google.cloud.cloudsecuritycompliance.v1.ObservationDetailsB\x03\xe0\x41\x03\x12O\n\x08\x65vidence\x18\x04 \x01(\x0b\x32\x38.google.cloud.cloudsecuritycompliance.v1.EvidenceDetailsB\x03\xe0\x41\x03\"d\n\x12ObservationDetails\x12\x1a\n\rcurrent_value\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0e\x65xpected_value\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08guidance\x18\x03 \x01(\tB\x03\xe0\x41\x03\"Z\n\x0f\x45videnceDetails\x12\x15\n\x08resource\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07service\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\revidence_path\x18\x03 \x01(\tB\x03\xe0\x41\x03\"\xfb\x02\n\x18\x43loudControlAuditDetails\x12\x1a\n\rcloud_control\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10\x63loud_control_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12&\n\x19\x63loud_control_description\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12W\n\x10\x63ompliance_state\x18\x04 \x01(\x0e\x32\x38.google.cloud.cloudsecuritycompliance.v1.ComplianceStateB\x03\xe0\x41\x03\x12S\n\x0ereport_summary\x18\x05 \x01(\x0b\x32\x36.google.cloud.cloudsecuritycompliance.v1.ReportSummaryB\x03\xe0\x41\x03\x12N\n\x08\x66indings\x18\x06 \x03(\x0b\x32\x37.google.cloud.cloudsecuritycompliance.v1.FindingDetailsB\x03\xe0\x41\x03*\x8f\x01\n\x0f\x43omplianceState\x12 \n\x1c\x43OMPLIANCE_STATE_UNSPECIFIED\x10\x00\x12\r\n\tCOMPLIANT\x10\x01\x12\r\n\tVIOLATION\x10\x02\x12\x18\n\x14MANUAL_REVIEW_NEEDED\x10\x03\x12\t\n\x05\x45RROR\x10\x04\x12\x17\n\x13\x41UDIT_NOT_SUPPORTED\x10\x05\x32\x9c\x0e\n\x05\x41udit\x12\xb3\x04\n!GenerateFrameworkAuditScopeReport\x12Q.google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest\x1aR.google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse\"\xe6\x02\xda\x41(scope,report_format,compliance_framework\x82\xd3\xe4\x93\x02\xb4\x02\"^/v1/{scope=folders/*/locations/*}/frameworkAuditScopeReports:generateFrameworkAuditScopeReport:\x01*Zd\"_/v1/{scope=projects/*/locations/*}/frameworkAuditScopeReports:generateFrameworkAuditScopeReport:\x01*Zi\"d/v1/{scope=organizations/*/locations/*}/frameworkAuditScopeReports:generateFrameworkAuditScopeReport:\x01*\x12\xd9\x03\n\x14\x43reateFrameworkAudit\x12\x44.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest\x1a\x1d.google.longrunning.Operation\"\xdb\x02\xca\x41K\n\x0e\x46rameworkAudit\x12\x39google.cloud.cloudsecuritycompliance.v1.OperationMetadata\xda\x41)parent,framework_audit,framework_audit_id\x82\xd3\xe4\x93\x02\xda\x01\"8/v1/{parent=organizations/*/locations/*}/frameworkAudits:\x0f\x66ramework_auditZE\"2/v1/{parent=folders/*/locations/*}/frameworkAudits:\x0f\x66ramework_auditZF\"3/v1/{parent=projects/*/locations/*}/frameworkAudits:\x0f\x66ramework_audit\x12\xda\x02\n\x13ListFrameworkAudits\x12\x43.google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest\x1a\x44.google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse\"\xb7\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xa7\x01\x12\x38/v1/{parent=organizations/*/locations/*}/frameworkAuditsZ4\x12\x32/v1/{parent=folders/*/locations/*}/frameworkAuditsZ5\x12\x33/v1/{parent=projects/*/locations/*}/frameworkAudits\x12\xc7\x02\n\x11GetFrameworkAudit\x12\x41.google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest\x1a\x37.google.cloud.cloudsecuritycompliance.v1.FrameworkAudit\"\xb5\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xa7\x01\x12\x38/v1/{name=organizations/*/locations/*/frameworkAudits/*}Z4\x12\x32/v1/{name=folders/*/locations/*/frameworkAudits/*}Z5\x12\x33/v1/{name=projects/*/locations/*/frameworkAudits/*}\x1aZ\xca\x41&cloudsecuritycompliance.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xa3\x02\n+com.google.cloud.cloudsecuritycompliance.v1B\nAuditProtoP\x01Zecloud.google.com/go/cloudsecuritycompliance/apiv1/cloudsecuritycompliancepb;cloudsecuritycompliancepb\xaa\x02\'Google.Cloud.CloudSecurityCompliance.V1\xca\x02\'Google\\Cloud\\CloudSecurityCompliance\\V1\xea\x02*Google::Cloud::CloudSecurityCompliance::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module CloudSecurityCompliance - module V1 - GenerateFrameworkAuditScopeReportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest").msgclass - GenerateFrameworkAuditScopeReportRequest::Format = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportRequest.Format").enummodule - GenerateFrameworkAuditScopeReportResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.GenerateFrameworkAuditScopeReportResponse").msgclass - ReportSummary = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.ReportSummary").msgclass - CreateFrameworkAuditRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.CreateFrameworkAuditRequest").msgclass - FrameworkAuditDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.FrameworkAuditDestination").msgclass - BucketDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.BucketDestination").msgclass - BucketDestination::Format = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.BucketDestination.Format").enummodule - FrameworkAudit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.FrameworkAudit").msgclass - FrameworkAudit::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.FrameworkAudit.State").enummodule - ListFrameworkAuditsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsRequest").msgclass - ListFrameworkAuditsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.ListFrameworkAuditsResponse").msgclass - GetFrameworkAuditRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.GetFrameworkAuditRequest").msgclass - CloudControlGroupAuditDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.CloudControlGroupAuditDetails").msgclass - FindingDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.FindingDetails").msgclass - ObservationDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.ObservationDetails").msgclass - EvidenceDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.EvidenceDetails").msgclass - CloudControlAuditDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.CloudControlAuditDetails").msgclass - ComplianceState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.ComplianceState").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/audit_services_pb.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/audit_services_pb.rb deleted file mode 100644 index 06e75518fc61..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/audit_services_pb.rb +++ /dev/null @@ -1,51 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/cloudsecuritycompliance/v1/audit.proto for package 'Google.Cloud.CloudSecurityCompliance.V1' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/cloud/cloudsecuritycompliance/v1/audit_pb' - -module Google - module Cloud - module CloudSecurityCompliance - module V1 - module Audit - # Service describing handlers for resources - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.cloudsecuritycompliance.v1.Audit' - - # Generates an audit scope report for a framework. - rpc :GenerateFrameworkAuditScopeReport, ::Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportRequest, ::Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportResponse - # Creates an audit scope report for a framework. - rpc :CreateFrameworkAudit, ::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkAuditRequest, ::Google::Longrunning::Operation - # Lists the framework audits for a given organization, folder, or project. - rpc :ListFrameworkAudits, ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkAuditsRequest, ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkAuditsResponse - # Gets the details for a framework audit. - rpc :GetFrameworkAudit, ::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkAuditRequest, ::Google::Cloud::CloudSecurityCompliance::V1::FrameworkAudit - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/cm_enrollment_service_pb.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/cm_enrollment_service_pb.rb deleted file mode 100644 index 6e6198235508..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/cm_enrollment_service_pb.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/cloudsecuritycompliance/v1/cm_enrollment_service.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\nCgoogle/cloud/cloudsecuritycompliance/v1/cm_enrollment_service.proto\x12\'google.cloud.cloudsecuritycompliance.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xa4\x01\n\x19UpdateCmEnrollmentRequest\x12Q\n\rcm_enrollment\x18\x01 \x01(\x0b\x32\x35.google.cloud.cloudsecuritycompliance.v1.CmEnrollmentB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"r\n%CalculateEffectiveCmEnrollmentRequest\x12I\n\x04name\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\n3cloudsecuritycompliance.googleapis.com/CmEnrollment\"\xd8\x02\n\x0c\x43mEnrollment\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x15\n\x08\x65nrolled\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12O\n\x0c\x61udit_config\x18\x03 \x01(\x0b\x32\x34.google.cloud.cloudsecuritycompliance.v1.AuditConfigB\x03\xe0\x41\x01:\xcc\x01\xea\x41\xc8\x01\n3cloudsecuritycompliance.googleapis.com/CmEnrollment\x12>organizations/{organization}/locations/{location}/cmEnrollment\x12\x34projects/{project}/locations/{location}/cmEnrollment*\rcmEnrollments2\x0c\x63mEnrollment\"v\n&CalculateEffectiveCmEnrollmentResponse\x12L\n\rcm_enrollment\x18\x01 \x01(\x0b\x32\x35.google.cloud.cloudsecuritycompliance.v1.CmEnrollment\"\xbf\x01\n\x0b\x41uditConfig\x12\x65\n\x0c\x64\x65stinations\x18\x01 \x03(\x0b\x32J.google.cloud.cloudsecuritycompliance.v1.AuditConfig.CmEligibleDestinationB\x03\xe0\x41\x02\x1aI\n\x15\x43mEligibleDestination\x12\x14\n\ngcs_bucket\x18\x01 \x01(\tH\x00\x42\x1a\n\x18\x63m_eligible_destinations2\xa3\x07\n\x13\x43mEnrollmentService\x12\xa4\x03\n\x12UpdateCmEnrollment\x12\x42.google.cloud.cloudsecuritycompliance.v1.UpdateCmEnrollmentRequest\x1a\x35.google.cloud.cloudsecuritycompliance.v1.CmEnrollment\"\x92\x02\xda\x41\x19\x63m_enrollment,update_mask\x82\xd3\xe4\x93\x02\xef\x01\x32\x41/v1/{cm_enrollment.name=organizations/*/locations/*/cmEnrollment}:\rcm_enrollmentZL2;/v1/{cm_enrollment.name=folders/*/locations/*/cmEnrollment}:\rcm_enrollmentZM2projects/{project}/locations/{location}/frameworks/{framework}*\nframeworks2\tframework\"\x95\x01\n\x13\x43loudControlDetails\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1e\n\x11major_revision_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02\x12K\n\nparameters\x18\x04 \x03(\x0b\x32\x32.google.cloud.cloudsecuritycompliance.v1.ParameterB\x03\xe0\x41\x01\"\x9c\x01\n\x12\x46rameworkReference\x12K\n\tframework\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0cloudsecuritycompliance.googleapis.com/Framework\x12#\n\x11major_revision_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x14\n\x12_major_revision_id\"q\n\tParameter\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12Q\n\x0fparameter_value\x18\x02 \x01(\x0b\x32\x33.google.cloud.cloudsecuritycompliance.v1.ParamValueB\x03\xe0\x41\x02\"\xa1\t\n\x0c\x43loudControl\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x08\x12\x1e\n\x11major_revision_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x62\n\x1bsupported_enforcement_modes\x18\x07 \x03(\x0e\x32\x38.google.cloud.cloudsecuritycompliance.v1.EnforcementModeB\x03\xe0\x41\x03\x12S\n\x0eparameter_spec\x18\x08 \x03(\x0b\x32\x36.google.cloud.cloudsecuritycompliance.v1.ParameterSpecB\x03\xe0\x41\x01\x12\x41\n\x05rules\x18\t \x03(\x0b\x32-.google.cloud.cloudsecuritycompliance.v1.RuleB\x03\xe0\x41\x01\x12H\n\x08severity\x18\x0b \x01(\x0e\x32\x31.google.cloud.cloudsecuritycompliance.v1.SeverityB\x03\xe0\x41\x01\x12\x1d\n\x10\x66inding_category\x18\x0c \x01(\tB\x03\xe0\x41\x01\x12^\n\x19supported_cloud_providers\x18\r \x03(\x0e\x32\x36.google.cloud.cloudsecuritycompliance.v1.CloudProviderB\x03\xe0\x41\x01\x12\x1f\n\x12related_frameworks\x18\x0e \x03(\tB\x03\xe0\x41\x03\x12\x1e\n\x11remediation_steps\x18\x0f \x01(\tB\x03\xe0\x41\x01\x12V\n\ncategories\x18\x10 \x03(\x0e\x32=.google.cloud.cloudsecuritycompliance.v1.CloudControlCategoryB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x11 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12i\n\x1fsupported_target_resource_types\x18\x12 \x03(\x0e\x32;.google.cloud.cloudsecuritycompliance.v1.TargetResourceTypeB\x03\xe0\x41\x01\"6\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06\x43USTOM\x10\x01\x12\x0c\n\x08\x42UILT_IN\x10\x02:\xee\x01\xea\x41\xea\x01\n3cloudsecuritycompliance.googleapis.com/CloudControl\x12Oorganizations/{organization}/locations/{location}/cloudControls/{cloud_control}\x12\x45projects/{project}/locations/{location}/cloudControls/{cloud_control}*\rcloudControls2\x0c\x63loudControl\"\x8e\x05\n\rParameterSpec\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bis_required\x18\x04 \x01(\x08\x42\x03\xe0\x41\x02\x12Y\n\nvalue_type\x18\x05 \x01(\x0e\x32@.google.cloud.cloudsecuritycompliance.v1.ParameterSpec.ValueTypeB\x03\xe0\x41\x02\x12O\n\rdefault_value\x18\x06 \x01(\x0b\x32\x33.google.cloud.cloudsecuritycompliance.v1.ParamValueB\x03\xe0\x41\x01\x12\x63\n\x12substitution_rules\x18\x07 \x03(\x0b\x32\x42.google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRuleB\x03\xe0\x41\x01\x12S\n\x0esub_parameters\x18\x08 \x03(\x0b\x32\x36.google.cloud.cloudsecuritycompliance.v1.ParameterSpecB\x03\xe0\x41\x01\x12L\n\nvalidation\x18\t \x01(\x0b\x32\x33.google.cloud.cloudsecuritycompliance.v1.ValidationB\x03\xe0\x41\x01\"g\n\tValueType\x12\x1a\n\x16VALUE_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06STRING\x10\x03\x12\x0b\n\x07\x42OOLEAN\x10\x04\x12\x0e\n\nSTRINGLIST\x10\x05\x12\n\n\x06NUMBER\x10\x06\x12\t\n\x05ONEOF\x10\x07\"\x86\x02\n\nValidation\x12P\n\x0e\x61llowed_values\x18\x01 \x01(\x0b\x32\x36.google.cloud.cloudsecuritycompliance.v1.AllowedValuesH\x00\x12\x46\n\tint_range\x18\x02 \x01(\x0b\x32\x31.google.cloud.cloudsecuritycompliance.v1.IntRangeH\x00\x12P\n\x0eregexp_pattern\x18\x03 \x01(\x0b\x32\x36.google.cloud.cloudsecuritycompliance.v1.RegexpPatternH\x00\x42\x0c\n\nconstraint\"Y\n\rAllowedValues\x12H\n\x06values\x18\x01 \x03(\x0b\x32\x33.google.cloud.cloudsecuritycompliance.v1.ParamValueB\x03\xe0\x41\x02\"%\n\rRegexpPattern\x12\x14\n\x07pattern\x18\x01 \x01(\tB\x03\xe0\x41\x02\".\n\x08IntRange\x12\x10\n\x03min\x18\x01 \x01(\x03\x42\x03\xe0\x41\x02\x12\x10\n\x03max\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02\"!\n\nStringList\x12\x13\n\x06values\x18\x01 \x03(\tB\x03\xe0\x41\x02\"\x90\x02\n\nParamValue\x12\x1b\n\x0cstring_value\x18\x03 \x01(\tB\x03\xe0\x41\x01H\x00\x12\x19\n\nbool_value\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01H\x00\x12U\n\x11string_list_value\x18\x05 \x01(\x0b\x32\x33.google.cloud.cloudsecuritycompliance.v1.StringListB\x03\xe0\x41\x01H\x00\x12\x1b\n\x0cnumber_value\x18\x06 \x01(\x01\x42\x03\xe0\x41\x01H\x00\x12N\n\x0boneof_value\x18\x07 \x01(\x0b\x32\x32.google.cloud.cloudsecuritycompliance.v1.ParameterB\x03\xe0\x41\x01H\x00\x42\x06\n\x04kind\"\x8a\x02\n\x19ParameterSubstitutionRule\x12m\n\x1dplaceholder_substitution_rule\x18\x01 \x01(\x0b\x32\x44.google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRuleH\x00\x12i\n\x1b\x61ttribute_substitution_rule\x18\x02 \x01(\x0b\x32\x42.google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRuleH\x00\x42\x13\n\x11substitution_type\".\n\x19\x41ttributeSubstitutionRule\x12\x11\n\tattribute\x18\x01 \x01(\t\"0\n\x1bPlaceholderSubstitutionRule\x12\x11\n\tattribute\x18\x01 \x01(\t\"\xdd\x01\n\x04Rule\x12P\n\x0e\x63\x65l_expression\x18\x01 \x01(\x0b\x32\x36.google.cloud.cloudsecuritycompliance.v1.CELExpressionH\x00\x12\x18\n\x0b\x64\x65scription\x18\n \x01(\tB\x03\xe0\x41\x01\x12W\n\x11rule_action_types\x18\x10 \x03(\x0e\x32\x37.google.cloud.cloudsecuritycompliance.v1.RuleActionTypeB\x03\xe0\x41\x02\x42\x10\n\x0eimplementation\"\x8a\x01\n\rCELExpression\x12T\n\x15resource_types_values\x18\x03 \x01(\x0b\x32\x33.google.cloud.cloudsecuritycompliance.v1.StringListH\x00\x12\x17\n\nexpression\x18\x01 \x01(\tB\x03\xe0\x41\x02\x42\n\n\x08\x63riteria\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\"\xa3\x08\n\x07\x43ontrol\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12L\n\x06\x66\x61mily\x18\x05 \x01(\x0e\x32\x37.google.cloud.cloudsecuritycompliance.v1.Control.FamilyB\x03\xe0\x41\x03\x12S\n\x0e\x63ontrol_family\x18\x06 \x01(\x0b\x32\x36.google.cloud.cloudsecuritycompliance.v1.ControlFamilyB\x03\xe0\x41\x03\x12n\n\x13responsibility_type\x18\x07 \x01(\x0e\x32L.google.cloud.cloudsecuritycompliance.v1.RegulatoryControlResponsibilityTypeB\x03\xe0\x41\x03\x12.\n!google_responsibility_description\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x31\n$google_responsibility_implementation\x18\t \x01(\tB\x03\xe0\x41\x03\x12\x30\n#customer_responsibility_description\x18\n \x01(\tB\x03\xe0\x41\x03\x12\x33\n&customer_responsibility_implementation\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12.\n!shared_responsibility_description\x18\x0c \x01(\tB\x03\xe0\x41\x03\x12#\n\x16\x61\x64\x64itional_content_uri\x18\r \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x12related_frameworks\x18\x0e \x03(\tB\x03\xe0\x41\x03\"\xb0\x01\n\x06\x46\x61mily\x12\x16\n\x12\x46\x41MILY_UNSPECIFIED\x10\x00\x12\x06\n\x02\x41\x43\x10\x01\x12\x06\n\x02\x41T\x10\x02\x12\x06\n\x02\x41U\x10\x03\x12\x06\n\x02\x43\x41\x10\x04\x12\x06\n\x02\x43M\x10\x05\x12\x06\n\x02\x43P\x10\x06\x12\x06\n\x02IA\x10\x07\x12\x06\n\x02IR\x10\x08\x12\x06\n\x02MA\x10\t\x12\x06\n\x02MP\x10\n\x12\x06\n\x02PE\x10\x0b\x12\x06\n\x02PL\x10\x0c\x12\x06\n\x02PS\x10\r\x12\x06\n\x02RA\x10\x0e\x12\x06\n\x02SA\x10\x0f\x12\x06\n\x02SC\x10\x10\x12\x06\n\x02SI\x10\x11\x12\x06\n\x02SR\x10\x12:\xc9\x01\xea\x41\xc5\x01\n.cloudsecuritycompliance.googleapis.com/Control\x12\x44organizations/{organization}/locations/{location}/controls/{control}\x12:projects/{project}/locations/{location}/controls/{control}*\x08\x63ontrols2\x07\x63ontrol\"8\n\rControlFamily\x12\x11\n\tfamily_id\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t*\x83\x01\n#RegulatoryControlResponsibilityType\x12\x36\n2REGULATORY_CONTROL_RESPONSIBILITY_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06GOOGLE\x10\x01\x12\x0c\n\x08\x43USTOMER\x10\x02\x12\n\n\x06SHARED\x10\x03*]\n\x0f\x45nforcementMode\x12 \n\x1c\x45NFORCEMENT_MODE_UNSPECIFIED\x10\x00\x12\x0e\n\nPREVENTIVE\x10\x01\x12\r\n\tDETECTIVE\x10\x02\x12\t\n\x05\x41UDIT\x10\x03*\xb1\x01\n\x11\x46rameworkCategory\x12\"\n\x1e\x46RAMEWORK_CATEGORY_UNSPECIFIED\x10\x00\x12\x1d\n\x19INDUSTRY_DEFINED_STANDARD\x10\x01\x12\x15\n\x11\x41SSURED_WORKLOADS\x10\x02\x12\x11\n\rDATA_SECURITY\x10\x03\x12\x19\n\x15GOOGLE_BEST_PRACTICES\x10\x04\x12\x14\n\x10\x43USTOM_FRAMEWORK\x10\x05*\xfe\x05\n\x14\x43loudControlCategory\x12&\n\"CLOUD_CONTROL_CATEGORY_UNSPECIFIED\x10\x00\x12\x1e\n\x1a\x43\x43_CATEGORY_INFRASTRUCTURE\x10\x01\x12\'\n#CC_CATEGORY_ARTIFICIAL_INTELLIGENCE\x10\x02\x12!\n\x1d\x43\x43_CATEGORY_PHYSICAL_SECURITY\x10\x03\x12\x1d\n\x19\x43\x43_CATEGORY_DATA_SECURITY\x10\x04\x12 \n\x1c\x43\x43_CATEGORY_NETWORK_SECURITY\x10\x05\x12#\n\x1f\x43\x43_CATEGORY_INCIDENT_MANAGEMENT\x10\x06\x12.\n*CC_CATEGORY_IDENTITY_AND_ACCESS_MANAGEMENT\x10\x07\x12\x1a\n\x16\x43\x43_CATEGORY_ENCRYPTION\x10\x08\x12\x32\n.CC_CATEGORY_LOGS_MANAGEMENT_AND_INFRASTRUCTURE\x10\t\x12&\n\"CC_CATEGORY_HR_ADMIN_AND_PROCESSES\x10\n\x12\x38\n4CC_CATEGORY_THIRD_PARTY_AND_SUB_PROCESSOR_MANAGEMENT\x10\x0b\x12%\n!CC_CATEGORY_LEGAL_AND_DISCLOSURES\x10\x0c\x12(\n$CC_CATEGORY_VULNERABILITY_MANAGEMENT\x10\r\x12\x17\n\x13\x43\x43_CATEGORY_PRIVACY\x10\x0e\x12\x14\n\x10\x43\x43_CATEGORY_BCDR\x10\x0f\x12\x1c\n\x18\x43\x43_CATEGORY_ADMIN_ACCESS\x10\x10\x12\x1e\n\x1a\x43\x43_CATEGORY_DATA_RESIDENCY\x10\x11\x12*\n&CC_CATEGORY_RESOURCE_USAGE_RESTRICTION\x10\x12\x12 \n\x1c\x43\x43_CATEGORY_SERVICE_SPECIFIC\x10\x13*L\n\rCloudProvider\x12\x1e\n\x1a\x43LOUD_PROVIDER_UNSPECIFIED\x10\x00\x12\x07\n\x03\x41WS\x10\x01\x12\t\n\x05\x41ZURE\x10\x02\x12\x07\n\x03GCP\x10\x03*Q\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43RITICAL\x10\x01\x12\x08\n\x04HIGH\x10\x02\x12\n\n\x06MEDIUM\x10\x03\x12\x07\n\x03LOW\x10\x04*\x8f\x01\n\x0eRuleActionType\x12 \n\x1cRULE_ACTION_TYPE_UNSPECIFIED\x10\x00\x12\x1f\n\x1bRULE_ACTION_TYPE_PREVENTIVE\x10\x01\x12\x1e\n\x1aRULE_ACTION_TYPE_DETECTIVE\x10\x02\x12\x1a\n\x16RULE_ACTION_TYPE_AUDIT\x10\x03*\xcd\x01\n\x12TargetResourceType\x12$\n TARGET_RESOURCE_TYPE_UNSPECIFIED\x10\x00\x12 \n\x1cTARGET_RESOURCE_CRM_TYPE_ORG\x10\x01\x12#\n\x1fTARGET_RESOURCE_CRM_TYPE_FOLDER\x10\x02\x12$\n TARGET_RESOURCE_CRM_TYPE_PROJECT\x10\x03\x12$\n TARGET_RESOURCE_TYPE_APPLICATION\x10\x04\x42\x97\x03\n+com.google.cloud.cloudsecuritycompliance.v1B\x0b\x43ommonProtoP\x01Zecloud.google.com/go/cloudsecuritycompliance/apiv1/cloudsecuritycompliancepb;cloudsecuritycompliancepb\xaa\x02\'Google.Cloud.CloudSecurityCompliance.V1\xca\x02\'Google\\Cloud\\CloudSecurityCompliance\\V1\xea\x02*Google::Cloud::CloudSecurityCompliance::V1\xea\x41p\n;cloudsecuritycompliance.googleapis.com/OrganizationLocation\x12\x31organizations/{organization}/locations/{location}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module CloudSecurityCompliance - module V1 - Framework = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.Framework").msgclass - Framework::FrameworkType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType").enummodule - CloudControlDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.CloudControlDetails").msgclass - FrameworkReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.FrameworkReference").msgclass - Parameter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.Parameter").msgclass - CloudControl = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.CloudControl").msgclass - CloudControl::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.CloudControl.Type").enummodule - ParameterSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.ParameterSpec").msgclass - ParameterSpec::ValueType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.ParameterSpec.ValueType").enummodule - Validation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.Validation").msgclass - AllowedValues = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.AllowedValues").msgclass - RegexpPattern = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.RegexpPattern").msgclass - IntRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.IntRange").msgclass - StringList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.StringList").msgclass - ParamValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.ParamValue").msgclass - ParameterSubstitutionRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.ParameterSubstitutionRule").msgclass - AttributeSubstitutionRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.AttributeSubstitutionRule").msgclass - PlaceholderSubstitutionRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.PlaceholderSubstitutionRule").msgclass - Rule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.Rule").msgclass - CELExpression = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.CELExpression").msgclass - OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.OperationMetadata").msgclass - Control = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.Control").msgclass - Control::Family = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.Control.Family").enummodule - ControlFamily = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.ControlFamily").msgclass - RegulatoryControlResponsibilityType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.RegulatoryControlResponsibilityType").enummodule - EnforcementMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.EnforcementMode").enummodule - FrameworkCategory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.FrameworkCategory").enummodule - CloudControlCategory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.CloudControlCategory").enummodule - CloudProvider = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.CloudProvider").enummodule - Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.Severity").enummodule - RuleActionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.RuleActionType").enummodule - TargetResourceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.TargetResourceType").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/config_pb.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/config_pb.rb deleted file mode 100644 index 2d01f26a779a..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/config_pb.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/cloudsecuritycompliance/v1/config.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/cloudsecuritycompliance/v1/common_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n4google/cloud/cloudsecuritycompliance/v1/config.proto\x12\'google.cloud.cloudsecuritycompliance.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x34google/cloud/cloudsecuritycompliance/v1/common.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\x92\x01\n\x15ListFrameworksRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\x12\x30\x63loudsecuritycompliance.googleapis.com/Framework\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"y\n\x16ListFrameworksResponse\x12\x46\n\nframeworks\x18\x01 \x03(\x0b\x32\x32.google.cloud.cloudsecuritycompliance.v1.Framework\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"}\n\x13GetFrameworkRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0cloudsecuritycompliance.googleapis.com/Framework\x12\x1e\n\x11major_revision_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01\"\xc9\x01\n\x16\x43reateFrameworkRequest\x12H\n\x06parent\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\x12\x30\x63loudsecuritycompliance.googleapis.com/Framework\x12\x19\n\x0c\x66ramework_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12J\n\tframework\x18\x03 \x01(\x0b\x32\x32.google.cloud.cloudsecuritycompliance.v1.FrameworkB\x03\xe0\x41\x02\"\xba\x01\n\x16UpdateFrameworkRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12J\n\tframework\x18\x02 \x01(\x0b\x32\x32.google.cloud.cloudsecuritycompliance.v1.FrameworkB\x03\xe0\x41\x02\x12\x1e\n\x11major_revision_id\x18\x03 \x01(\x03\x42\x03\xe0\x41\x01\"`\n\x16\x44\x65leteFrameworkRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0cloudsecuritycompliance.googleapis.com/Framework\"\x98\x01\n\x18ListCloudControlsRequest\x12K\n\x06parent\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\x12\x33\x63loudsecuritycompliance.googleapis.com/CloudControl\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x83\x01\n\x19ListCloudControlsResponse\x12M\n\x0e\x63loud_controls\x18\x01 \x03(\x0b\x32\x35.google.cloud.cloudsecuritycompliance.v1.CloudControl\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x83\x01\n\x16GetCloudControlRequest\x12I\n\x04name\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\n3cloudsecuritycompliance.googleapis.com/CloudControl\x12\x1e\n\x11major_revision_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01\"\xda\x01\n\x19\x43reateCloudControlRequest\x12K\n\x06parent\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\x12\x33\x63loudsecuritycompliance.googleapis.com/CloudControl\x12\x1d\n\x10\x63loud_control_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12Q\n\rcloud_control\x18\x03 \x01(\x0b\x32\x35.google.cloud.cloudsecuritycompliance.v1.CloudControlB\x03\xe0\x41\x02\"\xa4\x01\n\x19UpdateCloudControlRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12Q\n\rcloud_control\x18\x02 \x01(\x0b\x32\x35.google.cloud.cloudsecuritycompliance.v1.CloudControlB\x03\xe0\x41\x02\"f\n\x19\x44\x65leteCloudControlRequest\x12I\n\x04name\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\n3cloudsecuritycompliance.googleapis.com/CloudControl2\xf7\x16\n\x06\x43onfig\x12\x89\x02\n\x0eListFrameworks\x12>.google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest\x1a?.google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse\"v\xda\x41\x06parent\x82\xd3\xe4\x93\x02g\x12\x33/v1/{parent=organizations/*/locations/*}/frameworksZ0\x12./v1/{parent=projects/*/locations/*}/frameworks\x12\xf6\x01\n\x0cGetFramework\x12<.google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest\x1a\x32.google.cloud.cloudsecuritycompliance.v1.Framework\"t\xda\x41\x04name\x82\xd3\xe4\x93\x02g\x12\x33/v1/{name=organizations/*/locations/*/frameworks/*}Z0\x12./v1/{name=projects/*/locations/*/frameworks/*}\x12\xac\x02\n\x0f\x43reateFramework\x12?.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest\x1a\x32.google.cloud.cloudsecuritycompliance.v1.Framework\"\xa3\x01\xda\x41\x1dparent,framework,framework_id\x82\xd3\xe4\x93\x02}\"3/v1/{parent=organizations/*/locations/*}/frameworks:\tframeworkZ;\"./v1/{parent=projects/*/locations/*}/frameworks:\tframework\x12\xb9\x02\n\x0fUpdateFramework\x12?.google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest\x1a\x32.google.cloud.cloudsecuritycompliance.v1.Framework\"\xb0\x01\xda\x41\x15\x66ramework,update_mask\x82\xd3\xe4\x93\x02\x91\x01\x32=/v1/{framework.name=organizations/*/locations/*/frameworks/*}:\tframeworkZE28/v1/{framework.name=projects/*/locations/*/frameworks/*}:\tframework\x12\xe0\x01\n\x0f\x44\x65leteFramework\x12?.google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest\x1a\x16.google.protobuf.Empty\"t\xda\x41\x04name\x82\xd3\xe4\x93\x02g*3/v1/{name=organizations/*/locations/*/frameworks/*}Z0*./v1/{name=projects/*/locations/*/frameworks/*}\x12\x98\x02\n\x11ListCloudControls\x12\x41.google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest\x1a\x42.google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse\"|\xda\x41\x06parent\x82\xd3\xe4\x93\x02m\x12\x36/v1/{parent=organizations/*/locations/*}/cloudControlsZ3\x12\x31/v1/{parent=projects/*/locations/*}/cloudControls\x12\x85\x02\n\x0fGetCloudControl\x12?.google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest\x1a\x35.google.cloud.cloudsecuritycompliance.v1.CloudControl\"z\xda\x41\x04name\x82\xd3\xe4\x93\x02m\x12\x36/v1/{name=organizations/*/locations/*/cloudControls/*}Z3\x12\x31/v1/{name=projects/*/locations/*/cloudControls/*}\x12\xcc\x02\n\x12\x43reateCloudControl\x12\x42.google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest\x1a\x35.google.cloud.cloudsecuritycompliance.v1.CloudControl\"\xba\x01\xda\x41%parent,cloud_control,cloud_control_id\x82\xd3\xe4\x93\x02\x8b\x01\"6/v1/{parent=organizations/*/locations/*}/cloudControls:\rcloud_controlZB\"1/v1/{parent=projects/*/locations/*}/cloudControls:\rcloud_control\x12\xdc\x02\n\x12UpdateCloudControl\x12\x42.google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest\x1a\x35.google.cloud.cloudsecuritycompliance.v1.CloudControl\"\xca\x01\xda\x41\x19\x63loud_control,update_mask\x82\xd3\xe4\x93\x02\xa7\x01\x32\x44/v1/{cloud_control.name=organizations/*/locations/*/cloudControls/*}:\rcloud_controlZP2?/v1/{cloud_control.name=projects/*/locations/*/cloudControls/*}:\rcloud_control\x12\xec\x01\n\x12\x44\x65leteCloudControl\x12\x42.google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest\x1a\x16.google.protobuf.Empty\"z\xda\x41\x04name\x82\xd3\xe4\x93\x02m*6/v1/{name=organizations/*/locations/*/cloudControls/*}Z3*1/v1/{name=projects/*/locations/*/cloudControls/*}\x1aZ\xca\x41&cloudsecuritycompliance.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xa4\x02\n+com.google.cloud.cloudsecuritycompliance.v1B\x0b\x43onfigProtoP\x01Zecloud.google.com/go/cloudsecuritycompliance/apiv1/cloudsecuritycompliancepb;cloudsecuritycompliancepb\xaa\x02\'Google.Cloud.CloudSecurityCompliance.V1\xca\x02\'Google\\Cloud\\CloudSecurityCompliance\\V1\xea\x02*Google::Cloud::CloudSecurityCompliance::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module CloudSecurityCompliance - module V1 - ListFrameworksRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.ListFrameworksRequest").msgclass - ListFrameworksResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.ListFrameworksResponse").msgclass - GetFrameworkRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.GetFrameworkRequest").msgclass - CreateFrameworkRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.CreateFrameworkRequest").msgclass - UpdateFrameworkRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.UpdateFrameworkRequest").msgclass - DeleteFrameworkRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkRequest").msgclass - ListCloudControlsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.ListCloudControlsRequest").msgclass - ListCloudControlsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.ListCloudControlsResponse").msgclass - GetCloudControlRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.GetCloudControlRequest").msgclass - CreateCloudControlRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.CreateCloudControlRequest").msgclass - UpdateCloudControlRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.UpdateCloudControlRequest").msgclass - DeleteCloudControlRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.DeleteCloudControlRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/config_services_pb.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/config_services_pb.rb deleted file mode 100644 index 63e4655503da..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/config_services_pb.rb +++ /dev/null @@ -1,120 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/cloudsecuritycompliance/v1/config.proto for package 'Google.Cloud.CloudSecurityCompliance.V1' -# Original file comments: -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/cloud/cloudsecuritycompliance/v1/config_pb' - -module Google - module Cloud - module CloudSecurityCompliance - module V1 - module Config - # Config Service manages compliance frameworks, cloud controls, and their - # configurations. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.cloudsecuritycompliance.v1.Config' - - # Lists the frameworks (both built-in and custom) that are available within - # the parent resource. The latest major version of each framework is - # returned. - # This method supports pagination. - rpc :ListFrameworks, ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworksRequest, ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworksResponse - # Gets details about a framework. - # This method retrieves the latest major version of the framework. - # - # To retrieve a specific major version, include `major_revision_id` in - # the request. - rpc :GetFramework, ::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkRequest, ::Google::Cloud::CloudSecurityCompliance::V1::Framework - # Creates a custom framework in a given parent resource. - # You can't create built-in frameworks because those are managed by - # Google. - rpc :CreateFramework, ::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkRequest, ::Google::Cloud::CloudSecurityCompliance::V1::Framework - # Updates a custom framework. - # This method allows for partial updates of a framework. Use the - # `update_mask` to specify which fields to update. Consider the following: - # - # - If you provide an `update_mask`, only the fields that are specified - # in the mask are updated. - # - If you don't provide an `update_mask`, all the fields that are present - # in the request's `framework` body are used to overwrite the existing - # resource. - # - # You can only update frameworks with the `CUSTOM` type. - # A successful update creates a new version of the framework. - rpc :UpdateFramework, ::Google::Cloud::CloudSecurityCompliance::V1::UpdateFrameworkRequest, ::Google::Cloud::CloudSecurityCompliance::V1::Framework - # Deletes a custom framework, including all its major and - # minor revisions. Consider the following: - # - # - You can't delete built-in frameworks. You can only delete frameworks - # with type `CUSTOM`. - # - You can't delete frameworks that are deployed to a resource. - # - You can't restore a deleted framework. This action is permanent. - rpc :DeleteFramework, ::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkRequest, ::Google::Protobuf::Empty - # Lists the cloud controls (both built-in and custom) that are available - # in a given parent resource. The latest major version of each cloud control - # is returned. - # This method supports pagination. - rpc :ListCloudControls, ::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlsRequest, ::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlsResponse - # Gets details about a cloud control. - # This method retrieves the latest major version of a cloud control that - # you identify by name. - # - # By default, the latest major version of the cloud control is returned. - # To retrieve a specific major version, include `major_revision_id` in - # the request. - rpc :GetCloudControl, ::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlRequest, ::Google::Cloud::CloudSecurityCompliance::V1::CloudControl - # Creates a custom cloud control in a given parent - # resource. - # You can't create built-in cloud controls because those are managed by - # Google. - rpc :CreateCloudControl, ::Google::Cloud::CloudSecurityCompliance::V1::CreateCloudControlRequest, ::Google::Cloud::CloudSecurityCompliance::V1::CloudControl - # Updates a custom cloud control. - # This method allows for partial updates of a cloud control. Use the - # `update_mask` to specify which fields to update. Consider the following: - # - # - If you provide an `update_mask`, only the fields that are specified - # in the mask are updated. - # - If you don't provide an `update_mask`, all the fields that are present - # in the request's `cloud_control` body are used to overwrite the existing - # resource. - # - # You can only update cloud controls with the `CUSTOM` type. - # A successful update creates a new version of the cloud control. - rpc :UpdateCloudControl, ::Google::Cloud::CloudSecurityCompliance::V1::UpdateCloudControlRequest, ::Google::Cloud::CloudSecurityCompliance::V1::CloudControl - # Deletes a custom cloud control, including all its - # major and minor revisions. Consider the following: - # - # - You can't delete built-in cloud controls. You can only delete cloud - # controls with type `CUSTOM`. - # - You can't delete cloud controls if any of the versions are referenced - # by a framework. - # - You can't restore a deleted cloud control. This action is permanent. - rpc :DeleteCloudControl, ::Google::Cloud::CloudSecurityCompliance::V1::DeleteCloudControlRequest, ::Google::Protobuf::Empty - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/deployment_pb.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/deployment_pb.rb deleted file mode 100644 index ed79434c5c14..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/deployment_pb.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/cloudsecuritycompliance/v1/deployment.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/cloudsecuritycompliance/v1/common_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n8google/cloud/cloudsecuritycompliance/v1/deployment.proto\x12\'google.cloud.cloudsecuritycompliance.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x34google/cloud/cloudsecuritycompliance/v1/common.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa7\x08\n\x13\x46rameworkDeployment\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x62\n\x16target_resource_config\x18\x02 \x01(\x0b\x32=.google.cloud.cloudsecuritycompliance.v1.TargetResourceConfigB\x03\xe0\x41\x02\x12%\n\x18\x63omputed_target_resource\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12S\n\tframework\x18\x04 \x01(\x0b\x32;.google.cloud.cloudsecuritycompliance.v1.FrameworkReferenceB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x62\n\x16\x63loud_control_metadata\x18\x06 \x03(\x0b\x32=.google.cloud.cloudsecuritycompliance.v1.CloudControlMetadataB\x03\xe0\x41\x02\x12W\n\x10\x64\x65ployment_state\x18\x07 \x01(\x0e\x32\x38.google.cloud.cloudsecuritycompliance.v1.DeploymentStateB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\x0b \x01(\tB\x03\xe0\x41\x01\x12)\n\x1ctarget_resource_display_name\x18\r \x01(\tB\x03\xe0\x41\x03\x12z\n#cloud_control_deployment_references\x18\x0e \x03(\x0b\x32H.google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReferenceB\x03\xe0\x41\x03:\x9f\x02\xea\x41\x9b\x02\n:cloudsecuritycompliance.googleapis.com/FrameworkDeployment\x12]organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}\x12Sprojects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}*\x14\x66rameworkDeployments2\x13\x66rameworkDeployment\"\xc5\x08\n\x16\x43loudControlDeployment\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x62\n\x16target_resource_config\x18\x02 \x01(\x0b\x32=.google.cloud.cloudsecuritycompliance.v1.TargetResourceConfigB\x03\xe0\x41\x02\x12\x1c\n\x0ftarget_resource\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x62\n\x16\x63loud_control_metadata\x18\x04 \x01(\x0b\x32=.google.cloud.cloudsecuritycompliance.v1.CloudControlMetadataB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12W\n\x10\x64\x65ployment_state\x18\x06 \x01(\x0e\x32\x38.google.cloud.cloudsecuritycompliance.v1.DeploymentStateB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\t \x01(\tB\x03\xe0\x41\x01\x12g\n#parameter_substituted_cloud_control\x18\n \x01(\x0b\x32\x35.google.cloud.cloudsecuritycompliance.v1.CloudControlB\x03\xe0\x41\x03\x12s\n\x1f\x66ramework_deployment_references\x18\x0b \x03(\x0b\x32\x45.google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReferenceB\x03\xe0\x41\x03\x12)\n\x1ctarget_resource_display_name\x18\x0c \x01(\tB\x03\xe0\x41\x03:\xb6\x02\xea\x41\xb2\x02\n=cloudsecuritycompliance.googleapis.com/CloudControlDeployment\x12\x64organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}\x12Zprojects/{project}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}*\x17\x63loudControlDeployments2\x16\x63loudControlDeployment\"\xc9\x01\n\x14TargetResourceConfig\x12\'\n\x18\x65xisting_target_resource\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x12u\n\x1ftarget_resource_creation_config\x18\x02 \x01(\x0b\x32\x45.google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfigB\x03\xe0\x41\x01H\x00\x42\x11\n\x0fresource_config\"\x88\x02\n\x1cTargetResourceCreationConfig\x12\x64\n\x16\x66older_creation_config\x18\x01 \x01(\x0b\x32=.google.cloud.cloudsecuritycompliance.v1.FolderCreationConfigB\x03\xe0\x41\x01H\x00\x12\x66\n\x17project_creation_config\x18\x02 \x01(\x0b\x32>.google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfigB\x03\xe0\x41\x01H\x00\x42\x1a\n\x18resource_creation_config\"M\n\x14\x46olderCreationConfig\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12 \n\x13\x66older_display_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\"p\n\x15ProjectCreationConfig\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x14project_display_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x1f\n\x12\x62illing_account_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\xd1\x01\n\x14\x43loudControlMetadata\x12`\n\x15\x63loud_control_details\x18\x01 \x01(\x0b\x32<.google.cloud.cloudsecuritycompliance.v1.CloudControlDetailsB\x03\xe0\x41\x02\x12W\n\x10\x65nforcement_mode\x18\x02 \x01(\x0e\x32\x38.google.cloud.cloudsecuritycompliance.v1.EnforcementModeB\x03\xe0\x41\x02\"\xfd\x01\n CreateFrameworkDeploymentRequest\x12R\n\x06parent\x18\x01 \x01(\tBB\xe0\x41\x02\xfa\x41<\x12:cloudsecuritycompliance.googleapis.com/FrameworkDeployment\x12$\n\x17\x66ramework_deployment_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12_\n\x14\x66ramework_deployment\x18\x03 \x01(\x0b\x32<.google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentB\x03\xe0\x41\x02\"\x87\x01\n DeleteFrameworkDeploymentRequest\x12P\n\x04name\x18\x01 \x01(\tBB\xe0\x41\x02\xfa\x41<\n:cloudsecuritycompliance.googleapis.com/FrameworkDeployment\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"q\n\x1dGetFrameworkDeploymentRequest\x12P\n\x04name\x18\x01 \x01(\tBB\xe0\x41\x02\xfa\x41<\n:cloudsecuritycompliance.googleapis.com/FrameworkDeployment\"\xd2\x01\n\x1fListFrameworkDeploymentsRequest\x12R\n\x06parent\x18\x01 \x01(\tBB\xe0\x41\x02\xfa\x41<\x12:cloudsecuritycompliance.googleapis.com/FrameworkDeployment\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x98\x01\n ListFrameworkDeploymentsResponse\x12[\n\x15\x66ramework_deployments\x18\x01 \x03(\x0b\x32<.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"w\n GetCloudControlDeploymentRequest\x12S\n\x04name\x18\x01 \x01(\tBE\xe0\x41\x02\xfa\x41?\n=cloudsecuritycompliance.googleapis.com/CloudControlDeployment\"\xd8\x01\n\"ListCloudControlDeploymentsRequest\x12U\n\x06parent\x18\x01 \x01(\tBE\xe0\x41\x02\xfa\x41?\x12=cloudsecuritycompliance.googleapis.com/CloudControlDeployment\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xa2\x01\n#ListCloudControlDeploymentsResponse\x12\x62\n\x19\x63loud_control_deployments\x18\x01 \x03(\x0b\x32?.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x8a\x01\n\x1f\x43loudControlDeploymentReference\x12g\n\x18\x63loud_control_deployment\x18\x01 \x01(\tBE\xe0\x41\x03\xfa\x41?\n=cloudsecuritycompliance.googleapis.com/CloudControlDeployment\"\x84\x02\n\x1c\x46rameworkDeploymentReference\x12`\n\x14\x66ramework_deployment\x18\x01 \x01(\tBB\xe0\x41\x03\xfa\x41<\n:cloudsecuritycompliance.googleapis.com/FrameworkDeployment\x12]\n\x13\x66ramework_reference\x18\x02 \x01(\x0b\x32;.google.cloud.cloudsecuritycompliance.v1.FrameworkReferenceB\x03\xe0\x41\x01\x12#\n\x16\x66ramework_display_name\x18\x03 \x01(\tB\x03\xe0\x41\x01*\xbb\x02\n\x0f\x44\x65ploymentState\x12 \n\x1c\x44\x45PLOYMENT_STATE_UNSPECIFIED\x10\x00\x12\x1f\n\x1b\x44\x45PLOYMENT_STATE_VALIDATING\x10\x01\x12\x1d\n\x19\x44\x45PLOYMENT_STATE_CREATING\x10\x02\x12\x1d\n\x19\x44\x45PLOYMENT_STATE_DELETING\x10\x03\x12\x1d\n\x19\x44\x45PLOYMENT_STATE_UPDATING\x10\x08\x12\x1b\n\x17\x44\x45PLOYMENT_STATE_FAILED\x10\x04\x12\x1a\n\x16\x44\x45PLOYMENT_STATE_READY\x10\x05\x12\'\n#DEPLOYMENT_STATE_PARTIALLY_DEPLOYED\x10\x06\x12&\n\"DEPLOYMENT_STATE_PARTIALLY_DELETED\x10\x07\x32\x88\x11\n\nDeployment\x12\xbf\x03\n\x19\x43reateFrameworkDeployment\x12I.google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest\x1a\x1d.google.longrunning.Operation\"\xb7\x02\xca\x41P\n\x13\x46rameworkDeployment\x12\x39google.cloud.cloudsecuritycompliance.v1.OperationMetadata\xda\x41\x33parent,framework_deployment,framework_deployment_id\x82\xd3\xe4\x93\x02\xa7\x01\"=/v1/{parent=organizations/*/locations/*}/frameworkDeployments:\x14\x66ramework_deploymentZP\"8/v1/{parent=projects/*/locations/*}/frameworkDeployments:\x14\x66ramework_deployment\x12\xe5\x02\n\x19\x44\x65leteFrameworkDeployment\x12I.google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest\x1a\x1d.google.longrunning.Operation\"\xdd\x01\xca\x41R\n\x15google.protobuf.Empty\x12\x39google.cloud.cloudsecuritycompliance.v1.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02{*=/v1/{name=organizations/*/locations/*/frameworkDeployments/*}Z:*8/v1/{name=projects/*/locations/*/frameworkDeployments/*}\x12\xa9\x02\n\x16GetFrameworkDeployment\x12\x46.google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest\x1a<.google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment\"\x88\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02{\x12=/v1/{name=organizations/*/locations/*/frameworkDeployments/*}Z:\x12\x38/v1/{name=projects/*/locations/*/frameworkDeployments/*}\x12\xbc\x02\n\x18ListFrameworkDeployments\x12H.google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest\x1aI.google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse\"\x8a\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02{\x12=/v1/{parent=organizations/*/locations/*}/frameworkDeploymentsZ:\x12\x38/v1/{parent=projects/*/locations/*}/frameworkDeployments\x12\xb9\x02\n\x19GetCloudControlDeployment\x12I.google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest\x1a?.google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment\"\x8f\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\x81\x01\x12@/v1/{name=organizations/*/locations/*/cloudControlDeployments/*}Z=\x12;/v1/{name=projects/*/locations/*/cloudControlDeployments/*}\x12\xcc\x02\n\x1bListCloudControlDeployments\x12K.google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest\x1aL.google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse\"\x91\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x81\x01\x12@/v1/{parent=organizations/*/locations/*}/cloudControlDeploymentsZ=\x12;/v1/{parent=projects/*/locations/*}/cloudControlDeployments\x1aZ\xca\x41&cloudsecuritycompliance.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xa8\x02\n+com.google.cloud.cloudsecuritycompliance.v1B\x0f\x44\x65ploymentProtoP\x01Zecloud.google.com/go/cloudsecuritycompliance/apiv1/cloudsecuritycompliancepb;cloudsecuritycompliancepb\xaa\x02\'Google.Cloud.CloudSecurityCompliance.V1\xca\x02\'Google\\Cloud\\CloudSecurityCompliance\\V1\xea\x02*Google::Cloud::CloudSecurityCompliance::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module CloudSecurityCompliance - module V1 - FrameworkDeployment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.FrameworkDeployment").msgclass - CloudControlDeployment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.CloudControlDeployment").msgclass - TargetResourceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.TargetResourceConfig").msgclass - TargetResourceCreationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.TargetResourceCreationConfig").msgclass - FolderCreationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.FolderCreationConfig").msgclass - ProjectCreationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.ProjectCreationConfig").msgclass - CloudControlMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.CloudControlMetadata").msgclass - CreateFrameworkDeploymentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.CreateFrameworkDeploymentRequest").msgclass - DeleteFrameworkDeploymentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.DeleteFrameworkDeploymentRequest").msgclass - GetFrameworkDeploymentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.GetFrameworkDeploymentRequest").msgclass - ListFrameworkDeploymentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsRequest").msgclass - ListFrameworkDeploymentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.ListFrameworkDeploymentsResponse").msgclass - GetCloudControlDeploymentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.GetCloudControlDeploymentRequest").msgclass - ListCloudControlDeploymentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsRequest").msgclass - ListCloudControlDeploymentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.ListCloudControlDeploymentsResponse").msgclass - CloudControlDeploymentReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.CloudControlDeploymentReference").msgclass - FrameworkDeploymentReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.FrameworkDeploymentReference").msgclass - DeploymentState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.DeploymentState").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/deployment_services_pb.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/deployment_services_pb.rb deleted file mode 100644 index 1acf4f42b1ed..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/deployment_services_pb.rb +++ /dev/null @@ -1,59 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/cloudsecuritycompliance/v1/deployment.proto for package 'Google.Cloud.CloudSecurityCompliance.V1' -# Original file comments: -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/cloud/cloudsecuritycompliance/v1/deployment_pb' - -module Google - module Cloud - module CloudSecurityCompliance - module V1 - module Deployment - # Deployment service allows users to manage deployments of Frameworks and - # Cloud Controls on a target resource. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.cloudsecuritycompliance.v1.Deployment' - - # Creates a framework deployment in a given parent resource. A - # framework deployment lets you assign a particular framework version to an - # organization, folder, or project so that you can control and monitor - # those resources using the framework's cloud controls. - rpc :CreateFrameworkDeployment, ::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkDeploymentRequest, ::Google::Longrunning::Operation - # Deletes a framework deployment. - rpc :DeleteFrameworkDeployment, ::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkDeploymentRequest, ::Google::Longrunning::Operation - # Gets details about a framework deployment. - rpc :GetFrameworkDeployment, ::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkDeploymentRequest, ::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment - # Lists the framework deployments in a given parent resource. - rpc :ListFrameworkDeployments, ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkDeploymentsRequest, ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkDeploymentsResponse - # Gets details about a cloud control deployment. - rpc :GetCloudControlDeployment, ::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlDeploymentRequest, ::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment - # Lists the cloud conrol deployments in a given parent resource. - rpc :ListCloudControlDeployments, ::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlDeploymentsRequest, ::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlDeploymentsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/monitoring_pb.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/monitoring_pb.rb deleted file mode 100644 index 5eaaaa4c0538..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/monitoring_pb.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/cloudsecuritycompliance/v1/monitoring.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/cloudsecuritycompliance/v1/common_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/timestamp_pb' -require 'google/type/interval_pb' - - -descriptor_data = "\n8google/cloud/cloudsecuritycompliance/v1/monitoring.proto\x12\'google.cloud.cloudsecuritycompliance.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x34google/cloud/cloudsecuritycompliance/v1/common.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1agoogle/type/interval.proto\"\xa6\x02\n\'ListFrameworkComplianceSummariesRequest\x12Y\n\x06parent\x18\x01 \x01(\tBI\xe0\x41\x02\xfa\x41\x43\x12\x41\x63loudsecuritycompliance.googleapis.com/FrameworkComplianceSummary\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12Z\n\x04view\x18\x05 \x01(\x0e\x32G.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummaryViewB\x03\xe0\x41\x01\"\xb5\x01\n(ListFrameworkComplianceSummariesResponse\x12k\n\x1e\x66ramework_compliance_summaries\x18\x01 \x03(\x0b\x32\x43.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x03\"\xf6\x08\n\x19\x46rameworkComplianceReport\x12\x11\n\tframework\x18\x01 \x01(\t\x12\x1d\n\x15\x66ramework_description\x18\x02 \x01(\t\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x65\n\x1a\x63ontrol_assessment_details\x18\x04 \x01(\x0b\x32\x41.google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails\x12X\n\x0e\x66ramework_type\x18\x05 \x01(\x0e\x32@.google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType\x12Y\n\x19supported_cloud_providers\x18\x06 \x03(\x0e\x32\x36.google.cloud.cloudsecuritycompliance.v1.CloudProvider\x12X\n\x14\x66ramework_categories\x18\x07 \x03(\x0e\x32:.google.cloud.cloudsecuritycompliance.v1.FrameworkCategory\x12#\n\x16\x66ramework_display_name\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04name\x18\t \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x11major_revision_id\x18\n \x01(\x03\x12\x19\n\x11minor_revision_id\x18\x0b \x01(\x03\x12_\n\x17target_resource_details\x18\x0c \x03(\x0b\x32>.google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails:\xab\x03\xea\x41\xa7\x03\n@cloudsecuritycompliance.googleapis.com/FrameworkComplianceReport\x12`projects/{project}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}\x12^folders/{folder}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}\x12jorganizations/{organization}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}*\x1a\x66rameworkComplianceReports2\x19\x66rameworkComplianceReport\"\xc7\x01\n%FetchFrameworkComplianceReportRequest\x12V\n\x04name\x18\x01 \x01(\tBH\xe0\x41\x02\xfa\x41\x42\n@cloudsecuritycompliance.googleapis.com/FrameworkComplianceReport\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xe7\x01\n\x1bListFindingSummariesRequest\x12M\n\x06parent\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\x12\x35\x63loudsecuritycompliance.googleapis.com/FindingSummary\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x33\n\x08\x65nd_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x05\x18\x01\xe0\x41\x01\"\x90\x01\n\x1cListFindingSummariesResponse\x12R\n\x11\x66inding_summaries\x18\x01 \x03(\x0b\x32\x37.google.cloud.cloudsecuritycompliance.v1.FindingSummary\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x03\"\xfb\x01\n%ListControlComplianceSummariesRequest\x12W\n\x06parent\x18\x01 \x01(\tBG\xe0\x41\x02\xfa\x41\x41\x12?cloudsecuritycompliance.googleapis.com/ControlComplianceSummary\x12\x33\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x05\x18\x01\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xaf\x01\n&ListControlComplianceSummariesResponse\x12g\n\x1c\x63ontrol_compliance_summaries\x18\x01 \x03(\x0b\x32\x41.google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x03\"\xc6\x01\n)AggregateFrameworkComplianceReportRequest\x12V\n\x04name\x18\x01 \x01(\tBH\xe0\x41\x02\xfa\x41\x42\n@cloudsecuritycompliance.googleapis.com/FrameworkComplianceReport\x12,\n\x08interval\x18\x02 \x01(\x0b\x32\x15.google.type.IntervalB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x98\x01\n*AggregateFrameworkComplianceReportResponse\x12j\n\x1d\x61ggregated_compliance_reports\x18\x01 \x03(\x0b\x32\x43.google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport\"\x90\x01\n\x18\x43ontrolAssessmentDetails\x12\x18\n\x10passing_controls\x18\x01 \x01(\x05\x12\x18\n\x10\x66\x61iling_controls\x18\x02 \x01(\x05\x12!\n\x19\x61ssessed_passing_controls\x18\x03 \x01(\x05\x12\x1d\n\x15not_assessed_controls\x18\x04 \x01(\x05\"\xa0\t\n\x1a\x46rameworkComplianceSummary\x12\x11\n\tframework\x18\x01 \x01(\t\x12\x65\n\x1a\x63ontrol_assessment_details\x18\x02 \x01(\x0b\x32\x41.google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails\x12X\n\x0e\x66ramework_type\x18\x03 \x01(\x0e\x32@.google.cloud.cloudsecuritycompliance.v1.Framework.FrameworkType\x12Y\n\x19supported_cloud_providers\x18\x04 \x03(\x0e\x32\x36.google.cloud.cloudsecuritycompliance.v1.CloudProvider\x12X\n\x14\x66ramework_categories\x18\x05 \x03(\x0e\x32:.google.cloud.cloudsecuritycompliance.v1.FrameworkCategory\x12#\n\x16\x66ramework_display_name\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04name\x18\x07 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x11major_revision_id\x18\x08 \x01(\x03\x12\x19\n\x11minor_revision_id\x18\t \x01(\x03\x12_\n\x17target_resource_details\x18\n \x03(\x0b\x32>.google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails\x12\x1a\n\rfinding_count\x18\x0b \x01(\x03\x42\x03\xe0\x41\x03\x12S\n\x16\x63ontrols_passing_trend\x18\x0c \x01(\x0b\x32..google.cloud.cloudsecuritycompliance.v1.TrendB\x03\xe0\x41\x03:\xb8\x03\xea\x41\xb4\x03\nAcloudsecuritycompliance.googleapis.com/FrameworkComplianceSummary\x12\x63projects/{project}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}\x12\x61\x66olders/{folder}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}\x12morganizations/{organization}/locations/{location}/frameworkComplianceSummaries/{framework_compliance_summary}*\x1c\x66rameworkComplianceSummaries2\x1a\x66rameworkComplianceSummary\"\x8a\x05\n\x0e\x46indingSummary\x12\x18\n\x10\x66inding_category\x18\x01 \x01(\t\x12L\n\rfinding_class\x18\x02 \x01(\x0e\x32\x35.google.cloud.cloudsecuritycompliance.v1.FindingClass\x12\x43\n\x08severity\x18\x03 \x01(\x0e\x32\x31.google.cloud.cloudsecuritycompliance.v1.Severity\x12\x15\n\rfinding_count\x18\x04 \x01(\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1f\n\x12related_frameworks\x18\x06 \x03(\tB\x03\xe0\x41\x01\x12\x11\n\x04name\x18\x07 \x01(\tB\x03\xe0\x41\x08:\xc9\x02\xea\x41\xc5\x02\n5cloudsecuritycompliance.googleapis.com/FindingSummary\x12Jprojects/{project}/locations/{location}/findingSummaries/{finding_summary}\x12Hfolders/{folder}/locations/{location}/findingSummaries/{finding_summary}\x12Torganizations/{organization}/locations/{location}/findingSummaries/{finding_summary}*\x10\x66indingSummaries2\x0e\x66indingSummary\"\x9a\t\n\x18\x43ontrolComplianceSummary\x12\x0f\n\x07\x63ontrol\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12_\n\x18overall_evaluation_state\x18\x04 \x01(\x0e\x32\x38.google.cloud.cloudsecuritycompliance.v1.EvaluationStateB\x03\xe0\x41\x03\x12\x1c\n\x14total_findings_count\x18\x05 \x01(\x05\x12\x1d\n\x15\x63ompliance_frameworks\x18\x06 \x03(\t\x12R\n\x10similar_controls\x18\x07 \x03(\x0b\x32\x38.google.cloud.cloudsecuritycompliance.v1.SimilarControls\x12Z\n\x15\x63loud_control_reports\x18\x08 \x03(\x0b\x32;.google.cloud.cloudsecuritycompliance.v1.CloudControlReport\x12q\n\x1b\x63ontrol_responsibility_type\x18\t \x01(\x0e\x32L.google.cloud.cloudsecuritycompliance.v1.RegulatoryControlResponsibilityType\x12\x17\n\x0fis_fake_control\x18\n \x01(\x08\x12\x11\n\x04name\x18\x0b \x01(\tB\x03\xe0\x41\x08:\xd4\x04\xea\x41\xd0\x04\n?cloudsecuritycompliance.googleapis.com/ControlComplianceSummary\x12\x98\x01projects/{project}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}/controlComplianceSummaries/{control_compliance_summary}\x12\x96\x01\x66olders/{folder}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}/controlComplianceSummaries/{control_compliance_summary}\x12\xa2\x01organizations/{organization}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}/controlComplianceSummaries/{control_compliance_summary}*\x1a\x63ontrolComplianceSummaries2\x18\x63ontrolComplianceSummary\"\x98\x07\n\x12\x43loudControlReport\x12\x7f\n\'manual_cloud_control_assessment_details\x18\r \x01(\x0b\x32L.google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetailsH\x00\x12r\n cloud_control_assessment_details\x18\x0e \x01(\x0b\x32\x46.google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetailsH\x00\x12\x15\n\rcloud_control\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x12\n\ncategories\x18\x06 \x03(\t\x12R\n\x10similar_controls\x18\t \x03(\x0b\x32\x38.google.cloud.cloudsecuritycompliance.v1.SimilarControls\x12V\n\x12\x63loud_control_type\x18\n \x01(\x0e\x32:.google.cloud.cloudsecuritycompliance.v1.CloudControl.Type\x12\x18\n\x10\x66inding_category\x18\x0b \x01(\t\x12<\n\x05rules\x18\x0c \x03(\x0b\x32-.google.cloud.cloudsecuritycompliance.v1.Rule\x12K\n\x10\x66inding_severity\x18\x0f \x01(\x0e\x32\x31.google.cloud.cloudsecuritycompliance.v1.Severity\x12R\n\x10\x65nforcement_mode\x18\x10 \x01(\x0e\x32\x38.google.cloud.cloudsecuritycompliance.v1.EnforcementMode\x12 \n\x18\x63loud_control_deployment\x18\x11 \x01(\t\x12\x19\n\x11major_revision_id\x18\x12 \x01(\x03\x12\x19\n\x11minor_revision_id\x18\x13 \x01(\x03\x12$\n\x1c\x66ramework_major_revision_ids\x18\x14 \x03(\x03\x42\x14\n\x12\x61ssessment_details\"I\n#ManualCloudControlAssessmentDetails\x12\"\n\x1amanual_cloud_control_guide\x18\x01 \x03(\t\"\x90\x01\n\x1d\x43loudControlAssessmentDetails\x12\x16\n\x0e\x66indings_count\x18\x01 \x01(\x05\x12W\n\x10\x65valuation_state\x18\x02 \x01(\x0e\x32\x38.google.cloud.cloudsecuritycompliance.v1.EvaluationStateB\x03\xe0\x41\x03\"8\n\x0fSimilarControls\x12\x11\n\tframework\x18\x01 \x01(\t\x12\x12\n\ncontrol_id\x18\x02 \x01(\t\"\xb4\x01\n\x1a\x41ggregatedComplianceReport\x12\x65\n\x1a\x63ontrol_assessment_details\x18\x01 \x01(\x0b\x32\x41.google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails\x12/\n\x0breport_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x8c\x02\n\x15TargetResourceDetails\x12\x1c\n\x14\x66ramework_deployment\x18\x01 \x01(\t\x12$\n\x1ctarget_resource_display_name\x18\x02 \x01(\t\x12\x17\n\x0ftarget_resource\x18\x03 \x01(\t\x12/\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x19\n\x11major_revision_id\x18\x06 \x01(\x03\x12\x19\n\x11minor_revision_id\x18\x07 \x01(\x03\"U\n\x05Trend\x12\x30\n\x08\x64uration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\x12\x1a\n\rvalue_percent\x18\x02 \x01(\x01\x42\x03\xe0\x41\x03*\x90\x01\n\x0f\x45valuationState\x12 \n\x1c\x45VALUATION_STATE_UNSPECIFIED\x10\x00\x12\x1b\n\x17\x45VALUATION_STATE_PASSED\x10\x01\x12\x1b\n\x17\x45VALUATION_STATE_FAILED\x10\x02\x12!\n\x1d\x45VALUATION_STATE_NOT_ASSESSED\x10\x03*\xd9\x01\n\x0c\x46indingClass\x12\x1d\n\x19\x46INDING_CLASS_UNSPECIFIED\x10\x00\x12\n\n\x06THREAT\x10\x01\x12\x11\n\rVULNERABILITY\x10\x02\x12\x14\n\x10MISCONFIGURATION\x10\x03\x12\x0f\n\x0bOBSERVATION\x10\x04\x12\r\n\tSCC_ERROR\x10\x05\x12\x15\n\x11POSTURE_VIOLATION\x10\x06\x12\x15\n\x11TOXIC_COMBINATION\x10\x07\x12\x17\n\x13SENSITIVE_DATA_RISK\x10\x08\x12\x0e\n\nCHOKEPOINT\x10\t*\xac\x01\n\x1e\x46rameworkComplianceSummaryView\x12\x31\n-FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_UNSPECIFIED\x10\x00\x12+\n\'FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_BASIC\x10\x01\x12*\n&FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_FULL\x10\x02\x32\xd5\x11\n\nMonitoring\x12\xa8\x03\n ListFrameworkComplianceSummaries\x12P.google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest\x1aQ.google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse\"\xde\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xce\x01\x12\x45/v1/{parent=organizations/*/locations/*}/frameworkComplianceSummariesZA\x12?/v1/{parent=folders/*/locations/*}/frameworkComplianceSummariesZB\x12@/v1/{parent=projects/*/locations/*}/frameworkComplianceSummaries\x12\xe0\x02\n\x14ListFindingSummaries\x12\x44.google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest\x1a\x45.google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse\"\xba\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xaa\x01\x12\x39/v1/{parent=organizations/*/locations/*}/findingSummariesZ5\x12\x33/v1/{parent=folders/*/locations/*}/findingSummariesZ6\x12\x34/v1/{parent=projects/*/locations/*}/findingSummaries\x12\x9f\x03\n\x1e\x46\x65tchFrameworkComplianceReport\x12N.google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest\x1a\x42.google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport\"\xe8\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xda\x01\x12I/v1/{name=organizations/*/locations/*/frameworkComplianceReports/*}:fetchZE\x12\x43/v1/{name=folders/*/locations/*/frameworkComplianceReports/*}:fetchZF\x12\x44/v1/{name=projects/*/locations/*/frameworkComplianceReports/*}:fetch\x12\xf3\x03\n\x1eListControlComplianceSummaries\x12N.google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest\x1aO.google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse\"\xaf\x02\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x9f\x02\x12`/v1/{parent=organizations/*/locations/*/frameworkComplianceReports/*}/controlComplianceSummariesZ\\\x12Z/v1/{parent=folders/*/locations/*/frameworkComplianceReports/*}/controlComplianceSummariesZ]\x12[/v1/{parent=projects/*/locations/*/frameworkComplianceReports/*}/controlComplianceSummaries\x12\xc4\x03\n\"AggregateFrameworkComplianceReport\x12R.google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest\x1aS.google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse\"\xf4\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\xe6\x01\x12M/v1/{name=organizations/*/locations/*/frameworkComplianceReports/*}:aggregateZI\x12G/v1/{name=folders/*/locations/*/frameworkComplianceReports/*}:aggregateZJ\x12H/v1/{name=projects/*/locations/*/frameworkComplianceReports/*}:aggregate\x1aZ\xca\x41&cloudsecuritycompliance.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x89\x03\n+com.google.cloud.cloudsecuritycompliance.v1B\x0fMonitoringProtoP\x01Zecloud.google.com/go/cloudsecuritycompliance/apiv1/cloudsecuritycompliancepb;cloudsecuritycompliancepb\xaa\x02\'Google.Cloud.CloudSecurityCompliance.V1\xca\x02\'Google\\Cloud\\CloudSecurityCompliance\\V1\xea\x02*Google::Cloud::CloudSecurityCompliance::V1\xea\x41^\n5cloudsecuritycompliance.googleapis.com/FolderLocation\x12%folders/{folder}/locations/{location}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module CloudSecurityCompliance - module V1 - ListFrameworkComplianceSummariesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesRequest").msgclass - ListFrameworkComplianceSummariesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.ListFrameworkComplianceSummariesResponse").msgclass - FrameworkComplianceReport = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceReport").msgclass - FetchFrameworkComplianceReportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.FetchFrameworkComplianceReportRequest").msgclass - ListFindingSummariesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesRequest").msgclass - ListFindingSummariesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.ListFindingSummariesResponse").msgclass - ListControlComplianceSummariesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesRequest").msgclass - ListControlComplianceSummariesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.ListControlComplianceSummariesResponse").msgclass - AggregateFrameworkComplianceReportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportRequest").msgclass - AggregateFrameworkComplianceReportResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.AggregateFrameworkComplianceReportResponse").msgclass - ControlAssessmentDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.ControlAssessmentDetails").msgclass - FrameworkComplianceSummary = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummary").msgclass - FindingSummary = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.FindingSummary").msgclass - ControlComplianceSummary = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.ControlComplianceSummary").msgclass - CloudControlReport = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.CloudControlReport").msgclass - ManualCloudControlAssessmentDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.ManualCloudControlAssessmentDetails").msgclass - CloudControlAssessmentDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.CloudControlAssessmentDetails").msgclass - SimilarControls = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.SimilarControls").msgclass - AggregatedComplianceReport = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.AggregatedComplianceReport").msgclass - TargetResourceDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.TargetResourceDetails").msgclass - Trend = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.Trend").msgclass - EvaluationState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.EvaluationState").enummodule - FindingClass = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.FindingClass").enummodule - FrameworkComplianceSummaryView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudsecuritycompliance.v1.FrameworkComplianceSummaryView").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/monitoring_services_pb.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/monitoring_services_pb.rb deleted file mode 100644 index 3a6961e1141e..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/lib/google/cloud/cloudsecuritycompliance/v1/monitoring_services_pb.rb +++ /dev/null @@ -1,53 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/cloudsecuritycompliance/v1/monitoring.proto for package 'Google.Cloud.CloudSecurityCompliance.V1' -# Original file comments: -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/cloud/cloudsecuritycompliance/v1/monitoring_pb' - -module Google - module Cloud - module CloudSecurityCompliance - module V1 - module Monitoring - # Service describing handlers for resources - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.cloudsecuritycompliance.v1.Monitoring' - - # Lists the framework compliance summary for a given scope. - rpc :ListFrameworkComplianceSummaries, ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkComplianceSummariesRequest, ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkComplianceSummariesResponse - # Lists the finding summary by category for a given scope. - rpc :ListFindingSummaries, ::Google::Cloud::CloudSecurityCompliance::V1::ListFindingSummariesRequest, ::Google::Cloud::CloudSecurityCompliance::V1::ListFindingSummariesResponse - # Fetches the framework compliance report for a given scope. - rpc :FetchFrameworkComplianceReport, ::Google::Cloud::CloudSecurityCompliance::V1::FetchFrameworkComplianceReportRequest, ::Google::Cloud::CloudSecurityCompliance::V1::FrameworkComplianceReport - # Lists the control compliance summary for a given scope. - rpc :ListControlComplianceSummaries, ::Google::Cloud::CloudSecurityCompliance::V1::ListControlComplianceSummariesRequest, ::Google::Cloud::CloudSecurityCompliance::V1::ListControlComplianceSummariesResponse - # Gets the aggregated compliance report over time for a given scope. - rpc :AggregateFrameworkComplianceReport, ::Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportRequest, ::Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/README.md deleted file mode 100644 index 5043f1175240..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Cloud Security Compliance V1 Protocol Buffer Documentation - -These files are for the YARD documentation of the generated protobuf files. -They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/cloud/cloudsecuritycompliance/v1/audit.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/cloud/cloudsecuritycompliance/v1/audit.rb deleted file mode 100644 index bc09ec4a4605..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/cloud/cloudsecuritycompliance/v1/audit.rb +++ /dev/null @@ -1,413 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module CloudSecurityCompliance - module V1 - # The request message for [GenerateFrameworkAuditScopeReport][]. - # @!attribute [rw] scope - # @return [::String] - # Required. The organization, folder or project for the audit report. - # - # Supported formats are the following: - # - # * `projects/{project_id}/locations/{location}` - # * `folders/{folder_id}/locations/{location}` - # * `organizations/{organization_id}/locations/{location}` - # @!attribute [rw] report_format - # @return [::Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportRequest::Format] - # Required. The format that the scope report bytes is returned in. - # @!attribute [rw] compliance_framework - # @return [::String] - # Required. The compliance framework that the scope report is generated for. - class GenerateFrameworkAuditScopeReportRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The set of options for the audit scope report format. - module Format - # Default value. This value is unused. - FORMAT_UNSPECIFIED = 0 - - # The report format is the Open Document Format (ODF). - ODF = 1 - end - end - - # The response message for [GenerateFrameworkAuditScopeReport][]. - # @!attribute [rw] scope_report_contents - # @return [::String] - # The audit scope report content in byte format. - # @!attribute [rw] name - # @return [::String] - # Identifier. The name of the audit report, in the format that was - # given in the request. - # @!attribute [rw] compliance_framework - # @return [::String] - # Required. The compliance framework that the audit scope report is generated - # for. - class GenerateFrameworkAuditScopeReportResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Additional information for an audit operation. - # @!attribute [r] total_count - # @return [::Integer] - # Output only. The total number of checks. - # @!attribute [r] compliant_count - # @return [::Integer] - # Output only. The number of compliant checks. - # @!attribute [r] violation_count - # @return [::Integer] - # Output only. The number of checks with violations. - # @!attribute [r] manual_review_needed_count - # @return [::Integer] - # Output only. The number of checks with "manual review needed" status. - # @!attribute [r] error_count - # @return [::Integer] - # Output only. The number of checks that can't be performed due to errors. - class ReportSummary - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for [CreateFrameworkAudit][]. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource where this framework audit is created. - # - # Supported formats are the following: - # - # * `organizations/{organization_id}/locations/{location}` - # * `folders/{folder_id}/locations/{location}` - # * `projects/{project_id}/locations/{location}` - # @!attribute [rw] framework_audit_id - # @return [::String] - # Optional. The ID to use for the framework audit. The ID becomes the final - # component of the framework audit's full resource name. - # - # The ID must be between 4-63 characters, and valid characters - # are `\[a-z][0-9]-\`. - # @!attribute [rw] framework_audit - # @return [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkAudit] - # Required. The framework audit to create. - class CreateFrameworkAuditRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A destination for the framework audit. - # @!attribute [rw] bucket - # @return [::Google::Cloud::CloudSecurityCompliance::V1::BucketDestination] - # The Cloud Storage bucket destination. - class FrameworkAuditDestination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A Cloud Storage bucket destination. - # @!attribute [rw] bucket_uri - # @return [::String] - # Required. The URI of the Cloud Storage bucket. - # @!attribute [rw] framework_audit_format - # @return [::Google::Cloud::CloudSecurityCompliance::V1::BucketDestination::Format] - # Optional. The format of the framework audit. - class BucketDestination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The set of options for the framework audit format. - module Format - # Default value. This value is unused. - FORMAT_UNSPECIFIED = 0 - - # The format for the framework audit report is Open Document. - ODF = 1 - end - end - - # A framework audit. - # @!attribute [r] name - # @return [::String] - # Output only. Identifier. The name of the framework audit. - # @!attribute [r] framework_audit_id - # @return [::String] - # Output only. The ID of the framework audit. - # @!attribute [r] compliance_framework - # @return [::String] - # Output only. The compliance framework used for the audit. - # @!attribute [r] scope - # @return [::String] - # Output only. The scope of the audit. - # @!attribute [rw] framework_audit_destination - # @return [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkAuditDestination] - # Required. The destination for the audit reports. - # @!attribute [r] start_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time that the audit started. - # @!attribute [r] finish_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time that the audit finished. - # @!attribute [r] compliance_state - # @return [::Google::Cloud::CloudSecurityCompliance::V1::ComplianceState] - # Output only. The overall compliance state of the audit. - # @!attribute [r] report_summary - # @return [::Google::Cloud::CloudSecurityCompliance::V1::ReportSummary] - # Output only. The summary of the report. - # @!attribute [rw] cloud_control_group_audit_details - # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::CloudControlGroupAuditDetails>] - # Optional. The details for the cloud control groups within this audit. - # @!attribute [rw] cloud_control_audit_details - # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::CloudControlAuditDetails>] - # Optional. The details for the cloud controls within this audit. - # @!attribute [r] operation_id - # @return [::String] - # Output only. The ID of the long-running operation. - # @!attribute [r] state - # @return [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkAudit::State] - # Output only. The framework audit state of the audit. - class FrameworkAudit - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The state of the framework audit. - module State - # Default value. This value is unused. - STATE_UNSPECIFIED = 0 - - # The audit is scheduled. - SCHEDULED = 1 - - # The audit is running. - RUNNING = 2 - - # The audit results are being uploaded. - UPLOADING = 3 - - # The audit failed. - FAILED = 4 - - # The audit completed successfully. - SUCCEEDED = 5 - end - end - - # The request message for [ListFrameworkAudits][]. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource where the framework audits are listed. - # - # Supported formats are the following: - # - # * `organizations/{organization_id}/locations/{location}` - # * `folders/{folder_id}/locations/{location}` - # * `projects/{project_id}/locations/{location}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of framework audits to return. The service - # might return fewer audits than this value. If unspecified, a maximum of 10 - # framework audits are returned. The maximum value is 50; values above 50 are - # limited to 50. - # @!attribute [rw] page_token - # @return [::String] - # Optional. The `next_page_token` value that's returned from a previous list - # request, if any. - # @!attribute [rw] filter - # @return [::String] - # Optional. The filters to apply to the framework audits. - # Supported filters are `compliance_framework`, `compliance_state`, - # `create_time,` and `framework_audit_name`. If the filter is invalid, an - # invalid argument error is returned. - # For syntax details, see [AIP-160][https://google.aip.dev/160]. - class ListFrameworkAuditsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for [ListFrameworkAudits][]. - # @!attribute [rw] framework_audits - # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::FrameworkAudit>] - # The framework audits. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which you can send as the `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListFrameworkAuditsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for [GetFrameworkAudit][]. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the framework audit to retrieve. - # - # Supported formats are the following: - # - # * `organizations/{organization_id}/locations/{location}/frameworkAudits/{frameworkAuditName}` - # * `folders/{folder_id}/locations/{location}/frameworkAudits/{frameworkAuditName}` - # * `projects/{project_id}/locations/{location}/frameworkAudits/{frameworkAuditName}` - class GetFrameworkAuditRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The details for a cloud control group. - # @!attribute [r] cloud_control_group_id - # @return [::String] - # Output only. The ID of the cloud control group. - # @!attribute [r] display_name - # @return [::String] - # Output only. The display name of the cloud control group. - # @!attribute [r] description - # @return [::String] - # Output only. The description of the cloud control group. - # @!attribute [r] responsibility_type - # @return [::String] - # Output only. The responsibility type. - # @!attribute [r] google_responsibility_description - # @return [::String] - # Output only. The description of Google's responsibility. - # @!attribute [r] google_responsibility_implementation - # @return [::String] - # Output only. The implementation of Google's responsibility. - # @!attribute [r] customer_responsibility_description - # @return [::String] - # Output only. The description of your responsibility. - # @!attribute [r] customer_responsibility_implementation - # @return [::String] - # Output only. The implementation of your responsibility. - # @!attribute [r] compliance_state - # @return [::Google::Cloud::CloudSecurityCompliance::V1::ComplianceState] - # Output only. The compliance state of the control group. - # @!attribute [r] control_id - # @return [::String] - # Output only. The ID of the regulatory control. - # @!attribute [r] control_family - # @return [::Google::Cloud::CloudSecurityCompliance::V1::ControlFamily] - # Output only. The control family. - # @!attribute [r] cloud_control_details - # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::CloudControlAuditDetails>] - # Output only. The details for the cloud controls within this group. - # @!attribute [r] report_summary - # @return [::Google::Cloud::CloudSecurityCompliance::V1::ReportSummary] - # Output only. The summary of the report. - class CloudControlGroupAuditDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The details for a finding. - # @!attribute [r] name - # @return [::String] - # Output only. The name of the finding. - # @!attribute [r] compliance_state - # @return [::Google::Cloud::CloudSecurityCompliance::V1::ComplianceState] - # Output only. The compliance state of the finding. - # @!attribute [r] observation - # @return [::Google::Cloud::CloudSecurityCompliance::V1::ObservationDetails] - # Output only. The observation details for the finding. - # @!attribute [r] evidence - # @return [::Google::Cloud::CloudSecurityCompliance::V1::EvidenceDetails] - # Output only. The evidence details for the finding. - class FindingDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The observation details for a finding. - # @!attribute [r] current_value - # @return [::String] - # Output only. The current value. - # @!attribute [rw] expected_value - # @return [::String] - # Optional. The expected value. - # @!attribute [r] guidance - # @return [::String] - # Output only. Any guidance for the observation. - class ObservationDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The evidence details for a finding. - # @!attribute [r] resource - # @return [::String] - # Output only. The resource identifier. - # @!attribute [r] service - # @return [::String] - # Output only. The service identifier. - # @!attribute [r] evidence_path - # @return [::String] - # Output only. The path to the evidence. - class EvidenceDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The details for a cloud control audit. - # @!attribute [r] cloud_control - # @return [::String] - # Output only. The name of the cloud control. - # @!attribute [r] cloud_control_id - # @return [::String] - # Output only. The ID of the cloud control. - # @!attribute [r] cloud_control_description - # @return [::String] - # Output only. The description of the cloud control. - # @!attribute [r] compliance_state - # @return [::Google::Cloud::CloudSecurityCompliance::V1::ComplianceState] - # Output only. The overall status of the findings for the control. - # @!attribute [r] report_summary - # @return [::Google::Cloud::CloudSecurityCompliance::V1::ReportSummary] - # Output only. The summary of the report. - # @!attribute [r] findings - # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::FindingDetails>] - # Output only. The findings for the control. - class CloudControlAuditDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The state of compliance after evaluation is complete. - module ComplianceState - # Default value. This value is unused. - COMPLIANCE_STATE_UNSPECIFIED = 0 - - # The resource is compliant. - COMPLIANT = 1 - - # The resource has a violation. - VIOLATION = 2 - - # The resource requires manual review from you. - MANUAL_REVIEW_NEEDED = 3 - - # An error occurred while computing the resource status. - ERROR = 4 - - # The resource can't be audited. - AUDIT_NOT_SUPPORTED = 5 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/cloud/cloudsecuritycompliance/v1/cm_enrollment_service.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/cloud/cloudsecuritycompliance/v1/cm_enrollment_service.rb deleted file mode 100644 index 49abb65a66c5..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/cloud/cloudsecuritycompliance/v1/cm_enrollment_service.rb +++ /dev/null @@ -1,108 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module CloudSecurityCompliance - module V1 - # The request message for [UpdateCmEnrollment][]. - # @!attribute [rw] cm_enrollment - # @return [::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollment] - # Required. The Compliance Manager enrollment to update. - # The `name` field is used to identify the settings that you want to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. The list of fields that you want to update. - class UpdateCmEnrollmentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for [CalculateEffectiveCmEnrollment][]. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the Compliance Manager enrollment to calculate. - # - # Supported formats are the following: - # - # * `organizations/{organization_id}/locations/{location}/cmEnrollment` - # * `folders/{folder_id}/locations/{location}/cmEnrollment` - # * `projects/{project_id}/locations/{location}/cmEnrollment` - class CalculateEffectiveCmEnrollmentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The settings for Compliance Manager at a specific resource scope.= - # @!attribute [rw] name - # @return [::String] - # Identifier. The name of the Compliance Manager enrollment. - # - # Supported formats are the following: - # - # * `organizations/{organization_id}/locations/{location}/cmEnrollment` - # * `folders/{folder_id}/locations/{location}/cmEnrollment` - # * `projects/{project_id}/locations/{location}/cmEnrollment` - # @!attribute [rw] enrolled - # @return [::Boolean] - # Optional. Whether the resource is enrolled in Compliance Manager. - # This setting is inherited by all descendants. - # @!attribute [rw] audit_config - # @return [::Google::Cloud::CloudSecurityCompliance::V1::AuditConfig] - # Optional. The audit configuration for Compliance Manager. - # If set at a scope, this configuration overrides any inherited audit - # configuration. - class CmEnrollment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for [CalculateEffectiveCmEnrollment][]. - # @!attribute [rw] cm_enrollment - # @return [::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollment] - # The effective Compliance Manager enrollment for the resource. - class CalculateEffectiveCmEnrollmentResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The audit configuration for Compliance Manager. - # @!attribute [rw] destinations - # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::AuditConfig::CmEligibleDestination>] - # Required. The list of destinations that can be selected for uploading audit - # reports to. - class AuditConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The destination details where audit reports are - # uploaded. - # @!attribute [rw] gcs_bucket - # @return [::String] - # The Cloud Storage bucket where audit reports and evidences can be - # uploaded. The format is `gs://{bucket_name}`. - class CmEligibleDestination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/cloud/cloudsecuritycompliance/v1/common.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/cloud/cloudsecuritycompliance/v1/common.rb deleted file mode 100644 index 662d2ed61c0c..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/cloud/cloudsecuritycompliance/v1/common.rb +++ /dev/null @@ -1,808 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module CloudSecurityCompliance - module V1 - # A framework is a collection of cloud controls and regulatory controls - # that represent security best practices or industry-defined standards such as - # FedRAMP or NIST. - # @!attribute [rw] name - # @return [::String] - # Required. Identifier. The name of the framework, in one of the following - # formats: - # `organizations/{organization}/locations/{location}/frameworks/{framework}` - # or - # `projects/{project}/locations/{location}/frameworks/{framework}`. - # - # The only supported location is `global`. - # @!attribute [r] major_revision_id - # @return [::Integer] - # Output only. The major version of the framework, which is incremented in - # ascending order. - # @!attribute [rw] display_name - # @return [::String] - # Optional. The friendly name of the framework. The maximum length is 200 - # characters. - # @!attribute [rw] description - # @return [::String] - # Optional. The description of the framework. The maximum length is 2000 - # characters. - # @!attribute [r] type - # @return [::Google::Cloud::CloudSecurityCompliance::V1::Framework::FrameworkType] - # Output only. The type of framework. - # @!attribute [rw] cloud_control_details - # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDetails>] - # Optional. The cloud control details that are directly added without any - # grouping in the framework. - # @!attribute [rw] category - # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::FrameworkCategory>] - # Optional. The category of the framework. - # @!attribute [r] supported_cloud_providers - # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::CloudProvider>] - # Output only. The cloud providers that are supported by the framework. - # @!attribute [r] supported_target_resource_types - # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::TargetResourceType>] - # Output only. The target resource types that are supported by the framework. - # @!attribute [r] supported_enforcement_modes - # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::EnforcementMode>] - # Output only. The supported enforcement modes of the framework. - class Framework - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of framework. - module FrameworkType - # Default value. This value is unused. - FRAMEWORK_TYPE_UNSPECIFIED = 0 - - # A framework that's provided and managed by Google. - BUILT_IN = 1 - - # A framework that's created and managed by you. - CUSTOM = 2 - end - end - - # The details of a cloud control. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the cloud control, in one of the following formats: - # `organizations/{organization}/locations/{location}/cloudControls/{cloud_control}` - # or - # `projects/{project}/locations/{location}/cloudControls/{cloud_control}`. - # - # The only supported location is `global`. - # @!attribute [rw] major_revision_id - # @return [::Integer] - # Required. The major version of the cloud control. - # @!attribute [rw] parameters - # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::Parameter>] - # Optional. Parameters are key-value pairs that let you provide your custom - # location requirements, environment requirements, or other settings that are - # relevant to the cloud control. An example parameter is - # `{"name": "location","value": "us-west-1"}`. - class CloudControlDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The reference of a framework, in one of the following formats: - # - `organizations/{organization}/locations/{location}/frameworks/{framework}` - # - `projects/{project}/locations/{location}/frameworks/{framework}`. - # - # The only supported location is `global`. - # @!attribute [rw] framework - # @return [::String] - # Required. The major version of the framework. If not specified, the version - # corresponds to the latest version of the framework. - # @!attribute [rw] major_revision_id - # @return [::Integer] - # Optional. The major version of the framework. If not specified, the version - # corresponds to the latest version of the framework. - class FrameworkReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Parameters are key-value pairs that let you provide your custom location - # requirements, environment requirements, or other settings that are - # relevant to the cloud control. - # @!attribute [rw] name - # @return [::String] - # Required. The name or key of the parameter. - # @!attribute [rw] parameter_value - # @return [::Google::Cloud::CloudSecurityCompliance::V1::ParamValue] - # Required. The value of the parameter. - class Parameter - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A cloud control is a set of rules and associated metadata that you can - # use to define your organization's security or compliance intent. - # @!attribute [rw] name - # @return [::String] - # Required. Identifier. The name of the cloud control, in either of the - # formats: - # `organizations/{organization}/locations/{location}/cloudControls/{cloud_control}` - # or - # `projects/{project}/locations/{location}/cloudControls/{cloud_control}`. - # - # The only supported location is `global`. - # @!attribute [r] major_revision_id - # @return [::Integer] - # Output only. The major version of the cloud control, which is incremented - # in ascending order. - # @!attribute [rw] description - # @return [::String] - # Optional. A description of the cloud control. The maximum length is 2000 - # characters. - # @!attribute [rw] display_name - # @return [::String] - # Optional. The friendly name of the cloud control. The maximum length is 200 - # characters. - # @!attribute [r] supported_enforcement_modes - # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::EnforcementMode>] - # Output only. The supported enforcement modes for the cloud control. - # @!attribute [rw] parameter_spec - # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::ParameterSpec>] - # Optional. The parameter specifications for the cloud control. - # @!attribute [rw] rules - # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::Rule>] - # Optional. The rules that you can enforce to meet your security or - # compliance intent. - # @!attribute [rw] severity - # @return [::Google::Cloud::CloudSecurityCompliance::V1::Severity] - # Optional. The severity of the findings that are generated by the cloud - # control. - # @!attribute [rw] finding_category - # @return [::String] - # Optional. The finding category for the cloud control findings. The maximum - # length is 255 characters. - # @!attribute [rw] supported_cloud_providers - # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::CloudProvider>] - # Optional. The supported cloud providers. - # @!attribute [r] related_frameworks - # @return [::Array<::String>] - # Output only. The frameworks that include this cloud control. - # @!attribute [rw] remediation_steps - # @return [::String] - # Optional. The remediation steps for the cloud control findings. The - # maximum length is 400 characters. - # @!attribute [rw] categories - # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::CloudControlCategory>] - # Optional. The categories for the cloud control. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time that the cloud control was last updated. - # `create_time` is used because a new cloud control is created - # whenever an existing cloud control is updated. - # @!attribute [rw] supported_target_resource_types - # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::TargetResourceType>] - # Optional. The target resource types that are supported by the cloud - # control. - class CloudControl - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of cloud control. - module Type - # Default value. This value is unused. - TYPE_UNSPECIFIED = 0 - - # A cloud control that's created and managed by you. - CUSTOM = 1 - - # A cloud control that's provided and managed by Google. - BUILT_IN = 2 - end - end - - # The parameter specification for the cloud control. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the parameter. - # @!attribute [rw] display_name - # @return [::String] - # Optional. The friendly name of the parameter. The maximum length is 200 - # characters. - # @!attribute [rw] description - # @return [::String] - # Optional. The description of the parameter. The maximum length is 2000 - # characters. - # @!attribute [rw] is_required - # @return [::Boolean] - # Required. Whether the parameter is required. - # @!attribute [rw] value_type - # @return [::Google::Cloud::CloudSecurityCompliance::V1::ParameterSpec::ValueType] - # Required. The parameter value type. - # @!attribute [rw] default_value - # @return [::Google::Cloud::CloudSecurityCompliance::V1::ParamValue] - # Optional. The default value of the parameter. - # @!attribute [rw] substitution_rules - # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::ParameterSubstitutionRule>] - # Optional. The list of parameter substitutions. - # @!attribute [rw] sub_parameters - # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::ParameterSpec>] - # Optional. The parameter specification for `oneOf` attributes. - # @!attribute [rw] validation - # @return [::Google::Cloud::CloudSecurityCompliance::V1::Validation] - # Optional. The permitted set of values for the parameter. - class ParameterSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of parameter value. - module ValueType - # Default value. This value is unused. - VALUE_TYPE_UNSPECIFIED = 0 - - # A string value. - STRING = 3 - - # A boolean value. - BOOLEAN = 4 - - # A string list value. - STRINGLIST = 5 - - # A numeric value. - NUMBER = 6 - - # A oneOf value. - ONEOF = 7 - end - end - - # The validation of the parameter. - # @!attribute [rw] allowed_values - # @return [::Google::Cloud::CloudSecurityCompliance::V1::AllowedValues] - # The permitted set of values for the parameter. - # - # Note: The following fields are mutually exclusive: `allowed_values`, `int_range`, `regexp_pattern`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] int_range - # @return [::Google::Cloud::CloudSecurityCompliance::V1::IntRange] - # The permitted range for numeric parameters. - # - # Note: The following fields are mutually exclusive: `int_range`, `allowed_values`, `regexp_pattern`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] regexp_pattern - # @return [::Google::Cloud::CloudSecurityCompliance::V1::RegexpPattern] - # The regular expression for string parameters. - # - # Note: The following fields are mutually exclusive: `regexp_pattern`, `allowed_values`, `int_range`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Validation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The allowed set of values for the parameter. - # @!attribute [rw] values - # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::ParamValue>] - # Required. The list of allowed values for the parameter. - class AllowedValues - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The regular expression (regex) validator for parameter values. - # @!attribute [rw] pattern - # @return [::String] - # Required. The regex pattern to match the values of the parameter with. - class RegexpPattern - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The number range for number parameters. - # @!attribute [rw] min - # @return [::Integer] - # Required. The minimum permitted value for the numeric parameter - # (inclusive). - # @!attribute [rw] max - # @return [::Integer] - # Required. The maximum permitted value for the numeric parameter - # (inclusive). - class IntRange - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A list of strings for the parameter value. - # @!attribute [rw] values - # @return [::Array<::String>] - # Required. The strings in the list. - class StringList - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The possible parameter value types. - # @!attribute [rw] string_value - # @return [::String] - # Optional. A string value. - # - # Note: The following fields are mutually exclusive: `string_value`, `bool_value`, `string_list_value`, `number_value`, `oneof_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bool_value - # @return [::Boolean] - # Optional. A boolean value. - # - # Note: The following fields are mutually exclusive: `bool_value`, `string_value`, `string_list_value`, `number_value`, `oneof_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] string_list_value - # @return [::Google::Cloud::CloudSecurityCompliance::V1::StringList] - # Optional. A repeated string. - # - # Note: The following fields are mutually exclusive: `string_list_value`, `string_value`, `bool_value`, `number_value`, `oneof_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] number_value - # @return [::Float] - # Optional. A double value. - # - # Note: The following fields are mutually exclusive: `number_value`, `string_value`, `bool_value`, `string_list_value`, `oneof_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] oneof_value - # @return [::Google::Cloud::CloudSecurityCompliance::V1::Parameter] - # Optional. Sub-parameter values. - # - # Note: The following fields are mutually exclusive: `oneof_value`, `string_value`, `bool_value`, `string_list_value`, `number_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class ParamValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The parameter substitution rules. - # @!attribute [rw] placeholder_substitution_rule - # @return [::Google::Cloud::CloudSecurityCompliance::V1::PlaceholderSubstitutionRule] - # The placeholder substitution rule. - # - # Note: The following fields are mutually exclusive: `placeholder_substitution_rule`, `attribute_substitution_rule`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] attribute_substitution_rule - # @return [::Google::Cloud::CloudSecurityCompliance::V1::AttributeSubstitutionRule] - # The attribute substitution rule. - # - # Note: The following fields are mutually exclusive: `attribute_substitution_rule`, `placeholder_substitution_rule`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class ParameterSubstitutionRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The attribute at the given path that's substituted entirely. - # @!attribute [rw] attribute - # @return [::String] - # The fully qualified proto attribute path, in dot notation. - # For example: `rules[0].cel_expression.resource_types_values` - class AttributeSubstitutionRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The placeholder that's substituted in the rendered string. - # @!attribute [rw] attribute - # @return [::String] - # The fully qualified proto attribute path, in dot notation. - class PlaceholderSubstitutionRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A rule in the cloud control. - # @!attribute [rw] cel_expression - # @return [::Google::Cloud::CloudSecurityCompliance::V1::CELExpression] - # The rule's logic expression in Common Expression Language (CEL). - # @!attribute [rw] description - # @return [::String] - # Optional. The rule description. The maximum length is 2000 characters. - # @!attribute [rw] rule_action_types - # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::RuleActionType>] - # Required. The functionality that's enabled by the rule. - class Rule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A Common Expression Language (CEL) expression that's used to create a rule. - # @!attribute [rw] resource_types_values - # @return [::Google::Cloud::CloudSecurityCompliance::V1::StringList] - # The resource instance types on which this expression is defined. - # The format is `/`. - # For example: `compute.googleapis.com/Instance` - # @!attribute [rw] expression - # @return [::String] - # Required. The logical expression in CEL. The maximum length of the - # condition is 1000 characters. For more information, see [CEL - # expression](https://cloud.google.com/security-command-center/docs/compliance-manager-write-cel-expressions). - class CELExpression - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The metadata for the long-running operation. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the operation was created. - # @!attribute [r] end_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the operation finished running. - # @!attribute [r] target - # @return [::String] - # Output only. The server-defined resource path for the target of the - # operation. - # @!attribute [r] verb - # @return [::String] - # Output only. The name of the verb that was executed by the operation. - # @!attribute [r] status_message - # @return [::String] - # Output only. The human-readable status of the operation, if any. - # @!attribute [r] requested_cancellation - # @return [::Boolean] - # Output only. Identifies whether the user has requested that the operation - # be cancelled. If an operation was cancelled successfully, then the field - # {::Google::Longrunning::Operation#error google.longrunning.Operation.error} - # contains the value [google.rpc.Code.CANCELLED][google.rpc.Code.CANCELLED]. - # @!attribute [r] api_version - # @return [::String] - # Output only. The API version that was used to start the operation. - class OperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The regulatory control. - # @!attribute [r] name - # @return [::String] - # Output only. The name of a regulatory control, in one of the following - # formats: - # - `organizations/{organization}/locations/{location}/controls/{control}` - # - `projects/{project}/locations/{location}/controls/{control}`. - # - # The only supported location is `global`. - # @!attribute [r] display_name - # @return [::String] - # Output only. The friendly name for the regulatory control. - # @!attribute [r] description - # @return [::String] - # Output only. The description of the regulatory control. - # @!attribute [r] family - # @return [::Google::Cloud::CloudSecurityCompliance::V1::Control::Family] - # Output only. The regulatory group that the control belongs to. - # @!attribute [r] control_family - # @return [::Google::Cloud::CloudSecurityCompliance::V1::ControlFamily] - # Output only. The regulatory family that the control belongs to. - # @!attribute [r] responsibility_type - # @return [::Google::Cloud::CloudSecurityCompliance::V1::RegulatoryControlResponsibilityType] - # Output only. The entity that's responsible for the control, whether Google, - # you as the customer, or both. - # @!attribute [r] google_responsibility_description - # @return [::String] - # Output only. A description of Google's responsibility for the regulatory - # control. - # @!attribute [r] google_responsibility_implementation - # @return [::String] - # Output only. A description of Google's responsibility for implementing the - # regulatory control. - # @!attribute [r] customer_responsibility_description - # @return [::String] - # Output only. A description of your responsibility for the regulatory - # control. - # @!attribute [r] customer_responsibility_implementation - # @return [::String] - # Output only. A description of the your responsibility for implementing the - # regulatory control. - # @!attribute [r] shared_responsibility_description - # @return [::String] - # Output only. A description of the responsibility that's shared between - # Google and you in implementing this control. - # @!attribute [r] additional_content_uri - # @return [::String] - # Output only. A link to the documentation that's related to this control. - # @!attribute [r] related_frameworks - # @return [::Array<::String>] - # Output only. The frameworks that include this control. - class Control - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The regulatory control family. - module Family - # Default value. This value is unused. - FAMILY_UNSPECIFIED = 0 - - # Access control - AC = 1 - - # Awareness and araining - AT = 2 - - # Audit and accountability - AU = 3 - - # Certification, accreditation, and security assessments - CA = 4 - - # Configuration management - CM = 5 - - # Contingency planning - CP = 6 - - # Identification and authentication - IA = 7 - - # Incident response - IR = 8 - - # Maintenance - MA = 9 - - # Media protection - MP = 10 - - # Physical and environmental protection - PE = 11 - - # Security planning - PL = 12 - - # Personnel aecurity - PS = 13 - - # Risk assessment - RA = 14 - - # System services and acquisition - SA = 15 - - # System and communications protection - SC = 16 - - # System and information integrity - SI = 17 - - # Supply chain risk management - SR = 18 - end - end - - # The regulatory family of the control. - # @!attribute [rw] family_id - # @return [::String] - # The identifier for the regulatory control family. - # @!attribute [rw] display_name - # @return [::String] - # The friendly name for the regulatory control family. - class ControlFamily - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The responsibility type for the regulatory control. - module RegulatoryControlResponsibilityType - # Default value. This value is unused. - REGULATORY_CONTROL_RESPONSIBILITY_TYPE_UNSPECIFIED = 0 - - # Google's responsibility. - GOOGLE = 1 - - # Your responsibility. - CUSTOMER = 2 - - # Shared responsibility. - SHARED = 3 - end - - # The enforcement mode for the cloud control. - module EnforcementMode - # Default value. This value is unused. - ENFORCEMENT_MODE_UNSPECIFIED = 0 - - # The cloud control is enforced to prevent non-compliance. - PREVENTIVE = 1 - - # The cloud control is enforced to detect non-compliance. - DETECTIVE = 2 - - # The cloud control is enforced to audit for non-compliance. - AUDIT = 3 - end - - # The category for the framework. - module FrameworkCategory - # Default value. This value is unused. - FRAMEWORK_CATEGORY_UNSPECIFIED = 0 - - # An industry-defined framework. - INDUSTRY_DEFINED_STANDARD = 1 - - # An Assured Workloads framework. - ASSURED_WORKLOADS = 2 - - # A data security posture framework. - DATA_SECURITY = 3 - - # A Google's best practices framework. - GOOGLE_BEST_PRACTICES = 4 - - # A user-created framework. - CUSTOM_FRAMEWORK = 5 - end - - # The category for the cloud control. - module CloudControlCategory - # Default value. This value is unused. - CLOUD_CONTROL_CATEGORY_UNSPECIFIED = 0 - - # The infrastructure security category. - CC_CATEGORY_INFRASTRUCTURE = 1 - - # The artificial intelligence category. - CC_CATEGORY_ARTIFICIAL_INTELLIGENCE = 2 - - # The physical security category. - CC_CATEGORY_PHYSICAL_SECURITY = 3 - - # The data security category. - CC_CATEGORY_DATA_SECURITY = 4 - - # The network security category. - CC_CATEGORY_NETWORK_SECURITY = 5 - - # The incident management category. - CC_CATEGORY_INCIDENT_MANAGEMENT = 6 - - # The identity and access management category. - CC_CATEGORY_IDENTITY_AND_ACCESS_MANAGEMENT = 7 - - # The encryption category. - CC_CATEGORY_ENCRYPTION = 8 - - # The logs management and infrastructure category. - CC_CATEGORY_LOGS_MANAGEMENT_AND_INFRASTRUCTURE = 9 - - # The HR, admin, and processes category. - CC_CATEGORY_HR_ADMIN_AND_PROCESSES = 10 - - # The third-party and sub-processor management category. - CC_CATEGORY_THIRD_PARTY_AND_SUB_PROCESSOR_MANAGEMENT = 11 - - # The legal and disclosures category. - CC_CATEGORY_LEGAL_AND_DISCLOSURES = 12 - - # The vulnerability management category. - CC_CATEGORY_VULNERABILITY_MANAGEMENT = 13 - - # The privacy category. - CC_CATEGORY_PRIVACY = 14 - - # The business continuity and disaster recovery (BCDR) category. - CC_CATEGORY_BCDR = 15 - - # The admin access category. - CC_CATEGORY_ADMIN_ACCESS = 16 - - # DRZ (Data Residency). - CC_CATEGORY_DATA_RESIDENCY = 17 - - # RUR (Resource Usage Restriction). - CC_CATEGORY_RESOURCE_USAGE_RESTRICTION = 18 - - # SERVICE SPECIFIC - CC_CATEGORY_SERVICE_SPECIFIC = 19 - end - - # The cloud provider that's associated with the cloud control. - module CloudProvider - # Default value. This value is unused. - CLOUD_PROVIDER_UNSPECIFIED = 0 - - # Amazon Web Services (AWS). - AWS = 1 - - # Microsoft Azure. - AZURE = 2 - - # Google Cloud. - GCP = 3 - end - - # The severity of the finding. - module Severity - # Default value. This value is unused. - SEVERITY_UNSPECIFIED = 0 - - # A critical vulnerability is easily discoverable by an external actor, - # exploitable, and results in the direct ability to execute arbitrary code, - # exfiltrate data, and otherwise gain additional access and privileges to - # cloud resources and workloads. Examples include publicly accessible - # unprotected user data and public SSH access with weak or no - # passwords. - # - # A critical threat is a threat that can access, modify, or delete data or - # execute unauthorized code within existing resources. - CRITICAL = 1 - - # A high-risk vulnerability can be easily discovered and exploited in - # combination with other vulnerabilities to gain direct access and - # the ability to execute arbitrary code, exfiltrate data, and otherwise - # gain additional access and privileges to cloud resources and workloads. - # An example is a database with weak or no passwords that is only - # accessible internally. This database could easily be compromised by an - # actor that had access to the internal network. - # - # A high-risk threat is a threat that can create new computational - # resources in an environment but can't access data or execute code in - # existing resources. - HIGH = 2 - - # A medium-risk vulnerability can be used by an actor to gain access to - # resources or privileges that enable them to eventually (through multiple - # steps or a complex exploit) gain access and the ability to execute - # arbitrary code or exfiltrate data. An example is a service account with - # access to more projects than it should have. If an actor gains access to - # the service account, they could potentially use that access to manipulate - # a project the service account was not intended to. - # - # A medium-risk threat can cause operational impact but might not - # access data or execute unauthorized code. - MEDIUM = 3 - - # A low-risk vulnerability hampers a security organization's ability to - # detect vulnerabilities or active threats in their deployment, or prevents - # the root cause investigation of security issues. An example is monitoring - # and logs being disabled for resource configurations and access. - # - # A low-risk threat is a threat that has obtained minimal access to an - # environment but can't access data, execute code, or create resources. - LOW = 4 - end - - # The action type of the rule. - module RuleActionType - # Default value. This value is unused. - RULE_ACTION_TYPE_UNSPECIFIED = 0 - - # The rule is intended to prevent non-compliance. - RULE_ACTION_TYPE_PREVENTIVE = 1 - - # The rule is intended to detect non-compliance. - RULE_ACTION_TYPE_DETECTIVE = 2 - - # The rule is intended to audit non-compliance. - RULE_ACTION_TYPE_AUDIT = 3 - end - - # The type of resource that a control or framework can be applied to. - module TargetResourceType - # Default value. This value is unused. - TARGET_RESOURCE_TYPE_UNSPECIFIED = 0 - - # The target resource is a Google Cloud organization. - TARGET_RESOURCE_CRM_TYPE_ORG = 1 - - # The target resource is a folder. - TARGET_RESOURCE_CRM_TYPE_FOLDER = 2 - - # The target resource is a project. - TARGET_RESOURCE_CRM_TYPE_PROJECT = 3 - - # The target resource is an application in App Hub. - TARGET_RESOURCE_TYPE_APPLICATION = 4 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/cloud/cloudsecuritycompliance/v1/config.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/cloud/cloudsecuritycompliance/v1/config.rb deleted file mode 100644 index bf3572fe685e..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/cloud/cloudsecuritycompliance/v1/config.rb +++ /dev/null @@ -1,258 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module CloudSecurityCompliance - module V1 - # Request message for [ListFrameworks][]. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource name, in one of the following formats: - # - `organizations/{organization}/locations/{location}` - # - `projects/{project}/locations/{location}`. - # - # The only supported location is `global`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of frameworks to return. The default value is - # `500`. - # - # If you exceed the maximum value of `1000`, then the service uses the - # maximum value. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A pagination token returned from a previous request to list - # frameworks. Provide this token to retrieve the next page of results. - class ListFrameworksRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for [ListFrameworks][]. - # Returns a paginated list of Framework resources. - # @!attribute [rw] frameworks - # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::Framework>] - # The list of framework resources. - # @!attribute [rw] next_page_token - # @return [::String] - # A pagination token. To retrieve the next page of results, call the method - # again with this token. - class ListFrameworksResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for [GetFramework][]. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the framework to retrieve, in one of the following - # formats: - # `organizations/{organization}/locations/{location}/frameworks/{framework}` - # or - # `projects/{project}/locations/{location}/frameworks/{framework}`. - # - # The only supported location is `global`. - # @!attribute [rw] major_revision_id - # @return [::Integer] - # Optional. The framework major version to retrieve. If not specified, the - # most recently updated `revision_id` is retrieved. - class GetFrameworkRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for [CreateFramework][]. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource name, in one of the following formats: - # - `organizations/{organization}/locations/{location}` - # - `projects/{project}/locations/{location}`. - # - # The only supported location is `global`. - # @!attribute [rw] framework_id - # @return [::String] - # Required. The identifier (ID) of the framework. The ID is not the full name - # of the framework; it's the last part of the full name of the framework. - # @!attribute [rw] framework - # @return [::Google::Cloud::CloudSecurityCompliance::V1::Framework] - # Required. The resource being created. - class CreateFrameworkRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for [UpdateFramework][]. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. A field mask is used to specify the fields to be overwritten in - # the framework resource by the update. The fields specified in the - # `update_mask` are relative to the resource, not the full request. A field - # is overwritten if it is in the mask. If you don't provide a mask then all - # fields present in the request will be overwritten. - # @!attribute [rw] framework - # @return [::Google::Cloud::CloudSecurityCompliance::V1::Framework] - # Required. The resource that is being updated. - # @!attribute [rw] major_revision_id - # @return [::Integer] - # Optional. The major version ID of the framework to update. - class UpdateFrameworkRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for [DeleteFramework][]. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the resource, in one of the following formats: - # `organizations/{organization}/locations/{location}/frameworks/{framework}` - # or - # `projects/{project}/locations/{location}/frameworks/{framework}`. - # - # The only supported location is `global`. - class DeleteFrameworkRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for [ListCloudControls][]. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource name, in one of the following formats: - # - `organizations/{organization}/locations/{location}` - # - `projects/{project}/locations/{location}`. - # - # The only supported location is `global`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of cloud controls to return. The default value - # is `500`. - # - # If you exceed the maximum value of `1000`, then the service uses the - # maximum value. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A pagination token that's returned from a previous request to - # list cloud controls. Provide this token to retrieve the next page of - # results. - # - # When paginating, the parent that you provide to the - # {::Google::Cloud::CloudSecurityCompliance::V1::Config::Client#list_cloud_controls ListCloudControls} - # request must match the call that provided the page token. - class ListCloudControlsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for [ListCloudControls][]. - # @!attribute [rw] cloud_controls - # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::CloudControl>] - # The list of CloudControl resources. - # @!attribute [rw] next_page_token - # @return [::String] - # A pagination token. To retrieve the next page of results, call the method - # again with this token. - class ListCloudControlsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for [GetCloudControl][]. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the cloud control to retrieve, in one of the - # following formats: - # `organizations/{organization}/locations/{location}/cloudControls/{cloud_control}` - # or - # `projects/{project}/locations/{location}/cloudControls/{cloud_control}`. - # - # The only supported location is `global`. - # @!attribute [rw] major_revision_id - # @return [::Integer] - # Optional. The major version of the cloud control to retrieve. If not - # specified, the most recently updated `revision_id` is retrieved. - class GetCloudControlRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for [CreateCloudControl][]. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource name, in one of the following formats: - # - `organizations/{organization}/locations/{location}`. - # - `projects/{project}/locations/{location}`. - # - # The only supported location is `global`. - # @!attribute [rw] cloud_control_id - # @return [::String] - # Required. The identifier for the cloud control, which is the last segment - # of the cloud control name. The format is - # `^[a-zA-Z][a-zA-Z0-9-]{0,61}[a-zA-Z0-9]$`. - # @!attribute [rw] cloud_control - # @return [::Google::Cloud::CloudSecurityCompliance::V1::CloudControl] - # Required. The cloud control that's being created. - class CreateCloudControlRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for [UpdateCloudControl][]. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. Use a field mask to specify the fields to be overwritten in the - # cloud control during the update. - # The fields that you specify in the `update_mask` are relative to the - # cloud control, not the full request. A field is overwritten if it is in - # the mask. If you don't provide a mask, all fields in the request - # are updated. - # - # You can update the following fields: - # - # - Display name - # - Description - # - Parameters - # - Rules - # - Parameter specification - # @!attribute [rw] cloud_control - # @return [::Google::Cloud::CloudSecurityCompliance::V1::CloudControl] - # Required. The cloud control that you're updating. - class UpdateCloudControlRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for [DeleteCloudControl][]. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the cloud control to delete, in one of the following - # formats: - # `organizations/{organization}/locations/{location}/CloudControls/{CloudControl}` - # or - # `projects/{project}/locations/{location}/CloudControls/{CloudControl}`. - # - # The only supported location is `global`. - class DeleteCloudControlRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/cloud/cloudsecuritycompliance/v1/deployment.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/cloud/cloudsecuritycompliance/v1/deployment.rb deleted file mode 100644 index 909df6aae867..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/cloud/cloudsecuritycompliance/v1/deployment.rb +++ /dev/null @@ -1,492 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module CloudSecurityCompliance - module V1 - # Framework deployments represent the assignment of a framework to a target - # resource. Supported target resources are organizations, folders, and - # projects. - # @!attribute [rw] name - # @return [::String] - # Identifier. The name of the framework deployment, in the format - # `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}` - # or - # `projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}`. - # The only supported location is `global`. - # @!attribute [rw] target_resource_config - # @return [::Google::Cloud::CloudSecurityCompliance::V1::TargetResourceConfig] - # Required. The details of the target resource that you want to deploy the - # framework to. You can specify an existing resource, or create a new one. - # @!attribute [r] computed_target_resource - # @return [::String] - # Output only. The target resource to deploy the framework to, in one the - # following formats: - # - # - `organizations/{organizationID}` - # - `folders/{folderID}` - # - `projects/{projectID}` - # @!attribute [rw] framework - # @return [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkReference] - # Required. A reference to the framework that you're deploying. - # @!attribute [rw] description - # @return [::String] - # Optional. A user-provided description of the framework deployment. - # @!attribute [rw] cloud_control_metadata - # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::CloudControlMetadata>] - # Required. The deployment mode and parameters for each of the cloud controls - # in the framework. Every cloud control in the framework includes metadata. - # @!attribute [r] deployment_state - # @return [::Google::Cloud::CloudSecurityCompliance::V1::DeploymentState] - # Output only. The state for the framework deployment. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which the resource was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which the resource last updated. - # @!attribute [rw] etag - # @return [::String] - # Optional. To prevent concurrent updates from overwriting each other, always - # provide the `etag` when you update a framework deployment. You can also - # provide the `etag` when you delete a framework deployment, to help - # ensure that you're deleting the intended version of the - # framework deployment. - # @!attribute [r] target_resource_display_name - # @return [::String] - # Output only. The display name of the target resource. - # @!attribute [r] cloud_control_deployment_references - # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeploymentReference>] - # Output only. The references to the cloud control deployments. The reference - # includes all the cloud control deployments that are in the framework or in - # a cloud control group. - # - # For example, if a framework deployment deploys two - # cloud controls, `cc-deployment-1` and `cc-deployment-2`, then the - # references are: - # - # ``` - # { - # cloud_control_deployment_reference: { - # cloud_control_deployment: - # "organizations/\\{organization}/locations/\\{location}/cloudControlDeployments/cc-deployment-1" - # }, - # cloud_control_deployment_reference: { - # cloud_control_deployment: - # "organizations/\\{organization}/locations/\\{location}/cloudControlDeployments/cc-deployment-2" - # } - # ``` - class FrameworkDeployment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A cloud control deployment represents the deployment of a particular cloud - # control on a target resource. Supported target resources are - # `organizations/{organizationID}`, `folders/{folderID}`, and - # `projects/{projectID}`. - # @!attribute [rw] name - # @return [::String] - # Identifier. The name for the cloud control deployment, in the format - # `organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}` - # or - # `projects/{project}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}`. - # The only supported location is `global`. - # @!attribute [rw] target_resource_config - # @return [::Google::Cloud::CloudSecurityCompliance::V1::TargetResourceConfig] - # Required. The details of the target resource that the cloud control is - # deployed You can use an existing target resource or create a new target. - # @!attribute [r] target_resource - # @return [::String] - # Output only. The resource that the cloud control is deployed on, in one of - # the following formats: - # - # - `organizations/{organizationID}` - # - `folders/{folderID}` - # - `projects/{projectID}` - # @!attribute [rw] cloud_control_metadata - # @return [::Google::Cloud::CloudSecurityCompliance::V1::CloudControlMetadata] - # Required. The deployment mode and parameters for the cloud control. - # @!attribute [rw] description - # @return [::String] - # Optional. A friendly description for the cloud control deployment. - # @!attribute [r] deployment_state - # @return [::Google::Cloud::CloudSecurityCompliance::V1::DeploymentState] - # Output only. The state of the cloud control deployment. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the resource was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the resource was last updated. - # @!attribute [rw] etag - # @return [::String] - # Optional. To prevent concurrent updates from overwriting each other, - # provide the `etag` when you update a cloud control deployment. You can also - # provide the `etag` when you delete a cloud control deployment to help - # ensure that you're deleting the intended version of the - # deployment. - # @!attribute [r] parameter_substituted_cloud_control - # @return [::Google::Cloud::CloudSecurityCompliance::V1::CloudControl] - # Output only. The cloud control after the given parameters are substituted. - # @!attribute [r] framework_deployment_references - # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeploymentReference>] - # Output only. The references to the framework deployments that this cloud - # control deployment is part of. A cloud control deployment can be part of - # multiple framework deployments. - # @!attribute [r] target_resource_display_name - # @return [::String] - # Output only. The display name of the target resource. - class CloudControlDeployment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The name of the target resource or the configuration that's required to - # create a new target resource. - # @!attribute [rw] existing_target_resource - # @return [::String] - # Optional. The resource hierarchy node, in one of the following formats: - # - # - `organizations/{organizationID}` - # - `folders/{folderID}` - # - `projects/{projectID}` - # - # Note: The following fields are mutually exclusive: `existing_target_resource`, `target_resource_creation_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] target_resource_creation_config - # @return [::Google::Cloud::CloudSecurityCompliance::V1::TargetResourceCreationConfig] - # Optional. The details that are required to create a resource and use - # that resource as the target resource for deployment. - # - # Note: The following fields are mutually exclusive: `target_resource_creation_config`, `existing_target_resource`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class TargetResourceConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The configuration that's required to create a target resource. - # @!attribute [rw] folder_creation_config - # @return [::Google::Cloud::CloudSecurityCompliance::V1::FolderCreationConfig] - # Optional. The configuration that's required to create a folder. - # - # Note: The following fields are mutually exclusive: `folder_creation_config`, `project_creation_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] project_creation_config - # @return [::Google::Cloud::CloudSecurityCompliance::V1::ProjectCreationConfig] - # Optional. The configuration that's required to create a project. - # - # Note: The following fields are mutually exclusive: `project_creation_config`, `folder_creation_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class TargetResourceCreationConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The configuration that's required to create a folder to be used - # as the target resource for a deployment. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent of the folder, in the format - # `organizations/{organizationID}` or `folders/{folderID}`. - # @!attribute [rw] folder_display_name - # @return [::String] - # Required. The display name of the folder. - class FolderCreationConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The configuration that's required to create a project to be used - # as the target resource of a deployment. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent of the project, in the format - # `organizations/{organizationID}` or `folders/{folderID}`. - # @!attribute [rw] project_display_name - # @return [::String] - # Required. The display name of the project. - # @!attribute [rw] billing_account_id - # @return [::String] - # Required. The billing account ID for the project. - class ProjectCreationConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The enforcement mode and parameters of a cloud - # control deployment. - # @!attribute [rw] cloud_control_details - # @return [::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDetails] - # Required. The cloud control name and parameters. - # @!attribute [rw] enforcement_mode - # @return [::Google::Cloud::CloudSecurityCompliance::V1::EnforcementMode] - # Required. The enforcement mode of the cloud control. - class CloudControlMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for [CreateFrameworkDeployment][]. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource of the framework deployment in the format - # `organizations/{organization}/locations/{location}` - # or - # `projects/{project}/locations/{location}`. - # Only the global location is supported. - # @!attribute [rw] framework_deployment_id - # @return [::String] - # Optional. An identifier for the framework deployment that's unique in scope - # of the parent. If you don't specify a value, then a random UUID is - # generated. - # @!attribute [rw] framework_deployment - # @return [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment] - # Required. The framework deployment that you're creating. - class CreateFrameworkDeploymentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for [DeleteFrameworkDeployment][]. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the framework deployment that you want to delete, - # in the format - # `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}` - # or - # `projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}`. - # The only supported location is `global`. - # @!attribute [rw] etag - # @return [::String] - # Optional. An opaque identifier for the current version of the resource. - # - # If you provide this value, then it must match the existing value. If the - # values don't match, then the request fails with an - # [`ABORTED`][google.rpc.Code.ABORTED] error. - # - # If you omit this value, then the resource is deleted regardless of its - # current `etag` value. - class DeleteFrameworkDeploymentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for [GetFrameworkDeployment][]. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the framework deployment, in the format - # `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}` - # or - # `projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}`. - # The only supported location is `global`. - class GetFrameworkDeploymentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for [ListFrameworkDeployments][]. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource of the framework deployment, in the format - # `organizations/{organization}/locations/{location}` - # or - # `projects/{project}/locations/{location}`. - # The only supported location is `global`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The requested page size. The server might return fewer items than - # requested. - # If unspecified, the server picks an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token that identifies a page of results the server should - # return. - # @!attribute [rw] filter - # @return [::String] - # Optional. The filter to be applied on the resource, as defined by - # [AIP-160: Filtering](https://google.aip.dev/160). - # @!attribute [rw] order_by - # @return [::String] - # Optional. The sort order for the results. The following values are - # supported: - # - # * `name` - # * `name desc` - # - # If you do not specify a value, then the results are not sorted. - class ListFrameworkDeploymentsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for [ListFrameworkDeployments][]. - # @!attribute [rw] framework_deployments - # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment>] - # The list of framework deployments. - # @!attribute [rw] next_page_token - # @return [::String] - # A token that identifies the next page of results that the server - # should return. - class ListFrameworkDeploymentsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for [GetCloudControlDeployment][]. - # @!attribute [rw] name - # @return [::String] - # Required. The name for the cloud control deployment, in the format - # `organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}` - # or - # `projects/{project}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}`. - # The only supported location is `global`. - class GetCloudControlDeploymentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for [ListCloudControlDeployments][]. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource for the cloud control deployment, in the - # format `organizations/{organization}/locations/{location}` or - # `projects/{project}/locations/{location}`. - # The only supported location is `global`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The requested page size. The server might return fewer items than - # you requested. - # If unspecified, the server picks an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token that identifies the page of results that the server - # should return. - # @!attribute [rw] filter - # @return [::String] - # Optional. The filter to apply on the resource, as defined by - # [AIP-160: Filtering](https://google.aip.dev/160). - # @!attribute [rw] order_by - # @return [::String] - # Optional. The sort order for the results. The following values are - # supported: - # - # * `name` - # * `name desc` - # - # If you do not specify a value, then the results are not sorted. - class ListCloudControlDeploymentsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for [ListCloudControlDeployments][]. - # @!attribute [rw] cloud_control_deployments - # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment>] - # The list of cloud control deployments. - # @!attribute [rw] next_page_token - # @return [::String] - # A token that identifies the next page of results that the server - # should return. - class ListCloudControlDeploymentsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The reference to a cloud control deployment. - # @!attribute [r] cloud_control_deployment - # @return [::String] - # Output only. The name of the CloudControlDeployment. The format is - # `organizations/{organization}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}` - # or - # `projects/{project}/locations/{location}/cloudControlDeployments/{cloud_control_deployment}`. - # The only supported location is `global`. - class CloudControlDeploymentReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The reference to a framework deployment. - # @!attribute [r] framework_deployment - # @return [::String] - # Output only. The name of the framework deployment, in the format - # `organizations/{organization}/locations/{location}/frameworkDeployments/{framework_deployment}` - # or - # `projects/{project}/locations/{location}/frameworkDeployments/{framework_deployment}`. - # The only supported location is `global`. - # @!attribute [rw] framework_reference - # @return [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkReference] - # Optional. The reference to the framework that this deployment is for. - # For example: - # - # ``` - # { - # framework: - # "organizations/\\{organization}/locations/\\{location}/frameworks/\\{framework}", - # major_revision_id: 1 - # } - # ``` - # - # The only supported location is `global`. - # @!attribute [rw] framework_display_name - # @return [::String] - # Optional. The display name of the framework that this framework deployment - # is for. - class FrameworkDeploymentReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The state of the deployment resource. - module DeploymentState - # Default value. This value is unused. - DEPLOYMENT_STATE_UNSPECIFIED = 0 - - # Validating the deployment. - DEPLOYMENT_STATE_VALIDATING = 1 - - # Deployment is being created. - DEPLOYMENT_STATE_CREATING = 2 - - # Deployment is being deleted. - DEPLOYMENT_STATE_DELETING = 3 - - # Deployment is being updated. - DEPLOYMENT_STATE_UPDATING = 8 - - # Deployment has failed. All the changes made by the deployment were - # successfully rolled back. You can retry or delete a deployment that's - # in this state. - DEPLOYMENT_STATE_FAILED = 4 - - # Deployment is successful and ready to use. - DEPLOYMENT_STATE_READY = 5 - - # Deployment is partially deployed. All the cloud controls weren't deployed - # successfully. Retrying the operation resumes from the first failed - # step. - DEPLOYMENT_STATE_PARTIALLY_DEPLOYED = 6 - - # Deployment is partially deleted. All the cloud control deployments weren't - # deleted successfully. Retrying the operation resumes from the first - # failed step. - DEPLOYMENT_STATE_PARTIALLY_DELETED = 7 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/cloud/cloudsecuritycompliance/v1/monitoring.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/cloud/cloudsecuritycompliance/v1/monitoring.rb deleted file mode 100644 index adfa51fc7207..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/cloud/cloudsecuritycompliance/v1/monitoring.rb +++ /dev/null @@ -1,569 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module CloudSecurityCompliance - module V1 - # The request message for - # {::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkComplianceSummariesRequest ListFrameworkComplianceSummariesRequest}. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent scope for the framework compliance summary. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The requested page size. The server might return fewer items than - # requested. If unspecified, the server picks an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token that identifies the page of results that the server - # should return. - # @!attribute [rw] filter - # @return [::String] - # Optional. The filtering results. - # @!attribute [rw] view - # @return [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkComplianceSummaryView] - # Optional. Specifies the level of detail to return in the response. - class ListFrameworkComplianceSummariesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for - # {::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkComplianceSummariesResponse ListFrameworkComplianceSummariesResponse}. - # @!attribute [rw] framework_compliance_summaries - # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::FrameworkComplianceSummary>] - # The list of framework compliance summaries. - # @!attribute [r] next_page_token - # @return [::String] - # Output only. The token to retrieve the next page of results. - class ListFrameworkComplianceSummariesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for [GetFrameworkComplianceReport][]. - # @!attribute [rw] framework - # @return [::String] - # The name of the framework. - # @!attribute [rw] framework_description - # @return [::String] - # The description of the framework. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The last updated time of the report. - # @!attribute [rw] control_assessment_details - # @return [::Google::Cloud::CloudSecurityCompliance::V1::ControlAssessmentDetails] - # The control assessment details of the framework. - # @!attribute [rw] framework_type - # @return [::Google::Cloud::CloudSecurityCompliance::V1::Framework::FrameworkType] - # The type of framework. - # @!attribute [rw] supported_cloud_providers - # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::CloudProvider>] - # The list of cloud providers supported by the framework. - # @!attribute [rw] framework_categories - # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::FrameworkCategory>] - # The list of framework categories supported. - # @!attribute [rw] framework_display_name - # @return [::String] - # Optional. The display name for the framework. - # @!attribute [rw] name - # @return [::String] - # Identifier. The name of the framework compliance report. - # @!attribute [rw] major_revision_id - # @return [::Integer] - # The latest major revision ID of the framework. - # @!attribute [rw] minor_revision_id - # @return [::Integer] - # The latest minor revision ID of the latest major revision of the framework. - # @!attribute [rw] target_resource_details - # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::TargetResourceDetails>] - # The target resource details of the framework. - class FrameworkComplianceReport - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for [FetchFrameworkComplianceReport][]. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the framework compliance report to retrieve. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # Optional. The end time of the report. - # @!attribute [rw] filter - # @return [::String] - # Optional. The filtering results. - class FetchFrameworkComplianceReportRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for [ListFindingSummaries][]. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent scope for the framework overview page. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The requested page size. The server might return fewer items than - # requested. If unspecified, the server picks an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token that identifies the page of results that the server - # should return. - # @!attribute [rw] filter - # @return [::String] - # Optional. The filtering results. - # @!attribute [rw] end_time - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Protobuf::Timestamp] - # Optional. The end time of the finding summary. - class ListFindingSummariesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for [ListFindingSummaries][]. - # @!attribute [rw] finding_summaries - # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::FindingSummary>] - # List of finding summary by category. - # @!attribute [r] next_page_token - # @return [::String] - # Output only. The token to retrieve the next page of results. - class ListFindingSummariesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for [ListControlComplianceSummaries][]. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent scope for the framework overview page. - # @!attribute [rw] end_time - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Protobuf::Timestamp] - # Optional. The end time of the control compliance summary. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The requested page size. The server might return fewer items than - # requested. If unspecified, the server picks an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token that identifies the page of results that the server - # should return. - # @!attribute [rw] filter - # @return [::String] - # Optional. The filtering results. - class ListControlComplianceSummariesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for [ListControlComplianceSummaries][]. - # @!attribute [rw] control_compliance_summaries - # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::ControlComplianceSummary>] - # The list of control compliance details. - # @!attribute [r] next_page_token - # @return [::String] - # Output only. The token to retrieve the next page of results. - class ListControlComplianceSummariesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for [AggregateFrameworkComplianceReport][]. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the aggregated compliance report over time to - # retrieve. - # - # The supported format is: - # `organizations/{organization_id}/locations/{location}/frameworkComplianceReports/{framework_compliance_report}` - # @!attribute [rw] interval - # @return [::Google::Type::Interval] - # Optional. The start and end time range for the aggregated compliance - # report. - # @!attribute [rw] filter - # @return [::String] - # Optional. The filtering results. - class AggregateFrameworkComplianceReportRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for [AggregateFrameworkComplianceReport][]. - # @!attribute [rw] aggregated_compliance_reports - # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::AggregatedComplianceReport>] - # The list of aggregated compliance reports. - class AggregateFrameworkComplianceReportResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The details for a control assessment. - # @!attribute [rw] passing_controls - # @return [::Integer] - # The number of controls that are passing or not assessed. - # @!attribute [rw] failing_controls - # @return [::Integer] - # The number of controls that are failing. - # @!attribute [rw] assessed_passing_controls - # @return [::Integer] - # The number of controls that were assessed and are passing. - # @!attribute [rw] not_assessed_controls - # @return [::Integer] - # The number of controls that aren't assessed because they require manual - # review. - class ControlAssessmentDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The details for a framework compliance summary. - # @!attribute [rw] framework - # @return [::String] - # The name of the framework. - # @!attribute [rw] control_assessment_details - # @return [::Google::Cloud::CloudSecurityCompliance::V1::ControlAssessmentDetails] - # The control assessment details of the framework. - # @!attribute [rw] framework_type - # @return [::Google::Cloud::CloudSecurityCompliance::V1::Framework::FrameworkType] - # The type of framework. - # @!attribute [rw] supported_cloud_providers - # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::CloudProvider>] - # The list of cloud providers supported by the framework. - # @!attribute [rw] framework_categories - # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::FrameworkCategory>] - # The list of framework categories supported by the framework. - # @!attribute [rw] framework_display_name - # @return [::String] - # Optional. The display name for the framework. - # @!attribute [rw] name - # @return [::String] - # Identifier. The name of the framework compliance summary. - # @!attribute [rw] major_revision_id - # @return [::Integer] - # The major revision ID of the framework. - # @!attribute [rw] minor_revision_id - # @return [::Integer] - # The minor revision ID of the framework. - # @!attribute [rw] target_resource_details - # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::TargetResourceDetails>] - # The target resource details for the framework. - # @!attribute [r] finding_count - # @return [::Integer] - # Output only. The count of the findings generated against the framework. - # @!attribute [r] controls_passing_trend - # @return [::Google::Cloud::CloudSecurityCompliance::V1::Trend] - # Output only. The trend of controls that are passing for the given duration. - class FrameworkComplianceSummary - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The details for a finding. - # @!attribute [rw] finding_category - # @return [::String] - # The category of the finding. - # @!attribute [rw] finding_class - # @return [::Google::Cloud::CloudSecurityCompliance::V1::FindingClass] - # The class of the finding. - # @!attribute [rw] severity - # @return [::Google::Cloud::CloudSecurityCompliance::V1::Severity] - # The severity of the finding. - # @!attribute [rw] finding_count - # @return [::Integer] - # The count of the finding. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The last updated time of the finding. - # @!attribute [rw] related_frameworks - # @return [::Array<::String>] - # Optional. The list of compliance frameworks that the finding belongs to. - # @!attribute [rw] name - # @return [::String] - # Identifier. The name of the finding summary. - class FindingSummary - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The details for control compliance. - # @!attribute [rw] control - # @return [::String] - # The name of the control. - # @!attribute [rw] display_name - # @return [::String] - # The display name of the control. - # @!attribute [rw] description - # @return [::String] - # The description of the control. - # @!attribute [r] overall_evaluation_state - # @return [::Google::Cloud::CloudSecurityCompliance::V1::EvaluationState] - # Output only. The overall evaluation status of the control. - # @!attribute [rw] total_findings_count - # @return [::Integer] - # The total number of findings for the control. - # @!attribute [rw] compliance_frameworks - # @return [::Array<::String>] - # The list of compliance frameworks that the control belongs to. - # @!attribute [rw] similar_controls - # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::SimilarControls>] - # The list of similar controls. - # @!attribute [rw] cloud_control_reports - # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::CloudControlReport>] - # The list of cloud control reports. - # @!attribute [rw] control_responsibility_type - # @return [::Google::Cloud::CloudSecurityCompliance::V1::RegulatoryControlResponsibilityType] - # The responsibility type for the control. - # @!attribute [rw] is_fake_control - # @return [::Boolean] - # Whether the control is a fake control. Fake controls are created - # and mapped to cloud controls that don't belong to a control group. - # @!attribute [rw] name - # @return [::String] - # Identifier. The name of the control compliance summary. - class ControlComplianceSummary - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The cloud control report. - # @!attribute [rw] manual_cloud_control_assessment_details - # @return [::Google::Cloud::CloudSecurityCompliance::V1::ManualCloudControlAssessmentDetails] - # The details of a manual cloud control assessment. - # - # Note: The following fields are mutually exclusive: `manual_cloud_control_assessment_details`, `cloud_control_assessment_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] cloud_control_assessment_details - # @return [::Google::Cloud::CloudSecurityCompliance::V1::CloudControlAssessmentDetails] - # The details of a cloud control assessment. - # - # Note: The following fields are mutually exclusive: `cloud_control_assessment_details`, `manual_cloud_control_assessment_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] cloud_control - # @return [::String] - # The name of the cloud control. - # @!attribute [rw] display_name - # @return [::String] - # The display name of the cloud control. - # @!attribute [rw] description - # @return [::String] - # The description of the cloud control. - # @!attribute [rw] categories - # @return [::Array<::String>] - # The list of categories for the cloud control. - # @!attribute [rw] similar_controls - # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::SimilarControls>] - # The list of similar controls. - # @!attribute [rw] cloud_control_type - # @return [::Google::Cloud::CloudSecurityCompliance::V1::CloudControl::Type] - # The type of the cloud control. - # @!attribute [rw] finding_category - # @return [::String] - # The category of the finding. - # @!attribute [rw] rules - # @return [::Array<::Google::Cloud::CloudSecurityCompliance::V1::Rule>] - # The list of rules that correspond to the cloud control. - # @!attribute [rw] finding_severity - # @return [::Google::Cloud::CloudSecurityCompliance::V1::Severity] - # The severity of the finding. - # @!attribute [rw] enforcement_mode - # @return [::Google::Cloud::CloudSecurityCompliance::V1::EnforcementMode] - # The enforcement mode of the cloud control. - # @!attribute [rw] cloud_control_deployment - # @return [::String] - # The name of the cloud control deployment. - # @!attribute [rw] major_revision_id - # @return [::Integer] - # The major revision ID of the cloud control. - # @!attribute [rw] minor_revision_id - # @return [::Integer] - # The minor revision ID of the cloud control. - # @!attribute [rw] framework_major_revision_ids - # @return [::Array<::Integer>] - # The major revision IDs of the frameworks that the cloud control belongs to. - class CloudControlReport - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The details for a manual cloud control assessment. - # @!attribute [rw] manual_cloud_control_guide - # @return [::Array<::String>] - # The guide for assessing a cloud control manually. - class ManualCloudControlAssessmentDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The cloud control assessment details for non-manual cloud controls. - # @!attribute [rw] findings_count - # @return [::Integer] - # The number of findings for the cloud control. - # @!attribute [r] evaluation_state - # @return [::Google::Cloud::CloudSecurityCompliance::V1::EvaluationState] - # Output only. The evaluation status of the cloud control. - class CloudControlAssessmentDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The similar controls. - # @!attribute [rw] framework - # @return [::String] - # The name of the framework. - # @!attribute [rw] control_id - # @return [::String] - # The ID of the control. - class SimilarControls - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The aggregated compliance report. - # @!attribute [rw] control_assessment_details - # @return [::Google::Cloud::CloudSecurityCompliance::V1::ControlAssessmentDetails] - # The control assessment details of the framework. - # @!attribute [rw] report_time - # @return [::Google::Protobuf::Timestamp] - # The report time of the aggregated compliance report. - class AggregatedComplianceReport - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The details for a target resource. - # @!attribute [rw] framework_deployment - # @return [::String] - # The framework deployment name for the target resource. - # - # For example, - # `organizations/{organization_id}/locations/{location}/frameworkDeployments/{framework_deployment_id}` - # @!attribute [rw] target_resource_display_name - # @return [::String] - # The display name of the target resource. For example, `google.com`, - # `staging-project`, or `development-folder`. - # @!attribute [rw] target_resource - # @return [::String] - # The target resource. For example, `organizations/1234567890`, - # `projects/1234567890`, or `folders/1234567890`. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # The create time of the target resource. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # The update time of the target resource. - # @!attribute [rw] major_revision_id - # @return [::Integer] - # The major revision ID of the framework for the target resource. - # @!attribute [rw] minor_revision_id - # @return [::Integer] - # The minor revision ID of the framework for the target resource. - class TargetResourceDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The trend of a compliance metric. - # @!attribute [r] duration - # @return [::Google::Protobuf::Duration] - # Output only. The duration for the trend. - # @!attribute [r] value_percent - # @return [::Float] - # Output only. The trend value as a percentage. The value can be positive or - # negative. - class Trend - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The evaluation state of the control. - module EvaluationState - # Default value. This value is unused. - EVALUATION_STATE_UNSPECIFIED = 0 - - # The control is passing. - EVALUATION_STATE_PASSED = 1 - - # The control is failing. - EVALUATION_STATE_FAILED = 2 - - # The control is not assessed. - EVALUATION_STATE_NOT_ASSESSED = 3 - end - - # A finding is a record of assessment data like security, risk, health, or - # privacy. - module FindingClass - # Default value. This value is unused. - FINDING_CLASS_UNSPECIFIED = 0 - - # The activity is unwanted or malicious. - THREAT = 1 - - # A potential weakness in software that increases risk to - # confidentiality, integrity, and availability. - VULNERABILITY = 2 - - # A potential weakness in a cloud resource or asset configuration that - # increases risk. - MISCONFIGURATION = 3 - - # A security observation that is for informational purposes. - OBSERVATION = 4 - - # An error that prevents Security Command Center from functioning properly. - SCC_ERROR = 5 - - # A potential security risk that's due to a change in the security - # posture. - POSTURE_VIOLATION = 6 - - # A combination of security issues that represent a more severe - # security problem when taken together. - TOXIC_COMBINATION = 7 - - # A potential security risk to data assets that contain sensitive - # data. - SENSITIVE_DATA_RISK = 8 - - # A resource or resource group where high risk attack paths - # converge, based on attack path simulations (APS). - CHOKEPOINT = 9 - end - - # Specifies the view of the framework compliance summary to be returned. - # New values may be added in the future. - module FrameworkComplianceSummaryView - # The default / unset value. The API will default to the BASIC view. - FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_UNSPECIFIED = 0 - - # Includes basic compliance metadata, but omits trend data. - FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_BASIC = 1 - - # Includes all information, including - # [finding_count][google.cloud.cloudsecuritycompliance.v1main.FrameworkComplianceSummary.finding_count] - # and - # [controls_passing_trend][google.cloud.cloudsecuritycompliance.v1main.FrameworkComplianceSummary.controls_passing_trend]. - # Trend data is provided for the last 30 days. - FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_FULL = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/longrunning/operations.rb +++ /dev/null @@ -1,191 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Longrunning - # This resource represents a long-running operation that is the result of a - # network API call. - # @!attribute [rw] name - # @return [::String] - # The server-assigned name, which is only unique within the same service that - # originally returns it. If you use the default HTTP mapping, the - # `name` should be a resource name ending with `operations/{unique_id}`. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Any] - # Service-specific metadata associated with the operation. It typically - # contains progress information and common metadata such as create time. - # Some services might not provide such metadata. Any method that returns a - # long-running operation should document the metadata type, if any. - # @!attribute [rw] done - # @return [::Boolean] - # If the value is `false`, it means the operation is still in progress. - # If `true`, the operation is completed, and either `error` or `response` is - # available. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # The error result of the operation in case of failure or cancellation. - # - # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] response - # @return [::Google::Protobuf::Any] - # The normal, successful response of the operation. If the original - # method returns no data on success, such as `Delete`, the response is - # `google.protobuf.Empty`. If the original method is standard - # `Get`/`Create`/`Update`, the response should be the resource. For other - # methods, the response should have the type `XxxResponse`, where `Xxx` - # is the original method name. For example, if the original method name - # is `TakeSnapshot()`, the inferred response type is - # `TakeSnapshotResponse`. - # - # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Operation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.GetOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource. - class GetOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.ListOperations. - # @!attribute [rw] name - # @return [::String] - # The name of the operation's parent resource. - # @!attribute [rw] filter - # @return [::String] - # The standard list filter. - # @!attribute [rw] page_size - # @return [::Integer] - # The standard list page size. - # @!attribute [rw] page_token - # @return [::String] - # The standard list page token. - # @!attribute [rw] return_partial_success - # @return [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - class ListOperationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for - # Operations.ListOperations. - # @!attribute [rw] operations - # @return [::Array<::Google::Longrunning::Operation>] - # A list of operations that matches the specified filter in the request. - # @!attribute [rw] next_page_token - # @return [::String] - # The standard List next-page token. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unordered list. Unreachable resources. Populated when the request sets - # `ListOperationsRequest.return_partial_success` and reads across - # collections e.g. when attempting to list all resources across all supported - # locations. - class ListOperationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.CancelOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be cancelled. - class CancelOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.DeleteOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be deleted. - class DeleteOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.WaitOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to wait on. - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - class WaitOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message representing the message types used by a long-running operation. - # - # Example: - # - # rpc Export(ExportRequest) returns (google.longrunning.Operation) { - # option (google.longrunning.operation_info) = { - # response_type: "ExportResponse" - # metadata_type: "ExportMetadata" - # }; - # } - # @!attribute [rw] response_type - # @return [::String] - # Required. The message name of the primary return type for this - # long-running operation. - # This type will be used to deserialize the LRO's response. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - # @!attribute [rw] metadata_type - # @return [::String] - # Required. The message name of the metadata type for this long-running - # operation. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - class OperationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Any` contains an arbitrary serialized protocol buffer message along with a - # URL that describes the type of the serialized message. - # - # Protobuf library provides support to pack/unpack Any values in the form - # of utility functions or additional generated methods of the Any type. - # - # Example 1: Pack and unpack a message in C++. - # - # Foo foo = ...; - # Any any; - # any.PackFrom(foo); - # ... - # if (any.UnpackTo(&foo)) { - # ... - # } - # - # Example 2: Pack and unpack a message in Java. - # - # Foo foo = ...; - # Any any = Any.pack(foo); - # ... - # if (any.is(Foo.class)) { - # foo = any.unpack(Foo.class); - # } - # // or ... - # if (any.isSameTypeAs(Foo.getDefaultInstance())) { - # foo = any.unpack(Foo.getDefaultInstance()); - # } - # - # Example 3: Pack and unpack a message in Python. - # - # foo = Foo(...) - # any = Any() - # any.Pack(foo) - # ... - # if any.Is(Foo.DESCRIPTOR): - # any.Unpack(foo) - # ... - # - # Example 4: Pack and unpack a message in Go - # - # foo := &pb.Foo{...} - # any, err := anypb.New(foo) - # if err != nil { - # ... - # } - # ... - # foo := &pb.Foo{} - # if err := any.UnmarshalTo(foo); err != nil { - # ... - # } - # - # The pack methods provided by protobuf library will by default use - # 'type.googleapis.com/full.type.name' as the type URL and the unpack - # methods only use the fully qualified type name after the last '/' - # in the type URL, for example "foo.bar.com/x/y.z" will yield type - # name "y.z". - # - # JSON - # ==== - # The JSON representation of an `Any` value uses the regular - # representation of the deserialized, embedded message, with an - # additional field `@type` which contains the type URL. Example: - # - # package google.profile; - # message Person { - # string first_name = 1; - # string last_name = 2; - # } - # - # { - # "@type": "type.googleapis.com/google.profile.Person", - # "firstName": , - # "lastName": - # } - # - # If the embedded message type is well-known and has a custom JSON - # representation, that representation will be embedded adding a field - # `value` which holds the custom JSON in addition to the `@type` - # field. Example (for message [google.protobuf.Duration][]): - # - # { - # "@type": "type.googleapis.com/google.protobuf.Duration", - # "value": "1.212s" - # } - # @!attribute [rw] type_url - # @return [::String] - # A URL/resource name that uniquely identifies the type of the serialized - # protocol buffer message. This string must contain at least - # one "/" character. The last segment of the URL's path must represent - # the fully qualified name of the type (as in - # `path/google.protobuf.Duration`). The name should be in a canonical form - # (e.g., leading "." is not accepted). - # - # In practice, teams usually precompile into the binary all types that they - # expect it to use in the context of Any. However, for URLs which use the - # scheme `http`, `https`, or no scheme, one can optionally set up a type - # server that maps type URLs to message definitions as follows: - # - # * If no scheme is provided, `https` is assumed. - # * An HTTP GET on the URL must yield a [google.protobuf.Type][] - # value in binary format, or produce an error. - # * Applications are allowed to cache lookup results based on the - # URL, or have them precompiled into a binary to avoid any - # lookup. Therefore, binary compatibility needs to be preserved - # on changes to types. (Use versioned type names to manage - # breaking changes.) - # - # Note: this functionality is not currently available in the official - # protobuf release, and it is not used for type URLs beginning with - # type.googleapis.com. As of May 2023, there are no widely used type server - # implementations and no plans to implement one. - # - # Schemes other than `http`, `https` (or the empty scheme) might be - # used with implementation specific semantics. - # @!attribute [rw] value - # @return [::String] - # Must be a valid serialized protocol buffer of the above specified type. - class Any - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/protobuf/field_mask.rb +++ /dev/null @@ -1,229 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `FieldMask` represents a set of symbolic field paths, for example: - # - # paths: "f.a" - # paths: "f.b.d" - # - # Here `f` represents a field in some root message, `a` and `b` - # fields in the message found in `f`, and `d` a field found in the - # message in `f.b`. - # - # Field masks are used to specify a subset of fields that should be - # returned by a get operation or modified by an update operation. - # Field masks also have a custom JSON encoding (see below). - # - # # Field Masks in Projections - # - # When used in the context of a projection, a response message or - # sub-message is filtered by the API to only contain those fields as - # specified in the mask. For example, if the mask in the previous - # example is applied to a response message as follows: - # - # f { - # a : 22 - # b { - # d : 1 - # x : 2 - # } - # y : 13 - # } - # z: 8 - # - # The result will not contain specific values for fields x,y and z - # (their value will be set to the default, and omitted in proto text - # output): - # - # - # f { - # a : 22 - # b { - # d : 1 - # } - # } - # - # A repeated field is not allowed except at the last position of a - # paths string. - # - # If a FieldMask object is not present in a get operation, the - # operation applies to all fields (as if a FieldMask of all fields - # had been specified). - # - # Note that a field mask does not necessarily apply to the - # top-level response message. In case of a REST get operation, the - # field mask applies directly to the response, but in case of a REST - # list operation, the mask instead applies to each individual message - # in the returned resource list. In case of a REST custom method, - # other definitions may be used. Where the mask applies will be - # clearly documented together with its declaration in the API. In - # any case, the effect on the returned resource/resources is required - # behavior for APIs. - # - # # Field Masks in Update Operations - # - # A field mask in update operations specifies which fields of the - # targeted resource are going to be updated. The API is required - # to only change the values of the fields as specified in the mask - # and leave the others untouched. If a resource is passed in to - # describe the updated values, the API ignores the values of all - # fields not covered by the mask. - # - # If a repeated field is specified for an update operation, new values will - # be appended to the existing repeated field in the target resource. Note that - # a repeated field is only allowed in the last position of a `paths` string. - # - # If a sub-message is specified in the last position of the field mask for an - # update operation, then new value will be merged into the existing sub-message - # in the target resource. - # - # For example, given the target message: - # - # f { - # b { - # d: 1 - # x: 2 - # } - # c: [1] - # } - # - # And an update message: - # - # f { - # b { - # d: 10 - # } - # c: [2] - # } - # - # then if the field mask is: - # - # paths: ["f.b", "f.c"] - # - # then the result will be: - # - # f { - # b { - # d: 10 - # x: 2 - # } - # c: [1, 2] - # } - # - # An implementation may provide options to override this default behavior for - # repeated and message fields. - # - # In order to reset a field's value to the default, the field must - # be in the mask and set to the default value in the provided resource. - # Hence, in order to reset all fields of a resource, provide a default - # instance of the resource and set all fields in the mask, or do - # not provide a mask as described below. - # - # If a field mask is not present on update, the operation applies to - # all fields (as if a field mask of all fields has been specified). - # Note that in the presence of schema evolution, this may mean that - # fields the client does not know and has therefore not filled into - # the request will be reset to their default. If this is unwanted - # behavior, a specific service may require a client to always specify - # a field mask, producing an error if not. - # - # As with get operations, the location of the resource which - # describes the updated values in the request message depends on the - # operation kind. In any case, the effect of the field mask is - # required to be honored by the API. - # - # ## Considerations for HTTP REST - # - # The HTTP kind of an update operation which uses a field mask must - # be set to PATCH instead of PUT in order to satisfy HTTP semantics - # (PUT must only be used for full updates). - # - # # JSON Encoding of Field Masks - # - # In JSON, a field mask is encoded as a single string where paths are - # separated by a comma. Fields name in each path are converted - # to/from lower-camel naming conventions. - # - # As an example, consider the following message declarations: - # - # message Profile { - # User user = 1; - # Photo photo = 2; - # } - # message User { - # string display_name = 1; - # string address = 2; - # } - # - # In proto a field mask for `Profile` may look as such: - # - # mask { - # paths: "user.display_name" - # paths: "photo" - # } - # - # In JSON, the same mask is represented as below: - # - # { - # mask: "user.displayName,photo" - # } - # - # # Field Masks and Oneof Fields - # - # Field masks treat fields in oneofs just as regular fields. Consider the - # following message: - # - # message SampleMessage { - # oneof test_oneof { - # string name = 4; - # SubMessage sub_message = 9; - # } - # } - # - # The field mask can be: - # - # mask { - # paths: "name" - # } - # - # Or: - # - # mask { - # paths: "sub_message" - # } - # - # Note that oneof type names ("test_oneof" in this case) cannot be used in - # paths. - # - # ## Field Mask Verification - # - # The implementation of any API method which has a FieldMask type field in the - # request should verify the included field paths, and return an - # `INVALID_ARGUMENT` error if any path is unmappable. - # @!attribute [rw] paths - # @return [::Array<::String>] - # The set of field mask paths. - class FieldMask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/rpc/status.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Rpc - # The `Status` type defines a logical error model that is suitable for - # different programming environments, including REST APIs and RPC APIs. It is - # used by [gRPC](https://github.com/grpc). Each `Status` message contains - # three pieces of data: error code, error message, and error details. - # - # You can find out more about this error model and how to work with it in the - # [API Design Guide](https://cloud.google.com/apis/design/errors). - # @!attribute [rw] code - # @return [::Integer] - # The status code, which should be an enum value of - # [google.rpc.Code][google.rpc.Code]. - # @!attribute [rw] message - # @return [::String] - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized - # by the client. - # @!attribute [rw] details - # @return [::Array<::Google::Protobuf::Any>] - # A list of messages that carry the error details. There is a common set of - # message types for APIs to use. - class Status - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/type/interval.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/type/interval.rb deleted file mode 100644 index 9350ca479005..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/proto_docs/google/type/interval.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a time interval, encoded as a Timestamp start (inclusive) and a - # Timestamp end (exclusive). - # - # The start must be less than or equal to the end. - # When the start equals the end, the interval is empty (matches no time). - # When both start and end are unspecified, the interval matches any time. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # Optional. Inclusive start of the interval. - # - # If specified, a Timestamp matching this interval will have to be the same - # or after the start. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # Optional. Exclusive end of the interval. - # - # If specified, a Timestamp matching this interval will have to be before the - # end. - class Interval - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/Gemfile deleted file mode 100644 index 364a5ba4cea8..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-cloud_security_compliance-v1", path: "../" -else - gem "google-cloud-cloud_security_compliance-v1" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/audit/create_framework_audit.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/audit/create_framework_audit.rb deleted file mode 100644 index ce659d02bf89..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/audit/create_framework_audit.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudsecuritycompliance_v1_generated_Audit_CreateFrameworkAudit_sync] -require "google/cloud/cloud_security_compliance/v1" - -## -# Snippet for the create_framework_audit call in the Audit service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::CloudSecurityCompliance::V1::Audit::Client#create_framework_audit. -# -def create_framework_audit - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CloudSecurityCompliance::V1::Audit::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkAuditRequest.new - - # Call the create_framework_audit method. - result = client.create_framework_audit request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END cloudsecuritycompliance_v1_generated_Audit_CreateFrameworkAudit_sync] diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/audit/generate_framework_audit_scope_report.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/audit/generate_framework_audit_scope_report.rb deleted file mode 100644 index 5c753a51d708..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/audit/generate_framework_audit_scope_report.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudsecuritycompliance_v1_generated_Audit_GenerateFrameworkAuditScopeReport_sync] -require "google/cloud/cloud_security_compliance/v1" - -## -# Snippet for the generate_framework_audit_scope_report call in the Audit service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::CloudSecurityCompliance::V1::Audit::Client#generate_framework_audit_scope_report. -# -def generate_framework_audit_scope_report - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CloudSecurityCompliance::V1::Audit::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportRequest.new - - # Call the generate_framework_audit_scope_report method. - result = client.generate_framework_audit_scope_report request - - # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportResponse. - p result -end -# [END cloudsecuritycompliance_v1_generated_Audit_GenerateFrameworkAuditScopeReport_sync] diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/audit/get_framework_audit.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/audit/get_framework_audit.rb deleted file mode 100644 index 2e6b4e57cfd1..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/audit/get_framework_audit.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudsecuritycompliance_v1_generated_Audit_GetFrameworkAudit_sync] -require "google/cloud/cloud_security_compliance/v1" - -## -# Snippet for the get_framework_audit call in the Audit service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::CloudSecurityCompliance::V1::Audit::Client#get_framework_audit. -# -def get_framework_audit - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CloudSecurityCompliance::V1::Audit::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkAuditRequest.new - - # Call the get_framework_audit method. - result = client.get_framework_audit request - - # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::FrameworkAudit. - p result -end -# [END cloudsecuritycompliance_v1_generated_Audit_GetFrameworkAudit_sync] diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/audit/list_framework_audits.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/audit/list_framework_audits.rb deleted file mode 100644 index 7dab0e738235..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/audit/list_framework_audits.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudsecuritycompliance_v1_generated_Audit_ListFrameworkAudits_sync] -require "google/cloud/cloud_security_compliance/v1" - -## -# Snippet for the list_framework_audits call in the Audit service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::CloudSecurityCompliance::V1::Audit::Client#list_framework_audits. -# -def list_framework_audits - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CloudSecurityCompliance::V1::Audit::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkAuditsRequest.new - - # Call the list_framework_audits method. - result = client.list_framework_audits request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::CloudSecurityCompliance::V1::FrameworkAudit. - p item - end -end -# [END cloudsecuritycompliance_v1_generated_Audit_ListFrameworkAudits_sync] diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/cm_enrollment_service/calculate_effective_cm_enrollment.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/cm_enrollment_service/calculate_effective_cm_enrollment.rb deleted file mode 100644 index 6f5c4a66813b..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/cm_enrollment_service/calculate_effective_cm_enrollment.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudsecuritycompliance_v1_generated_CmEnrollmentService_CalculateEffectiveCmEnrollment_sync] -require "google/cloud/cloud_security_compliance/v1" - -## -# Snippet for the calculate_effective_cm_enrollment call in the CmEnrollmentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Client#calculate_effective_cm_enrollment. -# -def calculate_effective_cm_enrollment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CloudSecurityCompliance::V1::CalculateEffectiveCmEnrollmentRequest.new - - # Call the calculate_effective_cm_enrollment method. - result = client.calculate_effective_cm_enrollment request - - # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::CalculateEffectiveCmEnrollmentResponse. - p result -end -# [END cloudsecuritycompliance_v1_generated_CmEnrollmentService_CalculateEffectiveCmEnrollment_sync] diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/cm_enrollment_service/update_cm_enrollment.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/cm_enrollment_service/update_cm_enrollment.rb deleted file mode 100644 index d3b494a1582e..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/cm_enrollment_service/update_cm_enrollment.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudsecuritycompliance_v1_generated_CmEnrollmentService_UpdateCmEnrollment_sync] -require "google/cloud/cloud_security_compliance/v1" - -## -# Snippet for the update_cm_enrollment call in the CmEnrollmentService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Client#update_cm_enrollment. -# -def update_cm_enrollment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CloudSecurityCompliance::V1::UpdateCmEnrollmentRequest.new - - # Call the update_cm_enrollment method. - result = client.update_cm_enrollment request - - # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::CmEnrollment. - p result -end -# [END cloudsecuritycompliance_v1_generated_CmEnrollmentService_UpdateCmEnrollment_sync] diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/create_cloud_control.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/create_cloud_control.rb deleted file mode 100644 index ea3ac426a874..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/create_cloud_control.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudsecuritycompliance_v1_generated_Config_CreateCloudControl_sync] -require "google/cloud/cloud_security_compliance/v1" - -## -# Snippet for the create_cloud_control call in the Config service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::CloudSecurityCompliance::V1::Config::Client#create_cloud_control. -# -def create_cloud_control - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CloudSecurityCompliance::V1::CreateCloudControlRequest.new - - # Call the create_cloud_control method. - result = client.create_cloud_control request - - # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::CloudControl. - p result -end -# [END cloudsecuritycompliance_v1_generated_Config_CreateCloudControl_sync] diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/create_framework.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/create_framework.rb deleted file mode 100644 index fb1b27a7eafd..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/create_framework.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudsecuritycompliance_v1_generated_Config_CreateFramework_sync] -require "google/cloud/cloud_security_compliance/v1" - -## -# Snippet for the create_framework call in the Config service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::CloudSecurityCompliance::V1::Config::Client#create_framework. -# -def create_framework - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkRequest.new - - # Call the create_framework method. - result = client.create_framework request - - # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::Framework. - p result -end -# [END cloudsecuritycompliance_v1_generated_Config_CreateFramework_sync] diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/delete_cloud_control.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/delete_cloud_control.rb deleted file mode 100644 index 069434007011..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/delete_cloud_control.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudsecuritycompliance_v1_generated_Config_DeleteCloudControl_sync] -require "google/cloud/cloud_security_compliance/v1" - -## -# Snippet for the delete_cloud_control call in the Config service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::CloudSecurityCompliance::V1::Config::Client#delete_cloud_control. -# -def delete_cloud_control - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CloudSecurityCompliance::V1::DeleteCloudControlRequest.new - - # Call the delete_cloud_control method. - result = client.delete_cloud_control request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END cloudsecuritycompliance_v1_generated_Config_DeleteCloudControl_sync] diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/delete_framework.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/delete_framework.rb deleted file mode 100644 index 79399e028c57..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/delete_framework.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudsecuritycompliance_v1_generated_Config_DeleteFramework_sync] -require "google/cloud/cloud_security_compliance/v1" - -## -# Snippet for the delete_framework call in the Config service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::CloudSecurityCompliance::V1::Config::Client#delete_framework. -# -def delete_framework - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkRequest.new - - # Call the delete_framework method. - result = client.delete_framework request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END cloudsecuritycompliance_v1_generated_Config_DeleteFramework_sync] diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/get_cloud_control.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/get_cloud_control.rb deleted file mode 100644 index 1100e8dfd490..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/get_cloud_control.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudsecuritycompliance_v1_generated_Config_GetCloudControl_sync] -require "google/cloud/cloud_security_compliance/v1" - -## -# Snippet for the get_cloud_control call in the Config service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::CloudSecurityCompliance::V1::Config::Client#get_cloud_control. -# -def get_cloud_control - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlRequest.new - - # Call the get_cloud_control method. - result = client.get_cloud_control request - - # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::CloudControl. - p result -end -# [END cloudsecuritycompliance_v1_generated_Config_GetCloudControl_sync] diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/get_framework.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/get_framework.rb deleted file mode 100644 index af0ec33d3935..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/get_framework.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudsecuritycompliance_v1_generated_Config_GetFramework_sync] -require "google/cloud/cloud_security_compliance/v1" - -## -# Snippet for the get_framework call in the Config service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::CloudSecurityCompliance::V1::Config::Client#get_framework. -# -def get_framework - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkRequest.new - - # Call the get_framework method. - result = client.get_framework request - - # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::Framework. - p result -end -# [END cloudsecuritycompliance_v1_generated_Config_GetFramework_sync] diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/list_cloud_controls.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/list_cloud_controls.rb deleted file mode 100644 index a682b0e50076..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/list_cloud_controls.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudsecuritycompliance_v1_generated_Config_ListCloudControls_sync] -require "google/cloud/cloud_security_compliance/v1" - -## -# Snippet for the list_cloud_controls call in the Config service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::CloudSecurityCompliance::V1::Config::Client#list_cloud_controls. -# -def list_cloud_controls - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlsRequest.new - - # Call the list_cloud_controls method. - result = client.list_cloud_controls request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::CloudSecurityCompliance::V1::CloudControl. - p item - end -end -# [END cloudsecuritycompliance_v1_generated_Config_ListCloudControls_sync] diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/list_frameworks.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/list_frameworks.rb deleted file mode 100644 index 8c39cf70ff77..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/list_frameworks.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudsecuritycompliance_v1_generated_Config_ListFrameworks_sync] -require "google/cloud/cloud_security_compliance/v1" - -## -# Snippet for the list_frameworks call in the Config service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::CloudSecurityCompliance::V1::Config::Client#list_frameworks. -# -def list_frameworks - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CloudSecurityCompliance::V1::ListFrameworksRequest.new - - # Call the list_frameworks method. - result = client.list_frameworks request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::CloudSecurityCompliance::V1::Framework. - p item - end -end -# [END cloudsecuritycompliance_v1_generated_Config_ListFrameworks_sync] diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/update_cloud_control.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/update_cloud_control.rb deleted file mode 100644 index ba3ed702de99..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/update_cloud_control.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudsecuritycompliance_v1_generated_Config_UpdateCloudControl_sync] -require "google/cloud/cloud_security_compliance/v1" - -## -# Snippet for the update_cloud_control call in the Config service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::CloudSecurityCompliance::V1::Config::Client#update_cloud_control. -# -def update_cloud_control - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CloudSecurityCompliance::V1::UpdateCloudControlRequest.new - - # Call the update_cloud_control method. - result = client.update_cloud_control request - - # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::CloudControl. - p result -end -# [END cloudsecuritycompliance_v1_generated_Config_UpdateCloudControl_sync] diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/update_framework.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/update_framework.rb deleted file mode 100644 index 773e5aa1f5ab..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/config/update_framework.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudsecuritycompliance_v1_generated_Config_UpdateFramework_sync] -require "google/cloud/cloud_security_compliance/v1" - -## -# Snippet for the update_framework call in the Config service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::CloudSecurityCompliance::V1::Config::Client#update_framework. -# -def update_framework - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CloudSecurityCompliance::V1::UpdateFrameworkRequest.new - - # Call the update_framework method. - result = client.update_framework request - - # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::Framework. - p result -end -# [END cloudsecuritycompliance_v1_generated_Config_UpdateFramework_sync] diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/deployment/create_framework_deployment.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/deployment/create_framework_deployment.rb deleted file mode 100644 index d24a477bf574..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/deployment/create_framework_deployment.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudsecuritycompliance_v1_generated_Deployment_CreateFrameworkDeployment_sync] -require "google/cloud/cloud_security_compliance/v1" - -## -# Snippet for the create_framework_deployment call in the Deployment service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client#create_framework_deployment. -# -def create_framework_deployment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkDeploymentRequest.new - - # Call the create_framework_deployment method. - result = client.create_framework_deployment request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END cloudsecuritycompliance_v1_generated_Deployment_CreateFrameworkDeployment_sync] diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/deployment/delete_framework_deployment.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/deployment/delete_framework_deployment.rb deleted file mode 100644 index 609ff968e9dc..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/deployment/delete_framework_deployment.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudsecuritycompliance_v1_generated_Deployment_DeleteFrameworkDeployment_sync] -require "google/cloud/cloud_security_compliance/v1" - -## -# Snippet for the delete_framework_deployment call in the Deployment service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client#delete_framework_deployment. -# -def delete_framework_deployment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkDeploymentRequest.new - - # Call the delete_framework_deployment method. - result = client.delete_framework_deployment request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END cloudsecuritycompliance_v1_generated_Deployment_DeleteFrameworkDeployment_sync] diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/deployment/get_cloud_control_deployment.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/deployment/get_cloud_control_deployment.rb deleted file mode 100644 index b5626f18d60e..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/deployment/get_cloud_control_deployment.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudsecuritycompliance_v1_generated_Deployment_GetCloudControlDeployment_sync] -require "google/cloud/cloud_security_compliance/v1" - -## -# Snippet for the get_cloud_control_deployment call in the Deployment service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client#get_cloud_control_deployment. -# -def get_cloud_control_deployment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlDeploymentRequest.new - - # Call the get_cloud_control_deployment method. - result = client.get_cloud_control_deployment request - - # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment. - p result -end -# [END cloudsecuritycompliance_v1_generated_Deployment_GetCloudControlDeployment_sync] diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/deployment/get_framework_deployment.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/deployment/get_framework_deployment.rb deleted file mode 100644 index a8b63334d6fe..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/deployment/get_framework_deployment.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudsecuritycompliance_v1_generated_Deployment_GetFrameworkDeployment_sync] -require "google/cloud/cloud_security_compliance/v1" - -## -# Snippet for the get_framework_deployment call in the Deployment service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client#get_framework_deployment. -# -def get_framework_deployment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkDeploymentRequest.new - - # Call the get_framework_deployment method. - result = client.get_framework_deployment request - - # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment. - p result -end -# [END cloudsecuritycompliance_v1_generated_Deployment_GetFrameworkDeployment_sync] diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/deployment/list_cloud_control_deployments.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/deployment/list_cloud_control_deployments.rb deleted file mode 100644 index d0f99bf0331c..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/deployment/list_cloud_control_deployments.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudsecuritycompliance_v1_generated_Deployment_ListCloudControlDeployments_sync] -require "google/cloud/cloud_security_compliance/v1" - -## -# Snippet for the list_cloud_control_deployments call in the Deployment service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client#list_cloud_control_deployments. -# -def list_cloud_control_deployments - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlDeploymentsRequest.new - - # Call the list_cloud_control_deployments method. - result = client.list_cloud_control_deployments request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment. - p item - end -end -# [END cloudsecuritycompliance_v1_generated_Deployment_ListCloudControlDeployments_sync] diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/deployment/list_framework_deployments.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/deployment/list_framework_deployments.rb deleted file mode 100644 index 0447441f7ae8..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/deployment/list_framework_deployments.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudsecuritycompliance_v1_generated_Deployment_ListFrameworkDeployments_sync] -require "google/cloud/cloud_security_compliance/v1" - -## -# Snippet for the list_framework_deployments call in the Deployment service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client#list_framework_deployments. -# -def list_framework_deployments - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkDeploymentsRequest.new - - # Call the list_framework_deployments method. - result = client.list_framework_deployments request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment. - p item - end -end -# [END cloudsecuritycompliance_v1_generated_Deployment_ListFrameworkDeployments_sync] diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/monitoring/aggregate_framework_compliance_report.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/monitoring/aggregate_framework_compliance_report.rb deleted file mode 100644 index f08950b2b50e..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/monitoring/aggregate_framework_compliance_report.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudsecuritycompliance_v1_generated_Monitoring_AggregateFrameworkComplianceReport_sync] -require "google/cloud/cloud_security_compliance/v1" - -## -# Snippet for the aggregate_framework_compliance_report call in the Monitoring service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client#aggregate_framework_compliance_report. -# -def aggregate_framework_compliance_report - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportRequest.new - - # Call the aggregate_framework_compliance_report method. - result = client.aggregate_framework_compliance_report request - - # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportResponse. - p result -end -# [END cloudsecuritycompliance_v1_generated_Monitoring_AggregateFrameworkComplianceReport_sync] diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/monitoring/fetch_framework_compliance_report.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/monitoring/fetch_framework_compliance_report.rb deleted file mode 100644 index 08f2d012dd8a..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/monitoring/fetch_framework_compliance_report.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudsecuritycompliance_v1_generated_Monitoring_FetchFrameworkComplianceReport_sync] -require "google/cloud/cloud_security_compliance/v1" - -## -# Snippet for the fetch_framework_compliance_report call in the Monitoring service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client#fetch_framework_compliance_report. -# -def fetch_framework_compliance_report - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CloudSecurityCompliance::V1::FetchFrameworkComplianceReportRequest.new - - # Call the fetch_framework_compliance_report method. - result = client.fetch_framework_compliance_report request - - # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::FrameworkComplianceReport. - p result -end -# [END cloudsecuritycompliance_v1_generated_Monitoring_FetchFrameworkComplianceReport_sync] diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/monitoring/list_control_compliance_summaries.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/monitoring/list_control_compliance_summaries.rb deleted file mode 100644 index d151b5b3fdd1..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/monitoring/list_control_compliance_summaries.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudsecuritycompliance_v1_generated_Monitoring_ListControlComplianceSummaries_sync] -require "google/cloud/cloud_security_compliance/v1" - -## -# Snippet for the list_control_compliance_summaries call in the Monitoring service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client#list_control_compliance_summaries. -# -def list_control_compliance_summaries - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CloudSecurityCompliance::V1::ListControlComplianceSummariesRequest.new - - # Call the list_control_compliance_summaries method. - result = client.list_control_compliance_summaries request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::CloudSecurityCompliance::V1::ControlComplianceSummary. - p item - end -end -# [END cloudsecuritycompliance_v1_generated_Monitoring_ListControlComplianceSummaries_sync] diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/monitoring/list_finding_summaries.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/monitoring/list_finding_summaries.rb deleted file mode 100644 index ac46a9ee89b5..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/monitoring/list_finding_summaries.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudsecuritycompliance_v1_generated_Monitoring_ListFindingSummaries_sync] -require "google/cloud/cloud_security_compliance/v1" - -## -# Snippet for the list_finding_summaries call in the Monitoring service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client#list_finding_summaries. -# -def list_finding_summaries - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CloudSecurityCompliance::V1::ListFindingSummariesRequest.new - - # Call the list_finding_summaries method. - result = client.list_finding_summaries request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::CloudSecurityCompliance::V1::FindingSummary. - p item - end -end -# [END cloudsecuritycompliance_v1_generated_Monitoring_ListFindingSummaries_sync] diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/monitoring/list_framework_compliance_summaries.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/monitoring/list_framework_compliance_summaries.rb deleted file mode 100644 index 4e712b0ca450..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/monitoring/list_framework_compliance_summaries.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudsecuritycompliance_v1_generated_Monitoring_ListFrameworkComplianceSummaries_sync] -require "google/cloud/cloud_security_compliance/v1" - -## -# Snippet for the list_framework_compliance_summaries call in the Monitoring service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client#list_framework_compliance_summaries. -# -def list_framework_compliance_summaries - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkComplianceSummariesRequest.new - - # Call the list_framework_compliance_summaries method. - result = client.list_framework_compliance_summaries request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::CloudSecurityCompliance::V1::FrameworkComplianceSummary. - p item - end -end -# [END cloudsecuritycompliance_v1_generated_Monitoring_ListFrameworkComplianceSummaries_sync] diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/snippet_metadata_google.cloud.cloudsecuritycompliance.v1.json b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/snippet_metadata_google.cloud.cloudsecuritycompliance.v1.json deleted file mode 100644 index 0149b29a22ae..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/snippets/snippet_metadata_google.cloud.cloudsecuritycompliance.v1.json +++ /dev/null @@ -1,1095 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-cloud_security_compliance-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.cloudsecuritycompliance.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "cloudsecuritycompliance_v1_generated_Audit_GenerateFrameworkAuditScopeReport_sync", - "title": "Snippet for the generate_framework_audit_scope_report call in the Audit service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudSecurityCompliance::V1::Audit::Client#generate_framework_audit_scope_report.", - "file": "audit/generate_framework_audit_scope_report.rb", - "language": "RUBY", - "client_method": { - "short_name": "generate_framework_audit_scope_report", - "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client#generate_framework_audit_scope_report", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportResponse", - "client": { - "short_name": "Audit::Client", - "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client" - }, - "method": { - "short_name": "GenerateFrameworkAuditScopeReport", - "full_name": "google.cloud.cloudsecuritycompliance.v1.Audit.GenerateFrameworkAuditScopeReport", - "service": { - "short_name": "Audit", - "full_name": "google.cloud.cloudsecuritycompliance.v1.Audit" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudsecuritycompliance_v1_generated_Audit_CreateFrameworkAudit_sync", - "title": "Snippet for the create_framework_audit call in the Audit service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudSecurityCompliance::V1::Audit::Client#create_framework_audit.", - "file": "audit/create_framework_audit.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_framework_audit", - "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client#create_framework_audit", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkAuditRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Audit::Client", - "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client" - }, - "method": { - "short_name": "CreateFrameworkAudit", - "full_name": "google.cloud.cloudsecuritycompliance.v1.Audit.CreateFrameworkAudit", - "service": { - "short_name": "Audit", - "full_name": "google.cloud.cloudsecuritycompliance.v1.Audit" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudsecuritycompliance_v1_generated_Audit_ListFrameworkAudits_sync", - "title": "Snippet for the list_framework_audits call in the Audit service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudSecurityCompliance::V1::Audit::Client#list_framework_audits.", - "file": "audit/list_framework_audits.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_framework_audits", - "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client#list_framework_audits", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkAuditsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkAuditsResponse", - "client": { - "short_name": "Audit::Client", - "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client" - }, - "method": { - "short_name": "ListFrameworkAudits", - "full_name": "google.cloud.cloudsecuritycompliance.v1.Audit.ListFrameworkAudits", - "service": { - "short_name": "Audit", - "full_name": "google.cloud.cloudsecuritycompliance.v1.Audit" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudsecuritycompliance_v1_generated_Audit_GetFrameworkAudit_sync", - "title": "Snippet for the get_framework_audit call in the Audit service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudSecurityCompliance::V1::Audit::Client#get_framework_audit.", - "file": "audit/get_framework_audit.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_framework_audit", - "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client#get_framework_audit", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkAuditRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CloudSecurityCompliance::V1::FrameworkAudit", - "client": { - "short_name": "Audit::Client", - "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client" - }, - "method": { - "short_name": "GetFrameworkAudit", - "full_name": "google.cloud.cloudsecuritycompliance.v1.Audit.GetFrameworkAudit", - "service": { - "short_name": "Audit", - "full_name": "google.cloud.cloudsecuritycompliance.v1.Audit" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudsecuritycompliance_v1_generated_CmEnrollmentService_UpdateCmEnrollment_sync", - "title": "Snippet for the update_cm_enrollment call in the CmEnrollmentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Client#update_cm_enrollment.", - "file": "cm_enrollment_service/update_cm_enrollment.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_cm_enrollment", - "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Client#update_cm_enrollment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CloudSecurityCompliance::V1::UpdateCmEnrollmentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollment", - "client": { - "short_name": "CmEnrollmentService::Client", - "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Client" - }, - "method": { - "short_name": "UpdateCmEnrollment", - "full_name": "google.cloud.cloudsecuritycompliance.v1.CmEnrollmentService.UpdateCmEnrollment", - "service": { - "short_name": "CmEnrollmentService", - "full_name": "google.cloud.cloudsecuritycompliance.v1.CmEnrollmentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudsecuritycompliance_v1_generated_CmEnrollmentService_CalculateEffectiveCmEnrollment_sync", - "title": "Snippet for the calculate_effective_cm_enrollment call in the CmEnrollmentService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Client#calculate_effective_cm_enrollment.", - "file": "cm_enrollment_service/calculate_effective_cm_enrollment.rb", - "language": "RUBY", - "client_method": { - "short_name": "calculate_effective_cm_enrollment", - "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Client#calculate_effective_cm_enrollment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CloudSecurityCompliance::V1::CalculateEffectiveCmEnrollmentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CloudSecurityCompliance::V1::CalculateEffectiveCmEnrollmentResponse", - "client": { - "short_name": "CmEnrollmentService::Client", - "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Client" - }, - "method": { - "short_name": "CalculateEffectiveCmEnrollment", - "full_name": "google.cloud.cloudsecuritycompliance.v1.CmEnrollmentService.CalculateEffectiveCmEnrollment", - "service": { - "short_name": "CmEnrollmentService", - "full_name": "google.cloud.cloudsecuritycompliance.v1.CmEnrollmentService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudsecuritycompliance_v1_generated_Config_ListFrameworks_sync", - "title": "Snippet for the list_frameworks call in the Config service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudSecurityCompliance::V1::Config::Client#list_frameworks.", - "file": "config/list_frameworks.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_frameworks", - "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Config::Client#list_frameworks", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworksRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworksResponse", - "client": { - "short_name": "Config::Client", - "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Config::Client" - }, - "method": { - "short_name": "ListFrameworks", - "full_name": "google.cloud.cloudsecuritycompliance.v1.Config.ListFrameworks", - "service": { - "short_name": "Config", - "full_name": "google.cloud.cloudsecuritycompliance.v1.Config" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudsecuritycompliance_v1_generated_Config_GetFramework_sync", - "title": "Snippet for the get_framework call in the Config service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudSecurityCompliance::V1::Config::Client#get_framework.", - "file": "config/get_framework.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_framework", - "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Config::Client#get_framework", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CloudSecurityCompliance::V1::Framework", - "client": { - "short_name": "Config::Client", - "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Config::Client" - }, - "method": { - "short_name": "GetFramework", - "full_name": "google.cloud.cloudsecuritycompliance.v1.Config.GetFramework", - "service": { - "short_name": "Config", - "full_name": "google.cloud.cloudsecuritycompliance.v1.Config" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudsecuritycompliance_v1_generated_Config_CreateFramework_sync", - "title": "Snippet for the create_framework call in the Config service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudSecurityCompliance::V1::Config::Client#create_framework.", - "file": "config/create_framework.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_framework", - "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Config::Client#create_framework", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CloudSecurityCompliance::V1::Framework", - "client": { - "short_name": "Config::Client", - "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Config::Client" - }, - "method": { - "short_name": "CreateFramework", - "full_name": "google.cloud.cloudsecuritycompliance.v1.Config.CreateFramework", - "service": { - "short_name": "Config", - "full_name": "google.cloud.cloudsecuritycompliance.v1.Config" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudsecuritycompliance_v1_generated_Config_UpdateFramework_sync", - "title": "Snippet for the update_framework call in the Config service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudSecurityCompliance::V1::Config::Client#update_framework.", - "file": "config/update_framework.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_framework", - "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Config::Client#update_framework", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CloudSecurityCompliance::V1::UpdateFrameworkRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CloudSecurityCompliance::V1::Framework", - "client": { - "short_name": "Config::Client", - "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Config::Client" - }, - "method": { - "short_name": "UpdateFramework", - "full_name": "google.cloud.cloudsecuritycompliance.v1.Config.UpdateFramework", - "service": { - "short_name": "Config", - "full_name": "google.cloud.cloudsecuritycompliance.v1.Config" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudsecuritycompliance_v1_generated_Config_DeleteFramework_sync", - "title": "Snippet for the delete_framework call in the Config service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudSecurityCompliance::V1::Config::Client#delete_framework.", - "file": "config/delete_framework.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_framework", - "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Config::Client#delete_framework", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "Config::Client", - "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Config::Client" - }, - "method": { - "short_name": "DeleteFramework", - "full_name": "google.cloud.cloudsecuritycompliance.v1.Config.DeleteFramework", - "service": { - "short_name": "Config", - "full_name": "google.cloud.cloudsecuritycompliance.v1.Config" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudsecuritycompliance_v1_generated_Config_ListCloudControls_sync", - "title": "Snippet for the list_cloud_controls call in the Config service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudSecurityCompliance::V1::Config::Client#list_cloud_controls.", - "file": "config/list_cloud_controls.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_cloud_controls", - "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Config::Client#list_cloud_controls", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlsResponse", - "client": { - "short_name": "Config::Client", - "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Config::Client" - }, - "method": { - "short_name": "ListCloudControls", - "full_name": "google.cloud.cloudsecuritycompliance.v1.Config.ListCloudControls", - "service": { - "short_name": "Config", - "full_name": "google.cloud.cloudsecuritycompliance.v1.Config" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudsecuritycompliance_v1_generated_Config_GetCloudControl_sync", - "title": "Snippet for the get_cloud_control call in the Config service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudSecurityCompliance::V1::Config::Client#get_cloud_control.", - "file": "config/get_cloud_control.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_cloud_control", - "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Config::Client#get_cloud_control", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CloudSecurityCompliance::V1::CloudControl", - "client": { - "short_name": "Config::Client", - "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Config::Client" - }, - "method": { - "short_name": "GetCloudControl", - "full_name": "google.cloud.cloudsecuritycompliance.v1.Config.GetCloudControl", - "service": { - "short_name": "Config", - "full_name": "google.cloud.cloudsecuritycompliance.v1.Config" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudsecuritycompliance_v1_generated_Config_CreateCloudControl_sync", - "title": "Snippet for the create_cloud_control call in the Config service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudSecurityCompliance::V1::Config::Client#create_cloud_control.", - "file": "config/create_cloud_control.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_cloud_control", - "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Config::Client#create_cloud_control", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CloudSecurityCompliance::V1::CreateCloudControlRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CloudSecurityCompliance::V1::CloudControl", - "client": { - "short_name": "Config::Client", - "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Config::Client" - }, - "method": { - "short_name": "CreateCloudControl", - "full_name": "google.cloud.cloudsecuritycompliance.v1.Config.CreateCloudControl", - "service": { - "short_name": "Config", - "full_name": "google.cloud.cloudsecuritycompliance.v1.Config" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudsecuritycompliance_v1_generated_Config_UpdateCloudControl_sync", - "title": "Snippet for the update_cloud_control call in the Config service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudSecurityCompliance::V1::Config::Client#update_cloud_control.", - "file": "config/update_cloud_control.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_cloud_control", - "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Config::Client#update_cloud_control", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CloudSecurityCompliance::V1::UpdateCloudControlRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CloudSecurityCompliance::V1::CloudControl", - "client": { - "short_name": "Config::Client", - "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Config::Client" - }, - "method": { - "short_name": "UpdateCloudControl", - "full_name": "google.cloud.cloudsecuritycompliance.v1.Config.UpdateCloudControl", - "service": { - "short_name": "Config", - "full_name": "google.cloud.cloudsecuritycompliance.v1.Config" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudsecuritycompliance_v1_generated_Config_DeleteCloudControl_sync", - "title": "Snippet for the delete_cloud_control call in the Config service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudSecurityCompliance::V1::Config::Client#delete_cloud_control.", - "file": "config/delete_cloud_control.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_cloud_control", - "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Config::Client#delete_cloud_control", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CloudSecurityCompliance::V1::DeleteCloudControlRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "Config::Client", - "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Config::Client" - }, - "method": { - "short_name": "DeleteCloudControl", - "full_name": "google.cloud.cloudsecuritycompliance.v1.Config.DeleteCloudControl", - "service": { - "short_name": "Config", - "full_name": "google.cloud.cloudsecuritycompliance.v1.Config" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudsecuritycompliance_v1_generated_Deployment_CreateFrameworkDeployment_sync", - "title": "Snippet for the create_framework_deployment call in the Deployment service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client#create_framework_deployment.", - "file": "deployment/create_framework_deployment.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_framework_deployment", - "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client#create_framework_deployment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkDeploymentRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Deployment::Client", - "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client" - }, - "method": { - "short_name": "CreateFrameworkDeployment", - "full_name": "google.cloud.cloudsecuritycompliance.v1.Deployment.CreateFrameworkDeployment", - "service": { - "short_name": "Deployment", - "full_name": "google.cloud.cloudsecuritycompliance.v1.Deployment" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudsecuritycompliance_v1_generated_Deployment_DeleteFrameworkDeployment_sync", - "title": "Snippet for the delete_framework_deployment call in the Deployment service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client#delete_framework_deployment.", - "file": "deployment/delete_framework_deployment.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_framework_deployment", - "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client#delete_framework_deployment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkDeploymentRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Deployment::Client", - "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client" - }, - "method": { - "short_name": "DeleteFrameworkDeployment", - "full_name": "google.cloud.cloudsecuritycompliance.v1.Deployment.DeleteFrameworkDeployment", - "service": { - "short_name": "Deployment", - "full_name": "google.cloud.cloudsecuritycompliance.v1.Deployment" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudsecuritycompliance_v1_generated_Deployment_GetFrameworkDeployment_sync", - "title": "Snippet for the get_framework_deployment call in the Deployment service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client#get_framework_deployment.", - "file": "deployment/get_framework_deployment.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_framework_deployment", - "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client#get_framework_deployment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkDeploymentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment", - "client": { - "short_name": "Deployment::Client", - "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client" - }, - "method": { - "short_name": "GetFrameworkDeployment", - "full_name": "google.cloud.cloudsecuritycompliance.v1.Deployment.GetFrameworkDeployment", - "service": { - "short_name": "Deployment", - "full_name": "google.cloud.cloudsecuritycompliance.v1.Deployment" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudsecuritycompliance_v1_generated_Deployment_ListFrameworkDeployments_sync", - "title": "Snippet for the list_framework_deployments call in the Deployment service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client#list_framework_deployments.", - "file": "deployment/list_framework_deployments.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_framework_deployments", - "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client#list_framework_deployments", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkDeploymentsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkDeploymentsResponse", - "client": { - "short_name": "Deployment::Client", - "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client" - }, - "method": { - "short_name": "ListFrameworkDeployments", - "full_name": "google.cloud.cloudsecuritycompliance.v1.Deployment.ListFrameworkDeployments", - "service": { - "short_name": "Deployment", - "full_name": "google.cloud.cloudsecuritycompliance.v1.Deployment" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudsecuritycompliance_v1_generated_Deployment_GetCloudControlDeployment_sync", - "title": "Snippet for the get_cloud_control_deployment call in the Deployment service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client#get_cloud_control_deployment.", - "file": "deployment/get_cloud_control_deployment.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_cloud_control_deployment", - "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client#get_cloud_control_deployment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlDeploymentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment", - "client": { - "short_name": "Deployment::Client", - "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client" - }, - "method": { - "short_name": "GetCloudControlDeployment", - "full_name": "google.cloud.cloudsecuritycompliance.v1.Deployment.GetCloudControlDeployment", - "service": { - "short_name": "Deployment", - "full_name": "google.cloud.cloudsecuritycompliance.v1.Deployment" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudsecuritycompliance_v1_generated_Deployment_ListCloudControlDeployments_sync", - "title": "Snippet for the list_cloud_control_deployments call in the Deployment service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client#list_cloud_control_deployments.", - "file": "deployment/list_cloud_control_deployments.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_cloud_control_deployments", - "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client#list_cloud_control_deployments", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlDeploymentsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlDeploymentsResponse", - "client": { - "short_name": "Deployment::Client", - "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client" - }, - "method": { - "short_name": "ListCloudControlDeployments", - "full_name": "google.cloud.cloudsecuritycompliance.v1.Deployment.ListCloudControlDeployments", - "service": { - "short_name": "Deployment", - "full_name": "google.cloud.cloudsecuritycompliance.v1.Deployment" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudsecuritycompliance_v1_generated_Monitoring_ListFrameworkComplianceSummaries_sync", - "title": "Snippet for the list_framework_compliance_summaries call in the Monitoring service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client#list_framework_compliance_summaries.", - "file": "monitoring/list_framework_compliance_summaries.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_framework_compliance_summaries", - "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client#list_framework_compliance_summaries", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkComplianceSummariesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkComplianceSummariesResponse", - "client": { - "short_name": "Monitoring::Client", - "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client" - }, - "method": { - "short_name": "ListFrameworkComplianceSummaries", - "full_name": "google.cloud.cloudsecuritycompliance.v1.Monitoring.ListFrameworkComplianceSummaries", - "service": { - "short_name": "Monitoring", - "full_name": "google.cloud.cloudsecuritycompliance.v1.Monitoring" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudsecuritycompliance_v1_generated_Monitoring_ListFindingSummaries_sync", - "title": "Snippet for the list_finding_summaries call in the Monitoring service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client#list_finding_summaries.", - "file": "monitoring/list_finding_summaries.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_finding_summaries", - "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client#list_finding_summaries", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CloudSecurityCompliance::V1::ListFindingSummariesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CloudSecurityCompliance::V1::ListFindingSummariesResponse", - "client": { - "short_name": "Monitoring::Client", - "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client" - }, - "method": { - "short_name": "ListFindingSummaries", - "full_name": "google.cloud.cloudsecuritycompliance.v1.Monitoring.ListFindingSummaries", - "service": { - "short_name": "Monitoring", - "full_name": "google.cloud.cloudsecuritycompliance.v1.Monitoring" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudsecuritycompliance_v1_generated_Monitoring_FetchFrameworkComplianceReport_sync", - "title": "Snippet for the fetch_framework_compliance_report call in the Monitoring service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client#fetch_framework_compliance_report.", - "file": "monitoring/fetch_framework_compliance_report.rb", - "language": "RUBY", - "client_method": { - "short_name": "fetch_framework_compliance_report", - "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client#fetch_framework_compliance_report", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CloudSecurityCompliance::V1::FetchFrameworkComplianceReportRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CloudSecurityCompliance::V1::FrameworkComplianceReport", - "client": { - "short_name": "Monitoring::Client", - "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client" - }, - "method": { - "short_name": "FetchFrameworkComplianceReport", - "full_name": "google.cloud.cloudsecuritycompliance.v1.Monitoring.FetchFrameworkComplianceReport", - "service": { - "short_name": "Monitoring", - "full_name": "google.cloud.cloudsecuritycompliance.v1.Monitoring" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudsecuritycompliance_v1_generated_Monitoring_ListControlComplianceSummaries_sync", - "title": "Snippet for the list_control_compliance_summaries call in the Monitoring service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client#list_control_compliance_summaries.", - "file": "monitoring/list_control_compliance_summaries.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_control_compliance_summaries", - "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client#list_control_compliance_summaries", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CloudSecurityCompliance::V1::ListControlComplianceSummariesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CloudSecurityCompliance::V1::ListControlComplianceSummariesResponse", - "client": { - "short_name": "Monitoring::Client", - "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client" - }, - "method": { - "short_name": "ListControlComplianceSummaries", - "full_name": "google.cloud.cloudsecuritycompliance.v1.Monitoring.ListControlComplianceSummaries", - "service": { - "short_name": "Monitoring", - "full_name": "google.cloud.cloudsecuritycompliance.v1.Monitoring" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudsecuritycompliance_v1_generated_Monitoring_AggregateFrameworkComplianceReport_sync", - "title": "Snippet for the aggregate_framework_compliance_report call in the Monitoring service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client#aggregate_framework_compliance_report.", - "file": "monitoring/aggregate_framework_compliance_report.rb", - "language": "RUBY", - "client_method": { - "short_name": "aggregate_framework_compliance_report", - "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client#aggregate_framework_compliance_report", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportResponse", - "client": { - "short_name": "Monitoring::Client", - "full_name": "::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client" - }, - "method": { - "short_name": "AggregateFrameworkComplianceReport", - "full_name": "google.cloud.cloudsecuritycompliance.v1.Monitoring.AggregateFrameworkComplianceReport", - "service": { - "short_name": "Monitoring", - "full_name": "google.cloud.cloudsecuritycompliance.v1.Monitoring" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/audit_operations_test.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/audit_operations_test.rb deleted file mode 100644 index 095cac982ad8..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/audit_operations_test.rb +++ /dev/null @@ -1,400 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/cloudsecuritycompliance/v1/audit_pb" -require "google/cloud/cloudsecuritycompliance/v1/audit_services_pb" -require "google/cloud/cloud_security_compliance/v1/audit" - -class ::Google::Cloud::CloudSecurityCompliance::V1::Audit::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Operations.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/audit_paths_test.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/audit_paths_test.rb deleted file mode 100644 index b4e184205496..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/audit_paths_test.rb +++ /dev/null @@ -1,82 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/cloud_security_compliance/v1/audit" - -class ::Google::Cloud::CloudSecurityCompliance::V1::Audit::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_framework_audit_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.framework_audit_path project: "value0", location: "value1", framework_audit: "value2" - assert_equal "projects/value0/locations/value1/frameworkAudits/value2", path - - path = client.framework_audit_path organization: "value0", location: "value1", framework_audit: "value2" - assert_equal "organizations/value0/locations/value1/frameworkAudits/value2", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end - - def test_organization_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.organization_location_path organization: "value0", location: "value1" - assert_equal "organizations/value0/locations/value1", path - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/audit_rest_test.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/audit_rest_test.rb deleted file mode 100644 index 3febaeb289ea..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/audit_rest_test.rb +++ /dev/null @@ -1,322 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/cloudsecuritycompliance/v1/audit_pb" -require "google/cloud/cloud_security_compliance/v1/audit/rest" - - -class ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_generate_framework_audit_scope_report - # Create test objects. - client_result = ::Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - scope = "hello world" - report_format = :FORMAT_UNSPECIFIED - compliance_framework = "hello world" - - generate_framework_audit_scope_report_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Rest::ServiceStub.stub :transcode_generate_framework_audit_scope_report_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, generate_framework_audit_scope_report_client_stub do - # Create client - client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.generate_framework_audit_scope_report({ scope: scope, report_format: report_format, compliance_framework: compliance_framework }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.generate_framework_audit_scope_report scope: scope, report_format: report_format, compliance_framework: compliance_framework do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.generate_framework_audit_scope_report ::Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportRequest.new(scope: scope, report_format: report_format, compliance_framework: compliance_framework) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.generate_framework_audit_scope_report({ scope: scope, report_format: report_format, compliance_framework: compliance_framework }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.generate_framework_audit_scope_report(::Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportRequest.new(scope: scope, report_format: report_format, compliance_framework: compliance_framework), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, generate_framework_audit_scope_report_client_stub.call_count - end - end - end - - def test_create_framework_audit - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - framework_audit_id = "hello world" - framework_audit = {} - - create_framework_audit_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Rest::ServiceStub.stub :transcode_create_framework_audit_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_framework_audit_client_stub do - # Create client - client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_framework_audit({ parent: parent, framework_audit_id: framework_audit_id, framework_audit: framework_audit }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_framework_audit parent: parent, framework_audit_id: framework_audit_id, framework_audit: framework_audit do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_framework_audit ::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkAuditRequest.new(parent: parent, framework_audit_id: framework_audit_id, framework_audit: framework_audit) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_framework_audit({ parent: parent, framework_audit_id: framework_audit_id, framework_audit: framework_audit }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_framework_audit(::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkAuditRequest.new(parent: parent, framework_audit_id: framework_audit_id, framework_audit: framework_audit), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_framework_audit_client_stub.call_count - end - end - end - - def test_list_framework_audits - # Create test objects. - client_result = ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkAuditsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_framework_audits_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Rest::ServiceStub.stub :transcode_list_framework_audits_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_framework_audits_client_stub do - # Create client - client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_framework_audits({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_framework_audits parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_framework_audits ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkAuditsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_framework_audits({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_framework_audits(::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkAuditsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_framework_audits_client_stub.call_count - end - end - end - - def test_get_framework_audit - # Create test objects. - client_result = ::Google::Cloud::CloudSecurityCompliance::V1::FrameworkAudit.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_framework_audit_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Rest::ServiceStub.stub :transcode_get_framework_audit_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_framework_audit_client_stub do - # Create client - client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_framework_audit({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_framework_audit name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_framework_audit ::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkAuditRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_framework_audit({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_framework_audit(::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkAuditRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_framework_audit_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/audit_test.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/audit_test.rb deleted file mode 100644 index c6a1ce7c38c6..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/audit_test.rb +++ /dev/null @@ -1,374 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/cloudsecuritycompliance/v1/audit_pb" -require "google/cloud/cloud_security_compliance/v1/audit" - -class ::Google::Cloud::CloudSecurityCompliance::V1::Audit::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_generate_framework_audit_scope_report - # Create GRPC objects. - grpc_response = ::Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - scope = "hello world" - report_format = :FORMAT_UNSPECIFIED - compliance_framework = "hello world" - - generate_framework_audit_scope_report_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :generate_framework_audit_scope_report, name - assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportRequest, request - assert_equal "hello world", request["scope"] - assert_equal :FORMAT_UNSPECIFIED, request["report_format"] - assert_equal "hello world", request["compliance_framework"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, generate_framework_audit_scope_report_client_stub do - # Create client - client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.generate_framework_audit_scope_report({ scope: scope, report_format: report_format, compliance_framework: compliance_framework }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.generate_framework_audit_scope_report scope: scope, report_format: report_format, compliance_framework: compliance_framework do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.generate_framework_audit_scope_report ::Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportRequest.new(scope: scope, report_format: report_format, compliance_framework: compliance_framework) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.generate_framework_audit_scope_report({ scope: scope, report_format: report_format, compliance_framework: compliance_framework }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.generate_framework_audit_scope_report(::Google::Cloud::CloudSecurityCompliance::V1::GenerateFrameworkAuditScopeReportRequest.new(scope: scope, report_format: report_format, compliance_framework: compliance_framework), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, generate_framework_audit_scope_report_client_stub.call_rpc_count - end - end - - def test_create_framework_audit - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - framework_audit_id = "hello world" - framework_audit = {} - - create_framework_audit_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_framework_audit, name - assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkAuditRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["framework_audit_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CloudSecurityCompliance::V1::FrameworkAudit), request["framework_audit"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_framework_audit_client_stub do - # Create client - client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_framework_audit({ parent: parent, framework_audit_id: framework_audit_id, framework_audit: framework_audit }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_framework_audit parent: parent, framework_audit_id: framework_audit_id, framework_audit: framework_audit do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_framework_audit ::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkAuditRequest.new(parent: parent, framework_audit_id: framework_audit_id, framework_audit: framework_audit) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_framework_audit({ parent: parent, framework_audit_id: framework_audit_id, framework_audit: framework_audit }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_framework_audit(::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkAuditRequest.new(parent: parent, framework_audit_id: framework_audit_id, framework_audit: framework_audit), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_framework_audit_client_stub.call_rpc_count - end - end - - def test_list_framework_audits - # Create GRPC objects. - grpc_response = ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkAuditsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_framework_audits_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_framework_audits, name - assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkAuditsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_framework_audits_client_stub do - # Create client - client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_framework_audits({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_framework_audits parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_framework_audits ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkAuditsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_framework_audits({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_framework_audits(::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkAuditsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_framework_audits_client_stub.call_rpc_count - end - end - - def test_get_framework_audit - # Create GRPC objects. - grpc_response = ::Google::Cloud::CloudSecurityCompliance::V1::FrameworkAudit.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_framework_audit_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_framework_audit, name - assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkAuditRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_framework_audit_client_stub do - # Create client - client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_framework_audit({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_framework_audit name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_framework_audit ::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkAuditRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_framework_audit({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_framework_audit(::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkAuditRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_framework_audit_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client, client - assert_equal creds, client.configure.credentials - end - end - - def test_operations_client - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::Audit::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/cm_enrollment_service_paths_test.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/cm_enrollment_service_paths_test.rb deleted file mode 100644 index 3343676f5804..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/cm_enrollment_service_paths_test.rb +++ /dev/null @@ -1,58 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/cloud_security_compliance/v1/cm_enrollment_service" - -class ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_cm_enrollment_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.cm_enrollment_path organization: "value0", location: "value1" - assert_equal "organizations/value0/locations/value1/cmEnrollment", path - - path = client.cm_enrollment_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1/cmEnrollment", path - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/cm_enrollment_service_rest_test.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/cm_enrollment_service_rest_test.rb deleted file mode 100644 index 6984e3c798f8..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/cm_enrollment_service_rest_test.rb +++ /dev/null @@ -1,208 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/cloudsecuritycompliance/v1/cm_enrollment_service_pb" -require "google/cloud/cloud_security_compliance/v1/cm_enrollment_service/rest" - - -class ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_update_cm_enrollment - # Create test objects. - client_result = ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollment.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - cm_enrollment = {} - update_mask = {} - - update_cm_enrollment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Rest::ServiceStub.stub :transcode_update_cm_enrollment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_cm_enrollment_client_stub do - # Create client - client = ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_cm_enrollment({ cm_enrollment: cm_enrollment, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_cm_enrollment cm_enrollment: cm_enrollment, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_cm_enrollment ::Google::Cloud::CloudSecurityCompliance::V1::UpdateCmEnrollmentRequest.new(cm_enrollment: cm_enrollment, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_cm_enrollment({ cm_enrollment: cm_enrollment, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_cm_enrollment(::Google::Cloud::CloudSecurityCompliance::V1::UpdateCmEnrollmentRequest.new(cm_enrollment: cm_enrollment, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_cm_enrollment_client_stub.call_count - end - end - end - - def test_calculate_effective_cm_enrollment - # Create test objects. - client_result = ::Google::Cloud::CloudSecurityCompliance::V1::CalculateEffectiveCmEnrollmentResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - calculate_effective_cm_enrollment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Rest::ServiceStub.stub :transcode_calculate_effective_cm_enrollment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, calculate_effective_cm_enrollment_client_stub do - # Create client - client = ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.calculate_effective_cm_enrollment({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.calculate_effective_cm_enrollment name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.calculate_effective_cm_enrollment ::Google::Cloud::CloudSecurityCompliance::V1::CalculateEffectiveCmEnrollmentRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.calculate_effective_cm_enrollment({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.calculate_effective_cm_enrollment(::Google::Cloud::CloudSecurityCompliance::V1::CalculateEffectiveCmEnrollmentRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, calculate_effective_cm_enrollment_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/cm_enrollment_service_test.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/cm_enrollment_service_test.rb deleted file mode 100644 index 76f65d00851d..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/cm_enrollment_service_test.rb +++ /dev/null @@ -1,222 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/cloudsecuritycompliance/v1/cm_enrollment_service_pb" -require "google/cloud/cloud_security_compliance/v1/cm_enrollment_service" - -class ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_update_cm_enrollment - # Create GRPC objects. - grpc_response = ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollment.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - cm_enrollment = {} - update_mask = {} - - update_cm_enrollment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_cm_enrollment, name - assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::UpdateCmEnrollmentRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollment), request["cm_enrollment"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_cm_enrollment_client_stub do - # Create client - client = ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_cm_enrollment({ cm_enrollment: cm_enrollment, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_cm_enrollment cm_enrollment: cm_enrollment, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_cm_enrollment ::Google::Cloud::CloudSecurityCompliance::V1::UpdateCmEnrollmentRequest.new(cm_enrollment: cm_enrollment, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_cm_enrollment({ cm_enrollment: cm_enrollment, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_cm_enrollment(::Google::Cloud::CloudSecurityCompliance::V1::UpdateCmEnrollmentRequest.new(cm_enrollment: cm_enrollment, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_cm_enrollment_client_stub.call_rpc_count - end - end - - def test_calculate_effective_cm_enrollment - # Create GRPC objects. - grpc_response = ::Google::Cloud::CloudSecurityCompliance::V1::CalculateEffectiveCmEnrollmentResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - calculate_effective_cm_enrollment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :calculate_effective_cm_enrollment, name - assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::CalculateEffectiveCmEnrollmentRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, calculate_effective_cm_enrollment_client_stub do - # Create client - client = ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.calculate_effective_cm_enrollment({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.calculate_effective_cm_enrollment name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.calculate_effective_cm_enrollment ::Google::Cloud::CloudSecurityCompliance::V1::CalculateEffectiveCmEnrollmentRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.calculate_effective_cm_enrollment({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.calculate_effective_cm_enrollment(::Google::Cloud::CloudSecurityCompliance::V1::CalculateEffectiveCmEnrollmentRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, calculate_effective_cm_enrollment_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::CmEnrollmentService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/config_paths_test.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/config_paths_test.rb deleted file mode 100644 index f30c23b66461..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/config_paths_test.rb +++ /dev/null @@ -1,97 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/cloud_security_compliance/v1/config" - -class ::Google::Cloud::CloudSecurityCompliance::V1::Config::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_cloud_control_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.cloud_control_path organization: "value0", location: "value1", cloud_control: "value2" - assert_equal "organizations/value0/locations/value1/cloudControls/value2", path - - path = client.cloud_control_path project: "value0", location: "value1", cloud_control: "value2" - assert_equal "projects/value0/locations/value1/cloudControls/value2", path - end - end - - def test_framework_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.framework_path organization: "value0", location: "value1", framework: "value2" - assert_equal "organizations/value0/locations/value1/frameworks/value2", path - - path = client.framework_path project: "value0", location: "value1", framework: "value2" - assert_equal "projects/value0/locations/value1/frameworks/value2", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end - - def test_organization_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.organization_location_path organization: "value0", location: "value1" - assert_equal "organizations/value0/locations/value1", path - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/config_rest_test.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/config_rest_test.rb deleted file mode 100644 index 810240fc3602..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/config_rest_test.rb +++ /dev/null @@ -1,652 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/cloudsecuritycompliance/v1/config_pb" -require "google/cloud/cloud_security_compliance/v1/config/rest" - - -class ::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_frameworks - # Create test objects. - client_result = ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworksResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_frameworks_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::ServiceStub.stub :transcode_list_frameworks_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_frameworks_client_stub do - # Create client - client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_frameworks({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_frameworks parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_frameworks ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworksRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_frameworks({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_frameworks(::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworksRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_frameworks_client_stub.call_count - end - end - end - - def test_get_framework - # Create test objects. - client_result = ::Google::Cloud::CloudSecurityCompliance::V1::Framework.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - major_revision_id = 42 - - get_framework_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::ServiceStub.stub :transcode_get_framework_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_framework_client_stub do - # Create client - client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_framework({ name: name, major_revision_id: major_revision_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_framework name: name, major_revision_id: major_revision_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_framework ::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkRequest.new(name: name, major_revision_id: major_revision_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_framework({ name: name, major_revision_id: major_revision_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_framework(::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkRequest.new(name: name, major_revision_id: major_revision_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_framework_client_stub.call_count - end - end - end - - def test_create_framework - # Create test objects. - client_result = ::Google::Cloud::CloudSecurityCompliance::V1::Framework.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - framework_id = "hello world" - framework = {} - - create_framework_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::ServiceStub.stub :transcode_create_framework_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_framework_client_stub do - # Create client - client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_framework({ parent: parent, framework_id: framework_id, framework: framework }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_framework parent: parent, framework_id: framework_id, framework: framework do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_framework ::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkRequest.new(parent: parent, framework_id: framework_id, framework: framework) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_framework({ parent: parent, framework_id: framework_id, framework: framework }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_framework(::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkRequest.new(parent: parent, framework_id: framework_id, framework: framework), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_framework_client_stub.call_count - end - end - end - - def test_update_framework - # Create test objects. - client_result = ::Google::Cloud::CloudSecurityCompliance::V1::Framework.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - update_mask = {} - framework = {} - major_revision_id = 42 - - update_framework_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::ServiceStub.stub :transcode_update_framework_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_framework_client_stub do - # Create client - client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_framework({ update_mask: update_mask, framework: framework, major_revision_id: major_revision_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_framework update_mask: update_mask, framework: framework, major_revision_id: major_revision_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_framework ::Google::Cloud::CloudSecurityCompliance::V1::UpdateFrameworkRequest.new(update_mask: update_mask, framework: framework, major_revision_id: major_revision_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_framework({ update_mask: update_mask, framework: framework, major_revision_id: major_revision_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_framework(::Google::Cloud::CloudSecurityCompliance::V1::UpdateFrameworkRequest.new(update_mask: update_mask, framework: framework, major_revision_id: major_revision_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_framework_client_stub.call_count - end - end - end - - def test_delete_framework - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_framework_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::ServiceStub.stub :transcode_delete_framework_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_framework_client_stub do - # Create client - client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_framework({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_framework name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_framework ::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_framework({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_framework(::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_framework_client_stub.call_count - end - end - end - - def test_list_cloud_controls - # Create test objects. - client_result = ::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_cloud_controls_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::ServiceStub.stub :transcode_list_cloud_controls_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_cloud_controls_client_stub do - # Create client - client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_cloud_controls({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_cloud_controls parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_cloud_controls ::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_cloud_controls({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_cloud_controls(::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_cloud_controls_client_stub.call_count - end - end - end - - def test_get_cloud_control - # Create test objects. - client_result = ::Google::Cloud::CloudSecurityCompliance::V1::CloudControl.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - major_revision_id = 42 - - get_cloud_control_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::ServiceStub.stub :transcode_get_cloud_control_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_cloud_control_client_stub do - # Create client - client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_cloud_control({ name: name, major_revision_id: major_revision_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_cloud_control name: name, major_revision_id: major_revision_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_cloud_control ::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlRequest.new(name: name, major_revision_id: major_revision_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_cloud_control({ name: name, major_revision_id: major_revision_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_cloud_control(::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlRequest.new(name: name, major_revision_id: major_revision_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_cloud_control_client_stub.call_count - end - end - end - - def test_create_cloud_control - # Create test objects. - client_result = ::Google::Cloud::CloudSecurityCompliance::V1::CloudControl.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - cloud_control_id = "hello world" - cloud_control = {} - - create_cloud_control_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::ServiceStub.stub :transcode_create_cloud_control_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_cloud_control_client_stub do - # Create client - client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_cloud_control({ parent: parent, cloud_control_id: cloud_control_id, cloud_control: cloud_control }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_cloud_control parent: parent, cloud_control_id: cloud_control_id, cloud_control: cloud_control do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_cloud_control ::Google::Cloud::CloudSecurityCompliance::V1::CreateCloudControlRequest.new(parent: parent, cloud_control_id: cloud_control_id, cloud_control: cloud_control) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_cloud_control({ parent: parent, cloud_control_id: cloud_control_id, cloud_control: cloud_control }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_cloud_control(::Google::Cloud::CloudSecurityCompliance::V1::CreateCloudControlRequest.new(parent: parent, cloud_control_id: cloud_control_id, cloud_control: cloud_control), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_cloud_control_client_stub.call_count - end - end - end - - def test_update_cloud_control - # Create test objects. - client_result = ::Google::Cloud::CloudSecurityCompliance::V1::CloudControl.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - update_mask = {} - cloud_control = {} - - update_cloud_control_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::ServiceStub.stub :transcode_update_cloud_control_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_cloud_control_client_stub do - # Create client - client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_cloud_control({ update_mask: update_mask, cloud_control: cloud_control }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_cloud_control update_mask: update_mask, cloud_control: cloud_control do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_cloud_control ::Google::Cloud::CloudSecurityCompliance::V1::UpdateCloudControlRequest.new(update_mask: update_mask, cloud_control: cloud_control) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_cloud_control({ update_mask: update_mask, cloud_control: cloud_control }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_cloud_control(::Google::Cloud::CloudSecurityCompliance::V1::UpdateCloudControlRequest.new(update_mask: update_mask, cloud_control: cloud_control), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_cloud_control_client_stub.call_count - end - end - end - - def test_delete_cloud_control - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_cloud_control_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::ServiceStub.stub :transcode_delete_cloud_control_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_cloud_control_client_stub do - # Create client - client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_cloud_control({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_cloud_control name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_cloud_control ::Google::Cloud::CloudSecurityCompliance::V1::DeleteCloudControlRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_cloud_control({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_cloud_control(::Google::Cloud::CloudSecurityCompliance::V1::DeleteCloudControlRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_cloud_control_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::Config::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/config_test.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/config_test.rb deleted file mode 100644 index bab06fa29df5..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/config_test.rb +++ /dev/null @@ -1,720 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/cloudsecuritycompliance/v1/config_pb" -require "google/cloud/cloud_security_compliance/v1/config" - -class ::Google::Cloud::CloudSecurityCompliance::V1::Config::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_frameworks - # Create GRPC objects. - grpc_response = ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworksResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_frameworks_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_frameworks, name - assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworksRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_frameworks_client_stub do - # Create client - client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_frameworks({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_frameworks parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_frameworks ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworksRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_frameworks({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_frameworks(::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworksRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_frameworks_client_stub.call_rpc_count - end - end - - def test_get_framework - # Create GRPC objects. - grpc_response = ::Google::Cloud::CloudSecurityCompliance::V1::Framework.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - major_revision_id = 42 - - get_framework_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_framework, name - assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkRequest, request - assert_equal "hello world", request["name"] - assert_equal 42, request["major_revision_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_framework_client_stub do - # Create client - client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_framework({ name: name, major_revision_id: major_revision_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_framework name: name, major_revision_id: major_revision_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_framework ::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkRequest.new(name: name, major_revision_id: major_revision_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_framework({ name: name, major_revision_id: major_revision_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_framework(::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkRequest.new(name: name, major_revision_id: major_revision_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_framework_client_stub.call_rpc_count - end - end - - def test_create_framework - # Create GRPC objects. - grpc_response = ::Google::Cloud::CloudSecurityCompliance::V1::Framework.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - framework_id = "hello world" - framework = {} - - create_framework_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_framework, name - assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["framework_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CloudSecurityCompliance::V1::Framework), request["framework"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_framework_client_stub do - # Create client - client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_framework({ parent: parent, framework_id: framework_id, framework: framework }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_framework parent: parent, framework_id: framework_id, framework: framework do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_framework ::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkRequest.new(parent: parent, framework_id: framework_id, framework: framework) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_framework({ parent: parent, framework_id: framework_id, framework: framework }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_framework(::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkRequest.new(parent: parent, framework_id: framework_id, framework: framework), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_framework_client_stub.call_rpc_count - end - end - - def test_update_framework - # Create GRPC objects. - grpc_response = ::Google::Cloud::CloudSecurityCompliance::V1::Framework.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - update_mask = {} - framework = {} - major_revision_id = 42 - - update_framework_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_framework, name - assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::UpdateFrameworkRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CloudSecurityCompliance::V1::Framework), request["framework"] - assert_equal 42, request["major_revision_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_framework_client_stub do - # Create client - client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_framework({ update_mask: update_mask, framework: framework, major_revision_id: major_revision_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_framework update_mask: update_mask, framework: framework, major_revision_id: major_revision_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_framework ::Google::Cloud::CloudSecurityCompliance::V1::UpdateFrameworkRequest.new(update_mask: update_mask, framework: framework, major_revision_id: major_revision_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_framework({ update_mask: update_mask, framework: framework, major_revision_id: major_revision_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_framework(::Google::Cloud::CloudSecurityCompliance::V1::UpdateFrameworkRequest.new(update_mask: update_mask, framework: framework, major_revision_id: major_revision_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_framework_client_stub.call_rpc_count - end - end - - def test_delete_framework - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_framework_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_framework, name - assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_framework_client_stub do - # Create client - client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_framework({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_framework name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_framework ::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_framework({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_framework(::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_framework_client_stub.call_rpc_count - end - end - - def test_list_cloud_controls - # Create GRPC objects. - grpc_response = ::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_cloud_controls_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_cloud_controls, name - assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_cloud_controls_client_stub do - # Create client - client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_cloud_controls({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_cloud_controls parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_cloud_controls ::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_cloud_controls({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_cloud_controls(::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_cloud_controls_client_stub.call_rpc_count - end - end - - def test_get_cloud_control - # Create GRPC objects. - grpc_response = ::Google::Cloud::CloudSecurityCompliance::V1::CloudControl.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - major_revision_id = 42 - - get_cloud_control_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_cloud_control, name - assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlRequest, request - assert_equal "hello world", request["name"] - assert_equal 42, request["major_revision_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_cloud_control_client_stub do - # Create client - client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_cloud_control({ name: name, major_revision_id: major_revision_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_cloud_control name: name, major_revision_id: major_revision_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_cloud_control ::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlRequest.new(name: name, major_revision_id: major_revision_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_cloud_control({ name: name, major_revision_id: major_revision_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_cloud_control(::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlRequest.new(name: name, major_revision_id: major_revision_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_cloud_control_client_stub.call_rpc_count - end - end - - def test_create_cloud_control - # Create GRPC objects. - grpc_response = ::Google::Cloud::CloudSecurityCompliance::V1::CloudControl.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - cloud_control_id = "hello world" - cloud_control = {} - - create_cloud_control_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_cloud_control, name - assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::CreateCloudControlRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["cloud_control_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CloudSecurityCompliance::V1::CloudControl), request["cloud_control"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_cloud_control_client_stub do - # Create client - client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_cloud_control({ parent: parent, cloud_control_id: cloud_control_id, cloud_control: cloud_control }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_cloud_control parent: parent, cloud_control_id: cloud_control_id, cloud_control: cloud_control do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_cloud_control ::Google::Cloud::CloudSecurityCompliance::V1::CreateCloudControlRequest.new(parent: parent, cloud_control_id: cloud_control_id, cloud_control: cloud_control) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_cloud_control({ parent: parent, cloud_control_id: cloud_control_id, cloud_control: cloud_control }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_cloud_control(::Google::Cloud::CloudSecurityCompliance::V1::CreateCloudControlRequest.new(parent: parent, cloud_control_id: cloud_control_id, cloud_control: cloud_control), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_cloud_control_client_stub.call_rpc_count - end - end - - def test_update_cloud_control - # Create GRPC objects. - grpc_response = ::Google::Cloud::CloudSecurityCompliance::V1::CloudControl.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - update_mask = {} - cloud_control = {} - - update_cloud_control_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_cloud_control, name - assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::UpdateCloudControlRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CloudSecurityCompliance::V1::CloudControl), request["cloud_control"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_cloud_control_client_stub do - # Create client - client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_cloud_control({ update_mask: update_mask, cloud_control: cloud_control }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_cloud_control update_mask: update_mask, cloud_control: cloud_control do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_cloud_control ::Google::Cloud::CloudSecurityCompliance::V1::UpdateCloudControlRequest.new(update_mask: update_mask, cloud_control: cloud_control) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_cloud_control({ update_mask: update_mask, cloud_control: cloud_control }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_cloud_control(::Google::Cloud::CloudSecurityCompliance::V1::UpdateCloudControlRequest.new(update_mask: update_mask, cloud_control: cloud_control), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_cloud_control_client_stub.call_rpc_count - end - end - - def test_delete_cloud_control - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_cloud_control_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_cloud_control, name - assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::DeleteCloudControlRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_cloud_control_client_stub do - # Create client - client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_cloud_control({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_cloud_control name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_cloud_control ::Google::Cloud::CloudSecurityCompliance::V1::DeleteCloudControlRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_cloud_control({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_cloud_control(::Google::Cloud::CloudSecurityCompliance::V1::DeleteCloudControlRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_cloud_control_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::Config::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::CloudSecurityCompliance::V1::Config::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::Config::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/deployment_operations_test.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/deployment_operations_test.rb deleted file mode 100644 index b4fc87e40767..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/deployment_operations_test.rb +++ /dev/null @@ -1,400 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/cloudsecuritycompliance/v1/deployment_pb" -require "google/cloud/cloudsecuritycompliance/v1/deployment_services_pb" -require "google/cloud/cloud_security_compliance/v1/deployment" - -class ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Operations.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/deployment_paths_test.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/deployment_paths_test.rb deleted file mode 100644 index 3b757bca5db8..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/deployment_paths_test.rb +++ /dev/null @@ -1,112 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/cloud_security_compliance/v1/deployment" - -class ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_cloud_control_deployment_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.cloud_control_deployment_path organization: "value0", location: "value1", cloud_control_deployment: "value2" - assert_equal "organizations/value0/locations/value1/cloudControlDeployments/value2", path - - path = client.cloud_control_deployment_path project: "value0", location: "value1", cloud_control_deployment: "value2" - assert_equal "projects/value0/locations/value1/cloudControlDeployments/value2", path - end - end - - def test_framework_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.framework_path organization: "value0", location: "value1", framework: "value2" - assert_equal "organizations/value0/locations/value1/frameworks/value2", path - - path = client.framework_path project: "value0", location: "value1", framework: "value2" - assert_equal "projects/value0/locations/value1/frameworks/value2", path - end - end - - def test_framework_deployment_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.framework_deployment_path organization: "value0", location: "value1", framework_deployment: "value2" - assert_equal "organizations/value0/locations/value1/frameworkDeployments/value2", path - - path = client.framework_deployment_path project: "value0", location: "value1", framework_deployment: "value2" - assert_equal "projects/value0/locations/value1/frameworkDeployments/value2", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end - - def test_organization_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.organization_location_path organization: "value0", location: "value1" - assert_equal "organizations/value0/locations/value1", path - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/deployment_rest_test.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/deployment_rest_test.rb deleted file mode 100644 index 81286c9d38bc..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/deployment_rest_test.rb +++ /dev/null @@ -1,434 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/cloudsecuritycompliance/v1/deployment_pb" -require "google/cloud/cloud_security_compliance/v1/deployment/rest" - - -class ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_create_framework_deployment - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - framework_deployment_id = "hello world" - framework_deployment = {} - - create_framework_deployment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::ServiceStub.stub :transcode_create_framework_deployment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_framework_deployment_client_stub do - # Create client - client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_framework_deployment({ parent: parent, framework_deployment_id: framework_deployment_id, framework_deployment: framework_deployment }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_framework_deployment parent: parent, framework_deployment_id: framework_deployment_id, framework_deployment: framework_deployment do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_framework_deployment ::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkDeploymentRequest.new(parent: parent, framework_deployment_id: framework_deployment_id, framework_deployment: framework_deployment) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_framework_deployment({ parent: parent, framework_deployment_id: framework_deployment_id, framework_deployment: framework_deployment }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_framework_deployment(::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkDeploymentRequest.new(parent: parent, framework_deployment_id: framework_deployment_id, framework_deployment: framework_deployment), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_framework_deployment_client_stub.call_count - end - end - end - - def test_delete_framework_deployment - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_framework_deployment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::ServiceStub.stub :transcode_delete_framework_deployment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_framework_deployment_client_stub do - # Create client - client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_framework_deployment({ name: name, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_framework_deployment name: name, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_framework_deployment ::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkDeploymentRequest.new(name: name, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_framework_deployment({ name: name, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_framework_deployment(::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkDeploymentRequest.new(name: name, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_framework_deployment_client_stub.call_count - end - end - end - - def test_get_framework_deployment - # Create test objects. - client_result = ::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_framework_deployment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::ServiceStub.stub :transcode_get_framework_deployment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_framework_deployment_client_stub do - # Create client - client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_framework_deployment({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_framework_deployment name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_framework_deployment ::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkDeploymentRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_framework_deployment({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_framework_deployment(::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkDeploymentRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_framework_deployment_client_stub.call_count - end - end - end - - def test_list_framework_deployments - # Create test objects. - client_result = ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkDeploymentsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_framework_deployments_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::ServiceStub.stub :transcode_list_framework_deployments_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_framework_deployments_client_stub do - # Create client - client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_framework_deployments({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_framework_deployments parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_framework_deployments ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkDeploymentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_framework_deployments({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_framework_deployments(::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkDeploymentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_framework_deployments_client_stub.call_count - end - end - end - - def test_get_cloud_control_deployment - # Create test objects. - client_result = ::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_cloud_control_deployment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::ServiceStub.stub :transcode_get_cloud_control_deployment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_cloud_control_deployment_client_stub do - # Create client - client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_cloud_control_deployment({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_cloud_control_deployment name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_cloud_control_deployment ::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlDeploymentRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_cloud_control_deployment({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_cloud_control_deployment(::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlDeploymentRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_cloud_control_deployment_client_stub.call_count - end - end - end - - def test_list_cloud_control_deployments - # Create test objects. - client_result = ::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlDeploymentsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_cloud_control_deployments_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::ServiceStub.stub :transcode_list_cloud_control_deployments_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_cloud_control_deployments_client_stub do - # Create client - client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_cloud_control_deployments({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_cloud_control_deployments parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_cloud_control_deployments ::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlDeploymentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_cloud_control_deployments({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_cloud_control_deployments(::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlDeploymentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_cloud_control_deployments_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/deployment_test.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/deployment_test.rb deleted file mode 100644 index 15563cc06745..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/deployment_test.rb +++ /dev/null @@ -1,508 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/cloudsecuritycompliance/v1/deployment_pb" -require "google/cloud/cloud_security_compliance/v1/deployment" - -class ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_create_framework_deployment - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - framework_deployment_id = "hello world" - framework_deployment = {} - - create_framework_deployment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_framework_deployment, name - assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkDeploymentRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["framework_deployment_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment), request["framework_deployment"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_framework_deployment_client_stub do - # Create client - client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_framework_deployment({ parent: parent, framework_deployment_id: framework_deployment_id, framework_deployment: framework_deployment }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_framework_deployment parent: parent, framework_deployment_id: framework_deployment_id, framework_deployment: framework_deployment do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_framework_deployment ::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkDeploymentRequest.new(parent: parent, framework_deployment_id: framework_deployment_id, framework_deployment: framework_deployment) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_framework_deployment({ parent: parent, framework_deployment_id: framework_deployment_id, framework_deployment: framework_deployment }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_framework_deployment(::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkDeploymentRequest.new(parent: parent, framework_deployment_id: framework_deployment_id, framework_deployment: framework_deployment), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_framework_deployment_client_stub.call_rpc_count - end - end - - def test_delete_framework_deployment - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - etag = "hello world" - - delete_framework_deployment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_framework_deployment, name - assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkDeploymentRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_framework_deployment_client_stub do - # Create client - client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_framework_deployment({ name: name, etag: etag }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_framework_deployment name: name, etag: etag do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_framework_deployment ::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkDeploymentRequest.new(name: name, etag: etag) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_framework_deployment({ name: name, etag: etag }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_framework_deployment(::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkDeploymentRequest.new(name: name, etag: etag), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_framework_deployment_client_stub.call_rpc_count - end - end - - def test_get_framework_deployment - # Create GRPC objects. - grpc_response = ::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_framework_deployment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_framework_deployment, name - assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkDeploymentRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_framework_deployment_client_stub do - # Create client - client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_framework_deployment({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_framework_deployment name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_framework_deployment ::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkDeploymentRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_framework_deployment({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_framework_deployment(::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkDeploymentRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_framework_deployment_client_stub.call_rpc_count - end - end - - def test_list_framework_deployments - # Create GRPC objects. - grpc_response = ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkDeploymentsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_framework_deployments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_framework_deployments, name - assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkDeploymentsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_framework_deployments_client_stub do - # Create client - client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_framework_deployments({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_framework_deployments parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_framework_deployments ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkDeploymentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_framework_deployments({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_framework_deployments(::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkDeploymentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_framework_deployments_client_stub.call_rpc_count - end - end - - def test_get_cloud_control_deployment - # Create GRPC objects. - grpc_response = ::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_cloud_control_deployment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_cloud_control_deployment, name - assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlDeploymentRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_cloud_control_deployment_client_stub do - # Create client - client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_cloud_control_deployment({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_cloud_control_deployment name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_cloud_control_deployment ::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlDeploymentRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_cloud_control_deployment({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_cloud_control_deployment(::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlDeploymentRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_cloud_control_deployment_client_stub.call_rpc_count - end - end - - def test_list_cloud_control_deployments - # Create GRPC objects. - grpc_response = ::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlDeploymentsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_cloud_control_deployments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_cloud_control_deployments, name - assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlDeploymentsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_cloud_control_deployments_client_stub do - # Create client - client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_cloud_control_deployments({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_cloud_control_deployments parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_cloud_control_deployments ::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlDeploymentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_cloud_control_deployments({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_cloud_control_deployments(::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlDeploymentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_cloud_control_deployments_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client, client - assert_equal creds, client.configure.credentials - end - end - - def test_operations_client - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/monitoring_paths_test.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/monitoring_paths_test.rb deleted file mode 100644 index 4e758f1ea511..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/monitoring_paths_test.rb +++ /dev/null @@ -1,97 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/cloud_security_compliance/v1/monitoring" - -class ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_folder_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.folder_location_path folder: "value0", location: "value1" - assert_equal "folders/value0/locations/value1", path - end - end - - def test_framework_compliance_report_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.framework_compliance_report_path project: "value0", location: "value1", framework_compliance_report: "value2" - assert_equal "projects/value0/locations/value1/frameworkComplianceReports/value2", path - - path = client.framework_compliance_report_path folder: "value0", location: "value1", framework_compliance_report: "value2" - assert_equal "folders/value0/locations/value1/frameworkComplianceReports/value2", path - - path = client.framework_compliance_report_path organization: "value0", location: "value1", framework_compliance_report: "value2" - assert_equal "organizations/value0/locations/value1/frameworkComplianceReports/value2", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end - - def test_organization_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.organization_location_path organization: "value0", location: "value1" - assert_equal "organizations/value0/locations/value1", path - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/monitoring_rest_test.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/monitoring_rest_test.rb deleted file mode 100644 index 08012d88bdda..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/monitoring_rest_test.rb +++ /dev/null @@ -1,385 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/cloudsecuritycompliance/v1/monitoring_pb" -require "google/cloud/cloud_security_compliance/v1/monitoring/rest" - - -class ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_framework_compliance_summaries - # Create test objects. - client_result = ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkComplianceSummariesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - view = :FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_UNSPECIFIED - - list_framework_compliance_summaries_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Rest::ServiceStub.stub :transcode_list_framework_compliance_summaries_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_framework_compliance_summaries_client_stub do - # Create client - client = ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_framework_compliance_summaries({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_framework_compliance_summaries parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_framework_compliance_summaries ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkComplianceSummariesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_framework_compliance_summaries({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_framework_compliance_summaries(::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkComplianceSummariesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_framework_compliance_summaries_client_stub.call_count - end - end - end - - def test_list_finding_summaries - # Create test objects. - client_result = ::Google::Cloud::CloudSecurityCompliance::V1::ListFindingSummariesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - end_time = {} - - list_finding_summaries_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Rest::ServiceStub.stub :transcode_list_finding_summaries_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_finding_summaries_client_stub do - # Create client - client = ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_finding_summaries({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, end_time: end_time }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_finding_summaries parent: parent, page_size: page_size, page_token: page_token, filter: filter, end_time: end_time do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_finding_summaries ::Google::Cloud::CloudSecurityCompliance::V1::ListFindingSummariesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, end_time: end_time) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_finding_summaries({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, end_time: end_time }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_finding_summaries(::Google::Cloud::CloudSecurityCompliance::V1::ListFindingSummariesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, end_time: end_time), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_finding_summaries_client_stub.call_count - end - end - end - - def test_fetch_framework_compliance_report - # Create test objects. - client_result = ::Google::Cloud::CloudSecurityCompliance::V1::FrameworkComplianceReport.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - end_time = {} - filter = "hello world" - - fetch_framework_compliance_report_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Rest::ServiceStub.stub :transcode_fetch_framework_compliance_report_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, fetch_framework_compliance_report_client_stub do - # Create client - client = ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.fetch_framework_compliance_report({ name: name, end_time: end_time, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.fetch_framework_compliance_report name: name, end_time: end_time, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.fetch_framework_compliance_report ::Google::Cloud::CloudSecurityCompliance::V1::FetchFrameworkComplianceReportRequest.new(name: name, end_time: end_time, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.fetch_framework_compliance_report({ name: name, end_time: end_time, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.fetch_framework_compliance_report(::Google::Cloud::CloudSecurityCompliance::V1::FetchFrameworkComplianceReportRequest.new(name: name, end_time: end_time, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, fetch_framework_compliance_report_client_stub.call_count - end - end - end - - def test_list_control_compliance_summaries - # Create test objects. - client_result = ::Google::Cloud::CloudSecurityCompliance::V1::ListControlComplianceSummariesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - end_time = {} - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_control_compliance_summaries_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Rest::ServiceStub.stub :transcode_list_control_compliance_summaries_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_control_compliance_summaries_client_stub do - # Create client - client = ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_control_compliance_summaries({ parent: parent, end_time: end_time, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_control_compliance_summaries parent: parent, end_time: end_time, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_control_compliance_summaries ::Google::Cloud::CloudSecurityCompliance::V1::ListControlComplianceSummariesRequest.new(parent: parent, end_time: end_time, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_control_compliance_summaries({ parent: parent, end_time: end_time, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_control_compliance_summaries(::Google::Cloud::CloudSecurityCompliance::V1::ListControlComplianceSummariesRequest.new(parent: parent, end_time: end_time, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_control_compliance_summaries_client_stub.call_count - end - end - end - - def test_aggregate_framework_compliance_report - # Create test objects. - client_result = ::Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - interval = {} - filter = "hello world" - - aggregate_framework_compliance_report_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Rest::ServiceStub.stub :transcode_aggregate_framework_compliance_report_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, aggregate_framework_compliance_report_client_stub do - # Create client - client = ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.aggregate_framework_compliance_report({ name: name, interval: interval, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.aggregate_framework_compliance_report name: name, interval: interval, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.aggregate_framework_compliance_report ::Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportRequest.new(name: name, interval: interval, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.aggregate_framework_compliance_report({ name: name, interval: interval, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.aggregate_framework_compliance_report(::Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportRequest.new(name: name, interval: interval, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, aggregate_framework_compliance_report_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/monitoring_test.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/monitoring_test.rb deleted file mode 100644 index c258129ce4b3..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/google/cloud/cloud_security_compliance/v1/monitoring_test.rb +++ /dev/null @@ -1,441 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/cloudsecuritycompliance/v1/monitoring_pb" -require "google/cloud/cloud_security_compliance/v1/monitoring" - -class ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_framework_compliance_summaries - # Create GRPC objects. - grpc_response = ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkComplianceSummariesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - view = :FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_UNSPECIFIED - - list_framework_compliance_summaries_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_framework_compliance_summaries, name - assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkComplianceSummariesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal :FRAMEWORK_COMPLIANCE_SUMMARY_VIEW_UNSPECIFIED, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_framework_compliance_summaries_client_stub do - # Create client - client = ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_framework_compliance_summaries({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_framework_compliance_summaries parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_framework_compliance_summaries ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkComplianceSummariesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_framework_compliance_summaries({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_framework_compliance_summaries(::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkComplianceSummariesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, view: view), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_framework_compliance_summaries_client_stub.call_rpc_count - end - end - - def test_list_finding_summaries - # Create GRPC objects. - grpc_response = ::Google::Cloud::CloudSecurityCompliance::V1::ListFindingSummariesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - end_time = {} - - list_finding_summaries_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_finding_summaries, name - assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::ListFindingSummariesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["end_time"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_finding_summaries_client_stub do - # Create client - client = ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_finding_summaries({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, end_time: end_time }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_finding_summaries parent: parent, page_size: page_size, page_token: page_token, filter: filter, end_time: end_time do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_finding_summaries ::Google::Cloud::CloudSecurityCompliance::V1::ListFindingSummariesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, end_time: end_time) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_finding_summaries({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, end_time: end_time }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_finding_summaries(::Google::Cloud::CloudSecurityCompliance::V1::ListFindingSummariesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, end_time: end_time), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_finding_summaries_client_stub.call_rpc_count - end - end - - def test_fetch_framework_compliance_report - # Create GRPC objects. - grpc_response = ::Google::Cloud::CloudSecurityCompliance::V1::FrameworkComplianceReport.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - end_time = {} - filter = "hello world" - - fetch_framework_compliance_report_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :fetch_framework_compliance_report, name - assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::FetchFrameworkComplianceReportRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["end_time"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, fetch_framework_compliance_report_client_stub do - # Create client - client = ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.fetch_framework_compliance_report({ name: name, end_time: end_time, filter: filter }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.fetch_framework_compliance_report name: name, end_time: end_time, filter: filter do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.fetch_framework_compliance_report ::Google::Cloud::CloudSecurityCompliance::V1::FetchFrameworkComplianceReportRequest.new(name: name, end_time: end_time, filter: filter) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.fetch_framework_compliance_report({ name: name, end_time: end_time, filter: filter }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.fetch_framework_compliance_report(::Google::Cloud::CloudSecurityCompliance::V1::FetchFrameworkComplianceReportRequest.new(name: name, end_time: end_time, filter: filter), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, fetch_framework_compliance_report_client_stub.call_rpc_count - end - end - - def test_list_control_compliance_summaries - # Create GRPC objects. - grpc_response = ::Google::Cloud::CloudSecurityCompliance::V1::ListControlComplianceSummariesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - end_time = {} - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_control_compliance_summaries_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_control_compliance_summaries, name - assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::ListControlComplianceSummariesRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["end_time"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_control_compliance_summaries_client_stub do - # Create client - client = ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_control_compliance_summaries({ parent: parent, end_time: end_time, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_control_compliance_summaries parent: parent, end_time: end_time, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_control_compliance_summaries ::Google::Cloud::CloudSecurityCompliance::V1::ListControlComplianceSummariesRequest.new(parent: parent, end_time: end_time, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_control_compliance_summaries({ parent: parent, end_time: end_time, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_control_compliance_summaries(::Google::Cloud::CloudSecurityCompliance::V1::ListControlComplianceSummariesRequest.new(parent: parent, end_time: end_time, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_control_compliance_summaries_client_stub.call_rpc_count - end - end - - def test_aggregate_framework_compliance_report - # Create GRPC objects. - grpc_response = ::Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - interval = {} - filter = "hello world" - - aggregate_framework_compliance_report_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :aggregate_framework_compliance_report, name - assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Type::Interval), request["interval"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, aggregate_framework_compliance_report_client_stub do - # Create client - client = ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.aggregate_framework_compliance_report({ name: name, interval: interval, filter: filter }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.aggregate_framework_compliance_report name: name, interval: interval, filter: filter do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.aggregate_framework_compliance_report ::Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportRequest.new(name: name, interval: interval, filter: filter) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.aggregate_framework_compliance_report({ name: name, interval: interval, filter: filter }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.aggregate_framework_compliance_report(::Google::Cloud::CloudSecurityCompliance::V1::AggregateFrameworkComplianceReportRequest.new(name: name, interval: interval, filter: filter), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, aggregate_framework_compliance_report_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::CloudSecurityCompliance::V1::Monitoring::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/helper.rb b/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-cloud_security_compliance-v1/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct"