From e99da9b1c668169a50289f2d27a45be52436061c Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Tue, 11 Aug 2026 07:03:13 +0000 Subject: [PATCH 1/4] feat: Add organizations level support for GenerateAuditScopeReport, GenerateAuditReport and GetAuditReport feat: Add `validate_only` field to GenerateAuditReportRequest feat: deprecated the old `compliance_standard` field in favour of `compliance_framework` for GenerateAuditScopeReport and GenerateAuditReport feat: Add `https://www.googleapis.com/auth/cloud-auditmanager` OAuth scope docs: Clarify documentation for several RPCs, resource messages, and enumerations PiperOrigin-RevId: 962555701 Source-Link: https://github.com/googleapis/googleapis/commit/a60f0aea57667baefb38c3f3f14079766bbd1bb2 Source-Link: https://github.com/googleapis/googleapis-gen/commit/cd855af49e9b88cd31c2e02b37fa4f521df7ec6f Copy-Tag: eyJwIjoiQXVkaXRNYW5hZ2VyLy5Pd2xCb3QueWFtbCIsImgiOiJjZDg1NWFmNDllOWI4OGNkMzFjMmUwMmIzN2ZhNGY1MjFkZjdlYzZmIn0= --- .../Cloud/Auditmanager/V1/Auditmanager.php | 30 + .../Cloud/AuditManager/V1/AuditReport.php | 488 ++++++++++ .../V1/AuditReport/ReportGenerationState.php | 79 ++ .../AuditManager/V1/AuditScopeReport.php | 125 +++ .../Cloud/AuditManager/V1/ComplianceState.php | 83 ++ .../Google/Cloud/AuditManager/V1/Control.php | 399 ++++++++ .../Cloud/AuditManager/V1/Control/Family.php | 173 ++++ .../Cloud/AuditManager/V1/ControlDetails.php | 159 ++++ .../Cloud/AuditManager/V1/ControlFamily.php | 113 +++ .../AuditManager/V1/DestinationDetails.php | 78 ++ .../AuditManager/V1/EnrollResourceRequest.php | 169 ++++ .../EligibleDestination.php | 84 ++ .../Cloud/AuditManager/V1/Enrollment.php | 117 +++ .../V1/GenerateAuditReportRequest.php | 316 ++++++ .../AuditReportFormat.php | 54 ++ .../V1/GenerateAuditScopeReportRequest.php | 231 +++++ .../AuditScopeReportFormat.php | 54 ++ .../AuditManager/V1/GetAuditReportRequest.php | 98 ++ .../V1/GetResourceEnrollmentStatusRequest.php | 103 ++ .../V1/ListAuditReportsRequest.php | 187 ++++ .../V1/ListAuditReportsResponse.php | 110 +++ .../AuditManager/V1/ListControlsRequest.php | 182 ++++ .../AuditManager/V1/ListControlsResponse.php | 110 +++ .../ListResourceEnrollmentStatusesRequest.php | 182 ++++ ...ListResourceEnrollmentStatusesResponse.php | 110 +++ .../AuditManager/V1/OperationMetadata.php | 315 ++++++ .../Cloud/AuditManager/V1/OperationState.php | 103 ++ .../V1/ReportGenerationProgress.php | 299 ++++++ .../Cloud/AuditManager/V1/ReportSummary.php | 204 ++++ .../V1/ResourceEnrollmentStatus.php | 244 +++++ .../ResourceEnrollmentState.php | 68 ++ .../V1/AuditManagerClient/enroll_resource.php | 82 ++ .../generate_audit_report.php | 100 ++ .../generate_audit_scope_report.php | 93 ++ .../AuditManagerClient/get_audit_report.php | 75 ++ .../V1/AuditManagerClient/get_location.php | 57 ++ .../get_resource_enrollment_status.php | 80 ++ .../AuditManagerClient/list_audit_reports.php | 82 ++ .../V1/AuditManagerClient/list_controls.php | 81 ++ .../V1/AuditManagerClient/list_locations.php | 77 ++ .../list_resource_enrollment_statuses.php | 81 ++ .../v1/src/V1/Client/AuditManagerClient.php | 897 ++++++++++++++++++ .../v1/src/V1/gapic_metadata.json | 68 ++ .../audit_manager_client_config.json | 94 ++ .../audit_manager_descriptor_config.php | 207 ++++ .../audit_manager_rest_client_config.php | 298 ++++++ .../Unit/V1/Client/AuditManagerClientTest.php | 894 +++++++++++++++++ 47 files changed, 8333 insertions(+) create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/GPBMetadata/Google/Cloud/Auditmanager/V1/Auditmanager.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/AuditReport.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/AuditReport/ReportGenerationState.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/AuditScopeReport.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ComplianceState.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Control.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Control/Family.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ControlDetails.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ControlFamily.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/DestinationDetails.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/EnrollResourceRequest.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/EnrollResourceRequest/EligibleDestination.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Enrollment.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditReportRequest.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditReportRequest/AuditReportFormat.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditScopeReportRequest.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditScopeReportRequest/AuditScopeReportFormat.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GetAuditReportRequest.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GetResourceEnrollmentStatusRequest.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListAuditReportsRequest.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListAuditReportsResponse.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListControlsRequest.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListControlsResponse.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListResourceEnrollmentStatusesRequest.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListResourceEnrollmentStatusesResponse.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/OperationMetadata.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/OperationState.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ReportGenerationProgress.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ReportSummary.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ResourceEnrollmentStatus.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ResourceEnrollmentStatus/ResourceEnrollmentState.php create mode 100644 owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/enroll_resource.php create mode 100644 owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/generate_audit_report.php create mode 100644 owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/generate_audit_scope_report.php create mode 100644 owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_audit_report.php create mode 100644 owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_location.php create mode 100644 owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_resource_enrollment_status.php create mode 100644 owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_audit_reports.php create mode 100644 owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_controls.php create mode 100644 owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_locations.php create mode 100644 owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_resource_enrollment_statuses.php create mode 100644 owl-bot-staging/AuditManager/v1/src/V1/Client/AuditManagerClient.php create mode 100644 owl-bot-staging/AuditManager/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_client_config.json create mode 100644 owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_descriptor_config.php create mode 100644 owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_rest_client_config.php create mode 100644 owl-bot-staging/AuditManager/v1/tests/Unit/V1/Client/AuditManagerClientTest.php diff --git a/owl-bot-staging/AuditManager/v1/proto/src/GPBMetadata/Google/Cloud/Auditmanager/V1/Auditmanager.php b/owl-bot-staging/AuditManager/v1/proto/src/GPBMetadata/Google/Cloud/Auditmanager/V1/Auditmanager.php new file mode 100644 index 000000000000..4a487ea26fcc --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/GPBMetadata/Google/Cloud/Auditmanager/V1/Auditmanager.php @@ -0,0 +1,30 @@ +internalAddGeneratedFile( + "\x0A\xBCT\x0A/google/cloud/auditmanager/v1/auditmanager.proto\x12\x1Cgoogle.cloud.auditmanager.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A#google/longrunning/operations.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xDE\x01\x0A\x15EnrollResourceRequest\x12\x12\x0A\x05scope\x18\x01 \x01(\x09B\x03\xE0A\x02\x12b\x0A\x0Cdestinations\x18\x02 \x03(\x0B2G.google.cloud.auditmanager.v1.EnrollResourceRequest.EligibleDestinationB\x03\xE0A\x02\x1AM\x0A\x13EligibleDestination\x12\x1D\x0A\x13eligible_gcs_bucket\x18\x03 \x01(\x09H\x00B\x17\x0A\x15eligible_destinations\"\xD6\x02\x0A\x1FGenerateAuditScopeReportRequest\x12\x12\x0A\x05scope\x18\x02 \x01(\x09B\x03\xE0A\x02\x12\"\x0A\x13compliance_standard\x18\x03 \x01(\x09B\x05\x18\x01\xE0A\x01\x12p\x0A\x0Dreport_format\x18\x04 \x01(\x0E2T.google.cloud.auditmanager.v1.GenerateAuditScopeReportRequest.AuditScopeReportFormatB\x03\xE0A\x02\x12!\x0A\x14compliance_framework\x18\x05 \x01(\x09B\x03\xE0A\x02\"f\x0A\x16AuditScopeReportFormat\x12)\x0A%AUDIT_SCOPE_REPORT_FORMAT_UNSPECIFIED\x10\x00\x12!\x0A\x1DAUDIT_SCOPE_REPORT_FORMAT_ODF\x10\x01\"\xF4\x02\x0A\x1AGenerateAuditReportRequest\x12\x11\x0A\x07gcs_uri\x18\x02 \x01(\x09H\x00\x12\x12\x0A\x05scope\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\"\x0A\x13compliance_standard\x18\x03 \x01(\x09B\x05\x18\x01\xE0A\x01\x12f\x0A\x0Dreport_format\x18\x04 \x01(\x0E2J.google.cloud.auditmanager.v1.GenerateAuditReportRequest.AuditReportFormatB\x03\xE0A\x02\x12!\x0A\x14compliance_framework\x18\x05 \x01(\x09B\x03\xE0A\x02\x12\x1A\x0A\x0Dvalidate_only\x18\x08 \x01(\x08B\x03\xE0A\x01\"U\x0A\x11AuditReportFormat\x12#\x0A\x1FAUDIT_REPORT_FORMAT_UNSPECIFIED\x10\x00\x12\x1B\x0A\x17AUDIT_REPORT_FORMAT_ODF\x10\x01B\x0D\x0A\x0Bdestination\"p\x0A\"GetResourceEnrollmentStatusRequest\x12J\x0A\x04name\x18\x01 \x01(\x09B<\xE0A\x02\xFAA6\x0A4auditmanager.googleapis.com/ResourceEnrollmentStatus\"\xA3\x01\x0A%ListResourceEnrollmentStatusesRequest\x12I\x0A\x06parent\x18\x01 \x01(\x09B9\xE0A\x02\xFAA3\x0A1auditmanager.googleapis.com/EnrollmentStatusScope\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\"\xA4\x01\x0A&ListResourceEnrollmentStatusesResponse\x12\\\x0A\x1Cresource_enrollment_statuses\x18\x01 \x03(\x0B26.google.cloud.auditmanager.v1.ResourceEnrollmentStatus\x12\x1C\x0A\x0Fnext_page_token\x18\x02 \x01(\x09B\x03\xE0A\x03\"\x8B\x01\x0A\x17ListAuditReportsRequest\x12?\x0A\x06parent\x18\x01 \x01(\x09B/\xE0A\x02\xFAA)\x12'auditmanager.googleapis.com/AuditReport\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\"\x7F\x0A\x18ListAuditReportsResponse\x12E\x0A\x0Daudit_reports\x18\x01 \x03(\x0B2).google.cloud.auditmanager.v1.AuditReportB\x03\xE0A\x03\x12\x1C\x0A\x0Fnext_page_token\x18\x02 \x01(\x09B\x03\xE0A\x03\"V\x0A\x15GetAuditReportRequest\x12=\x0A\x04name\x18\x01 \x01(\x09B/\xE0A\x02\xFAA)\x0A'auditmanager.googleapis.com/AuditReport\"\x84\x01\x0A\x13ListControlsRequest\x12<\x0A\x06parent\x18\x01 \x01(\x09B,\xE0A\x02\xFAA&\x0A\$auditmanager.googleapis.com/Standard\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\"r\x0A\x14ListControlsResponse\x12<\x0A\x08controls\x18\x01 \x03(\x0B2%.google.cloud.auditmanager.v1.ControlB\x03\xE0A\x03\x12\x1C\x0A\x0Fnext_page_token\x18\x02 \x01(\x09B\x03\xE0A\x03\"\xE1\x02\x0A\x18ReportGenerationProgress\x12@\x0A\x05state\x18\x01 \x01(\x0E2,.google.cloud.auditmanager.v1.OperationStateB\x03\xE0A\x03\x12\x1B\x0A\x0Efailure_reason\x18\x02 \x01(\x09B\x03\xE0A\x03\x12#\x0A\x1Bevaluation_percent_complete\x18\x14 \x01(\x01\x12*\x0A\"report_generation_percent_complete\x18\x1E \x01(\x01\x12)\x0A!report_uploading_percent_complete\x18( \x01(\x01\x12#\x0A\x16destination_gcs_bucket\x182 \x01(\x09B\x03\xE0A\x03\x12E\x0A\x0Caudit_report\x183 \x01(\x09B/\xE0A\x03\xFAA)\x0A'auditmanager.googleapis.com/AuditReport\"\x89\x03\x0A\x0AEnrollment\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12R\x0A\x13destination_details\x18\x03 \x03(\x0B20.google.cloud.auditmanager.v1.DestinationDetailsB\x03\xE0A\x03:\x93\x02\xEAA\x8F\x02\x0A&auditmanager.googleapis.com/Enrollment\x12@projects/{project}/locations/{location}/enrollments/{enrollment}\x12>folders/{folder}/locations/{location}/enrollments/{enrollment}\x12Jorganizations/{organization}/locations/{location}/enrollments/{enrollment}*\x0Benrollments2\x0Aenrollment\"\xA8\x03\x0A\x10AuditScopeReport\x12\x1F\x0A\x15scope_report_contents\x18\x01 \x01(\x0CH\x00\x12\x11\x0A\x04name\x18\x02 \x01(\x09B\x03\xE0A\x08:\xCF\x02\xEAA\xCB\x02\x0A,auditmanager.googleapis.com/AuditScopeReport\x12Nprojects/{project}/locations/{location}/auditScopeReports/{audit_scope_report}\x12Lfolders/{folder}/locations/{location}/auditScopeReports/{audit_scope_report}\x12Xorganizations/{organization}/locations/{location}/auditScopeReports/{audit_scope_report}*\x11auditScopeReports2\x10auditScopeReportB\x0E\x0A\x0Caudit_report\"\x80\x02\x0A\x11OperationMetadata\x124\x0A\x0Bcreate_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x121\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\x13\x0A\x06target\x18\x03 \x01(\x09B\x03\xE0A\x03\x12\x11\x0A\x04verb\x18\x04 \x01(\x09B\x03\xE0A\x03\x12\x1B\x0A\x0Estatus_message\x18\x05 \x01(\x09B\x03\xE0A\x03\x12#\x0A\x16requested_cancellation\x18\x06 \x01(\x08B\x03\xE0A\x03\x12\x18\x0A\x0Bapi_version\x18\x07 \x01(\x09B\x03\xE0A\x03\"\xA6\x06\x0A\x18ResourceEnrollmentStatus\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12A\x0A\x0Aenrollment\x18\x02 \x01(\x0B2(.google.cloud.auditmanager.v1.EnrollmentB\x03\xE0A\x03\x12\x17\x0A\x08enrolled\x18\x03 \x01(\x08B\x05\x18\x01\xE0A\x03\x12\x19\x0A\x0Cdisplay_name\x18\x04 \x01(\x09B\x03\xE0A\x03\x12m\x0A\x10enrollment_state\x18\x05 \x01(\x0E2N.google.cloud.auditmanager.v1.ResourceEnrollmentStatus.ResourceEnrollmentStateB\x03\xE0A\x03\"s\x0A\x17ResourceEnrollmentState\x12)\x0A%RESOURCE_ENROLLMENT_STATE_UNSPECIFIED\x10\x00\x12\x10\x0A\x0CNOT_ENROLLED\x10\x01\x12\x0D\x0A\x09INHERITED\x10\x02\x12\x0C\x0A\x08ENROLLED\x10\x03:\x9B\x03\xEAA\x97\x03\x0A4auditmanager.googleapis.com/ResourceEnrollmentStatus\x12]folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}\x12_projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}\x12iorganizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}*\x1AresourceEnrollmentStatuses2\x18resourceEnrollmentStatus\"\xDA\x07\x0A\x0BAuditReport\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12H\x0A\x0Ereport_summary\x18\x02 \x01(\x0B2+.google.cloud.auditmanager.v1.ReportSummaryB\x03\xE0A\x03\x12\x19\x0A\x0Coperation_id\x18\x03 \x01(\x09B\x03\xE0A\x03\x12R\x0A\x13destination_details\x18\x04 \x01(\x0B20.google.cloud.auditmanager.v1.DestinationDetailsB\x03\xE0A\x03\x12\"\x0A\x13compliance_standard\x18\x05 \x01(\x09B\x05\x18\x01\xE0A\x03\x12\x12\x0A\x05scope\x18\x06 \x01(\x09B\x03\xE0A\x03\x124\x0A\x0Bcreate_time\x18\x07 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12J\x0A\x0Fcontrol_details\x18\x08 \x03(\x0B2,.google.cloud.auditmanager.v1.ControlDetailsB\x03\xE0A\x03\x12e\x0A\x17report_generation_state\x18\x09 \x01(\x0E2?.google.cloud.auditmanager.v1.AuditReport.ReportGenerationStateB\x03\xE0A\x03\x12!\x0A\x14compliance_framework\x18\x0A \x01(\x09B\x03\xE0A\x03\x12\x15\x0A\x08scope_id\x18\x0B \x01(\x09B\x03\xE0A\x03\"\x81\x01\x0A\x15ReportGenerationState\x12'\x0A#REPORT_GENERATION_STATE_UNSPECIFIED\x10\x00\x12\x0F\x0A\x0BIN_PROGRESS\x10\x01\x12\x0D\x0A\x09COMPLETED\x10\x02\x12\x0A\x0A\x06FAILED\x10\x03\x12\x13\x0A\x0FSUMMARY_UNKNOWN\x10\x04:\x9F\x02\xEAA\x9B\x02\x0A'auditmanager.googleapis.com/AuditReport\x12Cprojects/{project}/locations/{location}/auditReports/{audit_report}\x12Afolders/{folder}/locations/{location}/auditReports/{audit_report}\x12Morganizations/{organization}/locations/{location}/auditReports/{audit_report}*\x0CauditReports2\x0BauditReport\"8\x0A\x0DControlFamily\x12\x11\x0A\x09family_id\x18\x01 \x01(\x09\x12\x14\x0A\x0Cdisplay_name\x18\x02 \x01(\x09\"\xFB\x04\x0A\x07Control\x12\x0F\x0A\x02id\x18\x01 \x01(\x09B\x03\xE0A\x03\x12\x19\x0A\x0Cdisplay_name\x18\x02 \x01(\x09B\x03\xE0A\x03\x12A\x0A\x06family\x18\x03 \x01(\x0E2,.google.cloud.auditmanager.v1.Control.FamilyB\x03\xE0A\x03\x12H\x0A\x0Econtrol_family\x18\x0A \x01(\x0B2+.google.cloud.auditmanager.v1.ControlFamilyB\x03\xE0A\x03\x12\x18\x0A\x0Bdescription\x18\x04 \x01(\x09B\x03\xE0A\x03\x12 \x0A\x13responsibility_type\x18\x05 \x01(\x09B\x03\xE0A\x03\x12.\x0A!google_responsibility_description\x18\x06 \x01(\x09B\x03\xE0A\x03\x121\x0A\$google_responsibility_implementation\x18\x07 \x01(\x09B\x03\xE0A\x03\x120\x0A#customer_responsibility_description\x18\x08 \x01(\x09B\x03\xE0A\x03\x123\x0A&customer_responsibility_implementation\x18\x09 \x01(\x09B\x03\xE0A\x03\"\xB0\x01\x0A\x06Family\x12\x16\x0A\x12FAMILY_UNSPECIFIED\x10\x00\x12\x06\x0A\x02AC\x10\x01\x12\x06\x0A\x02AT\x10\x02\x12\x06\x0A\x02AU\x10\x03\x12\x06\x0A\x02CA\x10\x04\x12\x06\x0A\x02CM\x10\x05\x12\x06\x0A\x02CP\x10\x06\x12\x06\x0A\x02IA\x10\x07\x12\x06\x0A\x02IR\x10\x08\x12\x06\x0A\x02MA\x10\x09\x12\x06\x0A\x02MP\x10\x0A\x12\x06\x0A\x02PE\x10\x0B\x12\x06\x0A\x02PL\x10\x0C\x12\x06\x0A\x02PS\x10\x0D\x12\x06\x0A\x02RA\x10\x0E\x12\x06\x0A\x02SA\x10\x0F\x12\x06\x0A\x02SC\x10\x10\x12\x06\x0A\x02SI\x10\x11\x12\x06\x0A\x02SR\x10\x12\"=\x0A\x12DestinationDetails\x12\x18\x0A\x0Egcs_bucket_uri\x18\x01 \x01(\x09H\x00B\x0D\x0A\x0Bdestination\"\x8F\x01\x0A\x0DReportSummary\x12\x13\x0A\x0Btotal_count\x18\x01 \x01(\x05\x12\x17\x0A\x0Fcompliant_count\x18\x02 \x01(\x05\x12\x17\x0A\x0Fviolation_count\x18\x03 \x01(\x05\x12\"\x0A\x1Amanual_review_needed_count\x18\x04 \x01(\x05\x12\x13\x0A\x0Berror_count\x18\x05 \x01(\x05\"\xE3\x01\x0A\x0EControlDetails\x126\x0A\x07control\x18\x01 \x01(\x0B2%.google.cloud.auditmanager.v1.Control\x12L\x0A\x10compliance_state\x18\x02 \x01(\x0E2-.google.cloud.auditmanager.v1.ComplianceStateB\x03\xE0A\x03\x12K\x0A\x16control_report_summary\x18\x03 \x01(\x0B2+.google.cloud.auditmanager.v1.ReportSummary*\xFB\x02\x0A\x0EOperationState\x12\x1F\x0A\x1BOPERATION_STATE_UNSPECIFIED\x10\x00\x12\x1F\x0A\x1BOPERATION_STATE_NOT_STARTED\x10\x0A\x12*\x0A&OPERATION_STATE_EVALUATION_IN_PROGRESS\x10\x14\x12#\x0A\x1FOPERATION_STATE_EVALUATION_DONE\x10\x15\x12:\x0A6OPERATION_STATE_EVIDENCE_REPORT_GENERATION_IN_PROGRESS\x10\x1E\x123\x0A/OPERATION_STATE_EVIDENCE_REPORT_GENERATION_DONE\x10\x1F\x12/\x0A+OPERATION_STATE_EVIDENCE_UPLOAD_IN_PROGRESS\x10(\x12\x18\x0A\x14OPERATION_STATE_DONE\x102\x12\x1A\x0A\x16OPERATION_STATE_FAILED\x10<*\x8F\x01\x0A\x0FComplianceState\x12 \x0A\x1CCOMPLIANCE_STATE_UNSPECIFIED\x10\x00\x12\x0D\x0A\x09COMPLIANT\x10\x01\x12\x0D\x0A\x09VIOLATION\x10\x02\x12\x18\x0A\x14MANUAL_REVIEW_NEEDED\x10\x03\x12\x09\x0A\x05ERROR\x10\x04\x12\x17\x0A\x13AUDIT_NOT_SUPPORTED\x10\x052\xBD\x16\x0A\x0CAuditManager\x12\xB8\x02\x0A\x0EEnrollResource\x123.google.cloud.auditmanager.v1.EnrollResourceRequest\x1A(.google.cloud.auditmanager.v1.Enrollment\"\xC6\x01\xDAA\x12scope,destinations\x82\xD3\xE4\x93\x02\xAA\x01\"0/v1/{scope=folders/*/locations/*}:enrollResource:\x01*Z6\"1/v1/{scope=projects/*/locations/*}:enrollResource:\x01*Z;\"6/v1/{scope=organizations/*/locations/*}:enrollResource:\x01*\x12\x8B\x03\x0A\x18GenerateAuditScopeReport\x12=.google.cloud.auditmanager.v1.GenerateAuditScopeReportRequest\x1A..google.cloud.auditmanager.v1.AuditScopeReport\"\xFF\x01\xDAA'scope,compliance_standard,report_format\x82\xD3\xE4\x93\x02\xCE\x01\"/v1/{name=projects/*/locations/*/resourceEnrollmentStatuses/*}Z?\x12=/v1/{name=folders/*/locations/*/resourceEnrollmentStatuses/*}ZE\x12C/v1/{name=organizations/*/locations/*/resourceEnrollmentStatuses/*}\x12\xC4\x02\x0A\x1EListResourceEnrollmentStatuses\x12C.google.cloud.auditmanager.v1.ListResourceEnrollmentStatusesRequest\x1AD.google.cloud.auditmanager.v1.ListResourceEnrollmentStatusesResponse\"\x96\x01\xDAA\x06parent\x82\xD3\xE4\x93\x02\x86\x01\x12C/v1/{parent=organizations/*/locations/*}/resourceEnrollmentStatusesZ?\x12=/v1/{parent=folders/*/locations/*}/resourceEnrollmentStatuses\x12\xBE\x02\x0A\x0CListControls\x121.google.cloud.auditmanager.v1.ListControlsRequest\x1A2.google.cloud.auditmanager.v1.ListControlsResponse\"\xC6\x01\xDAA\x06parent\x82\xD3\xE4\x93\x02\xB6\x01\x12=/v1/{parent=organizations/*/locations/*/standards/*}/controlsZ9\x127/v1/{parent=folders/*/locations/*/standards/*}/controlsZ:\x128/v1/{parent=projects/*/locations/*/standards/*}/controls\x1A\x82\x01\xCAA\x1Bauditmanager.googleapis.com\xD2Aahttps://www.googleapis.com/auth/cloud-auditmanager,https://www.googleapis.com/auth/cloud-platformB\x92\x06\x0A com.google.cloud.auditmanager.v1B\x0BV1mainProtoP\x01ZDcloud.google.com/go/auditmanager/apiv1/auditmanagerpb;auditmanagerpb\xAA\x02\x1CGoogle.Cloud.AuditManager.V1\xCA\x02\x1CGoogle\\Cloud\\AuditManager\\V1\xEA\x02\x1FGoogle::Cloud::AuditManager::V1\xEAAS\x0A*auditmanager.googleapis.com/FolderLocation\x12%folders/{folder}/locations/{location}\xEAAe\x0A0auditmanager.googleapis.com/OrganizationLocation\x121organizations/{organization}/locations/{location}\xEAA\xE8\x01\x0A\$auditmanager.googleapis.com/Standard\x12google.cloud.auditmanager.v1.AuditReport + */ +class AuditReport extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. Name of the audit report, in one of the following formats: + * * `projects/{project}/locations/{location}/auditReports/{audit_report}` + * * `folders/{folder}/locations/{location}/auditReports/{audit_report}` + * * `organizations/{organization}/locations/{location}/auditReports/{audit_report}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. Report summary that includes information about compliance and + * violation counts. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.ReportSummary report_summary = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $report_summary = null; + /** + * Output only. Client operation ID for the audit report. + * + * Generated from protobuf field string operation_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $operation_id = ''; + /** + * Output only. Cloud Storage bucket where the audit report is uploaded to. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.DestinationDetails destination_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $destination_details = null; + /** + * Output only. Deprecated. Compliance standard to be audited against. + * Use the `compliance_framework` field instead. + * + * Generated from protobuf field string compliance_standard = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @deprecated + */ + protected $compliance_standard = ''; + /** + * Output only. Organization, folder, or project that the report is generated + * for, in one of the following formats: + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` + * + * Generated from protobuf field string scope = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $scope = ''; + /** + * Output only. Creation time of the audit report. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Overall status of the controls. + * + * Generated from protobuf field repeated .google.cloud.auditmanager.v1.ControlDetails control_details = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $control_details; + /** + * Output only. State of audit report generation. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.AuditReport.ReportGenerationState report_generation_state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $report_generation_state = 0; + /** + * Output only. Compliance framework to use for the audit report. For example, + * `CIS_GCP_FOUNDATIONS_V1_2_0`. + * + * Generated from protobuf field string compliance_framework = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $compliance_framework = ''; + /** + * Output only. Project number, folder ID, or organization ID that the audit + * report was generated for. + * + * Generated from protobuf field string scope_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $scope_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. Name of the audit report, in one of the following formats: + * * `projects/{project}/locations/{location}/auditReports/{audit_report}` + * * `folders/{folder}/locations/{location}/auditReports/{audit_report}` + * * `organizations/{organization}/locations/{location}/auditReports/{audit_report}` + * @type \Google\Cloud\AuditManager\V1\ReportSummary $report_summary + * Output only. Report summary that includes information about compliance and + * violation counts. + * @type string $operation_id + * Output only. Client operation ID for the audit report. + * @type \Google\Cloud\AuditManager\V1\DestinationDetails $destination_details + * Output only. Cloud Storage bucket where the audit report is uploaded to. + * @type string $compliance_standard + * Output only. Deprecated. Compliance standard to be audited against. + * Use the `compliance_framework` field instead. + * @type string $scope + * Output only. Organization, folder, or project that the report is generated + * for, in one of the following formats: + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Creation time of the audit report. + * @type \Google\Cloud\AuditManager\V1\ControlDetails[] $control_details + * Output only. Overall status of the controls. + * @type int $report_generation_state + * Output only. State of audit report generation. + * @type string $compliance_framework + * Output only. Compliance framework to use for the audit report. For example, + * `CIS_GCP_FOUNDATIONS_V1_2_0`. + * @type string $scope_id + * Output only. Project number, folder ID, or organization ID that the audit + * report was generated for. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. Name of the audit report, in one of the following formats: + * * `projects/{project}/locations/{location}/auditReports/{audit_report}` + * * `folders/{folder}/locations/{location}/auditReports/{audit_report}` + * * `organizations/{organization}/locations/{location}/auditReports/{audit_report}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. Name of the audit report, in one of the following formats: + * * `projects/{project}/locations/{location}/auditReports/{audit_report}` + * * `folders/{folder}/locations/{location}/auditReports/{audit_report}` + * * `organizations/{organization}/locations/{location}/auditReports/{audit_report}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. Report summary that includes information about compliance and + * violation counts. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.ReportSummary report_summary = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\AuditManager\V1\ReportSummary|null + */ + public function getReportSummary() + { + return $this->report_summary; + } + + public function hasReportSummary() + { + return isset($this->report_summary); + } + + public function clearReportSummary() + { + unset($this->report_summary); + } + + /** + * Output only. Report summary that includes information about compliance and + * violation counts. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.ReportSummary report_summary = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\AuditManager\V1\ReportSummary $var + * @return $this + */ + public function setReportSummary($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AuditManager\V1\ReportSummary::class); + $this->report_summary = $var; + + return $this; + } + + /** + * Output only. Client operation ID for the audit report. + * + * Generated from protobuf field string operation_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getOperationId() + { + return $this->operation_id; + } + + /** + * Output only. Client operation ID for the audit report. + * + * Generated from protobuf field string operation_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setOperationId($var) + { + GPBUtil::checkString($var, True); + $this->operation_id = $var; + + return $this; + } + + /** + * Output only. Cloud Storage bucket where the audit report is uploaded to. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.DestinationDetails destination_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\AuditManager\V1\DestinationDetails|null + */ + public function getDestinationDetails() + { + return $this->destination_details; + } + + public function hasDestinationDetails() + { + return isset($this->destination_details); + } + + public function clearDestinationDetails() + { + unset($this->destination_details); + } + + /** + * Output only. Cloud Storage bucket where the audit report is uploaded to. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.DestinationDetails destination_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\AuditManager\V1\DestinationDetails $var + * @return $this + */ + public function setDestinationDetails($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AuditManager\V1\DestinationDetails::class); + $this->destination_details = $var; + + return $this; + } + + /** + * Output only. Deprecated. Compliance standard to be audited against. + * Use the `compliance_framework` field instead. + * + * Generated from protobuf field string compliance_standard = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + * @deprecated + */ + public function getComplianceStandard() + { + if ($this->compliance_standard !== '') { + @trigger_error('compliance_standard is deprecated.', E_USER_DEPRECATED); + } + return $this->compliance_standard; + } + + /** + * Output only. Deprecated. Compliance standard to be audited against. + * Use the `compliance_framework` field instead. + * + * Generated from protobuf field string compliance_standard = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + * @deprecated + */ + public function setComplianceStandard($var) + { + @trigger_error('compliance_standard is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkString($var, True); + $this->compliance_standard = $var; + + return $this; + } + + /** + * Output only. Organization, folder, or project that the report is generated + * for, in one of the following formats: + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` + * + * Generated from protobuf field string scope = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getScope() + { + return $this->scope; + } + + /** + * Output only. Organization, folder, or project that the report is generated + * for, in one of the following formats: + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` + * + * Generated from protobuf field string scope = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setScope($var) + { + GPBUtil::checkString($var, True); + $this->scope = $var; + + return $this; + } + + /** + * Output only. Creation time of the audit report. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. Creation time of the audit report. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. Overall status of the controls. + * + * Generated from protobuf field repeated .google.cloud.auditmanager.v1.ControlDetails control_details = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField<\Google\Cloud\AuditManager\V1\ControlDetails> + */ + public function getControlDetails() + { + return $this->control_details; + } + + /** + * Output only. Overall status of the controls. + * + * Generated from protobuf field repeated .google.cloud.auditmanager.v1.ControlDetails control_details = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\AuditManager\V1\ControlDetails[] $var + * @return $this + */ + public function setControlDetails($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AuditManager\V1\ControlDetails::class); + $this->control_details = $arr; + + return $this; + } + + /** + * Output only. State of audit report generation. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.AuditReport.ReportGenerationState report_generation_state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getReportGenerationState() + { + return $this->report_generation_state; + } + + /** + * Output only. State of audit report generation. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.AuditReport.ReportGenerationState report_generation_state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setReportGenerationState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\AuditManager\V1\AuditReport\ReportGenerationState::class); + $this->report_generation_state = $var; + + return $this; + } + + /** + * Output only. Compliance framework to use for the audit report. For example, + * `CIS_GCP_FOUNDATIONS_V1_2_0`. + * + * Generated from protobuf field string compliance_framework = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getComplianceFramework() + { + return $this->compliance_framework; + } + + /** + * Output only. Compliance framework to use for the audit report. For example, + * `CIS_GCP_FOUNDATIONS_V1_2_0`. + * + * Generated from protobuf field string compliance_framework = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setComplianceFramework($var) + { + GPBUtil::checkString($var, True); + $this->compliance_framework = $var; + + return $this; + } + + /** + * Output only. Project number, folder ID, or organization ID that the audit + * report was generated for. + * + * Generated from protobuf field string scope_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getScopeId() + { + return $this->scope_id; + } + + /** + * Output only. Project number, folder ID, or organization ID that the audit + * report was generated for. + * + * Generated from protobuf field string scope_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setScopeId($var) + { + GPBUtil::checkString($var, True); + $this->scope_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/AuditReport/ReportGenerationState.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/AuditReport/ReportGenerationState.php new file mode 100644 index 000000000000..d34ee55388fe --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/AuditReport/ReportGenerationState.php @@ -0,0 +1,79 @@ +google.cloud.auditmanager.v1.AuditReport.ReportGenerationState + */ +class ReportGenerationState +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum REPORT_GENERATION_STATE_UNSPECIFIED = 0; + */ + const REPORT_GENERATION_STATE_UNSPECIFIED = 0; + /** + * The process is in progress. The operation can have any state + * except for `OPERATION_STATE_DONE` or `OPERATION_STATE_FAILED`. + * + * Generated from protobuf enum IN_PROGRESS = 1; + */ + const IN_PROGRESS = 1; + /** + * The process is completed. The operation state is + * `OPERATION_STATE_DONE`. + * + * Generated from protobuf enum COMPLETED = 2; + */ + const COMPLETED = 2; + /** + * The process has failed. The operation state is + * `OPERATION_STATE_FAILED`. + * + * Generated from protobuf enum FAILED = 3; + */ + const FAILED = 3; + /** + * The process completed, but the report summary's status is unknown. This + * state isn't used for new reports. + * + * Generated from protobuf enum SUMMARY_UNKNOWN = 4; + */ + const SUMMARY_UNKNOWN = 4; + + private static $valueToName = [ + self::REPORT_GENERATION_STATE_UNSPECIFIED => 'REPORT_GENERATION_STATE_UNSPECIFIED', + self::IN_PROGRESS => 'IN_PROGRESS', + self::COMPLETED => 'COMPLETED', + self::FAILED => 'FAILED', + self::SUMMARY_UNKNOWN => 'SUMMARY_UNKNOWN', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/AuditScopeReport.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/AuditScopeReport.php new file mode 100644 index 000000000000..89cb8c089869 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/AuditScopeReport.php @@ -0,0 +1,125 @@ +google.cloud.auditmanager.v1.AuditScopeReport + */ +class AuditScopeReport extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. Name for the audit scope report, in one of the following + * formats: + * * `projects/{project}/locations/{location}/auditScopeReports/{audit_scope_report}` + * * `folders/{folder}/locations/{location}/auditScopeReports/{audit_scope_report}` + * * `organizations/{organization}/locations/{location}/auditScopeReports/{audit_scope_report}` + * + * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + protected $audit_report; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $scope_report_contents + * Audit scope report content in byte format. + * @type string $name + * Identifier. Name for the audit scope report, in one of the following + * formats: + * * `projects/{project}/locations/{location}/auditScopeReports/{audit_scope_report}` + * * `folders/{folder}/locations/{location}/auditScopeReports/{audit_scope_report}` + * * `organizations/{organization}/locations/{location}/auditScopeReports/{audit_scope_report}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * Audit scope report content in byte format. + * + * Generated from protobuf field bytes scope_report_contents = 1; + * @return string + */ + public function getScopeReportContents() + { + return $this->readOneof(1); + } + + public function hasScopeReportContents() + { + return $this->hasOneof(1); + } + + /** + * Audit scope report content in byte format. + * + * Generated from protobuf field bytes scope_report_contents = 1; + * @param string $var + * @return $this + */ + public function setScopeReportContents($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Identifier. Name for the audit scope report, in one of the following + * formats: + * * `projects/{project}/locations/{location}/auditScopeReports/{audit_scope_report}` + * * `folders/{folder}/locations/{location}/auditScopeReports/{audit_scope_report}` + * * `organizations/{organization}/locations/{location}/auditScopeReports/{audit_scope_report}` + * + * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. Name for the audit scope report, in one of the following + * formats: + * * `projects/{project}/locations/{location}/auditScopeReports/{audit_scope_report}` + * * `folders/{folder}/locations/{location}/auditScopeReports/{audit_scope_report}` + * * `organizations/{organization}/locations/{location}/auditScopeReports/{audit_scope_report}` + * + * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * @return string + */ + public function getAuditReport() + { + return $this->whichOneof("audit_report"); + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ComplianceState.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ComplianceState.php new file mode 100644 index 000000000000..c67934babd70 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ComplianceState.php @@ -0,0 +1,83 @@ +google.cloud.auditmanager.v1.ComplianceState + */ +class ComplianceState +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum COMPLIANCE_STATE_UNSPECIFIED = 0; + */ + const COMPLIANCE_STATE_UNSPECIFIED = 0; + /** + * The resource is compliant. + * + * Generated from protobuf enum COMPLIANT = 1; + */ + const COMPLIANT = 1; + /** + * The resource isn't compliant. + * + * Generated from protobuf enum VIOLATION = 2; + */ + const VIOLATION = 2; + /** + * You must complete a manual review. + * + * Generated from protobuf enum MANUAL_REVIEW_NEEDED = 3; + */ + const MANUAL_REVIEW_NEEDED = 3; + /** + * An error was encountered during the evaluation or evidence gathering + * process. + * + * Generated from protobuf enum ERROR = 4; + */ + const ERROR = 4; + /** + * The resource can't be audited. + * + * Generated from protobuf enum AUDIT_NOT_SUPPORTED = 5; + */ + const AUDIT_NOT_SUPPORTED = 5; + + private static $valueToName = [ + self::COMPLIANCE_STATE_UNSPECIFIED => 'COMPLIANCE_STATE_UNSPECIFIED', + self::COMPLIANT => 'COMPLIANT', + self::VIOLATION => 'VIOLATION', + self::MANUAL_REVIEW_NEEDED => 'MANUAL_REVIEW_NEEDED', + self::ERROR => 'ERROR', + self::AUDIT_NOT_SUPPORTED => 'AUDIT_NOT_SUPPORTED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Control.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Control.php new file mode 100644 index 000000000000..f41280aa8cc4 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Control.php @@ -0,0 +1,399 @@ +google.cloud.auditmanager.v1.Control + */ +class Control extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Control identifier that's used to fetch the findings. The + * identifier is the same as the control report name. + * + * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $id = ''; + /** + * Output only. Display name of the control. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $display_name = ''; + /** + * Output only. Category that the control belongs to. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.Control.Family family = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $family = 0; + /** + * Output only. Regulatory family of the control. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.ControlFamily control_family = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $control_family = null; + /** + * Output only. Description of the control. + * + * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $description = ''; + /** + * Output only. Who is responsible for implementing this control. Set to one + * of the following values: `GOOGLE`, `CUSTOMER`, or `SHARED`. + * + * Generated from protobuf field string responsibility_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $responsibility_type = ''; + /** + * Output only. A description of Google's responsibility for this control. + * + * Generated from protobuf field string google_responsibility_description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $google_responsibility_description = ''; + /** + * Output only. A description of how Google implements its responsibility for + * this control. + * + * Generated from protobuf field string google_responsibility_implementation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $google_responsibility_implementation = ''; + /** + * Output only. A description of your responsibility for this control. + * + * Generated from protobuf field string customer_responsibility_description = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $customer_responsibility_description = ''; + /** + * Output only. A description of how you can implement your responsibility for + * this control. + * + * Generated from protobuf field string customer_responsibility_implementation = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $customer_responsibility_implementation = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * Output only. Control identifier that's used to fetch the findings. The + * identifier is the same as the control report name. + * @type string $display_name + * Output only. Display name of the control. + * @type int $family + * Output only. Category that the control belongs to. + * @type \Google\Cloud\AuditManager\V1\ControlFamily $control_family + * Output only. Regulatory family of the control. + * @type string $description + * Output only. Description of the control. + * @type string $responsibility_type + * Output only. Who is responsible for implementing this control. Set to one + * of the following values: `GOOGLE`, `CUSTOMER`, or `SHARED`. + * @type string $google_responsibility_description + * Output only. A description of Google's responsibility for this control. + * @type string $google_responsibility_implementation + * Output only. A description of how Google implements its responsibility for + * this control. + * @type string $customer_responsibility_description + * Output only. A description of your responsibility for this control. + * @type string $customer_responsibility_implementation + * Output only. A description of how you can implement your responsibility for + * this control. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Control identifier that's used to fetch the findings. The + * identifier is the same as the control report name. + * + * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Output only. Control identifier that's used to fetch the findings. The + * identifier is the same as the control report name. + * + * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * Output only. Display name of the control. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Output only. Display name of the control. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Output only. Category that the control belongs to. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.Control.Family family = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getFamily() + { + return $this->family; + } + + /** + * Output only. Category that the control belongs to. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.Control.Family family = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setFamily($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\AuditManager\V1\Control\Family::class); + $this->family = $var; + + return $this; + } + + /** + * Output only. Regulatory family of the control. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.ControlFamily control_family = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\AuditManager\V1\ControlFamily|null + */ + public function getControlFamily() + { + return $this->control_family; + } + + public function hasControlFamily() + { + return isset($this->control_family); + } + + public function clearControlFamily() + { + unset($this->control_family); + } + + /** + * Output only. Regulatory family of the control. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.ControlFamily control_family = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\AuditManager\V1\ControlFamily $var + * @return $this + */ + public function setControlFamily($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AuditManager\V1\ControlFamily::class); + $this->control_family = $var; + + return $this; + } + + /** + * Output only. Description of the control. + * + * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Output only. Description of the control. + * + * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. Who is responsible for implementing this control. Set to one + * of the following values: `GOOGLE`, `CUSTOMER`, or `SHARED`. + * + * Generated from protobuf field string responsibility_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getResponsibilityType() + { + return $this->responsibility_type; + } + + /** + * Output only. Who is responsible for implementing this control. Set to one + * of the following values: `GOOGLE`, `CUSTOMER`, or `SHARED`. + * + * Generated from protobuf field string responsibility_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setResponsibilityType($var) + { + GPBUtil::checkString($var, True); + $this->responsibility_type = $var; + + return $this; + } + + /** + * Output only. A description of Google's responsibility for this control. + * + * Generated from protobuf field string google_responsibility_description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getGoogleResponsibilityDescription() + { + return $this->google_responsibility_description; + } + + /** + * Output only. A description of Google's responsibility for this control. + * + * Generated from protobuf field string google_responsibility_description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setGoogleResponsibilityDescription($var) + { + GPBUtil::checkString($var, True); + $this->google_responsibility_description = $var; + + return $this; + } + + /** + * Output only. A description of how Google implements its responsibility for + * this control. + * + * Generated from protobuf field string google_responsibility_implementation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getGoogleResponsibilityImplementation() + { + return $this->google_responsibility_implementation; + } + + /** + * Output only. A description of how Google implements its responsibility for + * this control. + * + * Generated from protobuf field string google_responsibility_implementation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setGoogleResponsibilityImplementation($var) + { + GPBUtil::checkString($var, True); + $this->google_responsibility_implementation = $var; + + return $this; + } + + /** + * Output only. A description of your responsibility for this control. + * + * Generated from protobuf field string customer_responsibility_description = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getCustomerResponsibilityDescription() + { + return $this->customer_responsibility_description; + } + + /** + * Output only. A description of your responsibility for this control. + * + * Generated from protobuf field string customer_responsibility_description = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setCustomerResponsibilityDescription($var) + { + GPBUtil::checkString($var, True); + $this->customer_responsibility_description = $var; + + return $this; + } + + /** + * Output only. A description of how you can implement your responsibility for + * this control. + * + * Generated from protobuf field string customer_responsibility_implementation = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getCustomerResponsibilityImplementation() + { + return $this->customer_responsibility_implementation; + } + + /** + * Output only. A description of how you can implement your responsibility for + * this control. + * + * Generated from protobuf field string customer_responsibility_implementation = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setCustomerResponsibilityImplementation($var) + { + GPBUtil::checkString($var, True); + $this->customer_responsibility_implementation = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Control/Family.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Control/Family.php new file mode 100644 index 000000000000..7265a8c17a7d --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Control/Family.php @@ -0,0 +1,173 @@ +google.cloud.auditmanager.v1.Control.Family + */ +class Family +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum FAMILY_UNSPECIFIED = 0; + */ + const FAMILY_UNSPECIFIED = 0; + /** + * Access control. + * + * Generated from protobuf enum AC = 1; + */ + const AC = 1; + /** + * Awareness and training. + * + * Generated from protobuf enum AT = 2; + */ + const AT = 2; + /** + * Audit and accountability. + * + * Generated from protobuf enum AU = 3; + */ + const AU = 3; + /** + * Certification, accreditation and security assessments. + * + * Generated from protobuf enum CA = 4; + */ + const CA = 4; + /** + * Configuration management and change control. + * + * Generated from protobuf enum CM = 5; + */ + const CM = 5; + /** + * Contingency planning and disaster recovery. + * + * Generated from protobuf enum CP = 6; + */ + const CP = 6; + /** + * Identification and authentication. + * + * Generated from protobuf enum IA = 7; + */ + const IA = 7; + /** + * Incident response. + * + * Generated from protobuf enum IR = 8; + */ + const IR = 8; + /** + * Maintenance. + * + * Generated from protobuf enum MA = 9; + */ + const MA = 9; + /** + * Media protection. + * + * Generated from protobuf enum MP = 10; + */ + const MP = 10; + /** + * Physical and environmental protection. + * + * Generated from protobuf enum PE = 11; + */ + const PE = 11; + /** + * Security planning. + * + * Generated from protobuf enum PL = 12; + */ + const PL = 12; + /** + * Personnel security. + * + * Generated from protobuf enum PS = 13; + */ + const PS = 13; + /** + * Risk assessment. + * + * Generated from protobuf enum RA = 14; + */ + const RA = 14; + /** + * System services and acquisition. + * + * Generated from protobuf enum SA = 15; + */ + const SA = 15; + /** + * System and communications protection. + * + * Generated from protobuf enum SC = 16; + */ + const SC = 16; + /** + * System and information integrity. + * + * Generated from protobuf enum SI = 17; + */ + const SI = 17; + /** + * Supply chain risk management. + * + * Generated from protobuf enum SR = 18; + */ + const SR = 18; + + private static $valueToName = [ + self::FAMILY_UNSPECIFIED => 'FAMILY_UNSPECIFIED', + self::AC => 'AC', + self::AT => 'AT', + self::AU => 'AU', + self::CA => 'CA', + self::CM => 'CM', + self::CP => 'CP', + self::IA => 'IA', + self::IR => 'IR', + self::MA => 'MA', + self::MP => 'MP', + self::PE => 'PE', + self::PL => 'PL', + self::PS => 'PS', + self::RA => 'RA', + self::SA => 'SA', + self::SC => 'SC', + self::SI => 'SI', + self::SR => 'SR', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ControlDetails.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ControlDetails.php new file mode 100644 index 000000000000..11cf4310cd15 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ControlDetails.php @@ -0,0 +1,159 @@ +google.cloud.auditmanager.v1.ControlDetails + */ +class ControlDetails extends \Google\Protobuf\Internal\Message +{ + /** + * Control that the findings are being reported for. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.Control control = 1; + */ + protected $control = null; + /** + * Output only. Overall status of the findings for the control. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.ComplianceState compliance_state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $compliance_state = 0; + /** + * A control report summary that provides a high-level overview of the + * compliance controls and the assessment status. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.ReportSummary control_report_summary = 3; + */ + protected $control_report_summary = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AuditManager\V1\Control $control + * Control that the findings are being reported for. + * @type int $compliance_state + * Output only. Overall status of the findings for the control. + * @type \Google\Cloud\AuditManager\V1\ReportSummary $control_report_summary + * A control report summary that provides a high-level overview of the + * compliance controls and the assessment status. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * Control that the findings are being reported for. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.Control control = 1; + * @return \Google\Cloud\AuditManager\V1\Control|null + */ + public function getControl() + { + return $this->control; + } + + public function hasControl() + { + return isset($this->control); + } + + public function clearControl() + { + unset($this->control); + } + + /** + * Control that the findings are being reported for. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.Control control = 1; + * @param \Google\Cloud\AuditManager\V1\Control $var + * @return $this + */ + public function setControl($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AuditManager\V1\Control::class); + $this->control = $var; + + return $this; + } + + /** + * Output only. Overall status of the findings for the control. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.ComplianceState compliance_state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getComplianceState() + { + return $this->compliance_state; + } + + /** + * Output only. Overall status of the findings for the control. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.ComplianceState compliance_state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setComplianceState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\AuditManager\V1\ComplianceState::class); + $this->compliance_state = $var; + + return $this; + } + + /** + * A control report summary that provides a high-level overview of the + * compliance controls and the assessment status. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.ReportSummary control_report_summary = 3; + * @return \Google\Cloud\AuditManager\V1\ReportSummary|null + */ + public function getControlReportSummary() + { + return $this->control_report_summary; + } + + public function hasControlReportSummary() + { + return isset($this->control_report_summary); + } + + public function clearControlReportSummary() + { + unset($this->control_report_summary); + } + + /** + * A control report summary that provides a high-level overview of the + * compliance controls and the assessment status. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.ReportSummary control_report_summary = 3; + * @param \Google\Cloud\AuditManager\V1\ReportSummary $var + * @return $this + */ + public function setControlReportSummary($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AuditManager\V1\ReportSummary::class); + $this->control_report_summary = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ControlFamily.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ControlFamily.php new file mode 100644 index 000000000000..9a13b09e19e5 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ControlFamily.php @@ -0,0 +1,113 @@ +google.cloud.auditmanager.v1.ControlFamily + */ +class ControlFamily extends \Google\Protobuf\Internal\Message +{ + /** + * ID of the regulatory control family. To find the list of supported + * control families, use the + * [ListControls][google.cloud.auditmanager.v1.AuditManager.ListControls] + * method and review the `control_family` field in the response. + * + * Generated from protobuf field string family_id = 1; + */ + protected $family_id = ''; + /** + * Display name of the regulatory control family. + * + * Generated from protobuf field string display_name = 2; + */ + protected $display_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $family_id + * ID of the regulatory control family. To find the list of supported + * control families, use the + * [ListControls][google.cloud.auditmanager.v1.AuditManager.ListControls] + * method and review the `control_family` field in the response. + * @type string $display_name + * Display name of the regulatory control family. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * ID of the regulatory control family. To find the list of supported + * control families, use the + * [ListControls][google.cloud.auditmanager.v1.AuditManager.ListControls] + * method and review the `control_family` field in the response. + * + * Generated from protobuf field string family_id = 1; + * @return string + */ + public function getFamilyId() + { + return $this->family_id; + } + + /** + * ID of the regulatory control family. To find the list of supported + * control families, use the + * [ListControls][google.cloud.auditmanager.v1.AuditManager.ListControls] + * method and review the `control_family` field in the response. + * + * Generated from protobuf field string family_id = 1; + * @param string $var + * @return $this + */ + public function setFamilyId($var) + { + GPBUtil::checkString($var, True); + $this->family_id = $var; + + return $this; + } + + /** + * Display name of the regulatory control family. + * + * Generated from protobuf field string display_name = 2; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Display name of the regulatory control family. + * + * Generated from protobuf field string display_name = 2; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/DestinationDetails.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/DestinationDetails.php new file mode 100644 index 000000000000..3e1a1308d6c3 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/DestinationDetails.php @@ -0,0 +1,78 @@ +google.cloud.auditmanager.v1.DestinationDetails + */ +class DestinationDetails extends \Google\Protobuf\Internal\Message +{ + protected $destination; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $gcs_bucket_uri + * URI for the Cloud Storage bucket, in the format + * `gs://{bucket_name}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * URI for the Cloud Storage bucket, in the format + * `gs://{bucket_name}`. + * + * Generated from protobuf field string gcs_bucket_uri = 1; + * @return string + */ + public function getGcsBucketUri() + { + return $this->readOneof(1); + } + + public function hasGcsBucketUri() + { + return $this->hasOneof(1); + } + + /** + * URI for the Cloud Storage bucket, in the format + * `gs://{bucket_name}`. + * + * Generated from protobuf field string gcs_bucket_uri = 1; + * @param string $var + * @return $this + */ + public function setGcsBucketUri($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getDestination() + { + return $this->whichOneof("destination"); + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/EnrollResourceRequest.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/EnrollResourceRequest.php new file mode 100644 index 000000000000..65e8f85ebcc4 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/EnrollResourceRequest.php @@ -0,0 +1,169 @@ +google.cloud.auditmanager.v1.EnrollResourceRequest + */ +class EnrollResourceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Organization, folder, or project to enroll in Audit Manager, in + * one of the following formats: + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` + * + * Generated from protobuf field string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $scope = ''; + /** + * Required. Cloud Storage buckets that you can upload your audit reports to + * during the audit process. + * When you enroll an organization or folder, you can choose a Cloud Storage + * bucket from any project in the organization or folder. If you run an audit + * at the project level using the service agent at the organization or folder + * level, all the buckets that are associated with the service agent are + * available. + * + * Generated from protobuf field repeated .google.cloud.auditmanager.v1.EnrollResourceRequest.EligibleDestination destinations = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $destinations; + + /** + * @param string $scope Required. Organization, folder, or project to enroll in Audit Manager, in + * one of the following formats: + * + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` + * @param \Google\Cloud\AuditManager\V1\EnrollResourceRequest\EligibleDestination[] $destinations Required. Cloud Storage buckets that you can upload your audit reports to + * during the audit process. + * + * When you enroll an organization or folder, you can choose a Cloud Storage + * bucket from any project in the organization or folder. If you run an audit + * at the project level using the service agent at the organization or folder + * level, all the buckets that are associated with the service agent are + * available. + * + * @return \Google\Cloud\AuditManager\V1\EnrollResourceRequest + * + * @experimental + */ + public static function build(string $scope, array $destinations): self + { + return (new self()) + ->setScope($scope) + ->setDestinations($destinations); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $scope + * Required. Organization, folder, or project to enroll in Audit Manager, in + * one of the following formats: + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` + * @type \Google\Cloud\AuditManager\V1\EnrollResourceRequest\EligibleDestination[] $destinations + * Required. Cloud Storage buckets that you can upload your audit reports to + * during the audit process. + * When you enroll an organization or folder, you can choose a Cloud Storage + * bucket from any project in the organization or folder. If you run an audit + * at the project level using the service agent at the organization or folder + * level, all the buckets that are associated with the service agent are + * available. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * Required. Organization, folder, or project to enroll in Audit Manager, in + * one of the following formats: + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` + * + * Generated from protobuf field string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getScope() + { + return $this->scope; + } + + /** + * Required. Organization, folder, or project to enroll in Audit Manager, in + * one of the following formats: + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` + * + * Generated from protobuf field string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setScope($var) + { + GPBUtil::checkString($var, True); + $this->scope = $var; + + return $this; + } + + /** + * Required. Cloud Storage buckets that you can upload your audit reports to + * during the audit process. + * When you enroll an organization or folder, you can choose a Cloud Storage + * bucket from any project in the organization or folder. If you run an audit + * at the project level using the service agent at the organization or folder + * level, all the buckets that are associated with the service agent are + * available. + * + * Generated from protobuf field repeated .google.cloud.auditmanager.v1.EnrollResourceRequest.EligibleDestination destinations = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return RepeatedField<\Google\Cloud\AuditManager\V1\EnrollResourceRequest\EligibleDestination> + */ + public function getDestinations() + { + return $this->destinations; + } + + /** + * Required. Cloud Storage buckets that you can upload your audit reports to + * during the audit process. + * When you enroll an organization or folder, you can choose a Cloud Storage + * bucket from any project in the organization or folder. If you run an audit + * at the project level using the service agent at the organization or folder + * level, all the buckets that are associated with the service agent are + * available. + * + * Generated from protobuf field repeated .google.cloud.auditmanager.v1.EnrollResourceRequest.EligibleDestination destinations = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\AuditManager\V1\EnrollResourceRequest\EligibleDestination[] $var + * @return $this + */ + public function setDestinations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AuditManager\V1\EnrollResourceRequest\EligibleDestination::class); + $this->destinations = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/EnrollResourceRequest/EligibleDestination.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/EnrollResourceRequest/EligibleDestination.php new file mode 100644 index 000000000000..3b7f309ebfdb --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/EnrollResourceRequest/EligibleDestination.php @@ -0,0 +1,84 @@ +google.cloud.auditmanager.v1.EnrollResourceRequest.EligibleDestination + */ +class EligibleDestination extends \Google\Protobuf\Internal\Message +{ + protected $eligible_destinations; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $eligible_gcs_bucket + * The location of the Cloud Storage bucket where you want to upload the + * audit report and evidence during the + * [GenerateAuditReport][google.cloud.auditmanager.v1.AuditManager.GenerateAuditReport] + * API call. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * The location of the Cloud Storage bucket where you want to upload the + * audit report and evidence during the + * [GenerateAuditReport][google.cloud.auditmanager.v1.AuditManager.GenerateAuditReport] + * API call. + * + * Generated from protobuf field string eligible_gcs_bucket = 3; + * @return string + */ + public function getEligibleGcsBucket() + { + return $this->readOneof(3); + } + + public function hasEligibleGcsBucket() + { + return $this->hasOneof(3); + } + + /** + * The location of the Cloud Storage bucket where you want to upload the + * audit report and evidence during the + * [GenerateAuditReport][google.cloud.auditmanager.v1.AuditManager.GenerateAuditReport] + * API call. + * + * Generated from protobuf field string eligible_gcs_bucket = 3; + * @param string $var + * @return $this + */ + public function setEligibleGcsBucket($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getEligibleDestinations() + { + return $this->whichOneof("eligible_destinations"); + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Enrollment.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Enrollment.php new file mode 100644 index 000000000000..6f97b729a3f9 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Enrollment.php @@ -0,0 +1,117 @@ +google.cloud.auditmanager.v1.Enrollment + */ +class Enrollment extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. Name of the enrollment, in one of the following formats: + * * `projects/{project}/locations/{location}/enrollments/{enrollment}` + * * `folders/{folder}/locations/{location}/enrollments/{enrollment}` + * * `organizations/{organization}/locations/{location}/enrollments/{enrollment}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. Cloud Storage buckets where you want to upload the audit + * reports. + * + * Generated from protobuf field repeated .google.cloud.auditmanager.v1.DestinationDetails destination_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $destination_details; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. Name of the enrollment, in one of the following formats: + * * `projects/{project}/locations/{location}/enrollments/{enrollment}` + * * `folders/{folder}/locations/{location}/enrollments/{enrollment}` + * * `organizations/{organization}/locations/{location}/enrollments/{enrollment}` + * @type \Google\Cloud\AuditManager\V1\DestinationDetails[] $destination_details + * Output only. Cloud Storage buckets where you want to upload the audit + * reports. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. Name of the enrollment, in one of the following formats: + * * `projects/{project}/locations/{location}/enrollments/{enrollment}` + * * `folders/{folder}/locations/{location}/enrollments/{enrollment}` + * * `organizations/{organization}/locations/{location}/enrollments/{enrollment}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. Name of the enrollment, in one of the following formats: + * * `projects/{project}/locations/{location}/enrollments/{enrollment}` + * * `folders/{folder}/locations/{location}/enrollments/{enrollment}` + * * `organizations/{organization}/locations/{location}/enrollments/{enrollment}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. Cloud Storage buckets where you want to upload the audit + * reports. + * + * Generated from protobuf field repeated .google.cloud.auditmanager.v1.DestinationDetails destination_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField<\Google\Cloud\AuditManager\V1\DestinationDetails> + */ + public function getDestinationDetails() + { + return $this->destination_details; + } + + /** + * Output only. Cloud Storage buckets where you want to upload the audit + * reports. + * + * Generated from protobuf field repeated .google.cloud.auditmanager.v1.DestinationDetails destination_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\AuditManager\V1\DestinationDetails[] $var + * @return $this + */ + public function setDestinationDetails($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AuditManager\V1\DestinationDetails::class); + $this->destination_details = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditReportRequest.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditReportRequest.php new file mode 100644 index 000000000000..307a710e7cf8 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditReportRequest.php @@ -0,0 +1,316 @@ +google.cloud.auditmanager.v1.GenerateAuditReportRequest + */ +class GenerateAuditReportRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Organization, folder, or project that the audit applies to, in + * one of the following formats: + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` + * + * Generated from protobuf field string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $scope = ''; + /** + * Optional. Deprecated. Compliance standard for the audit report. + * Use the `compliance_framework` field instead. + * + * Generated from protobuf field string compliance_standard = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @deprecated + */ + protected $compliance_standard = ''; + /** + * Required. Format for the audit report. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.GenerateAuditReportRequest.AuditReportFormat report_format = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $report_format = 0; + /** + * Required. The framework that's used for the audit report. For example, + * `NIST_800_53`. + * + * Generated from protobuf field string compliance_framework = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $compliance_framework = ''; + /** + * Optional. If `true`, only validate the request and don't generate the audit + * report. + * + * Generated from protobuf field bool validate_only = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $validate_only = false; + protected $destination; + + /** + * @param string $scope Required. Organization, folder, or project that the audit applies to, in + * one of the following formats: + * + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` + * @param string $gcsUri URL for the Cloud Storage bucket where the report and evidence is + * uploaded. You must select a bucket that was provided during the + * enrollment process. + * @param string $complianceStandard Optional. Deprecated. Compliance standard for the audit report. + * + * Use the `compliance_framework` field instead. + * @param int $reportFormat Required. Format for the audit report. + * For allowed values, use constants defined on {@see \Google\Cloud\AuditManager\V1\GenerateAuditReportRequest\AuditReportFormat} + * + * @return \Google\Cloud\AuditManager\V1\GenerateAuditReportRequest + * + * @experimental + */ + public static function build(string $scope, string $gcsUri, string $complianceStandard, int $reportFormat): self + { + return (new self()) + ->setScope($scope) + ->setGcsUri($gcsUri) + ->setComplianceStandard($complianceStandard) + ->setReportFormat($reportFormat); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $gcs_uri + * URL for the Cloud Storage bucket where the report and evidence is + * uploaded. You must select a bucket that was provided during the + * enrollment process. + * @type string $scope + * Required. Organization, folder, or project that the audit applies to, in + * one of the following formats: + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` + * @type string $compliance_standard + * Optional. Deprecated. Compliance standard for the audit report. + * Use the `compliance_framework` field instead. + * @type int $report_format + * Required. Format for the audit report. + * @type string $compliance_framework + * Required. The framework that's used for the audit report. For example, + * `NIST_800_53`. + * @type bool $validate_only + * Optional. If `true`, only validate the request and don't generate the audit + * report. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * URL for the Cloud Storage bucket where the report and evidence is + * uploaded. You must select a bucket that was provided during the + * enrollment process. + * + * Generated from protobuf field string gcs_uri = 2; + * @return string + */ + public function getGcsUri() + { + return $this->readOneof(2); + } + + public function hasGcsUri() + { + return $this->hasOneof(2); + } + + /** + * URL for the Cloud Storage bucket where the report and evidence is + * uploaded. You must select a bucket that was provided during the + * enrollment process. + * + * Generated from protobuf field string gcs_uri = 2; + * @param string $var + * @return $this + */ + public function setGcsUri($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Required. Organization, folder, or project that the audit applies to, in + * one of the following formats: + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` + * + * Generated from protobuf field string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getScope() + { + return $this->scope; + } + + /** + * Required. Organization, folder, or project that the audit applies to, in + * one of the following formats: + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` + * + * Generated from protobuf field string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setScope($var) + { + GPBUtil::checkString($var, True); + $this->scope = $var; + + return $this; + } + + /** + * Optional. Deprecated. Compliance standard for the audit report. + * Use the `compliance_framework` field instead. + * + * Generated from protobuf field string compliance_standard = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @return string + * @deprecated + */ + public function getComplianceStandard() + { + if ($this->compliance_standard !== '') { + @trigger_error('compliance_standard is deprecated.', E_USER_DEPRECATED); + } + return $this->compliance_standard; + } + + /** + * Optional. Deprecated. Compliance standard for the audit report. + * Use the `compliance_framework` field instead. + * + * Generated from protobuf field string compliance_standard = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + * @deprecated + */ + public function setComplianceStandard($var) + { + @trigger_error('compliance_standard is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkString($var, True); + $this->compliance_standard = $var; + + return $this; + } + + /** + * Required. Format for the audit report. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.GenerateAuditReportRequest.AuditReportFormat report_format = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getReportFormat() + { + return $this->report_format; + } + + /** + * Required. Format for the audit report. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.GenerateAuditReportRequest.AuditReportFormat report_format = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setReportFormat($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\AuditManager\V1\GenerateAuditReportRequest\AuditReportFormat::class); + $this->report_format = $var; + + return $this; + } + + /** + * Required. The framework that's used for the audit report. For example, + * `NIST_800_53`. + * + * Generated from protobuf field string compliance_framework = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getComplianceFramework() + { + return $this->compliance_framework; + } + + /** + * Required. The framework that's used for the audit report. For example, + * `NIST_800_53`. + * + * Generated from protobuf field string compliance_framework = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setComplianceFramework($var) + { + GPBUtil::checkString($var, True); + $this->compliance_framework = $var; + + return $this; + } + + /** + * Optional. If `true`, only validate the request and don't generate the audit + * report. + * + * Generated from protobuf field bool validate_only = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Optional. If `true`, only validate the request and don't generate the audit + * report. + * + * Generated from protobuf field bool validate_only = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + + /** + * @return string + */ + public function getDestination() + { + return $this->whichOneof("destination"); + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditReportRequest/AuditReportFormat.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditReportRequest/AuditReportFormat.php new file mode 100644 index 000000000000..d28fd35a05ed --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditReportRequest/AuditReportFormat.php @@ -0,0 +1,54 @@ +google.cloud.auditmanager.v1.GenerateAuditReportRequest.AuditReportFormat + */ +class AuditReportFormat +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum AUDIT_REPORT_FORMAT_UNSPECIFIED = 0; + */ + const AUDIT_REPORT_FORMAT_UNSPECIFIED = 0; + /** + * Open Document format. + * + * Generated from protobuf enum AUDIT_REPORT_FORMAT_ODF = 1; + */ + const AUDIT_REPORT_FORMAT_ODF = 1; + + private static $valueToName = [ + self::AUDIT_REPORT_FORMAT_UNSPECIFIED => 'AUDIT_REPORT_FORMAT_UNSPECIFIED', + self::AUDIT_REPORT_FORMAT_ODF => 'AUDIT_REPORT_FORMAT_ODF', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditScopeReportRequest.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditScopeReportRequest.php new file mode 100644 index 000000000000..be64ad66d4aa --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditScopeReportRequest.php @@ -0,0 +1,231 @@ +google.cloud.auditmanager.v1.GenerateAuditScopeReportRequest + */ +class GenerateAuditScopeReportRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Project or folder that the audit scope report is generated for, + * in one of the following formats: + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` + * + * Generated from protobuf field string scope = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $scope = ''; + /** + * Optional. Deprecated. The standard (industry or regulatory requirements) + * that the audit scope report is run against. + * Use the `compliance_framework` field instead. + * + * Generated from protobuf field string compliance_standard = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @deprecated + */ + protected $compliance_standard = ''; + /** + * Required. Format for the audit scope report. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.GenerateAuditScopeReportRequest.AuditScopeReportFormat report_format = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $report_format = 0; + /** + * Required. Framework (set of controls) that the audit scope report is + * generated against. For example, `NIST_800_53`. + * + * Generated from protobuf field string compliance_framework = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $compliance_framework = ''; + + /** + * @param string $scope Required. Project or folder that the audit scope report is generated for, + * in one of the following formats: + * + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` + * @param string $complianceStandard Optional. Deprecated. The standard (industry or regulatory requirements) + * that the audit scope report is run against. + * + * Use the `compliance_framework` field instead. + * @param int $reportFormat Required. Format for the audit scope report. + * For allowed values, use constants defined on {@see \Google\Cloud\AuditManager\V1\GenerateAuditScopeReportRequest\AuditScopeReportFormat} + * + * @return \Google\Cloud\AuditManager\V1\GenerateAuditScopeReportRequest + * + * @experimental + */ + public static function build(string $scope, string $complianceStandard, int $reportFormat): self + { + return (new self()) + ->setScope($scope) + ->setComplianceStandard($complianceStandard) + ->setReportFormat($reportFormat); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $scope + * Required. Project or folder that the audit scope report is generated for, + * in one of the following formats: + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` + * @type string $compliance_standard + * Optional. Deprecated. The standard (industry or regulatory requirements) + * that the audit scope report is run against. + * Use the `compliance_framework` field instead. + * @type int $report_format + * Required. Format for the audit scope report. + * @type string $compliance_framework + * Required. Framework (set of controls) that the audit scope report is + * generated against. For example, `NIST_800_53`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * Required. Project or folder that the audit scope report is generated for, + * in one of the following formats: + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` + * + * Generated from protobuf field string scope = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getScope() + { + return $this->scope; + } + + /** + * Required. Project or folder that the audit scope report is generated for, + * in one of the following formats: + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` + * + * Generated from protobuf field string scope = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setScope($var) + { + GPBUtil::checkString($var, True); + $this->scope = $var; + + return $this; + } + + /** + * Optional. Deprecated. The standard (industry or regulatory requirements) + * that the audit scope report is run against. + * Use the `compliance_framework` field instead. + * + * Generated from protobuf field string compliance_standard = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @return string + * @deprecated + */ + public function getComplianceStandard() + { + if ($this->compliance_standard !== '') { + @trigger_error('compliance_standard is deprecated.', E_USER_DEPRECATED); + } + return $this->compliance_standard; + } + + /** + * Optional. Deprecated. The standard (industry or regulatory requirements) + * that the audit scope report is run against. + * Use the `compliance_framework` field instead. + * + * Generated from protobuf field string compliance_standard = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + * @deprecated + */ + public function setComplianceStandard($var) + { + @trigger_error('compliance_standard is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkString($var, True); + $this->compliance_standard = $var; + + return $this; + } + + /** + * Required. Format for the audit scope report. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.GenerateAuditScopeReportRequest.AuditScopeReportFormat report_format = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getReportFormat() + { + return $this->report_format; + } + + /** + * Required. Format for the audit scope report. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.GenerateAuditScopeReportRequest.AuditScopeReportFormat report_format = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setReportFormat($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\AuditManager\V1\GenerateAuditScopeReportRequest\AuditScopeReportFormat::class); + $this->report_format = $var; + + return $this; + } + + /** + * Required. Framework (set of controls) that the audit scope report is + * generated against. For example, `NIST_800_53`. + * + * Generated from protobuf field string compliance_framework = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getComplianceFramework() + { + return $this->compliance_framework; + } + + /** + * Required. Framework (set of controls) that the audit scope report is + * generated against. For example, `NIST_800_53`. + * + * Generated from protobuf field string compliance_framework = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setComplianceFramework($var) + { + GPBUtil::checkString($var, True); + $this->compliance_framework = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditScopeReportRequest/AuditScopeReportFormat.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditScopeReportRequest/AuditScopeReportFormat.php new file mode 100644 index 000000000000..05ee0385b32d --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditScopeReportRequest/AuditScopeReportFormat.php @@ -0,0 +1,54 @@ +google.cloud.auditmanager.v1.GenerateAuditScopeReportRequest.AuditScopeReportFormat + */ +class AuditScopeReportFormat +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum AUDIT_SCOPE_REPORT_FORMAT_UNSPECIFIED = 0; + */ + const AUDIT_SCOPE_REPORT_FORMAT_UNSPECIFIED = 0; + /** + * Open Document format. + * + * Generated from protobuf enum AUDIT_SCOPE_REPORT_FORMAT_ODF = 1; + */ + const AUDIT_SCOPE_REPORT_FORMAT_ODF = 1; + + private static $valueToName = [ + self::AUDIT_SCOPE_REPORT_FORMAT_UNSPECIFIED => 'AUDIT_SCOPE_REPORT_FORMAT_UNSPECIFIED', + self::AUDIT_SCOPE_REPORT_FORMAT_ODF => 'AUDIT_SCOPE_REPORT_FORMAT_ODF', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GetAuditReportRequest.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GetAuditReportRequest.php new file mode 100644 index 000000000000..938b2f0c35a8 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GetAuditReportRequest.php @@ -0,0 +1,98 @@ +google.cloud.auditmanager.v1.GetAuditReportRequest + */ +class GetAuditReportRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the audit report, in one of the following formats: + * * `projects/{project}/locations/{location}/auditReports/{audit_report}` + * * `folders/{folder}/locations/{location}/auditReports/{audit_report}` + * * `organizations/{organization}/locations/{location}/auditReports/{audit_report}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the audit report, in one of the following formats: + * + * * `projects/{project}/locations/{location}/auditReports/{audit_report}` + * * `folders/{folder}/locations/{location}/auditReports/{audit_report}` + * * `organizations/{organization}/locations/{location}/auditReports/{audit_report}` + * Please see {@see AuditManagerClient::auditReportName()} for help formatting this field. + * + * @return \Google\Cloud\AuditManager\V1\GetAuditReportRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the audit report, in one of the following formats: + * * `projects/{project}/locations/{location}/auditReports/{audit_report}` + * * `folders/{folder}/locations/{location}/auditReports/{audit_report}` + * * `organizations/{organization}/locations/{location}/auditReports/{audit_report}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the audit report, in one of the following formats: + * * `projects/{project}/locations/{location}/auditReports/{audit_report}` + * * `folders/{folder}/locations/{location}/auditReports/{audit_report}` + * * `organizations/{organization}/locations/{location}/auditReports/{audit_report}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the audit report, in one of the following formats: + * * `projects/{project}/locations/{location}/auditReports/{audit_report}` + * * `folders/{folder}/locations/{location}/auditReports/{audit_report}` + * * `organizations/{organization}/locations/{location}/auditReports/{audit_report}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GetResourceEnrollmentStatusRequest.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GetResourceEnrollmentStatusRequest.php new file mode 100644 index 000000000000..cc5898abe2c0 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GetResourceEnrollmentStatusRequest.php @@ -0,0 +1,103 @@ +google.cloud.auditmanager.v1.GetResourceEnrollmentStatusRequest + */ +class GetResourceEnrollmentStatusRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource enrollment status, in one of the following + * formats: + * * `folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * * `projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * * `organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the resource enrollment status, in one of the following + * formats: + * + * * `folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * * `projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * * `organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * Please see {@see AuditManagerClient::resourceEnrollmentStatusName()} for help formatting this field. + * + * @return \Google\Cloud\AuditManager\V1\GetResourceEnrollmentStatusRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the resource enrollment status, in one of the following + * formats: + * * `folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * * `projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * * `organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource enrollment status, in one of the following + * formats: + * * `folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * * `projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * * `organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the resource enrollment status, in one of the following + * formats: + * * `folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * * `projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * * `organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListAuditReportsRequest.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListAuditReportsRequest.php new file mode 100644 index 000000000000..048052f5d864 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListAuditReportsRequest.php @@ -0,0 +1,187 @@ +google.cloud.auditmanager.v1.ListAuditReportsRequest + */ +class ListAuditReportsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent organization, folder, or project to list reports for, + * in one of the following formats: + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Maximum number of items to return in a single page. The service + * might return fewer items than this value. If unspecified, the service picks + * an appropriate default. The maximum value is 100; values above 100 are + * reduced to 100. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A page token, received from a previous call, to retrieve the next + * page of results. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. Parent organization, folder, or project to list reports for, + * in one of the following formats: + * + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` + * Please see {@see AuditManagerClient::folderLocationName()} for help formatting this field. + * + * @return \Google\Cloud\AuditManager\V1\ListAuditReportsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Parent organization, folder, or project to list reports for, + * in one of the following formats: + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` + * @type int $page_size + * Optional. Maximum number of items to return in a single page. The service + * might return fewer items than this value. If unspecified, the service picks + * an appropriate default. The maximum value is 100; values above 100 are + * reduced to 100. + * @type string $page_token + * Optional. A page token, received from a previous call, to retrieve the next + * page of results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent organization, folder, or project to list reports for, + * in one of the following formats: + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Parent organization, folder, or project to list reports for, + * in one of the following formats: + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. Maximum number of items to return in a single page. The service + * might return fewer items than this value. If unspecified, the service picks + * an appropriate default. The maximum value is 100; values above 100 are + * reduced to 100. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. Maximum number of items to return in a single page. The service + * might return fewer items than this value. If unspecified, the service picks + * an appropriate default. The maximum value is 100; values above 100 are + * reduced to 100. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A page token, received from a previous call, to retrieve the next + * page of results. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A page token, received from a previous call, to retrieve the next + * page of results. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListAuditReportsResponse.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListAuditReportsResponse.php new file mode 100644 index 000000000000..17b03c5236ea --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListAuditReportsResponse.php @@ -0,0 +1,110 @@ +google.cloud.auditmanager.v1.ListAuditReportsResponse + */ +class ListAuditReportsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Audit reports. + * + * Generated from protobuf field repeated .google.cloud.auditmanager.v1.AuditReport audit_reports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $audit_reports; + /** + * Output only. A token that you can send as the `page_token` in a subsequent + * request to retrieve the next page of results. If this field is empty, there + * are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AuditManager\V1\AuditReport[] $audit_reports + * Output only. Audit reports. + * @type string $next_page_token + * Output only. A token that you can send as the `page_token` in a subsequent + * request to retrieve the next page of results. If this field is empty, there + * are no subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Audit reports. + * + * Generated from protobuf field repeated .google.cloud.auditmanager.v1.AuditReport audit_reports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField<\Google\Cloud\AuditManager\V1\AuditReport> + */ + public function getAuditReports() + { + return $this->audit_reports; + } + + /** + * Output only. Audit reports. + * + * Generated from protobuf field repeated .google.cloud.auditmanager.v1.AuditReport audit_reports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\AuditManager\V1\AuditReport[] $var + * @return $this + */ + public function setAuditReports($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AuditManager\V1\AuditReport::class); + $this->audit_reports = $arr; + + return $this; + } + + /** + * Output only. A token that you can send as the `page_token` in a subsequent + * request to retrieve the next page of results. If this field is empty, there + * are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Output only. A token that you can send as the `page_token` in a subsequent + * request to retrieve the next page of results. If this field is empty, there + * are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListControlsRequest.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListControlsRequest.php new file mode 100644 index 000000000000..c377232415e9 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListControlsRequest.php @@ -0,0 +1,182 @@ +google.cloud.auditmanager.v1.ListControlsRequest + */ +class ListControlsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Standard to list controls for, in one of the following formats: + * * `projects/{project}/locations/{location}/standards/{standard}` + * * `folders/{folder}/locations/{location}/standards/{standard}` + * * `organizations/{organization}/locations/{location}/standards/{standard}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Maximum number of items to return in a single page. The service + * might return fewer items than this value. If unspecified, the service picks + * an appropriate default. The maximum value is 100; values above 100 are + * reduced to 100. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A page token, received from a previous call, to retrieve the next + * page of results. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. Standard to list controls for, in one of the following formats: + * + * * `projects/{project}/locations/{location}/standards/{standard}` + * * `folders/{folder}/locations/{location}/standards/{standard}` + * * `organizations/{organization}/locations/{location}/standards/{standard}` + * Please see {@see AuditManagerClient::standardName()} for help formatting this field. + * + * @return \Google\Cloud\AuditManager\V1\ListControlsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Standard to list controls for, in one of the following formats: + * * `projects/{project}/locations/{location}/standards/{standard}` + * * `folders/{folder}/locations/{location}/standards/{standard}` + * * `organizations/{organization}/locations/{location}/standards/{standard}` + * @type int $page_size + * Optional. Maximum number of items to return in a single page. The service + * might return fewer items than this value. If unspecified, the service picks + * an appropriate default. The maximum value is 100; values above 100 are + * reduced to 100. + * @type string $page_token + * Optional. A page token, received from a previous call, to retrieve the next + * page of results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * Required. Standard to list controls for, in one of the following formats: + * * `projects/{project}/locations/{location}/standards/{standard}` + * * `folders/{folder}/locations/{location}/standards/{standard}` + * * `organizations/{organization}/locations/{location}/standards/{standard}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Standard to list controls for, in one of the following formats: + * * `projects/{project}/locations/{location}/standards/{standard}` + * * `folders/{folder}/locations/{location}/standards/{standard}` + * * `organizations/{organization}/locations/{location}/standards/{standard}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. Maximum number of items to return in a single page. The service + * might return fewer items than this value. If unspecified, the service picks + * an appropriate default. The maximum value is 100; values above 100 are + * reduced to 100. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. Maximum number of items to return in a single page. The service + * might return fewer items than this value. If unspecified, the service picks + * an appropriate default. The maximum value is 100; values above 100 are + * reduced to 100. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A page token, received from a previous call, to retrieve the next + * page of results. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A page token, received from a previous call, to retrieve the next + * page of results. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListControlsResponse.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListControlsResponse.php new file mode 100644 index 000000000000..df4f807cbd71 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListControlsResponse.php @@ -0,0 +1,110 @@ +google.cloud.auditmanager.v1.ListControlsResponse + */ +class ListControlsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Controls for a given regulatory standard. + * + * Generated from protobuf field repeated .google.cloud.auditmanager.v1.Control controls = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $controls; + /** + * Output only. A token that you can send as the `page_token` in a subsequent + * request to retrieve the next page of results. If this field is empty, there + * are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AuditManager\V1\Control[] $controls + * Output only. Controls for a given regulatory standard. + * @type string $next_page_token + * Output only. A token that you can send as the `page_token` in a subsequent + * request to retrieve the next page of results. If this field is empty, there + * are no subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Controls for a given regulatory standard. + * + * Generated from protobuf field repeated .google.cloud.auditmanager.v1.Control controls = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField<\Google\Cloud\AuditManager\V1\Control> + */ + public function getControls() + { + return $this->controls; + } + + /** + * Output only. Controls for a given regulatory standard. + * + * Generated from protobuf field repeated .google.cloud.auditmanager.v1.Control controls = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\AuditManager\V1\Control[] $var + * @return $this + */ + public function setControls($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AuditManager\V1\Control::class); + $this->controls = $arr; + + return $this; + } + + /** + * Output only. A token that you can send as the `page_token` in a subsequent + * request to retrieve the next page of results. If this field is empty, there + * are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Output only. A token that you can send as the `page_token` in a subsequent + * request to retrieve the next page of results. If this field is empty, there + * are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListResourceEnrollmentStatusesRequest.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListResourceEnrollmentStatusesRequest.php new file mode 100644 index 000000000000..6b11c3629db0 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListResourceEnrollmentStatusesRequest.php @@ -0,0 +1,182 @@ +google.cloud.auditmanager.v1.ListResourceEnrollmentStatusesRequest + */ +class ListResourceEnrollmentStatusesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent organization or folder to list enrollment statuses for, + * in one of the following formats: + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Maximum number of items to return in a single page. The service + * might return fewer items than this value. If unspecified, the service picks + * an appropriate default. The maximum value is 100; values above 100 are + * reduced to 100. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A page token, received from a previous call, to retrieve the next + * page of results. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. Parent organization or folder to list enrollment statuses for, + * in one of the following formats: + * + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` + * Please see {@see AuditManagerClient::enrollmentStatusScopeName()} for help formatting this field. + * + * @return \Google\Cloud\AuditManager\V1\ListResourceEnrollmentStatusesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Parent organization or folder to list enrollment statuses for, + * in one of the following formats: + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` + * @type int $page_size + * Optional. Maximum number of items to return in a single page. The service + * might return fewer items than this value. If unspecified, the service picks + * an appropriate default. The maximum value is 100; values above 100 are + * reduced to 100. + * @type string $page_token + * Optional. A page token, received from a previous call, to retrieve the next + * page of results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent organization or folder to list enrollment statuses for, + * in one of the following formats: + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Parent organization or folder to list enrollment statuses for, + * in one of the following formats: + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. Maximum number of items to return in a single page. The service + * might return fewer items than this value. If unspecified, the service picks + * an appropriate default. The maximum value is 100; values above 100 are + * reduced to 100. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. Maximum number of items to return in a single page. The service + * might return fewer items than this value. If unspecified, the service picks + * an appropriate default. The maximum value is 100; values above 100 are + * reduced to 100. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A page token, received from a previous call, to retrieve the next + * page of results. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A page token, received from a previous call, to retrieve the next + * page of results. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListResourceEnrollmentStatusesResponse.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListResourceEnrollmentStatusesResponse.php new file mode 100644 index 000000000000..364a0db41947 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListResourceEnrollmentStatusesResponse.php @@ -0,0 +1,110 @@ +google.cloud.auditmanager.v1.ListResourceEnrollmentStatusesResponse + */ +class ListResourceEnrollmentStatusesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Resources with their enrollment status. + * + * Generated from protobuf field repeated .google.cloud.auditmanager.v1.ResourceEnrollmentStatus resource_enrollment_statuses = 1; + */ + private $resource_enrollment_statuses; + /** + * Output only. A token that you can send as the `page_token` in a subsequent + * request to retrieve the next page of results. If this field is empty, there + * are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AuditManager\V1\ResourceEnrollmentStatus[] $resource_enrollment_statuses + * Resources with their enrollment status. + * @type string $next_page_token + * Output only. A token that you can send as the `page_token` in a subsequent + * request to retrieve the next page of results. If this field is empty, there + * are no subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * Resources with their enrollment status. + * + * Generated from protobuf field repeated .google.cloud.auditmanager.v1.ResourceEnrollmentStatus resource_enrollment_statuses = 1; + * @return RepeatedField<\Google\Cloud\AuditManager\V1\ResourceEnrollmentStatus> + */ + public function getResourceEnrollmentStatuses() + { + return $this->resource_enrollment_statuses; + } + + /** + * Resources with their enrollment status. + * + * Generated from protobuf field repeated .google.cloud.auditmanager.v1.ResourceEnrollmentStatus resource_enrollment_statuses = 1; + * @param \Google\Cloud\AuditManager\V1\ResourceEnrollmentStatus[] $var + * @return $this + */ + public function setResourceEnrollmentStatuses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AuditManager\V1\ResourceEnrollmentStatus::class); + $this->resource_enrollment_statuses = $arr; + + return $this; + } + + /** + * Output only. A token that you can send as the `page_token` in a subsequent + * request to retrieve the next page of results. If this field is empty, there + * are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Output only. A token that you can send as the `page_token` in a subsequent + * request to retrieve the next page of results. If this field is empty, there + * are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/OperationMetadata.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/OperationMetadata.php new file mode 100644 index 000000000000..5a51a0fa651f --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/OperationMetadata.php @@ -0,0 +1,315 @@ +google.cloud.auditmanager.v1.OperationMetadata + */ +class OperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Time that the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Time that the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_time = null; + /** + * Output only. A server-defined resource path for the target of the + * operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $target = ''; + /** + * Output only. The name of the verb that was executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $verb = ''; + /** + * Output only. A human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $status_message = ''; + /** + * Output only. Whether you requested that the operation be cancelled. + * Operations that were cancelled successfully have an + * [Operation.error][google.longrunning.Operation.error] + * value with a status code + * [Code.CANCELLED][google.rpc.Status.code.CANCELLED]. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $requested_cancellation = false; + /** + * Output only. The API version used to start the operation. For example, + * `v1`. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $api_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Time that the operation was created. + * @type \Google\Protobuf\Timestamp $end_time + * Output only. Time that the operation finished running. + * @type string $target + * Output only. A server-defined resource path for the target of the + * operation. + * @type string $verb + * Output only. The name of the verb that was executed by the operation. + * @type string $status_message + * Output only. A human-readable status of the operation, if any. + * @type bool $requested_cancellation + * Output only. Whether you requested that the operation be cancelled. + * Operations that were cancelled successfully have an + * [Operation.error][google.longrunning.Operation.error] + * value with a status code + * [Code.CANCELLED][google.rpc.Status.code.CANCELLED]. + * @type string $api_version + * Output only. The API version used to start the operation. For example, + * `v1`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Time that the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. Time that the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. Time that the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * Output only. Time that the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * Output only. A server-defined resource path for the target of the + * operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getTarget() + { + return $this->target; + } + + /** + * Output only. A server-defined resource path for the target of the + * operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setTarget($var) + { + GPBUtil::checkString($var, True); + $this->target = $var; + + return $this; + } + + /** + * Output only. The name of the verb that was executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getVerb() + { + return $this->verb; + } + + /** + * Output only. The name of the verb that was executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setVerb($var) + { + GPBUtil::checkString($var, True); + $this->verb = $var; + + return $this; + } + + /** + * Output only. A human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getStatusMessage() + { + return $this->status_message; + } + + /** + * Output only. A human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setStatusMessage($var) + { + GPBUtil::checkString($var, True); + $this->status_message = $var; + + return $this; + } + + /** + * Output only. Whether you requested that the operation be cancelled. + * Operations that were cancelled successfully have an + * [Operation.error][google.longrunning.Operation.error] + * value with a status code + * [Code.CANCELLED][google.rpc.Status.code.CANCELLED]. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getRequestedCancellation() + { + return $this->requested_cancellation; + } + + /** + * Output only. Whether you requested that the operation be cancelled. + * Operations that were cancelled successfully have an + * [Operation.error][google.longrunning.Operation.error] + * value with a status code + * [Code.CANCELLED][google.rpc.Status.code.CANCELLED]. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setRequestedCancellation($var) + { + GPBUtil::checkBool($var); + $this->requested_cancellation = $var; + + return $this; + } + + /** + * Output only. The API version used to start the operation. For example, + * `v1`. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getApiVersion() + { + return $this->api_version; + } + + /** + * Output only. The API version used to start the operation. For example, + * `v1`. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setApiVersion($var) + { + GPBUtil::checkString($var, True); + $this->api_version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/OperationState.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/OperationState.php new file mode 100644 index 000000000000..43de9a89b31d --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/OperationState.php @@ -0,0 +1,103 @@ +google.cloud.auditmanager.v1.OperationState + */ +class OperationState +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum OPERATION_STATE_UNSPECIFIED = 0; + */ + const OPERATION_STATE_UNSPECIFIED = 0; + /** + * Audit generation process hasn't started. + * + * Generated from protobuf enum OPERATION_STATE_NOT_STARTED = 10; + */ + const OPERATION_STATE_NOT_STARTED = 10; + /** + * Evaluation process is in progress. + * + * Generated from protobuf enum OPERATION_STATE_EVALUATION_IN_PROGRESS = 20; + */ + const OPERATION_STATE_EVALUATION_IN_PROGRESS = 20; + /** + * Evaluation process is completed. + * + * Generated from protobuf enum OPERATION_STATE_EVALUATION_DONE = 21; + */ + const OPERATION_STATE_EVALUATION_DONE = 21; + /** + * Report generation process is in progress. + * + * Generated from protobuf enum OPERATION_STATE_EVIDENCE_REPORT_GENERATION_IN_PROGRESS = 30; + */ + const OPERATION_STATE_EVIDENCE_REPORT_GENERATION_IN_PROGRESS = 30; + /** + * Report generation process is completed. + * + * Generated from protobuf enum OPERATION_STATE_EVIDENCE_REPORT_GENERATION_DONE = 31; + */ + const OPERATION_STATE_EVIDENCE_REPORT_GENERATION_DONE = 31; + /** + * The audit report and evidence are being uploaded to your bucket. + * + * Generated from protobuf enum OPERATION_STATE_EVIDENCE_UPLOAD_IN_PROGRESS = 40; + */ + const OPERATION_STATE_EVIDENCE_UPLOAD_IN_PROGRESS = 40; + /** + * The audit report and evidence are uploaded to your bucket. + * + * Generated from protobuf enum OPERATION_STATE_DONE = 50; + */ + const OPERATION_STATE_DONE = 50; + /** + * Audit report generation process failed. + * + * Generated from protobuf enum OPERATION_STATE_FAILED = 60; + */ + const OPERATION_STATE_FAILED = 60; + + private static $valueToName = [ + self::OPERATION_STATE_UNSPECIFIED => 'OPERATION_STATE_UNSPECIFIED', + self::OPERATION_STATE_NOT_STARTED => 'OPERATION_STATE_NOT_STARTED', + self::OPERATION_STATE_EVALUATION_IN_PROGRESS => 'OPERATION_STATE_EVALUATION_IN_PROGRESS', + self::OPERATION_STATE_EVALUATION_DONE => 'OPERATION_STATE_EVALUATION_DONE', + self::OPERATION_STATE_EVIDENCE_REPORT_GENERATION_IN_PROGRESS => 'OPERATION_STATE_EVIDENCE_REPORT_GENERATION_IN_PROGRESS', + self::OPERATION_STATE_EVIDENCE_REPORT_GENERATION_DONE => 'OPERATION_STATE_EVIDENCE_REPORT_GENERATION_DONE', + self::OPERATION_STATE_EVIDENCE_UPLOAD_IN_PROGRESS => 'OPERATION_STATE_EVIDENCE_UPLOAD_IN_PROGRESS', + self::OPERATION_STATE_DONE => 'OPERATION_STATE_DONE', + self::OPERATION_STATE_FAILED => 'OPERATION_STATE_FAILED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ReportGenerationProgress.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ReportGenerationProgress.php new file mode 100644 index 000000000000..8fccf8867285 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ReportGenerationProgress.php @@ -0,0 +1,299 @@ +google.cloud.auditmanager.v1.ReportGenerationProgress + */ +class ReportGenerationProgress extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Current state of execution for report generation. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.OperationState state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. Reason for failure during the audit report generation process. + * This field is set only if the `OperationState` attribute is + * `OPERATION_STATE_FAILED`. + * + * Generated from protobuf field string failure_reason = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $failure_reason = ''; + /** + * Progress of the evaluation process. The progress is + * defined in terms of percentage complete. + * + * Generated from protobuf field double evaluation_percent_complete = 20; + */ + protected $evaluation_percent_complete = 0.0; + /** + * Report generation progress, defined in terms of percentage complete. + * Until evaluation is complete, this value is always `0`. + * + * Generated from protobuf field double report_generation_percent_complete = 30; + */ + protected $report_generation_percent_complete = 0.0; + /** + * Report uploading progress, defined in terms of percentage complete. + * Until evaluation and report generation are complete, this value is always + * `0`. + * + * Generated from protobuf field double report_uploading_percent_complete = 40; + */ + protected $report_uploading_percent_complete = 0.0; + /** + * Output only. Cloud Storage bucket where the audit report is uploaded to + * after the evaluation process is completed. + * + * Generated from protobuf field string destination_gcs_bucket = 50 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $destination_gcs_bucket = ''; + /** + * Output only. Name of the audit report. + * + * Generated from protobuf field string audit_report = 51 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $audit_report = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $state + * Output only. Current state of execution for report generation. + * @type string $failure_reason + * Output only. Reason for failure during the audit report generation process. + * This field is set only if the `OperationState` attribute is + * `OPERATION_STATE_FAILED`. + * @type float $evaluation_percent_complete + * Progress of the evaluation process. The progress is + * defined in terms of percentage complete. + * @type float $report_generation_percent_complete + * Report generation progress, defined in terms of percentage complete. + * Until evaluation is complete, this value is always `0`. + * @type float $report_uploading_percent_complete + * Report uploading progress, defined in terms of percentage complete. + * Until evaluation and report generation are complete, this value is always + * `0`. + * @type string $destination_gcs_bucket + * Output only. Cloud Storage bucket where the audit report is uploaded to + * after the evaluation process is completed. + * @type string $audit_report + * Output only. Name of the audit report. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Current state of execution for report generation. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.OperationState state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. Current state of execution for report generation. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.OperationState state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\AuditManager\V1\OperationState::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. Reason for failure during the audit report generation process. + * This field is set only if the `OperationState` attribute is + * `OPERATION_STATE_FAILED`. + * + * Generated from protobuf field string failure_reason = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getFailureReason() + { + return $this->failure_reason; + } + + /** + * Output only. Reason for failure during the audit report generation process. + * This field is set only if the `OperationState` attribute is + * `OPERATION_STATE_FAILED`. + * + * Generated from protobuf field string failure_reason = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setFailureReason($var) + { + GPBUtil::checkString($var, True); + $this->failure_reason = $var; + + return $this; + } + + /** + * Progress of the evaluation process. The progress is + * defined in terms of percentage complete. + * + * Generated from protobuf field double evaluation_percent_complete = 20; + * @return float + */ + public function getEvaluationPercentComplete() + { + return $this->evaluation_percent_complete; + } + + /** + * Progress of the evaluation process. The progress is + * defined in terms of percentage complete. + * + * Generated from protobuf field double evaluation_percent_complete = 20; + * @param float $var + * @return $this + */ + public function setEvaluationPercentComplete($var) + { + GPBUtil::checkDouble($var); + $this->evaluation_percent_complete = $var; + + return $this; + } + + /** + * Report generation progress, defined in terms of percentage complete. + * Until evaluation is complete, this value is always `0`. + * + * Generated from protobuf field double report_generation_percent_complete = 30; + * @return float + */ + public function getReportGenerationPercentComplete() + { + return $this->report_generation_percent_complete; + } + + /** + * Report generation progress, defined in terms of percentage complete. + * Until evaluation is complete, this value is always `0`. + * + * Generated from protobuf field double report_generation_percent_complete = 30; + * @param float $var + * @return $this + */ + public function setReportGenerationPercentComplete($var) + { + GPBUtil::checkDouble($var); + $this->report_generation_percent_complete = $var; + + return $this; + } + + /** + * Report uploading progress, defined in terms of percentage complete. + * Until evaluation and report generation are complete, this value is always + * `0`. + * + * Generated from protobuf field double report_uploading_percent_complete = 40; + * @return float + */ + public function getReportUploadingPercentComplete() + { + return $this->report_uploading_percent_complete; + } + + /** + * Report uploading progress, defined in terms of percentage complete. + * Until evaluation and report generation are complete, this value is always + * `0`. + * + * Generated from protobuf field double report_uploading_percent_complete = 40; + * @param float $var + * @return $this + */ + public function setReportUploadingPercentComplete($var) + { + GPBUtil::checkDouble($var); + $this->report_uploading_percent_complete = $var; + + return $this; + } + + /** + * Output only. Cloud Storage bucket where the audit report is uploaded to + * after the evaluation process is completed. + * + * Generated from protobuf field string destination_gcs_bucket = 50 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDestinationGcsBucket() + { + return $this->destination_gcs_bucket; + } + + /** + * Output only. Cloud Storage bucket where the audit report is uploaded to + * after the evaluation process is completed. + * + * Generated from protobuf field string destination_gcs_bucket = 50 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDestinationGcsBucket($var) + { + GPBUtil::checkString($var, True); + $this->destination_gcs_bucket = $var; + + return $this; + } + + /** + * Output only. Name of the audit report. + * + * Generated from protobuf field string audit_report = 51 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getAuditReport() + { + return $this->audit_report; + } + + /** + * Output only. Name of the audit report. + * + * Generated from protobuf field string audit_report = 51 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setAuditReport($var) + { + GPBUtil::checkString($var, True); + $this->audit_report = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ReportSummary.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ReportSummary.php new file mode 100644 index 000000000000..c7a70105fd15 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ReportSummary.php @@ -0,0 +1,204 @@ +google.cloud.auditmanager.v1.ReportSummary + */ +class ReportSummary extends \Google\Protobuf\Internal\Message +{ + /** + * Total number of evaluated checks. + * + * Generated from protobuf field int32 total_count = 1; + */ + protected $total_count = 0; + /** + * Number of compliant checks. + * + * Generated from protobuf field int32 compliant_count = 2; + */ + protected $compliant_count = 0; + /** + * Number of checks with violations. + * + * Generated from protobuf field int32 violation_count = 3; + */ + protected $violation_count = 0; + /** + * Number of checks that require a manual review. + * + * Generated from protobuf field int32 manual_review_needed_count = 4; + */ + protected $manual_review_needed_count = 0; + /** + * Number of checks that can't be performed due to errors. + * + * Generated from protobuf field int32 error_count = 5; + */ + protected $error_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $total_count + * Total number of evaluated checks. + * @type int $compliant_count + * Number of compliant checks. + * @type int $violation_count + * Number of checks with violations. + * @type int $manual_review_needed_count + * Number of checks that require a manual review. + * @type int $error_count + * Number of checks that can't be performed due to errors. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * Total number of evaluated checks. + * + * Generated from protobuf field int32 total_count = 1; + * @return int + */ + public function getTotalCount() + { + return $this->total_count; + } + + /** + * Total number of evaluated checks. + * + * Generated from protobuf field int32 total_count = 1; + * @param int $var + * @return $this + */ + public function setTotalCount($var) + { + GPBUtil::checkInt32($var); + $this->total_count = $var; + + return $this; + } + + /** + * Number of compliant checks. + * + * Generated from protobuf field int32 compliant_count = 2; + * @return int + */ + public function getCompliantCount() + { + return $this->compliant_count; + } + + /** + * Number of compliant checks. + * + * Generated from protobuf field int32 compliant_count = 2; + * @param int $var + * @return $this + */ + public function setCompliantCount($var) + { + GPBUtil::checkInt32($var); + $this->compliant_count = $var; + + return $this; + } + + /** + * Number of checks with violations. + * + * Generated from protobuf field int32 violation_count = 3; + * @return int + */ + public function getViolationCount() + { + return $this->violation_count; + } + + /** + * Number of checks with violations. + * + * Generated from protobuf field int32 violation_count = 3; + * @param int $var + * @return $this + */ + public function setViolationCount($var) + { + GPBUtil::checkInt32($var); + $this->violation_count = $var; + + return $this; + } + + /** + * Number of checks that require a manual review. + * + * Generated from protobuf field int32 manual_review_needed_count = 4; + * @return int + */ + public function getManualReviewNeededCount() + { + return $this->manual_review_needed_count; + } + + /** + * Number of checks that require a manual review. + * + * Generated from protobuf field int32 manual_review_needed_count = 4; + * @param int $var + * @return $this + */ + public function setManualReviewNeededCount($var) + { + GPBUtil::checkInt32($var); + $this->manual_review_needed_count = $var; + + return $this; + } + + /** + * Number of checks that can't be performed due to errors. + * + * Generated from protobuf field int32 error_count = 5; + * @return int + */ + public function getErrorCount() + { + return $this->error_count; + } + + /** + * Number of checks that can't be performed due to errors. + * + * Generated from protobuf field int32 error_count = 5; + * @param int $var + * @return $this + */ + public function setErrorCount($var) + { + GPBUtil::checkInt32($var); + $this->error_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ResourceEnrollmentStatus.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ResourceEnrollmentStatus.php new file mode 100644 index 000000000000..471449da2710 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ResourceEnrollmentStatus.php @@ -0,0 +1,244 @@ +google.cloud.auditmanager.v1.ResourceEnrollmentStatus + */ +class ResourceEnrollmentStatus extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. Name of the resource enrollment status, in one of the following + * formats: + * * `folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * * `projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * * `organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. Enrolled destination details for the organization, folder, or + * project. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.Enrollment enrollment = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $enrollment = null; + /** + * Output only. Deprecated. Whether the organization, folder, or project is + * enrolled. Use `enrollment_state` instead. + * + * Generated from protobuf field bool enrolled = 3 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @deprecated + */ + protected $enrolled = false; + /** + * Output only. Display name for the organization, folder, or project. + * + * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $display_name = ''; + /** + * Output only. Enrollment state of the organization, folder, or project. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.ResourceEnrollmentStatus.ResourceEnrollmentState enrollment_state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $enrollment_state = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. Name of the resource enrollment status, in one of the following + * formats: + * * `folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * * `projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * * `organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * @type \Google\Cloud\AuditManager\V1\Enrollment $enrollment + * Output only. Enrolled destination details for the organization, folder, or + * project. + * @type bool $enrolled + * Output only. Deprecated. Whether the organization, folder, or project is + * enrolled. Use `enrollment_state` instead. + * @type string $display_name + * Output only. Display name for the organization, folder, or project. + * @type int $enrollment_state + * Output only. Enrollment state of the organization, folder, or project. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. Name of the resource enrollment status, in one of the following + * formats: + * * `folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * * `projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * * `organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. Name of the resource enrollment status, in one of the following + * formats: + * * `folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * * `projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * * `organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. Enrolled destination details for the organization, folder, or + * project. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.Enrollment enrollment = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\AuditManager\V1\Enrollment|null + */ + public function getEnrollment() + { + return $this->enrollment; + } + + public function hasEnrollment() + { + return isset($this->enrollment); + } + + public function clearEnrollment() + { + unset($this->enrollment); + } + + /** + * Output only. Enrolled destination details for the organization, folder, or + * project. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.Enrollment enrollment = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\AuditManager\V1\Enrollment $var + * @return $this + */ + public function setEnrollment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AuditManager\V1\Enrollment::class); + $this->enrollment = $var; + + return $this; + } + + /** + * Output only. Deprecated. Whether the organization, folder, or project is + * enrolled. Use `enrollment_state` instead. + * + * Generated from protobuf field bool enrolled = 3 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + * @deprecated + */ + public function getEnrolled() + { + if ($this->enrolled !== false) { + @trigger_error('enrolled is deprecated.', E_USER_DEPRECATED); + } + return $this->enrolled; + } + + /** + * Output only. Deprecated. Whether the organization, folder, or project is + * enrolled. Use `enrollment_state` instead. + * + * Generated from protobuf field bool enrolled = 3 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + * @deprecated + */ + public function setEnrolled($var) + { + @trigger_error('enrolled is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkBool($var); + $this->enrolled = $var; + + return $this; + } + + /** + * Output only. Display name for the organization, folder, or project. + * + * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Output only. Display name for the organization, folder, or project. + * + * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Output only. Enrollment state of the organization, folder, or project. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.ResourceEnrollmentStatus.ResourceEnrollmentState enrollment_state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getEnrollmentState() + { + return $this->enrollment_state; + } + + /** + * Output only. Enrollment state of the organization, folder, or project. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.ResourceEnrollmentStatus.ResourceEnrollmentState enrollment_state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setEnrollmentState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\AuditManager\V1\ResourceEnrollmentStatus\ResourceEnrollmentState::class); + $this->enrollment_state = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ResourceEnrollmentStatus/ResourceEnrollmentState.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ResourceEnrollmentStatus/ResourceEnrollmentState.php new file mode 100644 index 000000000000..96ad488e33be --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ResourceEnrollmentStatus/ResourceEnrollmentState.php @@ -0,0 +1,68 @@ +google.cloud.auditmanager.v1.ResourceEnrollmentStatus.ResourceEnrollmentState + */ +class ResourceEnrollmentState +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum RESOURCE_ENROLLMENT_STATE_UNSPECIFIED = 0; + */ + const RESOURCE_ENROLLMENT_STATE_UNSPECIFIED = 0; + /** + * The resource isn't enrolled. + * + * Generated from protobuf enum NOT_ENROLLED = 1; + */ + const NOT_ENROLLED = 1; + /** + * The resource isn't enrolled but the parent is enrolled. + * + * Generated from protobuf enum INHERITED = 2; + */ + const INHERITED = 2; + /** + * The resource is enrolled. + * + * Generated from protobuf enum ENROLLED = 3; + */ + const ENROLLED = 3; + + private static $valueToName = [ + self::RESOURCE_ENROLLMENT_STATE_UNSPECIFIED => 'RESOURCE_ENROLLMENT_STATE_UNSPECIFIED', + self::NOT_ENROLLED => 'NOT_ENROLLED', + self::INHERITED => 'INHERITED', + self::ENROLLED => 'ENROLLED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/enroll_resource.php b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/enroll_resource.php new file mode 100644 index 000000000000..0a2da65a1396 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/enroll_resource.php @@ -0,0 +1,82 @@ +setScope($scope) + ->setDestinations($destinations); + + // Call the API and handle any network failures. + try { + /** @var Enrollment $response */ + $response = $auditManagerClient->enrollResource($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $scope = '[SCOPE]'; + + enroll_resource_sample($scope); +} +// [END auditmanager_v1_generated_AuditManager_EnrollResource_sync] diff --git a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/generate_audit_report.php b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/generate_audit_report.php new file mode 100644 index 000000000000..07b4a254ac4f --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/generate_audit_report.php @@ -0,0 +1,100 @@ +setScope($scope) + ->setReportFormat($reportFormat) + ->setComplianceFramework($complianceFramework); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $auditManagerClient->generateAuditReport($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var AuditReport $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $scope = '[SCOPE]'; + $reportFormat = AuditReportFormat::AUDIT_REPORT_FORMAT_UNSPECIFIED; + $complianceFramework = '[COMPLIANCE_FRAMEWORK]'; + + generate_audit_report_sample($scope, $reportFormat, $complianceFramework); +} +// [END auditmanager_v1_generated_AuditManager_GenerateAuditReport_sync] diff --git a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/generate_audit_scope_report.php b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/generate_audit_scope_report.php new file mode 100644 index 000000000000..9b58aa25f9b7 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/generate_audit_scope_report.php @@ -0,0 +1,93 @@ +setScope($scope) + ->setReportFormat($reportFormat) + ->setComplianceFramework($complianceFramework); + + // Call the API and handle any network failures. + try { + /** @var AuditScopeReport $response */ + $response = $auditManagerClient->generateAuditScopeReport($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $scope = '[SCOPE]'; + $reportFormat = AuditScopeReportFormat::AUDIT_SCOPE_REPORT_FORMAT_UNSPECIFIED; + $complianceFramework = '[COMPLIANCE_FRAMEWORK]'; + + generate_audit_scope_report_sample($scope, $reportFormat, $complianceFramework); +} +// [END auditmanager_v1_generated_AuditManager_GenerateAuditScopeReport_sync] diff --git a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_audit_report.php b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_audit_report.php new file mode 100644 index 000000000000..a61f67c74e98 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_audit_report.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var AuditReport $response */ + $response = $auditManagerClient->getAuditReport($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = AuditManagerClient::auditReportName('[PROJECT]', '[LOCATION]', '[AUDIT_REPORT]'); + + get_audit_report_sample($formattedName); +} +// [END auditmanager_v1_generated_AuditManager_GetAuditReport_sync] diff --git a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_location.php b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_location.php new file mode 100644 index 000000000000..1dea4b7c3f71 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END auditmanager_v1_generated_AuditManager_GetLocation_sync] diff --git a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_resource_enrollment_status.php b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_resource_enrollment_status.php new file mode 100644 index 000000000000..e3a24459cc3e --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_resource_enrollment_status.php @@ -0,0 +1,80 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var ResourceEnrollmentStatus $response */ + $response = $auditManagerClient->getResourceEnrollmentStatus($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = AuditManagerClient::resourceEnrollmentStatusName( + '[FOLDER]', + '[LOCATION]', + '[RESOURCE_ENROLLMENT_STATUS]' + ); + + get_resource_enrollment_status_sample($formattedName); +} +// [END auditmanager_v1_generated_AuditManager_GetResourceEnrollmentStatus_sync] diff --git a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_audit_reports.php b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_audit_reports.php new file mode 100644 index 000000000000..608134c484ab --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_audit_reports.php @@ -0,0 +1,82 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $auditManagerClient->listAuditReports($request); + + /** @var AuditReport $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = AuditManagerClient::folderLocationName('[FOLDER]', '[LOCATION]'); + + list_audit_reports_sample($formattedParent); +} +// [END auditmanager_v1_generated_AuditManager_ListAuditReports_sync] diff --git a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_controls.php b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_controls.php new file mode 100644 index 000000000000..29e6f80c0fa5 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_controls.php @@ -0,0 +1,81 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $auditManagerClient->listControls($request); + + /** @var Control $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = AuditManagerClient::standardName('[PROJECT]', '[LOCATION]', '[STANDARD]'); + + list_controls_sample($formattedParent); +} +// [END auditmanager_v1_generated_AuditManager_ListControls_sync] diff --git a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_locations.php b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_locations.php new file mode 100644 index 000000000000..e556a3584ba8 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_locations.php @@ -0,0 +1,77 @@ +listLocations($request); + + /** @var Location $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END auditmanager_v1_generated_AuditManager_ListLocations_sync] diff --git a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_resource_enrollment_statuses.php b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_resource_enrollment_statuses.php new file mode 100644 index 000000000000..64c6cf526f20 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_resource_enrollment_statuses.php @@ -0,0 +1,81 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $auditManagerClient->listResourceEnrollmentStatuses($request); + + /** @var ResourceEnrollmentStatus $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = AuditManagerClient::enrollmentStatusScopeName('[FOLDER]', '[LOCATION]'); + + list_resource_enrollment_statuses_sample($formattedParent); +} +// [END auditmanager_v1_generated_AuditManager_ListResourceEnrollmentStatuses_sync] diff --git a/owl-bot-staging/AuditManager/v1/src/V1/Client/AuditManagerClient.php b/owl-bot-staging/AuditManager/v1/src/V1/Client/AuditManagerClient.php new file mode 100644 index 000000000000..2d2902f7c0fb --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/src/V1/Client/AuditManagerClient.php @@ -0,0 +1,897 @@ + enrollResourceAsync(EnrollResourceRequest $request, array $optionalArgs = []) + * @method PromiseInterface generateAuditReportAsync(GenerateAuditReportRequest $request, array $optionalArgs = []) + * @method PromiseInterface generateAuditScopeReportAsync(GenerateAuditScopeReportRequest $request, array $optionalArgs = []) + * @method PromiseInterface getAuditReportAsync(GetAuditReportRequest $request, array $optionalArgs = []) + * @method PromiseInterface getResourceEnrollmentStatusAsync(GetResourceEnrollmentStatusRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAuditReportsAsync(ListAuditReportsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listControlsAsync(ListControlsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listResourceEnrollmentStatusesAsync(ListResourceEnrollmentStatusesRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + */ +final class AuditManagerClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.auditmanager.v1.AuditManager'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'auditmanager.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'auditmanager.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** + * The default scopes required by the service. + * + * @internal + */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-auditmanager', + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/audit_manager_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/audit_manager_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/audit_manager_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/audit_manager_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = $methodName && isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a audit_report + * resource. + * + * @param string $project + * @param string $location + * @param string $auditReport + * + * @return string The formatted audit_report resource. + */ + public static function auditReportName(string $project, string $location, string $auditReport): string + { + return self::getPathTemplate('auditReport')->render([ + 'project' => $project, + 'location' => $location, + 'audit_report' => $auditReport, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * enrollment_status_scope resource. + * + * @param string $folder + * @param string $location + * + * @return string The formatted enrollment_status_scope resource. + */ + public static function enrollmentStatusScopeName(string $folder, string $location): string + { + return self::getPathTemplate('enrollmentStatusScope')->render([ + 'folder' => $folder, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * folder_location resource. + * + * @param string $folder + * @param string $location + * + * @return string The formatted folder_location resource. + */ + public static function folderLocationName(string $folder, string $location): string + { + return self::getPathTemplate('folderLocation')->render([ + 'folder' => $folder, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * folder_location_audit_report resource. + * + * @param string $folder + * @param string $location + * @param string $auditReport + * + * @return string The formatted folder_location_audit_report resource. + */ + public static function folderLocationAuditReportName(string $folder, string $location, string $auditReport): string + { + return self::getPathTemplate('folderLocationAuditReport')->render([ + 'folder' => $folder, + 'location' => $location, + 'audit_report' => $auditReport, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * folder_location_resource_enrollment_status resource. + * + * @param string $folder + * @param string $location + * @param string $resourceEnrollmentStatus + * + * @return string The formatted folder_location_resource_enrollment_status resource. + */ + public static function folderLocationResourceEnrollmentStatusName(string $folder, string $location, string $resourceEnrollmentStatus): string + { + return self::getPathTemplate('folderLocationResourceEnrollmentStatus')->render([ + 'folder' => $folder, + 'location' => $location, + 'resource_enrollment_status' => $resourceEnrollmentStatus, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * folder_location_standard resource. + * + * @param string $folder + * @param string $location + * @param string $standard + * + * @return string The formatted folder_location_standard resource. + */ + public static function folderLocationStandardName(string $folder, string $location, string $standard): string + { + return self::getPathTemplate('folderLocationStandard')->render([ + 'folder' => $folder, + 'location' => $location, + 'standard' => $standard, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName(string $project, string $location): string + { + return self::getPathTemplate('location')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_location resource. + * + * @param string $organization + * @param string $location + * + * @return string The formatted organization_location resource. + */ + public static function organizationLocationName(string $organization, string $location): string + { + return self::getPathTemplate('organizationLocation')->render([ + 'organization' => $organization, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_location_audit_report resource. + * + * @param string $organization + * @param string $location + * @param string $auditReport + * + * @return string The formatted organization_location_audit_report resource. + */ + public static function organizationLocationAuditReportName(string $organization, string $location, string $auditReport): string + { + return self::getPathTemplate('organizationLocationAuditReport')->render([ + 'organization' => $organization, + 'location' => $location, + 'audit_report' => $auditReport, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_location_resource_enrollment_status resource. + * + * @param string $organization + * @param string $location + * @param string $resourceEnrollmentStatus + * + * @return string The formatted organization_location_resource_enrollment_status resource. + */ + public static function organizationLocationResourceEnrollmentStatusName(string $organization, string $location, string $resourceEnrollmentStatus): string + { + return self::getPathTemplate('organizationLocationResourceEnrollmentStatus')->render([ + 'organization' => $organization, + 'location' => $location, + 'resource_enrollment_status' => $resourceEnrollmentStatus, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_location_standard resource. + * + * @param string $organization + * @param string $location + * @param string $standard + * + * @return string The formatted organization_location_standard resource. + */ + public static function organizationLocationStandardName(string $organization, string $location, string $standard): string + { + return self::getPathTemplate('organizationLocationStandard')->render([ + 'organization' => $organization, + 'location' => $location, + 'standard' => $standard, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_audit_report resource. + * + * @param string $project + * @param string $location + * @param string $auditReport + * + * @return string The formatted project_location_audit_report resource. + */ + public static function projectLocationAuditReportName(string $project, string $location, string $auditReport): string + { + return self::getPathTemplate('projectLocationAuditReport')->render([ + 'project' => $project, + 'location' => $location, + 'audit_report' => $auditReport, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_resource_enrollment_status resource. + * + * @param string $project + * @param string $location + * @param string $resourceEnrollmentStatus + * + * @return string The formatted project_location_resource_enrollment_status resource. + */ + public static function projectLocationResourceEnrollmentStatusName(string $project, string $location, string $resourceEnrollmentStatus): string + { + return self::getPathTemplate('projectLocationResourceEnrollmentStatus')->render([ + 'project' => $project, + 'location' => $location, + 'resource_enrollment_status' => $resourceEnrollmentStatus, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_standard resource. + * + * @param string $project + * @param string $location + * @param string $standard + * + * @return string The formatted project_location_standard resource. + */ + public static function projectLocationStandardName(string $project, string $location, string $standard): string + { + return self::getPathTemplate('projectLocationStandard')->render([ + 'project' => $project, + 'location' => $location, + 'standard' => $standard, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * resource_enrollment_status resource. + * + * @param string $folder + * @param string $location + * @param string $resourceEnrollmentStatus + * + * @return string The formatted resource_enrollment_status resource. + */ + public static function resourceEnrollmentStatusName(string $folder, string $location, string $resourceEnrollmentStatus): string + { + return self::getPathTemplate('resourceEnrollmentStatus')->render([ + 'folder' => $folder, + 'location' => $location, + 'resource_enrollment_status' => $resourceEnrollmentStatus, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a standard + * resource. + * + * @param string $project + * @param string $location + * @param string $standard + * + * @return string The formatted standard resource. + */ + public static function standardName(string $project, string $location, string $standard): string + { + return self::getPathTemplate('standard')->render([ + 'project' => $project, + 'location' => $location, + 'standard' => $standard, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - auditReport: projects/{project}/locations/{location}/auditReports/{audit_report} + * - enrollmentStatusScope: folders/{folder}/locations/{location} + * - folderLocation: folders/{folder}/locations/{location} + * - folderLocationAuditReport: folders/{folder}/locations/{location}/auditReports/{audit_report} + * - folderLocationResourceEnrollmentStatus: folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status} + * - folderLocationStandard: folders/{folder}/locations/{location}/standards/{standard} + * - location: projects/{project}/locations/{location} + * - organizationLocation: organizations/{organization}/locations/{location} + * - organizationLocationAuditReport: organizations/{organization}/locations/{location}/auditReports/{audit_report} + * - organizationLocationResourceEnrollmentStatus: organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status} + * - organizationLocationStandard: organizations/{organization}/locations/{location}/standards/{standard} + * - projectLocationAuditReport: projects/{project}/locations/{location}/auditReports/{audit_report} + * - projectLocationResourceEnrollmentStatus: projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status} + * - projectLocationStandard: projects/{project}/locations/{location}/standards/{standard} + * - resourceEnrollmentStatus: folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status} + * - standard: projects/{project}/locations/{location}/standards/{standard} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'auditmanager.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\AuditManager\V1\AuditManagerClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new AuditManagerClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Adds your project, folder, or organization to Audit + * Manager. This method creates the Audit Manager service agent in your + * workload and grants required permissions to the service agent. + * If you make this request on a workload that's already enrolled, + * then this method overrides the existing set of destinations. + * + * The async variant is {@see AuditManagerClient::enrollResourceAsync()} . + * + * @example samples/V1/AuditManagerClient/enroll_resource.php + * + * @param EnrollResourceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Enrollment + * + * @throws ApiException Thrown if the API call fails. + */ + public function enrollResource(EnrollResourceRequest $request, array $callOptions = []): Enrollment + { + return $this->startApiCall('EnrollResource', $request, $callOptions)->wait(); + } + + /** + * Registers audit report generation requests. This method returns the + * operation identifier that you can use to track the report generation + * progress. + * + * The async variant is {@see AuditManagerClient::generateAuditReportAsync()} . + * + * @example samples/V1/AuditManagerClient/generate_audit_report.php + * + * @param GenerateAuditReportRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function generateAuditReport(GenerateAuditReportRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('GenerateAuditReport', $request, $callOptions)->wait(); + } + + /** + * Generates an audit scope report for the given standard. + * + * The report includes the following: + * + * * The technical attributes and constraints that Audit Manager uses to + * verify your compliance with a framework. + * * A list of Google Cloud services and resources that are within the + * scope of the framework. + * + * The async variant is {@see AuditManagerClient::generateAuditScopeReportAsync()} + * . + * + * @example samples/V1/AuditManagerClient/generate_audit_scope_report.php + * + * @param GenerateAuditScopeReportRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return AuditScopeReport + * + * @throws ApiException Thrown if the API call fails. + */ + public function generateAuditScopeReport(GenerateAuditScopeReportRequest $request, array $callOptions = []): AuditScopeReport + { + return $this->startApiCall('GenerateAuditScopeReport', $request, $callOptions)->wait(); + } + + /** + * Gets the full metadata and findings for an audit report. + * + * The async variant is {@see AuditManagerClient::getAuditReportAsync()} . + * + * @example samples/V1/AuditManagerClient/get_audit_report.php + * + * @param GetAuditReportRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return AuditReport + * + * @throws ApiException Thrown if the API call fails. + */ + public function getAuditReport(GetAuditReportRequest $request, array $callOptions = []): AuditReport + { + return $this->startApiCall('GetAuditReport', $request, $callOptions)->wait(); + } + + /** + * Gets a resource and its enrollment status. + * + * The async variant is + * {@see AuditManagerClient::getResourceEnrollmentStatusAsync()} . + * + * @example samples/V1/AuditManagerClient/get_resource_enrollment_status.php + * + * @param GetResourceEnrollmentStatusRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ResourceEnrollmentStatus + * + * @throws ApiException Thrown if the API call fails. + */ + public function getResourceEnrollmentStatus(GetResourceEnrollmentStatusRequest $request, array $callOptions = []): ResourceEnrollmentStatus + { + return $this->startApiCall('GetResourceEnrollmentStatus', $request, $callOptions)->wait(); + } + + /** + * Lists the audit reports for the organization, folder, or project that you + * specify as the parent scope. + * + * The async variant is {@see AuditManagerClient::listAuditReportsAsync()} . + * + * @example samples/V1/AuditManagerClient/list_audit_reports.php + * + * @param ListAuditReportsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listAuditReports(ListAuditReportsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListAuditReports', $request, $callOptions); + } + + /** + * Lists the controls that you must implement to become compliant to a + * regulatory standard. + * + * The async variant is {@see AuditManagerClient::listControlsAsync()} . + * + * @example samples/V1/AuditManagerClient/list_controls.php + * + * @param ListControlsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listControls(ListControlsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListControls', $request, $callOptions); + } + + /** + * Lists all the folders and projects in an organization or folder, along with + * their enrollments. + * + * The async variant is + * {@see AuditManagerClient::listResourceEnrollmentStatusesAsync()} . + * + * @example samples/V1/AuditManagerClient/list_resource_enrollment_statuses.php + * + * @param ListResourceEnrollmentStatusesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listResourceEnrollmentStatuses(ListResourceEnrollmentStatusesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListResourceEnrollmentStatuses', $request, $callOptions); + } + + /** + * Gets information about a location. + * + * The async variant is {@see AuditManagerClient::getLocationAsync()} . + * + * @example samples/V1/AuditManagerClient/get_location.php + * + * @param GetLocationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * This method lists locations based on the resource scope provided in + * the [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field: * + * **Global locations**: If `name` is empty, the method lists the + * public locations available to all projects. * **Project-specific + * locations**: If `name` follows the format + * `projects/{project}`, the method lists locations visible to that + * specific project. This includes public, private, or other + * project-specific locations enabled for the project. + * + * For gRPC and client library implementations, the resource name is + * passed as the `name` field. For direct service calls, the resource + * name is + * incorporated into the request path based on the specific service + * implementation and version. + * + * The async variant is {@see AuditManagerClient::listLocationsAsync()} . + * + * @example samples/V1/AuditManagerClient/list_locations.php + * + * @param ListLocationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } +} diff --git a/owl-bot-staging/AuditManager/v1/src/V1/gapic_metadata.json b/owl-bot-staging/AuditManager/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..30a70b3b0e35 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/src/V1/gapic_metadata.json @@ -0,0 +1,68 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.auditmanager.v1", + "libraryPackage": "Google\\Cloud\\AuditManager\\V1", + "services": { + "AuditManager": { + "clients": { + "grpc": { + "libraryClient": "AuditManagerClient", + "rpcs": { + "EnrollResource": { + "methods": [ + "enrollResource" + ] + }, + "GenerateAuditReport": { + "methods": [ + "generateAuditReport" + ] + }, + "GenerateAuditScopeReport": { + "methods": [ + "generateAuditScopeReport" + ] + }, + "GetAuditReport": { + "methods": [ + "getAuditReport" + ] + }, + "GetResourceEnrollmentStatus": { + "methods": [ + "getResourceEnrollmentStatus" + ] + }, + "ListAuditReports": { + "methods": [ + "listAuditReports" + ] + }, + "ListControls": { + "methods": [ + "listControls" + ] + }, + "ListResourceEnrollmentStatuses": { + "methods": [ + "listResourceEnrollmentStatuses" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_client_config.json b/owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_client_config.json new file mode 100644 index 000000000000..621862801f8f --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_client_config.json @@ -0,0 +1,94 @@ +{ + "interfaces": { + "google.cloud.auditmanager.v1.AuditManager": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ], + "no_retry_1_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "EnrollResource": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GenerateAuditReport": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GenerateAuditScopeReport": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetAuditReport": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetResourceEnrollmentStatus": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListAuditReports": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListControls": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListResourceEnrollmentStatuses": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_descriptor_config.php b/owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_descriptor_config.php new file mode 100644 index 000000000000..98c9d30f4504 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_descriptor_config.php @@ -0,0 +1,207 @@ + [ + 'google.cloud.auditmanager.v1.AuditManager' => [ + 'GenerateAuditReport' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\AuditManager\V1\AuditReport', + 'metadataReturnType' => '\Google\Cloud\AuditManager\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'scope', + 'fieldAccessors' => [ + 'getScope', + ], + ], + ], + ], + 'EnrollResource' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\AuditManager\V1\Enrollment', + 'headerParams' => [ + [ + 'keyName' => 'scope', + 'fieldAccessors' => [ + 'getScope', + ], + ], + ], + ], + 'GenerateAuditScopeReport' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\AuditManager\V1\AuditScopeReport', + 'headerParams' => [ + [ + 'keyName' => 'scope', + 'fieldAccessors' => [ + 'getScope', + ], + ], + ], + ], + 'GetAuditReport' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\AuditManager\V1\AuditReport', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetResourceEnrollmentStatus' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\AuditManager\V1\ResourceEnrollmentStatus', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListAuditReports' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getAuditReports', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\AuditManager\V1\ListAuditReportsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListControls' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getControls', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\AuditManager\V1\ListControlsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListResourceEnrollmentStatuses' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getResourceEnrollmentStatuses', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\AuditManager\V1\ListResourceEnrollmentStatusesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'templateMap' => [ + 'auditReport' => 'projects/{project}/locations/{location}/auditReports/{audit_report}', + 'enrollmentStatusScope' => 'folders/{folder}/locations/{location}', + 'folderLocation' => 'folders/{folder}/locations/{location}', + 'folderLocationAuditReport' => 'folders/{folder}/locations/{location}/auditReports/{audit_report}', + 'folderLocationResourceEnrollmentStatus' => 'folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}', + 'folderLocationStandard' => 'folders/{folder}/locations/{location}/standards/{standard}', + 'location' => 'projects/{project}/locations/{location}', + 'organizationLocation' => 'organizations/{organization}/locations/{location}', + 'organizationLocationAuditReport' => 'organizations/{organization}/locations/{location}/auditReports/{audit_report}', + 'organizationLocationResourceEnrollmentStatus' => 'organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}', + 'organizationLocationStandard' => 'organizations/{organization}/locations/{location}/standards/{standard}', + 'projectLocationAuditReport' => 'projects/{project}/locations/{location}/auditReports/{audit_report}', + 'projectLocationResourceEnrollmentStatus' => 'projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}', + 'projectLocationStandard' => 'projects/{project}/locations/{location}/standards/{standard}', + 'resourceEnrollmentStatus' => 'folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}', + 'standard' => 'projects/{project}/locations/{location}/standards/{standard}', + ], + ], + ], +]; diff --git a/owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_rest_client_config.php b/owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_rest_client_config.php new file mode 100644 index 000000000000..f7d758688248 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_rest_client_config.php @@ -0,0 +1,298 @@ + [ + 'google.cloud.auditmanager.v1.AuditManager' => [ + 'EnrollResource' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{scope=folders/*/locations/*}:enrollResource', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{scope=projects/*/locations/*}:enrollResource', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{scope=organizations/*/locations/*}:enrollResource', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'scope' => [ + 'getters' => [ + 'getScope', + ], + ], + ], + ], + 'GenerateAuditReport' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{scope=folders/*/locations/*}/auditReports:generate', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{scope=projects/*/locations/*}/auditReports:generate', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{scope=organizations/*/locations/*}/auditReports:generate', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'scope' => [ + 'getters' => [ + 'getScope', + ], + ], + ], + ], + 'GenerateAuditScopeReport' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{scope=folders/*/locations/*}/auditScopeReports:generate', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{scope=projects/*/locations/*}/auditScopeReports:generate', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{scope=organizations/*/locations/*}/auditScopeReports:generate', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'scope' => [ + 'getters' => [ + 'getScope', + ], + ], + ], + ], + 'GetAuditReport' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=folders/*/locations/*/auditReports/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/auditReports/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*/auditReports/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetResourceEnrollmentStatus' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/resourceEnrollmentStatuses/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=folders/*/locations/*/resourceEnrollmentStatuses/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*/resourceEnrollmentStatuses/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListAuditReports' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=organizations/*/locations/*}/auditReports', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=folders/*/locations/*}/auditReports', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/auditReports', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListControls' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=organizations/*/locations/*/standards/*}/controls', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=folders/*/locations/*/standards/*}/controls', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/standards/*}/controls', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListResourceEnrollmentStatuses' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=organizations/*/locations/*}/resourceEnrollmentStatuses', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=folders/*/locations/*}/resourceEnrollmentStatuses', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*/operations/*}:cancel', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*}/operations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/AuditManager/v1/tests/Unit/V1/Client/AuditManagerClientTest.php b/owl-bot-staging/AuditManager/v1/tests/Unit/V1/Client/AuditManagerClientTest.php new file mode 100644 index 000000000000..16438f5b044a --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/tests/Unit/V1/Client/AuditManagerClientTest.php @@ -0,0 +1,894 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return AuditManagerClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new AuditManagerClient($options); + } + + /** @test */ + public function enrollResourceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new Enrollment(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $scope = 'scope109264468'; + $destinations = []; + $request = (new EnrollResourceRequest()) + ->setScope($scope) + ->setDestinations($destinations); + $response = $gapicClient->enrollResource($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.auditmanager.v1.AuditManager/EnrollResource', $actualFuncCall); + $actualValue = $actualRequestObject->getScope(); + $this->assertProtobufEquals($scope, $actualValue); + $actualValue = $actualRequestObject->getDestinations(); + $this->assertProtobufEquals($destinations, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function enrollResourceExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $scope = 'scope109264468'; + $destinations = []; + $request = (new EnrollResourceRequest()) + ->setScope($scope) + ->setDestinations($destinations); + try { + $gapicClient->enrollResource($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function generateAuditReportTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/generateAuditReportTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $operationId = 'operationId-274116877'; + $complianceStandard2 = 'complianceStandard2-1079015980'; + $scope2 = 'scope21923941639'; + $complianceFramework2 = 'complianceFramework2-1333971955'; + $scopeId = 'scopeId-487349530'; + $expectedResponse = new AuditReport(); + $expectedResponse->setName($name); + $expectedResponse->setOperationId($operationId); + $expectedResponse->setComplianceStandard($complianceStandard2); + $expectedResponse->setScope($scope2); + $expectedResponse->setComplianceFramework($complianceFramework2); + $expectedResponse->setScopeId($scopeId); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/generateAuditReportTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $scope = 'scope109264468'; + $reportFormat = AuditReportFormat::AUDIT_REPORT_FORMAT_UNSPECIFIED; + $complianceFramework = 'complianceFramework1384085210'; + $request = (new GenerateAuditReportRequest()) + ->setScope($scope) + ->setReportFormat($reportFormat) + ->setComplianceFramework($complianceFramework); + $response = $gapicClient->generateAuditReport($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.auditmanager.v1.AuditManager/GenerateAuditReport', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getScope(); + $this->assertProtobufEquals($scope, $actualValue); + $actualValue = $actualApiRequestObject->getReportFormat(); + $this->assertProtobufEquals($reportFormat, $actualValue); + $actualValue = $actualApiRequestObject->getComplianceFramework(); + $this->assertProtobufEquals($complianceFramework, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/generateAuditReportTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function generateAuditReportExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/generateAuditReportTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $scope = 'scope109264468'; + $reportFormat = AuditReportFormat::AUDIT_REPORT_FORMAT_UNSPECIFIED; + $complianceFramework = 'complianceFramework1384085210'; + $request = (new GenerateAuditReportRequest()) + ->setScope($scope) + ->setReportFormat($reportFormat) + ->setComplianceFramework($complianceFramework); + $response = $gapicClient->generateAuditReport($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/generateAuditReportTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function generateAuditScopeReportTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $scopeReportContents = '-38'; + $name = 'name3373707'; + $expectedResponse = new AuditScopeReport(); + $expectedResponse->setScopeReportContents($scopeReportContents); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $scope = 'scope109264468'; + $reportFormat = AuditScopeReportFormat::AUDIT_SCOPE_REPORT_FORMAT_UNSPECIFIED; + $complianceFramework = 'complianceFramework1384085210'; + $request = (new GenerateAuditScopeReportRequest()) + ->setScope($scope) + ->setReportFormat($reportFormat) + ->setComplianceFramework($complianceFramework); + $response = $gapicClient->generateAuditScopeReport($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.auditmanager.v1.AuditManager/GenerateAuditScopeReport', $actualFuncCall); + $actualValue = $actualRequestObject->getScope(); + $this->assertProtobufEquals($scope, $actualValue); + $actualValue = $actualRequestObject->getReportFormat(); + $this->assertProtobufEquals($reportFormat, $actualValue); + $actualValue = $actualRequestObject->getComplianceFramework(); + $this->assertProtobufEquals($complianceFramework, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function generateAuditScopeReportExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $scope = 'scope109264468'; + $reportFormat = AuditScopeReportFormat::AUDIT_SCOPE_REPORT_FORMAT_UNSPECIFIED; + $complianceFramework = 'complianceFramework1384085210'; + $request = (new GenerateAuditScopeReportRequest()) + ->setScope($scope) + ->setReportFormat($reportFormat) + ->setComplianceFramework($complianceFramework); + try { + $gapicClient->generateAuditScopeReport($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAuditReportTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $operationId = 'operationId-274116877'; + $complianceStandard = 'complianceStandard1339657825'; + $scope = 'scope109264468'; + $complianceFramework = 'complianceFramework1384085210'; + $scopeId = 'scopeId-487349530'; + $expectedResponse = new AuditReport(); + $expectedResponse->setName($name2); + $expectedResponse->setOperationId($operationId); + $expectedResponse->setComplianceStandard($complianceStandard); + $expectedResponse->setScope($scope); + $expectedResponse->setComplianceFramework($complianceFramework); + $expectedResponse->setScopeId($scopeId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->auditReportName('[PROJECT]', '[LOCATION]', '[AUDIT_REPORT]'); + $request = (new GetAuditReportRequest()) + ->setName($formattedName); + $response = $gapicClient->getAuditReport($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.auditmanager.v1.AuditManager/GetAuditReport', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAuditReportExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->auditReportName('[PROJECT]', '[LOCATION]', '[AUDIT_REPORT]'); + $request = (new GetAuditReportRequest()) + ->setName($formattedName); + try { + $gapicClient->getAuditReport($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getResourceEnrollmentStatusTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $enrolled = false; + $displayName = 'displayName1615086568'; + $expectedResponse = new ResourceEnrollmentStatus(); + $expectedResponse->setName($name2); + $expectedResponse->setEnrolled($enrolled); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->resourceEnrollmentStatusName('[FOLDER]', '[LOCATION]', '[RESOURCE_ENROLLMENT_STATUS]'); + $request = (new GetResourceEnrollmentStatusRequest()) + ->setName($formattedName); + $response = $gapicClient->getResourceEnrollmentStatus($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.auditmanager.v1.AuditManager/GetResourceEnrollmentStatus', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getResourceEnrollmentStatusExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->resourceEnrollmentStatusName('[FOLDER]', '[LOCATION]', '[RESOURCE_ENROLLMENT_STATUS]'); + $request = (new GetResourceEnrollmentStatusRequest()) + ->setName($formattedName); + try { + $gapicClient->getResourceEnrollmentStatus($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAuditReportsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $auditReportsElement = new AuditReport(); + $auditReports = [ + $auditReportsElement, + ]; + $expectedResponse = new ListAuditReportsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAuditReports($auditReports); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->folderLocationName('[FOLDER]', '[LOCATION]'); + $request = (new ListAuditReportsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listAuditReports($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAuditReports()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.auditmanager.v1.AuditManager/ListAuditReports', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAuditReportsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->folderLocationName('[FOLDER]', '[LOCATION]'); + $request = (new ListAuditReportsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listAuditReports($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listControlsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $controlsElement = new Control(); + $controls = [ + $controlsElement, + ]; + $expectedResponse = new ListControlsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setControls($controls); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->standardName('[PROJECT]', '[LOCATION]', '[STANDARD]'); + $request = (new ListControlsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listControls($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getControls()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.auditmanager.v1.AuditManager/ListControls', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listControlsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->standardName('[PROJECT]', '[LOCATION]', '[STANDARD]'); + $request = (new ListControlsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listControls($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listResourceEnrollmentStatusesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $resourceEnrollmentStatusesElement = new ResourceEnrollmentStatus(); + $resourceEnrollmentStatuses = [ + $resourceEnrollmentStatusesElement, + ]; + $expectedResponse = new ListResourceEnrollmentStatusesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setResourceEnrollmentStatuses($resourceEnrollmentStatuses); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->enrollmentStatusScopeName('[FOLDER]', '[LOCATION]'); + $request = (new ListResourceEnrollmentStatusesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listResourceEnrollmentStatuses($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getResourceEnrollmentStatuses()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.auditmanager.v1.AuditManager/ListResourceEnrollmentStatuses', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listResourceEnrollmentStatusesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->enrollmentStatusScopeName('[FOLDER]', '[LOCATION]'); + $request = (new ListResourceEnrollmentStatusesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listResourceEnrollmentStatuses($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function enrollResourceAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new Enrollment(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $scope = 'scope109264468'; + $destinations = []; + $request = (new EnrollResourceRequest()) + ->setScope($scope) + ->setDestinations($destinations); + $response = $gapicClient->enrollResourceAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.auditmanager.v1.AuditManager/EnrollResource', $actualFuncCall); + $actualValue = $actualRequestObject->getScope(); + $this->assertProtobufEquals($scope, $actualValue); + $actualValue = $actualRequestObject->getDestinations(); + $this->assertProtobufEquals($destinations, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} From 39e1357888936cf830c8b0204ca9bed7b97b5563 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Tue, 11 Aug 2026 07:06:24 +0000 Subject: [PATCH 2/4] =?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 --- AuditManager/metadata/V1/Auditmanager.php | 2 +- .../V1/AuditManagerClient/enroll_resource.php | 21 +- .../generate_audit_report.php | 27 +- .../generate_audit_scope_report.php | 39 +- .../AuditManagerClient/get_audit_report.php | 10 +- .../get_resource_enrollment_status.php | 12 +- .../AuditManagerClient/list_audit_reports.php | 12 +- .../V1/AuditManagerClient/list_controls.php | 11 +- .../V1/AuditManagerClient/list_locations.php | 20 +- .../list_resource_enrollment_statuses.php | 12 +- AuditManager/src/V1/AuditReport.php | 145 ++- .../V1/AuditReport/ReportGenerationState.php | 20 +- AuditManager/src/V1/AuditScopeReport.php | 36 +- .../src/V1/Client/AuditManagerClient.php | 87 +- AuditManager/src/V1/ComplianceState.php | 15 +- AuditManager/src/V1/Control.php | 96 +- AuditManager/src/V1/Control/Family.php | 40 +- AuditManager/src/V1/ControlDetails.php | 22 +- AuditManager/src/V1/ControlFamily.php | 30 +- AuditManager/src/V1/DestinationDetails.php | 11 +- AuditManager/src/V1/EnrollResourceRequest.php | 125 +-- .../EligibleDestination.php | 20 +- AuditManager/src/V1/Enrollment.php | 38 +- .../src/V1/GenerateAuditReportRequest.php | 167 ++-- .../AuditReportFormat.php | 6 +- .../V1/GenerateAuditScopeReportRequest.php | 114 ++- .../AuditScopeReportFormat.php | 6 +- AuditManager/src/V1/GetAuditReportRequest.php | 39 +- .../V1/GetResourceEnrollmentStatusRequest.php | 49 +- .../src/V1/ListAuditReportsRequest.php | 72 +- .../src/V1/ListAuditReportsResponse.php | 27 +- AuditManager/src/V1/ListControlsRequest.php | 75 +- AuditManager/src/V1/ListControlsResponse.php | 27 +- .../ListResourceEnrollmentStatusesRequest.php | 73 +- ...ListResourceEnrollmentStatusesResponse.php | 27 +- AuditManager/src/V1/OperationMetadata.php | 98 +- AuditManager/src/V1/OperationState.php | 22 +- .../src/V1/ReportGenerationProgress.php | 136 ++- AuditManager/src/V1/ReportSummary.php | 27 +- .../src/V1/ResourceEnrollmentStatus.php | 70 +- .../ResourceEnrollmentState.php | 10 +- .../audit_manager_descriptor_config.php | 1 + .../audit_manager_rest_client_config.php | 14 + .../Unit/V1/Client/AuditManagerClientTest.php | 12 - .../Cloud/Auditmanager/V1/Auditmanager.php | 30 - .../Cloud/AuditManager/V1/AuditReport.php | 488 ---------- .../V1/AuditReport/ReportGenerationState.php | 79 -- .../AuditManager/V1/AuditScopeReport.php | 125 --- .../Cloud/AuditManager/V1/ComplianceState.php | 83 -- .../Google/Cloud/AuditManager/V1/Control.php | 399 -------- .../Cloud/AuditManager/V1/Control/Family.php | 173 ---- .../Cloud/AuditManager/V1/ControlDetails.php | 159 ---- .../Cloud/AuditManager/V1/ControlFamily.php | 113 --- .../AuditManager/V1/DestinationDetails.php | 78 -- .../AuditManager/V1/EnrollResourceRequest.php | 169 ---- .../EligibleDestination.php | 84 -- .../Cloud/AuditManager/V1/Enrollment.php | 117 --- .../V1/GenerateAuditReportRequest.php | 316 ------ .../AuditReportFormat.php | 54 -- .../V1/GenerateAuditScopeReportRequest.php | 231 ----- .../AuditScopeReportFormat.php | 54 -- .../AuditManager/V1/GetAuditReportRequest.php | 98 -- .../V1/GetResourceEnrollmentStatusRequest.php | 103 -- .../V1/ListAuditReportsRequest.php | 187 ---- .../V1/ListAuditReportsResponse.php | 110 --- .../AuditManager/V1/ListControlsRequest.php | 182 ---- .../AuditManager/V1/ListControlsResponse.php | 110 --- .../ListResourceEnrollmentStatusesRequest.php | 182 ---- ...ListResourceEnrollmentStatusesResponse.php | 110 --- .../AuditManager/V1/OperationMetadata.php | 315 ------ .../Cloud/AuditManager/V1/OperationState.php | 103 -- .../V1/ReportGenerationProgress.php | 299 ------ .../Cloud/AuditManager/V1/ReportSummary.php | 204 ---- .../V1/ResourceEnrollmentStatus.php | 244 ----- .../ResourceEnrollmentState.php | 68 -- .../V1/AuditManagerClient/enroll_resource.php | 82 -- .../generate_audit_report.php | 100 -- .../generate_audit_scope_report.php | 93 -- .../AuditManagerClient/get_audit_report.php | 75 -- .../V1/AuditManagerClient/get_location.php | 57 -- .../get_resource_enrollment_status.php | 80 -- .../AuditManagerClient/list_audit_reports.php | 82 -- .../V1/AuditManagerClient/list_controls.php | 81 -- .../V1/AuditManagerClient/list_locations.php | 77 -- .../list_resource_enrollment_statuses.php | 81 -- .../v1/src/V1/Client/AuditManagerClient.php | 897 ------------------ .../v1/src/V1/gapic_metadata.json | 68 -- .../audit_manager_client_config.json | 94 -- .../audit_manager_descriptor_config.php | 207 ---- .../audit_manager_rest_client_config.php | 298 ------ .../Unit/V1/Client/AuditManagerClientTest.php | 894 ----------------- 91 files changed, 1139 insertions(+), 9117 deletions(-) delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/GPBMetadata/Google/Cloud/Auditmanager/V1/Auditmanager.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/AuditReport.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/AuditReport/ReportGenerationState.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/AuditScopeReport.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ComplianceState.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Control.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Control/Family.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ControlDetails.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ControlFamily.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/DestinationDetails.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/EnrollResourceRequest.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/EnrollResourceRequest/EligibleDestination.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Enrollment.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditReportRequest.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditReportRequest/AuditReportFormat.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditScopeReportRequest.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditScopeReportRequest/AuditScopeReportFormat.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GetAuditReportRequest.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GetResourceEnrollmentStatusRequest.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListAuditReportsRequest.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListAuditReportsResponse.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListControlsRequest.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListControlsResponse.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListResourceEnrollmentStatusesRequest.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListResourceEnrollmentStatusesResponse.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/OperationMetadata.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/OperationState.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ReportGenerationProgress.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ReportSummary.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ResourceEnrollmentStatus.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ResourceEnrollmentStatus/ResourceEnrollmentState.php delete mode 100644 owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/enroll_resource.php delete mode 100644 owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/generate_audit_report.php delete mode 100644 owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/generate_audit_scope_report.php delete mode 100644 owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_audit_report.php delete mode 100644 owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_location.php delete mode 100644 owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_resource_enrollment_status.php delete mode 100644 owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_audit_reports.php delete mode 100644 owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_controls.php delete mode 100644 owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_locations.php delete mode 100644 owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_resource_enrollment_statuses.php delete mode 100644 owl-bot-staging/AuditManager/v1/src/V1/Client/AuditManagerClient.php delete mode 100644 owl-bot-staging/AuditManager/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_client_config.json delete mode 100644 owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_descriptor_config.php delete mode 100644 owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_rest_client_config.php delete mode 100644 owl-bot-staging/AuditManager/v1/tests/Unit/V1/Client/AuditManagerClientTest.php diff --git a/AuditManager/metadata/V1/Auditmanager.php b/AuditManager/metadata/V1/Auditmanager.php index 0d391e894bd4..4a487ea26fcc 100644 --- a/AuditManager/metadata/V1/Auditmanager.php +++ b/AuditManager/metadata/V1/Auditmanager.php @@ -21,7 +21,7 @@ public static function initOnce() { \GPBMetadata\Google\Longrunning\Operations::initOnce(); \GPBMetadata\Google\Protobuf\Timestamp::initOnce(); $pool->internalAddGeneratedFile( - "\x0A\xF4P\x0A/google/cloud/auditmanager/v1/auditmanager.proto\x12\x1Cgoogle.cloud.auditmanager.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A#google/longrunning/operations.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xDE\x01\x0A\x15EnrollResourceRequest\x12\x12\x0A\x05scope\x18\x01 \x01(\x09B\x03\xE0A\x02\x12b\x0A\x0Cdestinations\x18\x02 \x03(\x0B2G.google.cloud.auditmanager.v1.EnrollResourceRequest.EligibleDestinationB\x03\xE0A\x02\x1AM\x0A\x13EligibleDestination\x12\x1D\x0A\x13eligible_gcs_bucket\x18\x03 \x01(\x09H\x00B\x17\x0A\x15eligible_destinations\"\xD4\x02\x0A\x1FGenerateAuditScopeReportRequest\x12\x12\x0A\x05scope\x18\x02 \x01(\x09B\x03\xE0A\x02\x12 \x0A\x13compliance_standard\x18\x03 \x01(\x09B\x03\xE0A\x02\x12p\x0A\x0Dreport_format\x18\x04 \x01(\x0E2T.google.cloud.auditmanager.v1.GenerateAuditScopeReportRequest.AuditScopeReportFormatB\x03\xE0A\x02\x12!\x0A\x14compliance_framework\x18\x05 \x01(\x09B\x03\xE0A\x02\"f\x0A\x16AuditScopeReportFormat\x12)\x0A%AUDIT_SCOPE_REPORT_FORMAT_UNSPECIFIED\x10\x00\x12!\x0A\x1DAUDIT_SCOPE_REPORT_FORMAT_ODF\x10\x01\"\xD6\x02\x0A\x1AGenerateAuditReportRequest\x12\x11\x0A\x07gcs_uri\x18\x02 \x01(\x09H\x00\x12\x12\x0A\x05scope\x18\x01 \x01(\x09B\x03\xE0A\x02\x12 \x0A\x13compliance_standard\x18\x03 \x01(\x09B\x03\xE0A\x02\x12f\x0A\x0Dreport_format\x18\x04 \x01(\x0E2J.google.cloud.auditmanager.v1.GenerateAuditReportRequest.AuditReportFormatB\x03\xE0A\x02\x12!\x0A\x14compliance_framework\x18\x05 \x01(\x09B\x03\xE0A\x02\"U\x0A\x11AuditReportFormat\x12#\x0A\x1FAUDIT_REPORT_FORMAT_UNSPECIFIED\x10\x00\x12\x1B\x0A\x17AUDIT_REPORT_FORMAT_ODF\x10\x01B\x0D\x0A\x0Bdestination\"p\x0A\"GetResourceEnrollmentStatusRequest\x12J\x0A\x04name\x18\x01 \x01(\x09B<\xE0A\x02\xFAA6\x0A4auditmanager.googleapis.com/ResourceEnrollmentStatus\"\xA3\x01\x0A%ListResourceEnrollmentStatusesRequest\x12I\x0A\x06parent\x18\x01 \x01(\x09B9\xE0A\x02\xFAA3\x0A1auditmanager.googleapis.com/EnrollmentStatusScope\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\"\xA4\x01\x0A&ListResourceEnrollmentStatusesResponse\x12\\\x0A\x1Cresource_enrollment_statuses\x18\x01 \x03(\x0B26.google.cloud.auditmanager.v1.ResourceEnrollmentStatus\x12\x1C\x0A\x0Fnext_page_token\x18\x02 \x01(\x09B\x03\xE0A\x03\"\x8B\x01\x0A\x17ListAuditReportsRequest\x12?\x0A\x06parent\x18\x01 \x01(\x09B/\xE0A\x02\xFAA)\x12'auditmanager.googleapis.com/AuditReport\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\"\x7F\x0A\x18ListAuditReportsResponse\x12E\x0A\x0Daudit_reports\x18\x01 \x03(\x0B2).google.cloud.auditmanager.v1.AuditReportB\x03\xE0A\x03\x12\x1C\x0A\x0Fnext_page_token\x18\x02 \x01(\x09B\x03\xE0A\x03\"V\x0A\x15GetAuditReportRequest\x12=\x0A\x04name\x18\x01 \x01(\x09B/\xE0A\x02\xFAA)\x0A'auditmanager.googleapis.com/AuditReport\"\x84\x01\x0A\x13ListControlsRequest\x12<\x0A\x06parent\x18\x01 \x01(\x09B,\xE0A\x02\xFAA&\x0A\$auditmanager.googleapis.com/Standard\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\"r\x0A\x14ListControlsResponse\x12<\x0A\x08controls\x18\x01 \x03(\x0B2%.google.cloud.auditmanager.v1.ControlB\x03\xE0A\x03\x12\x1C\x0A\x0Fnext_page_token\x18\x02 \x01(\x09B\x03\xE0A\x03\"\xE1\x02\x0A\x18ReportGenerationProgress\x12@\x0A\x05state\x18\x01 \x01(\x0E2,.google.cloud.auditmanager.v1.OperationStateB\x03\xE0A\x03\x12\x1B\x0A\x0Efailure_reason\x18\x02 \x01(\x09B\x03\xE0A\x03\x12#\x0A\x1Bevaluation_percent_complete\x18\x14 \x01(\x01\x12*\x0A\"report_generation_percent_complete\x18\x1E \x01(\x01\x12)\x0A!report_uploading_percent_complete\x18( \x01(\x01\x12#\x0A\x16destination_gcs_bucket\x182 \x01(\x09B\x03\xE0A\x03\x12E\x0A\x0Caudit_report\x183 \x01(\x09B/\xE0A\x03\xFAA)\x0A'auditmanager.googleapis.com/AuditReport\"\x89\x03\x0A\x0AEnrollment\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12R\x0A\x13destination_details\x18\x03 \x03(\x0B20.google.cloud.auditmanager.v1.DestinationDetailsB\x03\xE0A\x03:\x93\x02\xEAA\x8F\x02\x0A&auditmanager.googleapis.com/Enrollment\x12@projects/{project}/locations/{location}/enrollments/{enrollment}\x12>folders/{folder}/locations/{location}/enrollments/{enrollment}\x12Jorganizations/{organization}/locations/{location}/enrollments/{enrollment}*\x0Benrollments2\x0Aenrollment\"\xCE\x02\x0A\x10AuditScopeReport\x12\x1F\x0A\x15scope_report_contents\x18\x01 \x01(\x0CH\x00\x12\x11\x0A\x04name\x18\x02 \x01(\x09B\x03\xE0A\x08:\xF5\x01\xEAA\xF1\x01\x0A,auditmanager.googleapis.com/AuditScopeReport\x12Nprojects/{project}/locations/{location}/auditScopeReports/{audit_scope_report}\x12Lfolders/{folder}/locations/{location}/auditScopeReports/{audit_scope_report}*\x11auditScopeReports2\x10auditScopeReportB\x0E\x0A\x0Caudit_report\"\x80\x02\x0A\x11OperationMetadata\x124\x0A\x0Bcreate_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x121\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\x13\x0A\x06target\x18\x03 \x01(\x09B\x03\xE0A\x03\x12\x11\x0A\x04verb\x18\x04 \x01(\x09B\x03\xE0A\x03\x12\x1B\x0A\x0Estatus_message\x18\x05 \x01(\x09B\x03\xE0A\x03\x12#\x0A\x16requested_cancellation\x18\x06 \x01(\x08B\x03\xE0A\x03\x12\x18\x0A\x0Bapi_version\x18\x07 \x01(\x09B\x03\xE0A\x03\"\xA6\x06\x0A\x18ResourceEnrollmentStatus\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12A\x0A\x0Aenrollment\x18\x02 \x01(\x0B2(.google.cloud.auditmanager.v1.EnrollmentB\x03\xE0A\x03\x12\x17\x0A\x08enrolled\x18\x03 \x01(\x08B\x05\x18\x01\xE0A\x03\x12\x19\x0A\x0Cdisplay_name\x18\x04 \x01(\x09B\x03\xE0A\x03\x12m\x0A\x10enrollment_state\x18\x05 \x01(\x0E2N.google.cloud.auditmanager.v1.ResourceEnrollmentStatus.ResourceEnrollmentStateB\x03\xE0A\x03\"s\x0A\x17ResourceEnrollmentState\x12)\x0A%RESOURCE_ENROLLMENT_STATE_UNSPECIFIED\x10\x00\x12\x10\x0A\x0CNOT_ENROLLED\x10\x01\x12\x0D\x0A\x09INHERITED\x10\x02\x12\x0C\x0A\x08ENROLLED\x10\x03:\x9B\x03\xEAA\x97\x03\x0A4auditmanager.googleapis.com/ResourceEnrollmentStatus\x12]folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}\x12_projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}\x12iorganizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}*\x1AresourceEnrollmentStatuses2\x18resourceEnrollmentStatus\"\x89\x07\x0A\x0BAuditReport\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12H\x0A\x0Ereport_summary\x18\x02 \x01(\x0B2+.google.cloud.auditmanager.v1.ReportSummaryB\x03\xE0A\x03\x12\x19\x0A\x0Coperation_id\x18\x03 \x01(\x09B\x03\xE0A\x03\x12R\x0A\x13destination_details\x18\x04 \x01(\x0B20.google.cloud.auditmanager.v1.DestinationDetailsB\x03\xE0A\x03\x12 \x0A\x13compliance_standard\x18\x05 \x01(\x09B\x03\xE0A\x03\x12\x12\x0A\x05scope\x18\x06 \x01(\x09B\x03\xE0A\x03\x124\x0A\x0Bcreate_time\x18\x07 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12J\x0A\x0Fcontrol_details\x18\x08 \x03(\x0B2,.google.cloud.auditmanager.v1.ControlDetailsB\x03\xE0A\x03\x12e\x0A\x17report_generation_state\x18\x09 \x01(\x0E2?.google.cloud.auditmanager.v1.AuditReport.ReportGenerationStateB\x03\xE0A\x03\x12!\x0A\x14compliance_framework\x18\x0A \x01(\x09B\x03\xE0A\x03\x12\x15\x0A\x08scope_id\x18\x0B \x01(\x09B\x03\xE0A\x03\"\x81\x01\x0A\x15ReportGenerationState\x12'\x0A#REPORT_GENERATION_STATE_UNSPECIFIED\x10\x00\x12\x0F\x0A\x0BIN_PROGRESS\x10\x01\x12\x0D\x0A\x09COMPLETED\x10\x02\x12\x0A\x0A\x06FAILED\x10\x03\x12\x13\x0A\x0FSUMMARY_UNKNOWN\x10\x04:\xD0\x01\xEAA\xCC\x01\x0A'auditmanager.googleapis.com/AuditReport\x12Cprojects/{project}/locations/{location}/auditReports/{audit_report}\x12Afolders/{folder}/locations/{location}/auditReports/{audit_report}*\x0CauditReports2\x0BauditReport\"8\x0A\x0DControlFamily\x12\x11\x0A\x09family_id\x18\x01 \x01(\x09\x12\x14\x0A\x0Cdisplay_name\x18\x02 \x01(\x09\"\xFB\x04\x0A\x07Control\x12\x0F\x0A\x02id\x18\x01 \x01(\x09B\x03\xE0A\x03\x12\x19\x0A\x0Cdisplay_name\x18\x02 \x01(\x09B\x03\xE0A\x03\x12A\x0A\x06family\x18\x03 \x01(\x0E2,.google.cloud.auditmanager.v1.Control.FamilyB\x03\xE0A\x03\x12H\x0A\x0Econtrol_family\x18\x0A \x01(\x0B2+.google.cloud.auditmanager.v1.ControlFamilyB\x03\xE0A\x03\x12\x18\x0A\x0Bdescription\x18\x04 \x01(\x09B\x03\xE0A\x03\x12 \x0A\x13responsibility_type\x18\x05 \x01(\x09B\x03\xE0A\x03\x12.\x0A!google_responsibility_description\x18\x06 \x01(\x09B\x03\xE0A\x03\x121\x0A\$google_responsibility_implementation\x18\x07 \x01(\x09B\x03\xE0A\x03\x120\x0A#customer_responsibility_description\x18\x08 \x01(\x09B\x03\xE0A\x03\x123\x0A&customer_responsibility_implementation\x18\x09 \x01(\x09B\x03\xE0A\x03\"\xB0\x01\x0A\x06Family\x12\x16\x0A\x12FAMILY_UNSPECIFIED\x10\x00\x12\x06\x0A\x02AC\x10\x01\x12\x06\x0A\x02AT\x10\x02\x12\x06\x0A\x02AU\x10\x03\x12\x06\x0A\x02CA\x10\x04\x12\x06\x0A\x02CM\x10\x05\x12\x06\x0A\x02CP\x10\x06\x12\x06\x0A\x02IA\x10\x07\x12\x06\x0A\x02IR\x10\x08\x12\x06\x0A\x02MA\x10\x09\x12\x06\x0A\x02MP\x10\x0A\x12\x06\x0A\x02PE\x10\x0B\x12\x06\x0A\x02PL\x10\x0C\x12\x06\x0A\x02PS\x10\x0D\x12\x06\x0A\x02RA\x10\x0E\x12\x06\x0A\x02SA\x10\x0F\x12\x06\x0A\x02SC\x10\x10\x12\x06\x0A\x02SI\x10\x11\x12\x06\x0A\x02SR\x10\x12\"=\x0A\x12DestinationDetails\x12\x18\x0A\x0Egcs_bucket_uri\x18\x01 \x01(\x09H\x00B\x0D\x0A\x0Bdestination\"\x8F\x01\x0A\x0DReportSummary\x12\x13\x0A\x0Btotal_count\x18\x01 \x01(\x05\x12\x17\x0A\x0Fcompliant_count\x18\x02 \x01(\x05\x12\x17\x0A\x0Fviolation_count\x18\x03 \x01(\x05\x12\"\x0A\x1Amanual_review_needed_count\x18\x04 \x01(\x05\x12\x13\x0A\x0Berror_count\x18\x05 \x01(\x05\"\xE3\x01\x0A\x0EControlDetails\x126\x0A\x07control\x18\x01 \x01(\x0B2%.google.cloud.auditmanager.v1.Control\x12L\x0A\x10compliance_state\x18\x02 \x01(\x0E2-.google.cloud.auditmanager.v1.ComplianceStateB\x03\xE0A\x03\x12K\x0A\x16control_report_summary\x18\x03 \x01(\x0B2+.google.cloud.auditmanager.v1.ReportSummary*\xFB\x02\x0A\x0EOperationState\x12\x1F\x0A\x1BOPERATION_STATE_UNSPECIFIED\x10\x00\x12\x1F\x0A\x1BOPERATION_STATE_NOT_STARTED\x10\x0A\x12*\x0A&OPERATION_STATE_EVALUATION_IN_PROGRESS\x10\x14\x12#\x0A\x1FOPERATION_STATE_EVALUATION_DONE\x10\x15\x12:\x0A6OPERATION_STATE_EVIDENCE_REPORT_GENERATION_IN_PROGRESS\x10\x1E\x123\x0A/OPERATION_STATE_EVIDENCE_REPORT_GENERATION_DONE\x10\x1F\x12/\x0A+OPERATION_STATE_EVIDENCE_UPLOAD_IN_PROGRESS\x10(\x12\x18\x0A\x14OPERATION_STATE_DONE\x102\x12\x1A\x0A\x16OPERATION_STATE_FAILED\x10<*\x8F\x01\x0A\x0FComplianceState\x12 \x0A\x1CCOMPLIANCE_STATE_UNSPECIFIED\x10\x00\x12\x0D\x0A\x09COMPLIANT\x10\x01\x12\x0D\x0A\x09VIOLATION\x10\x02\x12\x18\x0A\x14MANUAL_REVIEW_NEEDED\x10\x03\x12\x09\x0A\x05ERROR\x10\x04\x12\x17\x0A\x13AUDIT_NOT_SUPPORTED\x10\x052\xC0\x14\x0A\x0CAuditManager\x12\xB8\x02\x0A\x0EEnrollResource\x123.google.cloud.auditmanager.v1.EnrollResourceRequest\x1A(.google.cloud.auditmanager.v1.Enrollment\"\xC6\x01\xDAA\x12scope,destinations\x82\xD3\xE4\x93\x02\xAA\x01\"0/v1/{scope=folders/*/locations/*}:enrollResource:\x01*Z6\"1/v1/{scope=projects/*/locations/*}:enrollResource:\x01*Z;\"6/v1/{scope=organizations/*/locations/*}:enrollResource:\x01*\x12\xC2\x02\x0A\x18GenerateAuditScopeReport\x12=.google.cloud.auditmanager.v1.GenerateAuditScopeReportRequest\x1A..google.cloud.auditmanager.v1.AuditScopeReport\"\xB6\x01\xDAA'scope,compliance_standard,report_format\x82\xD3\xE4\x93\x02\x85\x01\"/v1/{name=projects/*/locations/*/resourceEnrollmentStatuses/*}Z?\x12=/v1/{name=folders/*/locations/*/resourceEnrollmentStatuses/*}ZE\x12C/v1/{name=organizations/*/locations/*/resourceEnrollmentStatuses/*}\x12\xC4\x02\x0A\x1EListResourceEnrollmentStatuses\x12C.google.cloud.auditmanager.v1.ListResourceEnrollmentStatusesRequest\x1AD.google.cloud.auditmanager.v1.ListResourceEnrollmentStatusesResponse\"\x96\x01\xDAA\x06parent\x82\xD3\xE4\x93\x02\x86\x01\x12C/v1/{parent=organizations/*/locations/*}/resourceEnrollmentStatusesZ?\x12=/v1/{parent=folders/*/locations/*}/resourceEnrollmentStatuses\x12\xBE\x02\x0A\x0CListControls\x121.google.cloud.auditmanager.v1.ListControlsRequest\x1A2.google.cloud.auditmanager.v1.ListControlsResponse\"\xC6\x01\xDAA\x06parent\x82\xD3\xE4\x93\x02\xB6\x01\x12=/v1/{parent=organizations/*/locations/*/standards/*}/controlsZ9\x127/v1/{parent=folders/*/locations/*/standards/*}/controlsZ:\x128/v1/{parent=projects/*/locations/*/standards/*}/controls\x1AO\xCAA\x1Bauditmanager.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\x92\x06\x0A com.google.cloud.auditmanager.v1B\x0BV1mainProtoP\x01ZDcloud.google.com/go/auditmanager/apiv1/auditmanagerpb;auditmanagerpb\xAA\x02\x1CGoogle.Cloud.AuditManager.V1\xCA\x02\x1CGoogle\\Cloud\\AuditManager\\V1\xEA\x02\x1FGoogle::Cloud::AuditManager::V1\xEAAS\x0A*auditmanager.googleapis.com/FolderLocation\x12%folders/{folder}/locations/{location}\xEAAe\x0A0auditmanager.googleapis.com/OrganizationLocation\x121organizations/{organization}/locations/{location}\xEAA\xE8\x01\x0A\$auditmanager.googleapis.com/Standard\x12folders/{folder}/locations/{location}/enrollments/{enrollment}\x12Jorganizations/{organization}/locations/{location}/enrollments/{enrollment}*\x0Benrollments2\x0Aenrollment\"\xA8\x03\x0A\x10AuditScopeReport\x12\x1F\x0A\x15scope_report_contents\x18\x01 \x01(\x0CH\x00\x12\x11\x0A\x04name\x18\x02 \x01(\x09B\x03\xE0A\x08:\xCF\x02\xEAA\xCB\x02\x0A,auditmanager.googleapis.com/AuditScopeReport\x12Nprojects/{project}/locations/{location}/auditScopeReports/{audit_scope_report}\x12Lfolders/{folder}/locations/{location}/auditScopeReports/{audit_scope_report}\x12Xorganizations/{organization}/locations/{location}/auditScopeReports/{audit_scope_report}*\x11auditScopeReports2\x10auditScopeReportB\x0E\x0A\x0Caudit_report\"\x80\x02\x0A\x11OperationMetadata\x124\x0A\x0Bcreate_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x121\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\x13\x0A\x06target\x18\x03 \x01(\x09B\x03\xE0A\x03\x12\x11\x0A\x04verb\x18\x04 \x01(\x09B\x03\xE0A\x03\x12\x1B\x0A\x0Estatus_message\x18\x05 \x01(\x09B\x03\xE0A\x03\x12#\x0A\x16requested_cancellation\x18\x06 \x01(\x08B\x03\xE0A\x03\x12\x18\x0A\x0Bapi_version\x18\x07 \x01(\x09B\x03\xE0A\x03\"\xA6\x06\x0A\x18ResourceEnrollmentStatus\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12A\x0A\x0Aenrollment\x18\x02 \x01(\x0B2(.google.cloud.auditmanager.v1.EnrollmentB\x03\xE0A\x03\x12\x17\x0A\x08enrolled\x18\x03 \x01(\x08B\x05\x18\x01\xE0A\x03\x12\x19\x0A\x0Cdisplay_name\x18\x04 \x01(\x09B\x03\xE0A\x03\x12m\x0A\x10enrollment_state\x18\x05 \x01(\x0E2N.google.cloud.auditmanager.v1.ResourceEnrollmentStatus.ResourceEnrollmentStateB\x03\xE0A\x03\"s\x0A\x17ResourceEnrollmentState\x12)\x0A%RESOURCE_ENROLLMENT_STATE_UNSPECIFIED\x10\x00\x12\x10\x0A\x0CNOT_ENROLLED\x10\x01\x12\x0D\x0A\x09INHERITED\x10\x02\x12\x0C\x0A\x08ENROLLED\x10\x03:\x9B\x03\xEAA\x97\x03\x0A4auditmanager.googleapis.com/ResourceEnrollmentStatus\x12]folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}\x12_projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}\x12iorganizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}*\x1AresourceEnrollmentStatuses2\x18resourceEnrollmentStatus\"\xDA\x07\x0A\x0BAuditReport\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12H\x0A\x0Ereport_summary\x18\x02 \x01(\x0B2+.google.cloud.auditmanager.v1.ReportSummaryB\x03\xE0A\x03\x12\x19\x0A\x0Coperation_id\x18\x03 \x01(\x09B\x03\xE0A\x03\x12R\x0A\x13destination_details\x18\x04 \x01(\x0B20.google.cloud.auditmanager.v1.DestinationDetailsB\x03\xE0A\x03\x12\"\x0A\x13compliance_standard\x18\x05 \x01(\x09B\x05\x18\x01\xE0A\x03\x12\x12\x0A\x05scope\x18\x06 \x01(\x09B\x03\xE0A\x03\x124\x0A\x0Bcreate_time\x18\x07 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12J\x0A\x0Fcontrol_details\x18\x08 \x03(\x0B2,.google.cloud.auditmanager.v1.ControlDetailsB\x03\xE0A\x03\x12e\x0A\x17report_generation_state\x18\x09 \x01(\x0E2?.google.cloud.auditmanager.v1.AuditReport.ReportGenerationStateB\x03\xE0A\x03\x12!\x0A\x14compliance_framework\x18\x0A \x01(\x09B\x03\xE0A\x03\x12\x15\x0A\x08scope_id\x18\x0B \x01(\x09B\x03\xE0A\x03\"\x81\x01\x0A\x15ReportGenerationState\x12'\x0A#REPORT_GENERATION_STATE_UNSPECIFIED\x10\x00\x12\x0F\x0A\x0BIN_PROGRESS\x10\x01\x12\x0D\x0A\x09COMPLETED\x10\x02\x12\x0A\x0A\x06FAILED\x10\x03\x12\x13\x0A\x0FSUMMARY_UNKNOWN\x10\x04:\x9F\x02\xEAA\x9B\x02\x0A'auditmanager.googleapis.com/AuditReport\x12Cprojects/{project}/locations/{location}/auditReports/{audit_report}\x12Afolders/{folder}/locations/{location}/auditReports/{audit_report}\x12Morganizations/{organization}/locations/{location}/auditReports/{audit_report}*\x0CauditReports2\x0BauditReport\"8\x0A\x0DControlFamily\x12\x11\x0A\x09family_id\x18\x01 \x01(\x09\x12\x14\x0A\x0Cdisplay_name\x18\x02 \x01(\x09\"\xFB\x04\x0A\x07Control\x12\x0F\x0A\x02id\x18\x01 \x01(\x09B\x03\xE0A\x03\x12\x19\x0A\x0Cdisplay_name\x18\x02 \x01(\x09B\x03\xE0A\x03\x12A\x0A\x06family\x18\x03 \x01(\x0E2,.google.cloud.auditmanager.v1.Control.FamilyB\x03\xE0A\x03\x12H\x0A\x0Econtrol_family\x18\x0A \x01(\x0B2+.google.cloud.auditmanager.v1.ControlFamilyB\x03\xE0A\x03\x12\x18\x0A\x0Bdescription\x18\x04 \x01(\x09B\x03\xE0A\x03\x12 \x0A\x13responsibility_type\x18\x05 \x01(\x09B\x03\xE0A\x03\x12.\x0A!google_responsibility_description\x18\x06 \x01(\x09B\x03\xE0A\x03\x121\x0A\$google_responsibility_implementation\x18\x07 \x01(\x09B\x03\xE0A\x03\x120\x0A#customer_responsibility_description\x18\x08 \x01(\x09B\x03\xE0A\x03\x123\x0A&customer_responsibility_implementation\x18\x09 \x01(\x09B\x03\xE0A\x03\"\xB0\x01\x0A\x06Family\x12\x16\x0A\x12FAMILY_UNSPECIFIED\x10\x00\x12\x06\x0A\x02AC\x10\x01\x12\x06\x0A\x02AT\x10\x02\x12\x06\x0A\x02AU\x10\x03\x12\x06\x0A\x02CA\x10\x04\x12\x06\x0A\x02CM\x10\x05\x12\x06\x0A\x02CP\x10\x06\x12\x06\x0A\x02IA\x10\x07\x12\x06\x0A\x02IR\x10\x08\x12\x06\x0A\x02MA\x10\x09\x12\x06\x0A\x02MP\x10\x0A\x12\x06\x0A\x02PE\x10\x0B\x12\x06\x0A\x02PL\x10\x0C\x12\x06\x0A\x02PS\x10\x0D\x12\x06\x0A\x02RA\x10\x0E\x12\x06\x0A\x02SA\x10\x0F\x12\x06\x0A\x02SC\x10\x10\x12\x06\x0A\x02SI\x10\x11\x12\x06\x0A\x02SR\x10\x12\"=\x0A\x12DestinationDetails\x12\x18\x0A\x0Egcs_bucket_uri\x18\x01 \x01(\x09H\x00B\x0D\x0A\x0Bdestination\"\x8F\x01\x0A\x0DReportSummary\x12\x13\x0A\x0Btotal_count\x18\x01 \x01(\x05\x12\x17\x0A\x0Fcompliant_count\x18\x02 \x01(\x05\x12\x17\x0A\x0Fviolation_count\x18\x03 \x01(\x05\x12\"\x0A\x1Amanual_review_needed_count\x18\x04 \x01(\x05\x12\x13\x0A\x0Berror_count\x18\x05 \x01(\x05\"\xE3\x01\x0A\x0EControlDetails\x126\x0A\x07control\x18\x01 \x01(\x0B2%.google.cloud.auditmanager.v1.Control\x12L\x0A\x10compliance_state\x18\x02 \x01(\x0E2-.google.cloud.auditmanager.v1.ComplianceStateB\x03\xE0A\x03\x12K\x0A\x16control_report_summary\x18\x03 \x01(\x0B2+.google.cloud.auditmanager.v1.ReportSummary*\xFB\x02\x0A\x0EOperationState\x12\x1F\x0A\x1BOPERATION_STATE_UNSPECIFIED\x10\x00\x12\x1F\x0A\x1BOPERATION_STATE_NOT_STARTED\x10\x0A\x12*\x0A&OPERATION_STATE_EVALUATION_IN_PROGRESS\x10\x14\x12#\x0A\x1FOPERATION_STATE_EVALUATION_DONE\x10\x15\x12:\x0A6OPERATION_STATE_EVIDENCE_REPORT_GENERATION_IN_PROGRESS\x10\x1E\x123\x0A/OPERATION_STATE_EVIDENCE_REPORT_GENERATION_DONE\x10\x1F\x12/\x0A+OPERATION_STATE_EVIDENCE_UPLOAD_IN_PROGRESS\x10(\x12\x18\x0A\x14OPERATION_STATE_DONE\x102\x12\x1A\x0A\x16OPERATION_STATE_FAILED\x10<*\x8F\x01\x0A\x0FComplianceState\x12 \x0A\x1CCOMPLIANCE_STATE_UNSPECIFIED\x10\x00\x12\x0D\x0A\x09COMPLIANT\x10\x01\x12\x0D\x0A\x09VIOLATION\x10\x02\x12\x18\x0A\x14MANUAL_REVIEW_NEEDED\x10\x03\x12\x09\x0A\x05ERROR\x10\x04\x12\x17\x0A\x13AUDIT_NOT_SUPPORTED\x10\x052\xBD\x16\x0A\x0CAuditManager\x12\xB8\x02\x0A\x0EEnrollResource\x123.google.cloud.auditmanager.v1.EnrollResourceRequest\x1A(.google.cloud.auditmanager.v1.Enrollment\"\xC6\x01\xDAA\x12scope,destinations\x82\xD3\xE4\x93\x02\xAA\x01\"0/v1/{scope=folders/*/locations/*}:enrollResource:\x01*Z6\"1/v1/{scope=projects/*/locations/*}:enrollResource:\x01*Z;\"6/v1/{scope=organizations/*/locations/*}:enrollResource:\x01*\x12\x8B\x03\x0A\x18GenerateAuditScopeReport\x12=.google.cloud.auditmanager.v1.GenerateAuditScopeReportRequest\x1A..google.cloud.auditmanager.v1.AuditScopeReport\"\xFF\x01\xDAA'scope,compliance_standard,report_format\x82\xD3\xE4\x93\x02\xCE\x01\"/v1/{name=projects/*/locations/*/resourceEnrollmentStatuses/*}Z?\x12=/v1/{name=folders/*/locations/*/resourceEnrollmentStatuses/*}ZE\x12C/v1/{name=organizations/*/locations/*/resourceEnrollmentStatuses/*}\x12\xC4\x02\x0A\x1EListResourceEnrollmentStatuses\x12C.google.cloud.auditmanager.v1.ListResourceEnrollmentStatusesRequest\x1AD.google.cloud.auditmanager.v1.ListResourceEnrollmentStatusesResponse\"\x96\x01\xDAA\x06parent\x82\xD3\xE4\x93\x02\x86\x01\x12C/v1/{parent=organizations/*/locations/*}/resourceEnrollmentStatusesZ?\x12=/v1/{parent=folders/*/locations/*}/resourceEnrollmentStatuses\x12\xBE\x02\x0A\x0CListControls\x121.google.cloud.auditmanager.v1.ListControlsRequest\x1A2.google.cloud.auditmanager.v1.ListControlsResponse\"\xC6\x01\xDAA\x06parent\x82\xD3\xE4\x93\x02\xB6\x01\x12=/v1/{parent=organizations/*/locations/*/standards/*}/controlsZ9\x127/v1/{parent=folders/*/locations/*/standards/*}/controlsZ:\x128/v1/{parent=projects/*/locations/*/standards/*}/controls\x1A\x82\x01\xCAA\x1Bauditmanager.googleapis.com\xD2Aahttps://www.googleapis.com/auth/cloud-auditmanager,https://www.googleapis.com/auth/cloud-platformB\x92\x06\x0A com.google.cloud.auditmanager.v1B\x0BV1mainProtoP\x01ZDcloud.google.com/go/auditmanager/apiv1/auditmanagerpb;auditmanagerpb\xAA\x02\x1CGoogle.Cloud.AuditManager.V1\xCA\x02\x1CGoogle\\Cloud\\AuditManager\\V1\xEA\x02\x1FGoogle::Cloud::AuditManager::V1\xEAAS\x0A*auditmanager.googleapis.com/FolderLocation\x12%folders/{folder}/locations/{location}\xEAAe\x0A0auditmanager.googleapis.com/OrganizationLocation\x121organizations/{organization}/locations/{location}\xEAA\xE8\x01\x0A\$auditmanager.googleapis.com/Standard\x12setScope($scope) - ->setComplianceStandard($complianceStandard) ->setReportFormat($reportFormat) ->setComplianceFramework($complianceFramework); @@ -92,10 +92,9 @@ function generate_audit_report_sample( function callSample(): void { $scope = '[SCOPE]'; - $complianceStandard = '[COMPLIANCE_STANDARD]'; $reportFormat = AuditReportFormat::AUDIT_REPORT_FORMAT_UNSPECIFIED; $complianceFramework = '[COMPLIANCE_FRAMEWORK]'; - generate_audit_report_sample($scope, $complianceStandard, $reportFormat, $complianceFramework); + generate_audit_report_sample($scope, $reportFormat, $complianceFramework); } // [END auditmanager_v1_generated_AuditManager_GenerateAuditReport_sync] diff --git a/AuditManager/samples/V1/AuditManagerClient/generate_audit_scope_report.php b/AuditManager/samples/V1/AuditManagerClient/generate_audit_scope_report.php index 07796a5927be..9b58aa25f9b7 100644 --- a/AuditManager/samples/V1/AuditManagerClient/generate_audit_scope_report.php +++ b/AuditManager/samples/V1/AuditManagerClient/generate_audit_scope_report.php @@ -30,23 +30,27 @@ use Google\Cloud\AuditManager\V1\GenerateAuditScopeReportRequest\AuditScopeReportFormat; /** - * Generates a demo report highlighting different responsibilities - * (Google/Customer/ shared) required to be fulfilled for the customer's - * workload to be compliant with the given standard. + * Generates an audit scope report for the given standard. * - * @param string $scope Scope for which the AuditScopeReport is required. Must be of - * format resource_type/resource_identifier Eg: - * projects/{project}/locations/{location}, - * folders/{folder}/locations/{location} - * @param string $complianceStandard Compliance Standard against which the Scope Report must be - * generated. Eg: FEDRAMP_MODERATE - * @param int $reportFormat The format in which the Scope report bytes should be returned. - * @param string $complianceFramework Compliance framework against which the Scope Report must be - * generated. + * The report includes the following: + * + * * The technical attributes and constraints that Audit Manager uses to + * verify your compliance with a framework. + * * A list of Google Cloud services and resources that are within the + * scope of the framework. + * + * @param string $scope Project or folder that the audit scope report is generated for, + * in one of the following formats: + * + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` + * @param int $reportFormat Format for the audit scope report. + * @param string $complianceFramework Framework (set of controls) that the audit scope report is + * generated against. For example, `NIST_800_53`. */ function generate_audit_scope_report_sample( string $scope, - string $complianceStandard, int $reportFormat, string $complianceFramework ): void { @@ -56,7 +60,6 @@ function generate_audit_scope_report_sample( // Prepare the request message. $request = (new GenerateAuditScopeReportRequest()) ->setScope($scope) - ->setComplianceStandard($complianceStandard) ->setReportFormat($reportFormat) ->setComplianceFramework($complianceFramework); @@ -82,15 +85,9 @@ function generate_audit_scope_report_sample( function callSample(): void { $scope = '[SCOPE]'; - $complianceStandard = '[COMPLIANCE_STANDARD]'; $reportFormat = AuditScopeReportFormat::AUDIT_SCOPE_REPORT_FORMAT_UNSPECIFIED; $complianceFramework = '[COMPLIANCE_FRAMEWORK]'; - generate_audit_scope_report_sample( - $scope, - $complianceStandard, - $reportFormat, - $complianceFramework - ); + generate_audit_scope_report_sample($scope, $reportFormat, $complianceFramework); } // [END auditmanager_v1_generated_AuditManager_GenerateAuditScopeReport_sync] diff --git a/AuditManager/samples/V1/AuditManagerClient/get_audit_report.php b/AuditManager/samples/V1/AuditManagerClient/get_audit_report.php index fe898f54cd38..a61f67c74e98 100644 --- a/AuditManager/samples/V1/AuditManagerClient/get_audit_report.php +++ b/AuditManager/samples/V1/AuditManagerClient/get_audit_report.php @@ -29,11 +29,13 @@ use Google\Cloud\AuditManager\V1\GetAuditReportRequest; /** - * Get the overall audit report + * Gets the full metadata and findings for an audit report. * - * @param string $formattedName Format - * projects/{project}/locations/{location}/auditReports/{audit_report}, - * folders/{folder}/locations/{location}/auditReports/{audit_report} + * @param string $formattedName Name of the audit report, in one of the following formats: + * + * * `projects/{project}/locations/{location}/auditReports/{audit_report}` + * * `folders/{folder}/locations/{location}/auditReports/{audit_report}` + * * `organizations/{organization}/locations/{location}/auditReports/{audit_report}` * Please see {@see AuditManagerClient::auditReportName()} for help formatting this field. */ function get_audit_report_sample(string $formattedName): void diff --git a/AuditManager/samples/V1/AuditManagerClient/get_resource_enrollment_status.php b/AuditManager/samples/V1/AuditManagerClient/get_resource_enrollment_status.php index 5847394ae22a..e3a24459cc3e 100644 --- a/AuditManager/samples/V1/AuditManagerClient/get_resource_enrollment_status.php +++ b/AuditManager/samples/V1/AuditManagerClient/get_resource_enrollment_status.php @@ -29,12 +29,14 @@ use Google\Cloud\AuditManager\V1\ResourceEnrollmentStatus; /** - * Get a resource along with its enrollment status. + * Gets a resource and its enrollment status. * - * @param string $formattedName Format - * folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}, - * projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}, - * organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status} + * @param string $formattedName Name of the resource enrollment status, in one of the following + * formats: + * + * * `folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * * `projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * * `organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` * Please see {@see AuditManagerClient::resourceEnrollmentStatusName()} for help formatting this field. */ function get_resource_enrollment_status_sample(string $formattedName): void diff --git a/AuditManager/samples/V1/AuditManagerClient/list_audit_reports.php b/AuditManager/samples/V1/AuditManagerClient/list_audit_reports.php index 5237cc95bf1d..608134c484ab 100644 --- a/AuditManager/samples/V1/AuditManagerClient/list_audit_reports.php +++ b/AuditManager/samples/V1/AuditManagerClient/list_audit_reports.php @@ -30,10 +30,16 @@ use Google\Cloud\AuditManager\V1\ListAuditReportsRequest; /** - * Lists audit reports in the selected parent scope + * Lists the audit reports for the organization, folder, or project that you + * specify as the parent scope. * - * @param string $formattedParent The parent scope for which to list the reports. Please see - * {@see AuditManagerClient::folderLocationName()} for help formatting this field. + * @param string $formattedParent Parent organization, folder, or project to list reports for, + * in one of the following formats: + * + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` + * Please see {@see AuditManagerClient::folderLocationName()} for help formatting this field. */ function list_audit_reports_sample(string $formattedParent): void { diff --git a/AuditManager/samples/V1/AuditManagerClient/list_controls.php b/AuditManager/samples/V1/AuditManagerClient/list_controls.php index 23dad617a496..29e6f80c0fa5 100644 --- a/AuditManager/samples/V1/AuditManagerClient/list_controls.php +++ b/AuditManager/samples/V1/AuditManagerClient/list_controls.php @@ -30,11 +30,14 @@ use Google\Cloud\AuditManager\V1\ListControlsRequest; /** - * Gets controls needed to be implemented to be compliant to a standard. + * Lists the controls that you must implement to become compliant to a + * regulatory standard. * - * @param string $formattedParent Format - * projects/{project}/locations/{location}/standards/{standard}, - * folders/{folder}/locations/{location}/standards/{standard} + * @param string $formattedParent Standard to list controls for, in one of the following formats: + * + * * `projects/{project}/locations/{location}/standards/{standard}` + * * `folders/{folder}/locations/{location}/standards/{standard}` + * * `organizations/{organization}/locations/{location}/standards/{standard}` * Please see {@see AuditManagerClient::standardName()} for help formatting this field. */ function list_controls_sample(string $formattedParent): void diff --git a/AuditManager/samples/V1/AuditManagerClient/list_locations.php b/AuditManager/samples/V1/AuditManagerClient/list_locations.php index 87fb2dc7e1fd..e556a3584ba8 100644 --- a/AuditManager/samples/V1/AuditManagerClient/list_locations.php +++ b/AuditManager/samples/V1/AuditManagerClient/list_locations.php @@ -31,13 +31,21 @@ /** * Lists information about the supported locations for this service. - * This method can be called in two ways: * - * * **List all public locations:** Use the path `GET /v1/locations`. - * * **List project-visible locations:** Use the path - * `GET /v1/projects/{project_id}/locations`. This may include public - * locations as well as private or other locations specifically visible - * to the project. + * This method lists locations based on the resource scope provided in + * the [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field: * + * **Global locations**: If `name` is empty, the method lists the + * public locations available to all projects. * **Project-specific + * locations**: If `name` follows the format + * `projects/{project}`, the method lists locations visible to that + * specific project. This includes public, private, or other + * project-specific locations enabled for the project. + * + * For gRPC and client library implementations, the resource name is + * passed as the `name` field. For direct service calls, the resource + * name is + * incorporated into the request path based on the specific service + * implementation and version. * * This sample has been automatically generated and should be regarded as a code * template only. It will require modifications to work: diff --git a/AuditManager/samples/V1/AuditManagerClient/list_resource_enrollment_statuses.php b/AuditManager/samples/V1/AuditManagerClient/list_resource_enrollment_statuses.php index 2e9fe28a0ab6..64c6cf526f20 100644 --- a/AuditManager/samples/V1/AuditManagerClient/list_resource_enrollment_statuses.php +++ b/AuditManager/samples/V1/AuditManagerClient/list_resource_enrollment_statuses.php @@ -30,11 +30,15 @@ use Google\Cloud\AuditManager\V1\ResourceEnrollmentStatus; /** - * Fetches all resources under the parent along with their enrollment. + * Lists all the folders and projects in an organization or folder, along with + * their enrollments. * - * @param string $formattedParent The parent scope for which the list of resources with enrollments - * are required. Please see - * {@see AuditManagerClient::enrollmentStatusScopeName()} for help formatting this field. + * @param string $formattedParent Parent organization or folder to list enrollment statuses for, + * in one of the following formats: + * + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` + * Please see {@see AuditManagerClient::enrollmentStatusScopeName()} for help formatting this field. */ function list_resource_enrollment_statuses_sample(string $formattedParent): void { diff --git a/AuditManager/src/V1/AuditReport.php b/AuditManager/src/V1/AuditReport.php index 5787f6ec35bd..6357b88b3ffa 100644 --- a/AuditManager/src/V1/AuditReport.php +++ b/AuditManager/src/V1/AuditReport.php @@ -16,38 +16,47 @@ class AuditReport extends \Google\Protobuf\Internal\Message { /** - * Identifier. The name of this Audit Report, in the format of scope given in - * request. + * Identifier. Name of the audit report, in one of the following formats: + * * `projects/{project}/locations/{location}/auditReports/{audit_report}` + * * `folders/{folder}/locations/{location}/auditReports/{audit_report}` + * * `organizations/{organization}/locations/{location}/auditReports/{audit_report}` * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; */ protected $name = ''; /** - * Output only. Report summary with compliance, violation counts etc. + * Output only. Report summary that includes information about compliance and + * violation counts. * * Generated from protobuf field .google.cloud.auditmanager.v1.ReportSummary report_summary = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ protected $report_summary = null; /** - * Output only. ClientOperationId + * Output only. Client operation ID for the audit report. * * Generated from protobuf field string operation_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ protected $operation_id = ''; /** - * Output only. The location where the generated report will be uploaded. + * Output only. Cloud Storage bucket where the audit report is uploaded to. * * Generated from protobuf field .google.cloud.auditmanager.v1.DestinationDetails destination_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ protected $destination_details = null; /** - * Output only. Compliance Standard. + * Output only. Deprecated. Compliance standard to be audited against. + * Use the `compliance_framework` field instead. * - * Generated from protobuf field string compliance_standard = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * Generated from protobuf field string compliance_standard = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @deprecated */ protected $compliance_standard = ''; /** - * Output only. The parent scope on which the report was generated. + * Output only. Organization, folder, or project that the report is generated + * for, in one of the following formats: + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` * * Generated from protobuf field string scope = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ @@ -59,26 +68,27 @@ class AuditReport extends \Google\Protobuf\Internal\Message */ protected $create_time = null; /** - * Output only. The overall status of controls + * Output only. Overall status of the controls. * * Generated from protobuf field repeated .google.cloud.auditmanager.v1.ControlDetails control_details = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ private $control_details; /** - * Output only. The state of Audit Report Generation. + * Output only. State of audit report generation. * * Generated from protobuf field .google.cloud.auditmanager.v1.AuditReport.ReportGenerationState report_generation_state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ protected $report_generation_state = 0; /** - * Output only. Compliance Framework of Audit Report + * Output only. Compliance framework to use for the audit report. For example, + * `CIS_GCP_FOUNDATIONS_V1_2_0`. * * Generated from protobuf field string compliance_framework = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ protected $compliance_framework = ''; /** - * Output only. The ID/ Number for the scope on which the audit report was - * generated. + * Output only. Project number, folder ID, or organization ID that the audit + * report was generated for. * * Generated from protobuf field string scope_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ @@ -91,29 +101,38 @@ class AuditReport extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $name - * Identifier. The name of this Audit Report, in the format of scope given in - * request. + * Identifier. Name of the audit report, in one of the following formats: + * * `projects/{project}/locations/{location}/auditReports/{audit_report}` + * * `folders/{folder}/locations/{location}/auditReports/{audit_report}` + * * `organizations/{organization}/locations/{location}/auditReports/{audit_report}` * @type \Google\Cloud\AuditManager\V1\ReportSummary $report_summary - * Output only. Report summary with compliance, violation counts etc. + * Output only. Report summary that includes information about compliance and + * violation counts. * @type string $operation_id - * Output only. ClientOperationId + * Output only. Client operation ID for the audit report. * @type \Google\Cloud\AuditManager\V1\DestinationDetails $destination_details - * Output only. The location where the generated report will be uploaded. + * Output only. Cloud Storage bucket where the audit report is uploaded to. * @type string $compliance_standard - * Output only. Compliance Standard. + * Output only. Deprecated. Compliance standard to be audited against. + * Use the `compliance_framework` field instead. * @type string $scope - * Output only. The parent scope on which the report was generated. + * Output only. Organization, folder, or project that the report is generated + * for, in one of the following formats: + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` * @type \Google\Protobuf\Timestamp $create_time * Output only. Creation time of the audit report. * @type \Google\Cloud\AuditManager\V1\ControlDetails[] $control_details - * Output only. The overall status of controls + * Output only. Overall status of the controls. * @type int $report_generation_state - * Output only. The state of Audit Report Generation. + * Output only. State of audit report generation. * @type string $compliance_framework - * Output only. Compliance Framework of Audit Report + * Output only. Compliance framework to use for the audit report. For example, + * `CIS_GCP_FOUNDATIONS_V1_2_0`. * @type string $scope_id - * Output only. The ID/ Number for the scope on which the audit report was - * generated. + * Output only. Project number, folder ID, or organization ID that the audit + * report was generated for. * } */ public function __construct($data = NULL) { @@ -122,8 +141,10 @@ public function __construct($data = NULL) { } /** - * Identifier. The name of this Audit Report, in the format of scope given in - * request. + * Identifier. Name of the audit report, in one of the following formats: + * * `projects/{project}/locations/{location}/auditReports/{audit_report}` + * * `folders/{folder}/locations/{location}/auditReports/{audit_report}` + * * `organizations/{organization}/locations/{location}/auditReports/{audit_report}` * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * @return string @@ -134,8 +155,10 @@ public function getName() } /** - * Identifier. The name of this Audit Report, in the format of scope given in - * request. + * Identifier. Name of the audit report, in one of the following formats: + * * `projects/{project}/locations/{location}/auditReports/{audit_report}` + * * `folders/{folder}/locations/{location}/auditReports/{audit_report}` + * * `organizations/{organization}/locations/{location}/auditReports/{audit_report}` * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * @param string $var @@ -150,7 +173,8 @@ public function setName($var) } /** - * Output only. Report summary with compliance, violation counts etc. + * Output only. Report summary that includes information about compliance and + * violation counts. * * Generated from protobuf field .google.cloud.auditmanager.v1.ReportSummary report_summary = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return \Google\Cloud\AuditManager\V1\ReportSummary|null @@ -171,7 +195,8 @@ public function clearReportSummary() } /** - * Output only. Report summary with compliance, violation counts etc. + * Output only. Report summary that includes information about compliance and + * violation counts. * * Generated from protobuf field .google.cloud.auditmanager.v1.ReportSummary report_summary = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param \Google\Cloud\AuditManager\V1\ReportSummary $var @@ -186,7 +211,7 @@ public function setReportSummary($var) } /** - * Output only. ClientOperationId + * Output only. Client operation ID for the audit report. * * Generated from protobuf field string operation_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return string @@ -197,7 +222,7 @@ public function getOperationId() } /** - * Output only. ClientOperationId + * Output only. Client operation ID for the audit report. * * Generated from protobuf field string operation_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param string $var @@ -212,7 +237,7 @@ public function setOperationId($var) } /** - * Output only. The location where the generated report will be uploaded. + * Output only. Cloud Storage bucket where the audit report is uploaded to. * * Generated from protobuf field .google.cloud.auditmanager.v1.DestinationDetails destination_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return \Google\Cloud\AuditManager\V1\DestinationDetails|null @@ -233,7 +258,7 @@ public function clearDestinationDetails() } /** - * Output only. The location where the generated report will be uploaded. + * Output only. Cloud Storage bucket where the audit report is uploaded to. * * Generated from protobuf field .google.cloud.auditmanager.v1.DestinationDetails destination_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param \Google\Cloud\AuditManager\V1\DestinationDetails $var @@ -248,25 +273,33 @@ public function setDestinationDetails($var) } /** - * Output only. Compliance Standard. + * Output only. Deprecated. Compliance standard to be audited against. + * Use the `compliance_framework` field instead. * - * Generated from protobuf field string compliance_standard = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * Generated from protobuf field string compliance_standard = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; * @return string + * @deprecated */ public function getComplianceStandard() { + if ($this->compliance_standard !== '') { + @trigger_error('compliance_standard is deprecated.', E_USER_DEPRECATED); + } return $this->compliance_standard; } /** - * Output only. Compliance Standard. + * Output only. Deprecated. Compliance standard to be audited against. + * Use the `compliance_framework` field instead. * - * Generated from protobuf field string compliance_standard = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * Generated from protobuf field string compliance_standard = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; * @param string $var * @return $this + * @deprecated */ public function setComplianceStandard($var) { + @trigger_error('compliance_standard is deprecated.', E_USER_DEPRECATED); GPBUtil::checkString($var, True); $this->compliance_standard = $var; @@ -274,7 +307,11 @@ public function setComplianceStandard($var) } /** - * Output only. The parent scope on which the report was generated. + * Output only. Organization, folder, or project that the report is generated + * for, in one of the following formats: + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` * * Generated from protobuf field string scope = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return string @@ -285,7 +322,11 @@ public function getScope() } /** - * Output only. The parent scope on which the report was generated. + * Output only. Organization, folder, or project that the report is generated + * for, in one of the following formats: + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` * * Generated from protobuf field string scope = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param string $var @@ -336,7 +377,7 @@ public function setCreateTime($var) } /** - * Output only. The overall status of controls + * Output only. Overall status of the controls. * * Generated from protobuf field repeated .google.cloud.auditmanager.v1.ControlDetails control_details = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return RepeatedField<\Google\Cloud\AuditManager\V1\ControlDetails> @@ -347,7 +388,7 @@ public function getControlDetails() } /** - * Output only. The overall status of controls + * Output only. Overall status of the controls. * * Generated from protobuf field repeated .google.cloud.auditmanager.v1.ControlDetails control_details = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param \Google\Cloud\AuditManager\V1\ControlDetails[] $var @@ -362,7 +403,7 @@ public function setControlDetails($var) } /** - * Output only. The state of Audit Report Generation. + * Output only. State of audit report generation. * * Generated from protobuf field .google.cloud.auditmanager.v1.AuditReport.ReportGenerationState report_generation_state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return int @@ -373,7 +414,7 @@ public function getReportGenerationState() } /** - * Output only. The state of Audit Report Generation. + * Output only. State of audit report generation. * * Generated from protobuf field .google.cloud.auditmanager.v1.AuditReport.ReportGenerationState report_generation_state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param int $var @@ -388,7 +429,8 @@ public function setReportGenerationState($var) } /** - * Output only. Compliance Framework of Audit Report + * Output only. Compliance framework to use for the audit report. For example, + * `CIS_GCP_FOUNDATIONS_V1_2_0`. * * Generated from protobuf field string compliance_framework = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return string @@ -399,7 +441,8 @@ public function getComplianceFramework() } /** - * Output only. Compliance Framework of Audit Report + * Output only. Compliance framework to use for the audit report. For example, + * `CIS_GCP_FOUNDATIONS_V1_2_0`. * * Generated from protobuf field string compliance_framework = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param string $var @@ -414,8 +457,8 @@ public function setComplianceFramework($var) } /** - * Output only. The ID/ Number for the scope on which the audit report was - * generated. + * Output only. Project number, folder ID, or organization ID that the audit + * report was generated for. * * Generated from protobuf field string scope_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return string @@ -426,8 +469,8 @@ public function getScopeId() } /** - * Output only. The ID/ Number for the scope on which the audit report was - * generated. + * Output only. Project number, folder ID, or organization ID that the audit + * report was generated for. * * Generated from protobuf field string scope_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param string $var diff --git a/AuditManager/src/V1/AuditReport/ReportGenerationState.php b/AuditManager/src/V1/AuditReport/ReportGenerationState.php index a3b3d315f4d5..d34ee55388fe 100644 --- a/AuditManager/src/V1/AuditReport/ReportGenerationState.php +++ b/AuditManager/src/V1/AuditReport/ReportGenerationState.php @@ -7,42 +7,42 @@ use UnexpectedValueException; /** - * The different states of the Audit Manager report generation. + * Different states of report generation. * * Protobuf type google.cloud.auditmanager.v1.AuditReport.ReportGenerationState */ class ReportGenerationState { /** - * Unspecified. Invalid state. + * Default value. This value is unused. * * Generated from protobuf enum REPORT_GENERATION_STATE_UNSPECIFIED = 0; */ const REPORT_GENERATION_STATE_UNSPECIFIED = 0; /** - * Audit report generation process is in progress, ie. operation state is - * neither OPERATION_STATE_DONE nor OPERATION_STATE_FAILED. + * The process is in progress. The operation can have any state + * except for `OPERATION_STATE_DONE` or `OPERATION_STATE_FAILED`. * * Generated from protobuf enum IN_PROGRESS = 1; */ const IN_PROGRESS = 1; /** - * Audit report generation process is completed. Operation state is - * OPERATION_STATE_DONE. + * The process is completed. The operation state is + * `OPERATION_STATE_DONE`. * * Generated from protobuf enum COMPLETED = 2; */ const COMPLETED = 2; /** - * Audit report generation process has failed. Operation state is - * OPERATION_STATE_FAILED. + * The process has failed. The operation state is + * `OPERATION_STATE_FAILED`. * * Generated from protobuf enum FAILED = 3; */ const FAILED = 3; /** - * Audit report generation process has completed. But report summary is - * unknown. This is valid for older reports. + * The process completed, but the report summary's status is unknown. This + * state isn't used for new reports. * * Generated from protobuf enum SUMMARY_UNKNOWN = 4; */ diff --git a/AuditManager/src/V1/AuditScopeReport.php b/AuditManager/src/V1/AuditScopeReport.php index 9771cc2cebd0..89cb8c089869 100644 --- a/AuditManager/src/V1/AuditScopeReport.php +++ b/AuditManager/src/V1/AuditScopeReport.php @@ -9,15 +9,18 @@ use Google\Protobuf\RepeatedField; /** - * The audit scope report. + * Audit scope report. * * Generated from protobuf message google.cloud.auditmanager.v1.AuditScopeReport */ class AuditScopeReport extends \Google\Protobuf\Internal\Message { /** - * Identifier. The name of this Audit Report, in the format of scope given in - * request. + * Identifier. Name for the audit scope report, in one of the following + * formats: + * * `projects/{project}/locations/{location}/auditScopeReports/{audit_scope_report}` + * * `folders/{folder}/locations/{location}/auditScopeReports/{audit_scope_report}` + * * `organizations/{organization}/locations/{location}/auditScopeReports/{audit_scope_report}` * * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = IDENTIFIER]; */ @@ -31,10 +34,13 @@ class AuditScopeReport extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $scope_report_contents - * The audit scope report content in byte format. + * Audit scope report content in byte format. * @type string $name - * Identifier. The name of this Audit Report, in the format of scope given in - * request. + * Identifier. Name for the audit scope report, in one of the following + * formats: + * * `projects/{project}/locations/{location}/auditScopeReports/{audit_scope_report}` + * * `folders/{folder}/locations/{location}/auditScopeReports/{audit_scope_report}` + * * `organizations/{organization}/locations/{location}/auditScopeReports/{audit_scope_report}` * } */ public function __construct($data = NULL) { @@ -43,7 +49,7 @@ public function __construct($data = NULL) { } /** - * The audit scope report content in byte format. + * Audit scope report content in byte format. * * Generated from protobuf field bytes scope_report_contents = 1; * @return string @@ -59,7 +65,7 @@ public function hasScopeReportContents() } /** - * The audit scope report content in byte format. + * Audit scope report content in byte format. * * Generated from protobuf field bytes scope_report_contents = 1; * @param string $var @@ -74,8 +80,11 @@ public function setScopeReportContents($var) } /** - * Identifier. The name of this Audit Report, in the format of scope given in - * request. + * Identifier. Name for the audit scope report, in one of the following + * formats: + * * `projects/{project}/locations/{location}/auditScopeReports/{audit_scope_report}` + * * `folders/{folder}/locations/{location}/auditScopeReports/{audit_scope_report}` + * * `organizations/{organization}/locations/{location}/auditScopeReports/{audit_scope_report}` * * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = IDENTIFIER]; * @return string @@ -86,8 +95,11 @@ public function getName() } /** - * Identifier. The name of this Audit Report, in the format of scope given in - * request. + * Identifier. Name for the audit scope report, in one of the following + * formats: + * * `projects/{project}/locations/{location}/auditScopeReports/{audit_scope_report}` + * * `folders/{folder}/locations/{location}/auditScopeReports/{audit_scope_report}` + * * `organizations/{organization}/locations/{location}/auditScopeReports/{audit_scope_report}` * * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = IDENTIFIER]; * @param string $var diff --git a/AuditManager/src/V1/Client/AuditManagerClient.php b/AuditManager/src/V1/Client/AuditManagerClient.php index 7470740b4dac..cdd0fb54906d 100644 --- a/AuditManager/src/V1/Client/AuditManagerClient.php +++ b/AuditManager/src/V1/Client/AuditManagerClient.php @@ -106,7 +106,10 @@ final class AuditManagerClient * * @internal */ - public static $serviceScopes = ['https://www.googleapis.com/auth/cloud-platform']; + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-auditmanager', + 'https://www.googleapis.com/auth/cloud-platform', + ]; private $operationsClient; @@ -327,6 +330,28 @@ public static function organizationLocationName(string $organization, string $lo ]); } + /** + * Formats a string containing the fully-qualified path to represent a + * organization_location_audit_report resource. + * + * @param string $organization + * @param string $location + * @param string $auditReport + * + * @return string The formatted organization_location_audit_report resource. + */ + public static function organizationLocationAuditReportName( + string $organization, + string $location, + string $auditReport + ): string { + return self::getPathTemplate('organizationLocationAuditReport')->render([ + 'organization' => $organization, + 'location' => $location, + 'audit_report' => $auditReport, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a * organization_location_resource_enrollment_status resource. @@ -487,6 +512,7 @@ public static function standardName(string $project, string $location, string $s * - folderLocationStandard: folders/{folder}/locations/{location}/standards/{standard} * - location: projects/{project}/locations/{location} * - organizationLocation: organizations/{organization}/locations/{location} + * - organizationLocationAuditReport: organizations/{organization}/locations/{location}/auditReports/{audit_report} * - organizationLocationResourceEnrollmentStatus: organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status} * - organizationLocationStandard: organizations/{organization}/locations/{location}/standards/{standard} * - projectLocationAuditReport: projects/{project}/locations/{location}/auditReports/{audit_report} @@ -600,11 +626,11 @@ public function __call($method, $args) } /** - * Enrolls the customer resource(folder/project/organization) to the audit - * manager service by creating the audit managers Service Agent in customers - * workload and granting required permissions to the Service Agent. Please - * note that if enrollment request is made on the already enrolled workload - * then enrollment is executed overriding the existing set of destinations. + * Adds your project, folder, or organization to Audit + * Manager. This method creates the Audit Manager service agent in your + * workload and grants required permissions to the service agent. + * If you make this request on a workload that's already enrolled, + * then this method overrides the existing set of destinations. * * The async variant is {@see AuditManagerClient::enrollResourceAsync()} . * @@ -630,8 +656,9 @@ public function enrollResource(EnrollResourceRequest $request, array $callOption } /** - * Register the Audit Report generation requests and returns the OperationId - * using which the customer can track the report generation progress. + * Registers audit report generation requests. This method returns the + * operation identifier that you can use to track the report generation + * progress. * * The async variant is {@see AuditManagerClient::generateAuditReportAsync()} . * @@ -657,9 +684,14 @@ public function generateAuditReport(GenerateAuditReportRequest $request, array $ } /** - * Generates a demo report highlighting different responsibilities - * (Google/Customer/ shared) required to be fulfilled for the customer's - * workload to be compliant with the given standard. + * Generates an audit scope report for the given standard. + * + * The report includes the following: + * + * * The technical attributes and constraints that Audit Manager uses to + * verify your compliance with a framework. + * * A list of Google Cloud services and resources that are within the + * scope of the framework. * * The async variant is {@see AuditManagerClient::generateAuditScopeReportAsync()} * . @@ -688,7 +720,7 @@ public function generateAuditScopeReport( } /** - * Get the overall audit report + * Gets the full metadata and findings for an audit report. * * The async variant is {@see AuditManagerClient::getAuditReportAsync()} . * @@ -714,7 +746,7 @@ public function getAuditReport(GetAuditReportRequest $request, array $callOption } /** - * Get a resource along with its enrollment status. + * Gets a resource and its enrollment status. * * The async variant is * {@see AuditManagerClient::getResourceEnrollmentStatusAsync()} . @@ -743,7 +775,8 @@ public function getResourceEnrollmentStatus( } /** - * Lists audit reports in the selected parent scope + * Lists the audit reports for the organization, folder, or project that you + * specify as the parent scope. * * The async variant is {@see AuditManagerClient::listAuditReportsAsync()} . * @@ -769,7 +802,8 @@ public function listAuditReports(ListAuditReportsRequest $request, array $callOp } /** - * Gets controls needed to be implemented to be compliant to a standard. + * Lists the controls that you must implement to become compliant to a + * regulatory standard. * * The async variant is {@see AuditManagerClient::listControlsAsync()} . * @@ -795,7 +829,8 @@ public function listControls(ListControlsRequest $request, array $callOptions = } /** - * Fetches all resources under the parent along with their enrollment. + * Lists all the folders and projects in an organization or folder, along with + * their enrollments. * * The async variant is * {@see AuditManagerClient::listResourceEnrollmentStatusesAsync()} . @@ -851,13 +886,21 @@ public function getLocation(GetLocationRequest $request, array $callOptions = [] /** * Lists information about the supported locations for this service. - * This method can be called in two ways: * - * * **List all public locations:** Use the path `GET /v1/locations`. - * * **List project-visible locations:** Use the path - * `GET /v1/projects/{project_id}/locations`. This may include public - * locations as well as private or other locations specifically visible - * to the project. + * This method lists locations based on the resource scope provided in + * the [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field: * + * **Global locations**: If `name` is empty, the method lists the + * public locations available to all projects. * **Project-specific + * locations**: If `name` follows the format + * `projects/{project}`, the method lists locations visible to that + * specific project. This includes public, private, or other + * project-specific locations enabled for the project. + * + * For gRPC and client library implementations, the resource name is + * passed as the `name` field. For direct service calls, the resource + * name is + * incorporated into the request path based on the specific service + * implementation and version. * * The async variant is {@see AuditManagerClient::listLocationsAsync()} . * diff --git a/AuditManager/src/V1/ComplianceState.php b/AuditManager/src/V1/ComplianceState.php index d8dcc8141bf7..c67934babd70 100644 --- a/AuditManager/src/V1/ComplianceState.php +++ b/AuditManager/src/V1/ComplianceState.php @@ -7,44 +7,45 @@ use UnexpectedValueException; /** - * The compliance state after evaluation. + * Compliance state after evaluation. * * Protobuf type google.cloud.auditmanager.v1.ComplianceState */ class ComplianceState { /** - * Unspecified. Invalid state. + * Default value. This value is unused. * * Generated from protobuf enum COMPLIANCE_STATE_UNSPECIFIED = 0; */ const COMPLIANCE_STATE_UNSPECIFIED = 0; /** - * Compliant. + * The resource is compliant. * * Generated from protobuf enum COMPLIANT = 1; */ const COMPLIANT = 1; /** - * Violation. + * The resource isn't compliant. * * Generated from protobuf enum VIOLATION = 2; */ const VIOLATION = 2; /** - * MANUAL_REVIEW_NEEDED, requires manual review + * You must complete a manual review. * * Generated from protobuf enum MANUAL_REVIEW_NEEDED = 3; */ const MANUAL_REVIEW_NEEDED = 3; /** - * Error while computing status. + * An error was encountered during the evaluation or evidence gathering + * process. * * Generated from protobuf enum ERROR = 4; */ const ERROR = 4; /** - * Cannot be audited + * The resource can't be audited. * * Generated from protobuf enum AUDIT_NOT_SUPPORTED = 5; */ diff --git a/AuditManager/src/V1/Control.php b/AuditManager/src/V1/Control.php index f949ac8b88a3..f41280aa8cc4 100644 --- a/AuditManager/src/V1/Control.php +++ b/AuditManager/src/V1/Control.php @@ -16,8 +16,8 @@ class Control extends \Google\Protobuf\Internal\Message { /** - * Output only. The control identifier used to fetch the findings. This is - * same as the control report name. + * Output only. Control identifier that's used to fetch the findings. The + * identifier is the same as the control report name. * * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ @@ -29,53 +29,51 @@ class Control extends \Google\Protobuf\Internal\Message */ protected $display_name = ''; /** - * Output only. Group where the control belongs. E.g. Access Control. + * Output only. Category that the control belongs to. * * Generated from protobuf field .google.cloud.auditmanager.v1.Control.Family family = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ protected $family = 0; /** - * Output only. Regulatory Family of the control E.g. Access Control + * Output only. Regulatory family of the control. * * Generated from protobuf field .google.cloud.auditmanager.v1.ControlFamily control_family = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ protected $control_family = null; /** - * Output only. Regulatory control ask of the control + * Output only. Description of the control. * * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ protected $description = ''; /** - * Output only. The type of responsibility for implementing this control. It - * can be google, customer or shared. + * Output only. Who is responsible for implementing this control. Set to one + * of the following values: `GOOGLE`, `CUSTOMER`, or `SHARED`. * * Generated from protobuf field string responsibility_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ protected $responsibility_type = ''; /** - * Output only. Description of the google responsibility for implementing this - * control. + * Output only. A description of Google's responsibility for this control. * * Generated from protobuf field string google_responsibility_description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ protected $google_responsibility_description = ''; /** - * Output only. Implementation of the google responsibility for implementing + * Output only. A description of how Google implements its responsibility for * this control. * * Generated from protobuf field string google_responsibility_implementation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ protected $google_responsibility_implementation = ''; /** - * Output only. Description of the customer responsibility for implementing - * this control. + * Output only. A description of your responsibility for this control. * * Generated from protobuf field string customer_responsibility_description = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ protected $customer_responsibility_description = ''; /** - * Output only. Implementation of the customer responsibility for implementing + * Output only. A description of how you can implement your responsibility for * this control. * * Generated from protobuf field string customer_responsibility_implementation = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -89,30 +87,28 @@ class Control extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $id - * Output only. The control identifier used to fetch the findings. This is - * same as the control report name. + * Output only. Control identifier that's used to fetch the findings. The + * identifier is the same as the control report name. * @type string $display_name * Output only. Display name of the control. * @type int $family - * Output only. Group where the control belongs. E.g. Access Control. + * Output only. Category that the control belongs to. * @type \Google\Cloud\AuditManager\V1\ControlFamily $control_family - * Output only. Regulatory Family of the control E.g. Access Control + * Output only. Regulatory family of the control. * @type string $description - * Output only. Regulatory control ask of the control + * Output only. Description of the control. * @type string $responsibility_type - * Output only. The type of responsibility for implementing this control. It - * can be google, customer or shared. + * Output only. Who is responsible for implementing this control. Set to one + * of the following values: `GOOGLE`, `CUSTOMER`, or `SHARED`. * @type string $google_responsibility_description - * Output only. Description of the google responsibility for implementing this - * control. + * Output only. A description of Google's responsibility for this control. * @type string $google_responsibility_implementation - * Output only. Implementation of the google responsibility for implementing + * Output only. A description of how Google implements its responsibility for * this control. * @type string $customer_responsibility_description - * Output only. Description of the customer responsibility for implementing - * this control. + * Output only. A description of your responsibility for this control. * @type string $customer_responsibility_implementation - * Output only. Implementation of the customer responsibility for implementing + * Output only. A description of how you can implement your responsibility for * this control. * } */ @@ -122,8 +118,8 @@ public function __construct($data = NULL) { } /** - * Output only. The control identifier used to fetch the findings. This is - * same as the control report name. + * Output only. Control identifier that's used to fetch the findings. The + * identifier is the same as the control report name. * * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return string @@ -134,8 +130,8 @@ public function getId() } /** - * Output only. The control identifier used to fetch the findings. This is - * same as the control report name. + * Output only. Control identifier that's used to fetch the findings. The + * identifier is the same as the control report name. * * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param string $var @@ -176,7 +172,7 @@ public function setDisplayName($var) } /** - * Output only. Group where the control belongs. E.g. Access Control. + * Output only. Category that the control belongs to. * * Generated from protobuf field .google.cloud.auditmanager.v1.Control.Family family = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return int @@ -187,7 +183,7 @@ public function getFamily() } /** - * Output only. Group where the control belongs. E.g. Access Control. + * Output only. Category that the control belongs to. * * Generated from protobuf field .google.cloud.auditmanager.v1.Control.Family family = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param int $var @@ -202,7 +198,7 @@ public function setFamily($var) } /** - * Output only. Regulatory Family of the control E.g. Access Control + * Output only. Regulatory family of the control. * * Generated from protobuf field .google.cloud.auditmanager.v1.ControlFamily control_family = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return \Google\Cloud\AuditManager\V1\ControlFamily|null @@ -223,7 +219,7 @@ public function clearControlFamily() } /** - * Output only. Regulatory Family of the control E.g. Access Control + * Output only. Regulatory family of the control. * * Generated from protobuf field .google.cloud.auditmanager.v1.ControlFamily control_family = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param \Google\Cloud\AuditManager\V1\ControlFamily $var @@ -238,7 +234,7 @@ public function setControlFamily($var) } /** - * Output only. Regulatory control ask of the control + * Output only. Description of the control. * * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return string @@ -249,7 +245,7 @@ public function getDescription() } /** - * Output only. Regulatory control ask of the control + * Output only. Description of the control. * * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param string $var @@ -264,8 +260,8 @@ public function setDescription($var) } /** - * Output only. The type of responsibility for implementing this control. It - * can be google, customer or shared. + * Output only. Who is responsible for implementing this control. Set to one + * of the following values: `GOOGLE`, `CUSTOMER`, or `SHARED`. * * Generated from protobuf field string responsibility_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return string @@ -276,8 +272,8 @@ public function getResponsibilityType() } /** - * Output only. The type of responsibility for implementing this control. It - * can be google, customer or shared. + * Output only. Who is responsible for implementing this control. Set to one + * of the following values: `GOOGLE`, `CUSTOMER`, or `SHARED`. * * Generated from protobuf field string responsibility_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param string $var @@ -292,8 +288,7 @@ public function setResponsibilityType($var) } /** - * Output only. Description of the google responsibility for implementing this - * control. + * Output only. A description of Google's responsibility for this control. * * Generated from protobuf field string google_responsibility_description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return string @@ -304,8 +299,7 @@ public function getGoogleResponsibilityDescription() } /** - * Output only. Description of the google responsibility for implementing this - * control. + * Output only. A description of Google's responsibility for this control. * * Generated from protobuf field string google_responsibility_description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param string $var @@ -320,7 +314,7 @@ public function setGoogleResponsibilityDescription($var) } /** - * Output only. Implementation of the google responsibility for implementing + * Output only. A description of how Google implements its responsibility for * this control. * * Generated from protobuf field string google_responsibility_implementation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -332,7 +326,7 @@ public function getGoogleResponsibilityImplementation() } /** - * Output only. Implementation of the google responsibility for implementing + * Output only. A description of how Google implements its responsibility for * this control. * * Generated from protobuf field string google_responsibility_implementation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -348,8 +342,7 @@ public function setGoogleResponsibilityImplementation($var) } /** - * Output only. Description of the customer responsibility for implementing - * this control. + * Output only. A description of your responsibility for this control. * * Generated from protobuf field string customer_responsibility_description = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return string @@ -360,8 +353,7 @@ public function getCustomerResponsibilityDescription() } /** - * Output only. Description of the customer responsibility for implementing - * this control. + * Output only. A description of your responsibility for this control. * * Generated from protobuf field string customer_responsibility_description = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param string $var @@ -376,7 +368,7 @@ public function setCustomerResponsibilityDescription($var) } /** - * Output only. Implementation of the customer responsibility for implementing + * Output only. A description of how you can implement your responsibility for * this control. * * Generated from protobuf field string customer_responsibility_implementation = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -388,7 +380,7 @@ public function getCustomerResponsibilityImplementation() } /** - * Output only. Implementation of the customer responsibility for implementing + * Output only. A description of how you can implement your responsibility for * this control. * * Generated from protobuf field string customer_responsibility_implementation = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; diff --git a/AuditManager/src/V1/Control/Family.php b/AuditManager/src/V1/Control/Family.php index 5d69ff209695..7265a8c17a7d 100644 --- a/AuditManager/src/V1/Control/Family.php +++ b/AuditManager/src/V1/Control/Family.php @@ -7,122 +7,122 @@ use UnexpectedValueException; /** - * The family of the control. For example, Access Control. + * Category of the control. * * Protobuf type google.cloud.auditmanager.v1.Control.Family */ class Family { /** - * Unspecified. Invalid state. + * Default value. This value is unused. * * Generated from protobuf enum FAMILY_UNSPECIFIED = 0; */ const FAMILY_UNSPECIFIED = 0; /** - * Access Control + * Access control. * * Generated from protobuf enum AC = 1; */ const AC = 1; /** - * Awareness and Training + * Awareness and training. * * Generated from protobuf enum AT = 2; */ const AT = 2; /** - * Audit and Accountability + * Audit and accountability. * * Generated from protobuf enum AU = 3; */ const AU = 3; /** - * Certification, Accreditation and Security Assessments + * Certification, accreditation and security assessments. * * Generated from protobuf enum CA = 4; */ const CA = 4; /** - * Configuration Management + * Configuration management and change control. * * Generated from protobuf enum CM = 5; */ const CM = 5; /** - * Contingency Planning + * Contingency planning and disaster recovery. * * Generated from protobuf enum CP = 6; */ const CP = 6; /** - * Identification and Authentication + * Identification and authentication. * * Generated from protobuf enum IA = 7; */ const IA = 7; /** - * Incident Response + * Incident response. * * Generated from protobuf enum IR = 8; */ const IR = 8; /** - * Maintenance + * Maintenance. * * Generated from protobuf enum MA = 9; */ const MA = 9; /** - * Media Protection + * Media protection. * * Generated from protobuf enum MP = 10; */ const MP = 10; /** - * Physical and Environmental Protection + * Physical and environmental protection. * * Generated from protobuf enum PE = 11; */ const PE = 11; /** - * Security Planning + * Security planning. * * Generated from protobuf enum PL = 12; */ const PL = 12; /** - * Personnel Security + * Personnel security. * * Generated from protobuf enum PS = 13; */ const PS = 13; /** - * Risk Assessment + * Risk assessment. * * Generated from protobuf enum RA = 14; */ const RA = 14; /** - * System Services and Acquisition + * System services and acquisition. * * Generated from protobuf enum SA = 15; */ const SA = 15; /** - * System and Communications Protection + * System and communications protection. * * Generated from protobuf enum SC = 16; */ const SC = 16; /** - * System and Information Integrity + * System and information integrity. * * Generated from protobuf enum SI = 17; */ const SI = 17; /** - * Supply Chain Risk Management + * Supply chain risk management. * * Generated from protobuf enum SR = 18; */ diff --git a/AuditManager/src/V1/ControlDetails.php b/AuditManager/src/V1/ControlDetails.php index db9e5a41f2ff..11cf4310cd15 100644 --- a/AuditManager/src/V1/ControlDetails.php +++ b/AuditManager/src/V1/ControlDetails.php @@ -9,14 +9,14 @@ use Google\Protobuf\RepeatedField; /** - * The evaluation details for a control. + * Evaluation details for a control. * * Generated from protobuf message google.cloud.auditmanager.v1.ControlDetails */ class ControlDetails extends \Google\Protobuf\Internal\Message { /** - * The control for which the findings are being reported. + * Control that the findings are being reported for. * * Generated from protobuf field .google.cloud.auditmanager.v1.Control control = 1; */ @@ -28,7 +28,8 @@ class ControlDetails extends \Google\Protobuf\Internal\Message */ protected $compliance_state = 0; /** - * Report summary with compliance, violation counts etc. + * A control report summary that provides a high-level overview of the + * compliance controls and the assessment status. * * Generated from protobuf field .google.cloud.auditmanager.v1.ReportSummary control_report_summary = 3; */ @@ -41,11 +42,12 @@ class ControlDetails extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type \Google\Cloud\AuditManager\V1\Control $control - * The control for which the findings are being reported. + * Control that the findings are being reported for. * @type int $compliance_state * Output only. Overall status of the findings for the control. * @type \Google\Cloud\AuditManager\V1\ReportSummary $control_report_summary - * Report summary with compliance, violation counts etc. + * A control report summary that provides a high-level overview of the + * compliance controls and the assessment status. * } */ public function __construct($data = NULL) { @@ -54,7 +56,7 @@ public function __construct($data = NULL) { } /** - * The control for which the findings are being reported. + * Control that the findings are being reported for. * * Generated from protobuf field .google.cloud.auditmanager.v1.Control control = 1; * @return \Google\Cloud\AuditManager\V1\Control|null @@ -75,7 +77,7 @@ public function clearControl() } /** - * The control for which the findings are being reported. + * Control that the findings are being reported for. * * Generated from protobuf field .google.cloud.auditmanager.v1.Control control = 1; * @param \Google\Cloud\AuditManager\V1\Control $var @@ -116,7 +118,8 @@ public function setComplianceState($var) } /** - * Report summary with compliance, violation counts etc. + * A control report summary that provides a high-level overview of the + * compliance controls and the assessment status. * * Generated from protobuf field .google.cloud.auditmanager.v1.ReportSummary control_report_summary = 3; * @return \Google\Cloud\AuditManager\V1\ReportSummary|null @@ -137,7 +140,8 @@ public function clearControlReportSummary() } /** - * Report summary with compliance, violation counts etc. + * A control report summary that provides a high-level overview of the + * compliance controls and the assessment status. * * Generated from protobuf field .google.cloud.auditmanager.v1.ReportSummary control_report_summary = 3; * @param \Google\Cloud\AuditManager\V1\ReportSummary $var diff --git a/AuditManager/src/V1/ControlFamily.php b/AuditManager/src/V1/ControlFamily.php index acf2c41ea1b0..9a13b09e19e5 100644 --- a/AuditManager/src/V1/ControlFamily.php +++ b/AuditManager/src/V1/ControlFamily.php @@ -9,20 +9,23 @@ use Google\Protobuf\RepeatedField; /** - * The regulatory family of the control. + * Regulatory family of the control. * * Generated from protobuf message google.cloud.auditmanager.v1.ControlFamily */ class ControlFamily extends \Google\Protobuf\Internal\Message { /** - * The ID of the regulatory control family. + * ID of the regulatory control family. To find the list of supported + * control families, use the + * [ListControls][google.cloud.auditmanager.v1.AuditManager.ListControls] + * method and review the `control_family` field in the response. * * Generated from protobuf field string family_id = 1; */ protected $family_id = ''; /** - * The display name of the regulatory control family. + * Display name of the regulatory control family. * * Generated from protobuf field string display_name = 2; */ @@ -35,9 +38,12 @@ class ControlFamily extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $family_id - * The ID of the regulatory control family. + * ID of the regulatory control family. To find the list of supported + * control families, use the + * [ListControls][google.cloud.auditmanager.v1.AuditManager.ListControls] + * method and review the `control_family` field in the response. * @type string $display_name - * The display name of the regulatory control family. + * Display name of the regulatory control family. * } */ public function __construct($data = NULL) { @@ -46,7 +52,10 @@ public function __construct($data = NULL) { } /** - * The ID of the regulatory control family. + * ID of the regulatory control family. To find the list of supported + * control families, use the + * [ListControls][google.cloud.auditmanager.v1.AuditManager.ListControls] + * method and review the `control_family` field in the response. * * Generated from protobuf field string family_id = 1; * @return string @@ -57,7 +66,10 @@ public function getFamilyId() } /** - * The ID of the regulatory control family. + * ID of the regulatory control family. To find the list of supported + * control families, use the + * [ListControls][google.cloud.auditmanager.v1.AuditManager.ListControls] + * method and review the `control_family` field in the response. * * Generated from protobuf field string family_id = 1; * @param string $var @@ -72,7 +84,7 @@ public function setFamilyId($var) } /** - * The display name of the regulatory control family. + * Display name of the regulatory control family. * * Generated from protobuf field string display_name = 2; * @return string @@ -83,7 +95,7 @@ public function getDisplayName() } /** - * The display name of the regulatory control family. + * Display name of the regulatory control family. * * Generated from protobuf field string display_name = 2; * @param string $var diff --git a/AuditManager/src/V1/DestinationDetails.php b/AuditManager/src/V1/DestinationDetails.php index ea77df7bc36c..3e1a1308d6c3 100644 --- a/AuditManager/src/V1/DestinationDetails.php +++ b/AuditManager/src/V1/DestinationDetails.php @@ -9,7 +9,7 @@ use Google\Protobuf\RepeatedField; /** - * The locations where the generated reports are saved. + * Cloud Storage bucket where the audit report is uploaded to. * * Generated from protobuf message google.cloud.auditmanager.v1.DestinationDetails */ @@ -24,7 +24,8 @@ class DestinationDetails extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $gcs_bucket_uri - * The Cloud Storage bucket where the audit report is/will be uploaded. + * URI for the Cloud Storage bucket, in the format + * `gs://{bucket_name}`. * } */ public function __construct($data = NULL) { @@ -33,7 +34,8 @@ public function __construct($data = NULL) { } /** - * The Cloud Storage bucket where the audit report is/will be uploaded. + * URI for the Cloud Storage bucket, in the format + * `gs://{bucket_name}`. * * Generated from protobuf field string gcs_bucket_uri = 1; * @return string @@ -49,7 +51,8 @@ public function hasGcsBucketUri() } /** - * The Cloud Storage bucket where the audit report is/will be uploaded. + * URI for the Cloud Storage bucket, in the format + * `gs://{bucket_name}`. * * Generated from protobuf field string gcs_bucket_uri = 1; * @param string $var diff --git a/AuditManager/src/V1/EnrollResourceRequest.php b/AuditManager/src/V1/EnrollResourceRequest.php index bd8d3c7efa18..65e8f85ebcc4 100644 --- a/AuditManager/src/V1/EnrollResourceRequest.php +++ b/AuditManager/src/V1/EnrollResourceRequest.php @@ -9,48 +9,51 @@ use Google\Protobuf\RepeatedField; /** - * Request message to subscribe the Audit Manager service for given resource. + * Request message for + * [EnrollResource][google.cloud.auditmanager.v1.AuditManager.EnrollResource]. * * Generated from protobuf message google.cloud.auditmanager.v1.EnrollResourceRequest */ class EnrollResourceRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The resource to be enrolled to the audit manager. Scope format - * should be resource_type/resource_identifier Eg: - * projects/{project}/locations/{location}, - * folders/{folder}/locations/{location} - * organizations/{organization}/locations/{location} + * Required. Organization, folder, or project to enroll in Audit Manager, in + * one of the following formats: + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` * * Generated from protobuf field string scope = 1 [(.google.api.field_behavior) = REQUIRED]; */ protected $scope = ''; /** - * Required. List of destination among which customer can choose to upload - * their reports during the audit process. While enrolling at a - * organization/folder level, customer can choose Cloud storage bucket in any - * project. If the audit is triggered at project level using the service agent - * at organization/folder level, all the destination options associated with - * respective organization/folder level service agent will be available to - * auditing projects. + * Required. Cloud Storage buckets that you can upload your audit reports to + * during the audit process. + * When you enroll an organization or folder, you can choose a Cloud Storage + * bucket from any project in the organization or folder. If you run an audit + * at the project level using the service agent at the organization or folder + * level, all the buckets that are associated with the service agent are + * available. * * Generated from protobuf field repeated .google.cloud.auditmanager.v1.EnrollResourceRequest.EligibleDestination destinations = 2 [(.google.api.field_behavior) = REQUIRED]; */ private $destinations; /** - * @param string $scope Required. The resource to be enrolled to the audit manager. Scope format - * should be resource_type/resource_identifier Eg: - * projects/{project}/locations/{location}, - * folders/{folder}/locations/{location} - * organizations/{organization}/locations/{location} - * @param \Google\Cloud\AuditManager\V1\EnrollResourceRequest\EligibleDestination[] $destinations Required. List of destination among which customer can choose to upload - * their reports during the audit process. While enrolling at a - * organization/folder level, customer can choose Cloud storage bucket in any - * project. If the audit is triggered at project level using the service agent - * at organization/folder level, all the destination options associated with - * respective organization/folder level service agent will be available to - * auditing projects. + * @param string $scope Required. Organization, folder, or project to enroll in Audit Manager, in + * one of the following formats: + * + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` + * @param \Google\Cloud\AuditManager\V1\EnrollResourceRequest\EligibleDestination[] $destinations Required. Cloud Storage buckets that you can upload your audit reports to + * during the audit process. + * + * When you enroll an organization or folder, you can choose a Cloud Storage + * bucket from any project in the organization or folder. If you run an audit + * at the project level using the service agent at the organization or folder + * level, all the buckets that are associated with the service agent are + * available. * * @return \Google\Cloud\AuditManager\V1\EnrollResourceRequest * @@ -70,19 +73,19 @@ public static function build(string $scope, array $destinations): self * Optional. Data for populating the Message object. * * @type string $scope - * Required. The resource to be enrolled to the audit manager. Scope format - * should be resource_type/resource_identifier Eg: - * projects/{project}/locations/{location}, - * folders/{folder}/locations/{location} - * organizations/{organization}/locations/{location} + * Required. Organization, folder, or project to enroll in Audit Manager, in + * one of the following formats: + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` * @type \Google\Cloud\AuditManager\V1\EnrollResourceRequest\EligibleDestination[] $destinations - * Required. List of destination among which customer can choose to upload - * their reports during the audit process. While enrolling at a - * organization/folder level, customer can choose Cloud storage bucket in any - * project. If the audit is triggered at project level using the service agent - * at organization/folder level, all the destination options associated with - * respective organization/folder level service agent will be available to - * auditing projects. + * Required. Cloud Storage buckets that you can upload your audit reports to + * during the audit process. + * When you enroll an organization or folder, you can choose a Cloud Storage + * bucket from any project in the organization or folder. If you run an audit + * at the project level using the service agent at the organization or folder + * level, all the buckets that are associated with the service agent are + * available. * } */ public function __construct($data = NULL) { @@ -91,11 +94,11 @@ public function __construct($data = NULL) { } /** - * Required. The resource to be enrolled to the audit manager. Scope format - * should be resource_type/resource_identifier Eg: - * projects/{project}/locations/{location}, - * folders/{folder}/locations/{location} - * organizations/{organization}/locations/{location} + * Required. Organization, folder, or project to enroll in Audit Manager, in + * one of the following formats: + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` * * Generated from protobuf field string scope = 1 [(.google.api.field_behavior) = REQUIRED]; * @return string @@ -106,11 +109,11 @@ public function getScope() } /** - * Required. The resource to be enrolled to the audit manager. Scope format - * should be resource_type/resource_identifier Eg: - * projects/{project}/locations/{location}, - * folders/{folder}/locations/{location} - * organizations/{organization}/locations/{location} + * Required. Organization, folder, or project to enroll in Audit Manager, in + * one of the following formats: + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` * * Generated from protobuf field string scope = 1 [(.google.api.field_behavior) = REQUIRED]; * @param string $var @@ -125,13 +128,13 @@ public function setScope($var) } /** - * Required. List of destination among which customer can choose to upload - * their reports during the audit process. While enrolling at a - * organization/folder level, customer can choose Cloud storage bucket in any - * project. If the audit is triggered at project level using the service agent - * at organization/folder level, all the destination options associated with - * respective organization/folder level service agent will be available to - * auditing projects. + * Required. Cloud Storage buckets that you can upload your audit reports to + * during the audit process. + * When you enroll an organization or folder, you can choose a Cloud Storage + * bucket from any project in the organization or folder. If you run an audit + * at the project level using the service agent at the organization or folder + * level, all the buckets that are associated with the service agent are + * available. * * Generated from protobuf field repeated .google.cloud.auditmanager.v1.EnrollResourceRequest.EligibleDestination destinations = 2 [(.google.api.field_behavior) = REQUIRED]; * @return RepeatedField<\Google\Cloud\AuditManager\V1\EnrollResourceRequest\EligibleDestination> @@ -142,13 +145,13 @@ public function getDestinations() } /** - * Required. List of destination among which customer can choose to upload - * their reports during the audit process. While enrolling at a - * organization/folder level, customer can choose Cloud storage bucket in any - * project. If the audit is triggered at project level using the service agent - * at organization/folder level, all the destination options associated with - * respective organization/folder level service agent will be available to - * auditing projects. + * Required. Cloud Storage buckets that you can upload your audit reports to + * during the audit process. + * When you enroll an organization or folder, you can choose a Cloud Storage + * bucket from any project in the organization or folder. If you run an audit + * at the project level using the service agent at the organization or folder + * level, all the buckets that are associated with the service agent are + * available. * * Generated from protobuf field repeated .google.cloud.auditmanager.v1.EnrollResourceRequest.EligibleDestination destinations = 2 [(.google.api.field_behavior) = REQUIRED]; * @param \Google\Cloud\AuditManager\V1\EnrollResourceRequest\EligibleDestination[] $var diff --git a/AuditManager/src/V1/EnrollResourceRequest/EligibleDestination.php b/AuditManager/src/V1/EnrollResourceRequest/EligibleDestination.php index dd2064cd2fa0..3b7f309ebfdb 100644 --- a/AuditManager/src/V1/EnrollResourceRequest/EligibleDestination.php +++ b/AuditManager/src/V1/EnrollResourceRequest/EligibleDestination.php @@ -9,7 +9,7 @@ use Google\Protobuf\RepeatedField; /** - * The destination details where the audit report must be uploaded. + * Details about the bucket where you want to upload the audit report. * * Generated from protobuf message google.cloud.auditmanager.v1.EnrollResourceRequest.EligibleDestination */ @@ -24,8 +24,10 @@ class EligibleDestination extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $eligible_gcs_bucket - * The Cloud Storage bucket location where the audit report and evidences - * can be uploaded during the `GenerateAuditReport` API call. + * The location of the Cloud Storage bucket where you want to upload the + * audit report and evidence during the + * [GenerateAuditReport][google.cloud.auditmanager.v1.AuditManager.GenerateAuditReport] + * API call. * } */ public function __construct($data = NULL) { @@ -34,8 +36,10 @@ public function __construct($data = NULL) { } /** - * The Cloud Storage bucket location where the audit report and evidences - * can be uploaded during the `GenerateAuditReport` API call. + * The location of the Cloud Storage bucket where you want to upload the + * audit report and evidence during the + * [GenerateAuditReport][google.cloud.auditmanager.v1.AuditManager.GenerateAuditReport] + * API call. * * Generated from protobuf field string eligible_gcs_bucket = 3; * @return string @@ -51,8 +55,10 @@ public function hasEligibleGcsBucket() } /** - * The Cloud Storage bucket location where the audit report and evidences - * can be uploaded during the `GenerateAuditReport` API call. + * The location of the Cloud Storage bucket where you want to upload the + * audit report and evidence during the + * [GenerateAuditReport][google.cloud.auditmanager.v1.AuditManager.GenerateAuditReport] + * API call. * * Generated from protobuf field string eligible_gcs_bucket = 3; * @param string $var diff --git a/AuditManager/src/V1/Enrollment.php b/AuditManager/src/V1/Enrollment.php index c217bf90018b..6f97b729a3f9 100644 --- a/AuditManager/src/V1/Enrollment.php +++ b/AuditManager/src/V1/Enrollment.php @@ -9,21 +9,24 @@ use Google\Protobuf\RepeatedField; /** - * The enrollment resource. + * Organization, folder, or project to enroll for audit reports. * * Generated from protobuf message google.cloud.auditmanager.v1.Enrollment */ class Enrollment extends \Google\Protobuf\Internal\Message { /** - * Identifier. The name of this Enrollment, in the format of scope given in - * request. + * Identifier. Name of the enrollment, in one of the following formats: + * * `projects/{project}/locations/{location}/enrollments/{enrollment}` + * * `folders/{folder}/locations/{location}/enrollments/{enrollment}` + * * `organizations/{organization}/locations/{location}/enrollments/{enrollment}` * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; */ protected $name = ''; /** - * Output only. The locations where the generated reports can be uploaded. + * Output only. Cloud Storage buckets where you want to upload the audit + * reports. * * Generated from protobuf field repeated .google.cloud.auditmanager.v1.DestinationDetails destination_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ @@ -36,10 +39,13 @@ class Enrollment extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $name - * Identifier. The name of this Enrollment, in the format of scope given in - * request. + * Identifier. Name of the enrollment, in one of the following formats: + * * `projects/{project}/locations/{location}/enrollments/{enrollment}` + * * `folders/{folder}/locations/{location}/enrollments/{enrollment}` + * * `organizations/{organization}/locations/{location}/enrollments/{enrollment}` * @type \Google\Cloud\AuditManager\V1\DestinationDetails[] $destination_details - * Output only. The locations where the generated reports can be uploaded. + * Output only. Cloud Storage buckets where you want to upload the audit + * reports. * } */ public function __construct($data = NULL) { @@ -48,8 +54,10 @@ public function __construct($data = NULL) { } /** - * Identifier. The name of this Enrollment, in the format of scope given in - * request. + * Identifier. Name of the enrollment, in one of the following formats: + * * `projects/{project}/locations/{location}/enrollments/{enrollment}` + * * `folders/{folder}/locations/{location}/enrollments/{enrollment}` + * * `organizations/{organization}/locations/{location}/enrollments/{enrollment}` * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * @return string @@ -60,8 +68,10 @@ public function getName() } /** - * Identifier. The name of this Enrollment, in the format of scope given in - * request. + * Identifier. Name of the enrollment, in one of the following formats: + * * `projects/{project}/locations/{location}/enrollments/{enrollment}` + * * `folders/{folder}/locations/{location}/enrollments/{enrollment}` + * * `organizations/{organization}/locations/{location}/enrollments/{enrollment}` * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * @param string $var @@ -76,7 +86,8 @@ public function setName($var) } /** - * Output only. The locations where the generated reports can be uploaded. + * Output only. Cloud Storage buckets where you want to upload the audit + * reports. * * Generated from protobuf field repeated .google.cloud.auditmanager.v1.DestinationDetails destination_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return RepeatedField<\Google\Cloud\AuditManager\V1\DestinationDetails> @@ -87,7 +98,8 @@ public function getDestinationDetails() } /** - * Output only. The locations where the generated reports can be uploaded. + * Output only. Cloud Storage buckets where you want to upload the audit + * reports. * * Generated from protobuf field repeated .google.cloud.auditmanager.v1.DestinationDetails destination_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param \Google\Cloud\AuditManager\V1\DestinationDetails[] $var diff --git a/AuditManager/src/V1/GenerateAuditReportRequest.php b/AuditManager/src/V1/GenerateAuditReportRequest.php index 3403f7c7ccd1..307a710e7cf8 100644 --- a/AuditManager/src/V1/GenerateAuditReportRequest.php +++ b/AuditManager/src/V1/GenerateAuditReportRequest.php @@ -9,53 +9,67 @@ use Google\Protobuf\RepeatedField; /** - * Message for requesting the Audit Report. + * Request message for + * [GenerateAuditReport][google.cloud.auditmanager.v1.AuditManager.GenerateAuditReport]. * * Generated from protobuf message google.cloud.auditmanager.v1.GenerateAuditReportRequest */ class GenerateAuditReportRequest extends \Google\Protobuf\Internal\Message { /** - * Required. Scope for which the AuditScopeReport is required. Must be of - * format resource_type/resource_identifier Eg: - * projects/{project}/locations/{location}, - * folders/{folder}/locations/{location} + * Required. Organization, folder, or project that the audit applies to, in + * one of the following formats: + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` * * Generated from protobuf field string scope = 1 [(.google.api.field_behavior) = REQUIRED]; */ protected $scope = ''; /** - * Required. Compliance Standard against which the Scope Report must be - * generated. Eg: FEDRAMP_MODERATE + * Optional. Deprecated. Compliance standard for the audit report. + * Use the `compliance_framework` field instead. * - * Generated from protobuf field string compliance_standard = 3 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field string compliance_standard = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @deprecated */ protected $compliance_standard = ''; /** - * Required. The format in which the audit report should be created. + * Required. Format for the audit report. * * Generated from protobuf field .google.cloud.auditmanager.v1.GenerateAuditReportRequest.AuditReportFormat report_format = 4 [(.google.api.field_behavior) = REQUIRED]; */ protected $report_format = 0; /** - * Required. Compliance framework against which the Report must be generated. + * Required. The framework that's used for the audit report. For example, + * `NIST_800_53`. * * Generated from protobuf field string compliance_framework = 5 [(.google.api.field_behavior) = REQUIRED]; */ protected $compliance_framework = ''; + /** + * Optional. If `true`, only validate the request and don't generate the audit + * report. + * + * Generated from protobuf field bool validate_only = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $validate_only = false; protected $destination; /** - * @param string $scope Required. Scope for which the AuditScopeReport is required. Must be of - * format resource_type/resource_identifier Eg: - * projects/{project}/locations/{location}, - * folders/{folder}/locations/{location} - * @param string $gcsUri Destination Cloud storage bucket where report and evidence must be - * uploaded. The Cloud storage bucket provided here must be selected among - * the buckets entered during the enrollment process. - * @param string $complianceStandard Required. Compliance Standard against which the Scope Report must be - * generated. Eg: FEDRAMP_MODERATE - * @param int $reportFormat Required. The format in which the audit report should be created. + * @param string $scope Required. Organization, folder, or project that the audit applies to, in + * one of the following formats: + * + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` + * @param string $gcsUri URL for the Cloud Storage bucket where the report and evidence is + * uploaded. You must select a bucket that was provided during the + * enrollment process. + * @param string $complianceStandard Optional. Deprecated. Compliance standard for the audit report. + * + * Use the `compliance_framework` field instead. + * @param int $reportFormat Required. Format for the audit report. * For allowed values, use constants defined on {@see \Google\Cloud\AuditManager\V1\GenerateAuditReportRequest\AuditReportFormat} * * @return \Google\Cloud\AuditManager\V1\GenerateAuditReportRequest @@ -78,21 +92,26 @@ public static function build(string $scope, string $gcsUri, string $complianceSt * Optional. Data for populating the Message object. * * @type string $gcs_uri - * Destination Cloud storage bucket where report and evidence must be - * uploaded. The Cloud storage bucket provided here must be selected among - * the buckets entered during the enrollment process. + * URL for the Cloud Storage bucket where the report and evidence is + * uploaded. You must select a bucket that was provided during the + * enrollment process. * @type string $scope - * Required. Scope for which the AuditScopeReport is required. Must be of - * format resource_type/resource_identifier Eg: - * projects/{project}/locations/{location}, - * folders/{folder}/locations/{location} + * Required. Organization, folder, or project that the audit applies to, in + * one of the following formats: + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` * @type string $compliance_standard - * Required. Compliance Standard against which the Scope Report must be - * generated. Eg: FEDRAMP_MODERATE + * Optional. Deprecated. Compliance standard for the audit report. + * Use the `compliance_framework` field instead. * @type int $report_format - * Required. The format in which the audit report should be created. + * Required. Format for the audit report. * @type string $compliance_framework - * Required. Compliance framework against which the Report must be generated. + * Required. The framework that's used for the audit report. For example, + * `NIST_800_53`. + * @type bool $validate_only + * Optional. If `true`, only validate the request and don't generate the audit + * report. * } */ public function __construct($data = NULL) { @@ -101,9 +120,9 @@ public function __construct($data = NULL) { } /** - * Destination Cloud storage bucket where report and evidence must be - * uploaded. The Cloud storage bucket provided here must be selected among - * the buckets entered during the enrollment process. + * URL for the Cloud Storage bucket where the report and evidence is + * uploaded. You must select a bucket that was provided during the + * enrollment process. * * Generated from protobuf field string gcs_uri = 2; * @return string @@ -119,9 +138,9 @@ public function hasGcsUri() } /** - * Destination Cloud storage bucket where report and evidence must be - * uploaded. The Cloud storage bucket provided here must be selected among - * the buckets entered during the enrollment process. + * URL for the Cloud Storage bucket where the report and evidence is + * uploaded. You must select a bucket that was provided during the + * enrollment process. * * Generated from protobuf field string gcs_uri = 2; * @param string $var @@ -136,10 +155,11 @@ public function setGcsUri($var) } /** - * Required. Scope for which the AuditScopeReport is required. Must be of - * format resource_type/resource_identifier Eg: - * projects/{project}/locations/{location}, - * folders/{folder}/locations/{location} + * Required. Organization, folder, or project that the audit applies to, in + * one of the following formats: + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` * * Generated from protobuf field string scope = 1 [(.google.api.field_behavior) = REQUIRED]; * @return string @@ -150,10 +170,11 @@ public function getScope() } /** - * Required. Scope for which the AuditScopeReport is required. Must be of - * format resource_type/resource_identifier Eg: - * projects/{project}/locations/{location}, - * folders/{folder}/locations/{location} + * Required. Organization, folder, or project that the audit applies to, in + * one of the following formats: + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` * * Generated from protobuf field string scope = 1 [(.google.api.field_behavior) = REQUIRED]; * @param string $var @@ -168,27 +189,33 @@ public function setScope($var) } /** - * Required. Compliance Standard against which the Scope Report must be - * generated. Eg: FEDRAMP_MODERATE + * Optional. Deprecated. Compliance standard for the audit report. + * Use the `compliance_framework` field instead. * - * Generated from protobuf field string compliance_standard = 3 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field string compliance_standard = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; * @return string + * @deprecated */ public function getComplianceStandard() { + if ($this->compliance_standard !== '') { + @trigger_error('compliance_standard is deprecated.', E_USER_DEPRECATED); + } return $this->compliance_standard; } /** - * Required. Compliance Standard against which the Scope Report must be - * generated. Eg: FEDRAMP_MODERATE + * Optional. Deprecated. Compliance standard for the audit report. + * Use the `compliance_framework` field instead. * - * Generated from protobuf field string compliance_standard = 3 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field string compliance_standard = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this + * @deprecated */ public function setComplianceStandard($var) { + @trigger_error('compliance_standard is deprecated.', E_USER_DEPRECATED); GPBUtil::checkString($var, True); $this->compliance_standard = $var; @@ -196,7 +223,7 @@ public function setComplianceStandard($var) } /** - * Required. The format in which the audit report should be created. + * Required. Format for the audit report. * * Generated from protobuf field .google.cloud.auditmanager.v1.GenerateAuditReportRequest.AuditReportFormat report_format = 4 [(.google.api.field_behavior) = REQUIRED]; * @return int @@ -207,7 +234,7 @@ public function getReportFormat() } /** - * Required. The format in which the audit report should be created. + * Required. Format for the audit report. * * Generated from protobuf field .google.cloud.auditmanager.v1.GenerateAuditReportRequest.AuditReportFormat report_format = 4 [(.google.api.field_behavior) = REQUIRED]; * @param int $var @@ -222,7 +249,8 @@ public function setReportFormat($var) } /** - * Required. Compliance framework against which the Report must be generated. + * Required. The framework that's used for the audit report. For example, + * `NIST_800_53`. * * Generated from protobuf field string compliance_framework = 5 [(.google.api.field_behavior) = REQUIRED]; * @return string @@ -233,7 +261,8 @@ public function getComplianceFramework() } /** - * Required. Compliance framework against which the Report must be generated. + * Required. The framework that's used for the audit report. For example, + * `NIST_800_53`. * * Generated from protobuf field string compliance_framework = 5 [(.google.api.field_behavior) = REQUIRED]; * @param string $var @@ -247,6 +276,34 @@ public function setComplianceFramework($var) return $this; } + /** + * Optional. If `true`, only validate the request and don't generate the audit + * report. + * + * Generated from protobuf field bool validate_only = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Optional. If `true`, only validate the request and don't generate the audit + * report. + * + * Generated from protobuf field bool validate_only = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + /** * @return string */ diff --git a/AuditManager/src/V1/GenerateAuditReportRequest/AuditReportFormat.php b/AuditManager/src/V1/GenerateAuditReportRequest/AuditReportFormat.php index b4ee4870255c..d28fd35a05ed 100644 --- a/AuditManager/src/V1/GenerateAuditReportRequest/AuditReportFormat.php +++ b/AuditManager/src/V1/GenerateAuditReportRequest/AuditReportFormat.php @@ -7,20 +7,20 @@ use UnexpectedValueException; /** - * The options for the audit report format. + * Format for the audit report. * * Protobuf type google.cloud.auditmanager.v1.GenerateAuditReportRequest.AuditReportFormat */ class AuditReportFormat { /** - * Unspecified. Invalid state. + * Default value. This value is unused. * * Generated from protobuf enum AUDIT_REPORT_FORMAT_UNSPECIFIED = 0; */ const AUDIT_REPORT_FORMAT_UNSPECIFIED = 0; /** - * Audit Report creation format is Open Document. + * Open Document format. * * Generated from protobuf enum AUDIT_REPORT_FORMAT_ODF = 1; */ diff --git a/AuditManager/src/V1/GenerateAuditScopeReportRequest.php b/AuditManager/src/V1/GenerateAuditScopeReportRequest.php index 09f9b50badc4..be64ad66d4aa 100644 --- a/AuditManager/src/V1/GenerateAuditScopeReportRequest.php +++ b/AuditManager/src/V1/GenerateAuditScopeReportRequest.php @@ -9,50 +9,58 @@ use Google\Protobuf\RepeatedField; /** - * Message for requesting audit scope report. + * Request message for + * [GenerateAuditScopeReport][google.cloud.auditmanager.v1.AuditManager.GenerateAuditScopeReport]. * * Generated from protobuf message google.cloud.auditmanager.v1.GenerateAuditScopeReportRequest */ class GenerateAuditScopeReportRequest extends \Google\Protobuf\Internal\Message { /** - * Required. Scope for which the AuditScopeReport is required. Must be of - * format resource_type/resource_identifier Eg: - * projects/{project}/locations/{location}, - * folders/{folder}/locations/{location} + * Required. Project or folder that the audit scope report is generated for, + * in one of the following formats: + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` * * Generated from protobuf field string scope = 2 [(.google.api.field_behavior) = REQUIRED]; */ protected $scope = ''; /** - * Required. Compliance Standard against which the Scope Report must be - * generated. Eg: FEDRAMP_MODERATE + * Optional. Deprecated. The standard (industry or regulatory requirements) + * that the audit scope report is run against. + * Use the `compliance_framework` field instead. * - * Generated from protobuf field string compliance_standard = 3 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field string compliance_standard = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @deprecated */ protected $compliance_standard = ''; /** - * Required. The format in which the Scope report bytes should be returned. + * Required. Format for the audit scope report. * * Generated from protobuf field .google.cloud.auditmanager.v1.GenerateAuditScopeReportRequest.AuditScopeReportFormat report_format = 4 [(.google.api.field_behavior) = REQUIRED]; */ protected $report_format = 0; /** - * Required. Compliance framework against which the Scope Report must be - * generated. + * Required. Framework (set of controls) that the audit scope report is + * generated against. For example, `NIST_800_53`. * * Generated from protobuf field string compliance_framework = 5 [(.google.api.field_behavior) = REQUIRED]; */ protected $compliance_framework = ''; /** - * @param string $scope Required. Scope for which the AuditScopeReport is required. Must be of - * format resource_type/resource_identifier Eg: - * projects/{project}/locations/{location}, - * folders/{folder}/locations/{location} - * @param string $complianceStandard Required. Compliance Standard against which the Scope Report must be - * generated. Eg: FEDRAMP_MODERATE - * @param int $reportFormat Required. The format in which the Scope report bytes should be returned. + * @param string $scope Required. Project or folder that the audit scope report is generated for, + * in one of the following formats: + * + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` + * @param string $complianceStandard Optional. Deprecated. The standard (industry or regulatory requirements) + * that the audit scope report is run against. + * + * Use the `compliance_framework` field instead. + * @param int $reportFormat Required. Format for the audit scope report. * For allowed values, use constants defined on {@see \Google\Cloud\AuditManager\V1\GenerateAuditScopeReportRequest\AuditScopeReportFormat} * * @return \Google\Cloud\AuditManager\V1\GenerateAuditScopeReportRequest @@ -74,18 +82,20 @@ public static function build(string $scope, string $complianceStandard, int $rep * Optional. Data for populating the Message object. * * @type string $scope - * Required. Scope for which the AuditScopeReport is required. Must be of - * format resource_type/resource_identifier Eg: - * projects/{project}/locations/{location}, - * folders/{folder}/locations/{location} + * Required. Project or folder that the audit scope report is generated for, + * in one of the following formats: + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` * @type string $compliance_standard - * Required. Compliance Standard against which the Scope Report must be - * generated. Eg: FEDRAMP_MODERATE + * Optional. Deprecated. The standard (industry or regulatory requirements) + * that the audit scope report is run against. + * Use the `compliance_framework` field instead. * @type int $report_format - * Required. The format in which the Scope report bytes should be returned. + * Required. Format for the audit scope report. * @type string $compliance_framework - * Required. Compliance framework against which the Scope Report must be - * generated. + * Required. Framework (set of controls) that the audit scope report is + * generated against. For example, `NIST_800_53`. * } */ public function __construct($data = NULL) { @@ -94,10 +104,11 @@ public function __construct($data = NULL) { } /** - * Required. Scope for which the AuditScopeReport is required. Must be of - * format resource_type/resource_identifier Eg: - * projects/{project}/locations/{location}, - * folders/{folder}/locations/{location} + * Required. Project or folder that the audit scope report is generated for, + * in one of the following formats: + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` * * Generated from protobuf field string scope = 2 [(.google.api.field_behavior) = REQUIRED]; * @return string @@ -108,10 +119,11 @@ public function getScope() } /** - * Required. Scope for which the AuditScopeReport is required. Must be of - * format resource_type/resource_identifier Eg: - * projects/{project}/locations/{location}, - * folders/{folder}/locations/{location} + * Required. Project or folder that the audit scope report is generated for, + * in one of the following formats: + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` * * Generated from protobuf field string scope = 2 [(.google.api.field_behavior) = REQUIRED]; * @param string $var @@ -126,27 +138,35 @@ public function setScope($var) } /** - * Required. Compliance Standard against which the Scope Report must be - * generated. Eg: FEDRAMP_MODERATE + * Optional. Deprecated. The standard (industry or regulatory requirements) + * that the audit scope report is run against. + * Use the `compliance_framework` field instead. * - * Generated from protobuf field string compliance_standard = 3 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field string compliance_standard = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; * @return string + * @deprecated */ public function getComplianceStandard() { + if ($this->compliance_standard !== '') { + @trigger_error('compliance_standard is deprecated.', E_USER_DEPRECATED); + } return $this->compliance_standard; } /** - * Required. Compliance Standard against which the Scope Report must be - * generated. Eg: FEDRAMP_MODERATE + * Optional. Deprecated. The standard (industry or regulatory requirements) + * that the audit scope report is run against. + * Use the `compliance_framework` field instead. * - * Generated from protobuf field string compliance_standard = 3 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field string compliance_standard = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this + * @deprecated */ public function setComplianceStandard($var) { + @trigger_error('compliance_standard is deprecated.', E_USER_DEPRECATED); GPBUtil::checkString($var, True); $this->compliance_standard = $var; @@ -154,7 +174,7 @@ public function setComplianceStandard($var) } /** - * Required. The format in which the Scope report bytes should be returned. + * Required. Format for the audit scope report. * * Generated from protobuf field .google.cloud.auditmanager.v1.GenerateAuditScopeReportRequest.AuditScopeReportFormat report_format = 4 [(.google.api.field_behavior) = REQUIRED]; * @return int @@ -165,7 +185,7 @@ public function getReportFormat() } /** - * Required. The format in which the Scope report bytes should be returned. + * Required. Format for the audit scope report. * * Generated from protobuf field .google.cloud.auditmanager.v1.GenerateAuditScopeReportRequest.AuditScopeReportFormat report_format = 4 [(.google.api.field_behavior) = REQUIRED]; * @param int $var @@ -180,8 +200,8 @@ public function setReportFormat($var) } /** - * Required. Compliance framework against which the Scope Report must be - * generated. + * Required. Framework (set of controls) that the audit scope report is + * generated against. For example, `NIST_800_53`. * * Generated from protobuf field string compliance_framework = 5 [(.google.api.field_behavior) = REQUIRED]; * @return string @@ -192,8 +212,8 @@ public function getComplianceFramework() } /** - * Required. Compliance framework against which the Scope Report must be - * generated. + * Required. Framework (set of controls) that the audit scope report is + * generated against. For example, `NIST_800_53`. * * Generated from protobuf field string compliance_framework = 5 [(.google.api.field_behavior) = REQUIRED]; * @param string $var diff --git a/AuditManager/src/V1/GenerateAuditScopeReportRequest/AuditScopeReportFormat.php b/AuditManager/src/V1/GenerateAuditScopeReportRequest/AuditScopeReportFormat.php index 2a7537779bb9..05ee0385b32d 100644 --- a/AuditManager/src/V1/GenerateAuditScopeReportRequest/AuditScopeReportFormat.php +++ b/AuditManager/src/V1/GenerateAuditScopeReportRequest/AuditScopeReportFormat.php @@ -7,20 +7,20 @@ use UnexpectedValueException; /** - * The options for the audit scope report format. + * Format for the audit scope report. * * Protobuf type google.cloud.auditmanager.v1.GenerateAuditScopeReportRequest.AuditScopeReportFormat */ class AuditScopeReportFormat { /** - * Unspecified. Invalid format. + * Default value. This value is unused. * * Generated from protobuf enum AUDIT_SCOPE_REPORT_FORMAT_UNSPECIFIED = 0; */ const AUDIT_SCOPE_REPORT_FORMAT_UNSPECIFIED = 0; /** - * Audit Scope Report creation format is Open Document. + * Open Document format. * * Generated from protobuf enum AUDIT_SCOPE_REPORT_FORMAT_ODF = 1; */ diff --git a/AuditManager/src/V1/GetAuditReportRequest.php b/AuditManager/src/V1/GetAuditReportRequest.php index 4f091bad0900..938b2f0c35a8 100644 --- a/AuditManager/src/V1/GetAuditReportRequest.php +++ b/AuditManager/src/V1/GetAuditReportRequest.php @@ -9,25 +9,29 @@ use Google\Protobuf\RepeatedField; /** - * Message for requesting the overall audit report for an audit report name. + * Request message for + * [GetAuditReport][google.cloud.auditmanager.v1.AuditManager.GetAuditReport]. * * Generated from protobuf message google.cloud.auditmanager.v1.GetAuditReportRequest */ class GetAuditReportRequest extends \Google\Protobuf\Internal\Message { /** - * Required. Format - * projects/{project}/locations/{location}/auditReports/{audit_report}, - * folders/{folder}/locations/{location}/auditReports/{audit_report} + * Required. Name of the audit report, in one of the following formats: + * * `projects/{project}/locations/{location}/auditReports/{audit_report}` + * * `folders/{folder}/locations/{location}/auditReports/{audit_report}` + * * `organizations/{organization}/locations/{location}/auditReports/{audit_report}` * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ protected $name = ''; /** - * @param string $name Required. Format - * projects/{project}/locations/{location}/auditReports/{audit_report}, - * folders/{folder}/locations/{location}/auditReports/{audit_report} + * @param string $name Required. Name of the audit report, in one of the following formats: + * + * * `projects/{project}/locations/{location}/auditReports/{audit_report}` + * * `folders/{folder}/locations/{location}/auditReports/{audit_report}` + * * `organizations/{organization}/locations/{location}/auditReports/{audit_report}` * Please see {@see AuditManagerClient::auditReportName()} for help formatting this field. * * @return \Google\Cloud\AuditManager\V1\GetAuditReportRequest @@ -47,9 +51,10 @@ public static function build(string $name): self * Optional. Data for populating the Message object. * * @type string $name - * Required. Format - * projects/{project}/locations/{location}/auditReports/{audit_report}, - * folders/{folder}/locations/{location}/auditReports/{audit_report} + * Required. Name of the audit report, in one of the following formats: + * * `projects/{project}/locations/{location}/auditReports/{audit_report}` + * * `folders/{folder}/locations/{location}/auditReports/{audit_report}` + * * `organizations/{organization}/locations/{location}/auditReports/{audit_report}` * } */ public function __construct($data = NULL) { @@ -58,9 +63,10 @@ public function __construct($data = NULL) { } /** - * Required. Format - * projects/{project}/locations/{location}/auditReports/{audit_report}, - * folders/{folder}/locations/{location}/auditReports/{audit_report} + * Required. Name of the audit report, in one of the following formats: + * * `projects/{project}/locations/{location}/auditReports/{audit_report}` + * * `folders/{folder}/locations/{location}/auditReports/{audit_report}` + * * `organizations/{organization}/locations/{location}/auditReports/{audit_report}` * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string @@ -71,9 +77,10 @@ public function getName() } /** - * Required. Format - * projects/{project}/locations/{location}/auditReports/{audit_report}, - * folders/{folder}/locations/{location}/auditReports/{audit_report} + * Required. Name of the audit report, in one of the following formats: + * * `projects/{project}/locations/{location}/auditReports/{audit_report}` + * * `folders/{folder}/locations/{location}/auditReports/{audit_report}` + * * `organizations/{organization}/locations/{location}/auditReports/{audit_report}` * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var diff --git a/AuditManager/src/V1/GetResourceEnrollmentStatusRequest.php b/AuditManager/src/V1/GetResourceEnrollmentStatusRequest.php index a5bb1bd71f39..cc5898abe2c0 100644 --- a/AuditManager/src/V1/GetResourceEnrollmentStatusRequest.php +++ b/AuditManager/src/V1/GetResourceEnrollmentStatusRequest.php @@ -9,27 +9,31 @@ use Google\Protobuf\RepeatedField; /** - * Message for getting the enrollment status of a resource. + * Request message for + * [GetResourceEnrollmentStatus][google.cloud.auditmanager.v1.AuditManager.GetResourceEnrollmentStatus]. * * Generated from protobuf message google.cloud.auditmanager.v1.GetResourceEnrollmentStatusRequest */ class GetResourceEnrollmentStatusRequest extends \Google\Protobuf\Internal\Message { /** - * Required. Format - * folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}, - * projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}, - * organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status} + * Required. Name of the resource enrollment status, in one of the following + * formats: + * * `folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * * `projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * * `organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ protected $name = ''; /** - * @param string $name Required. Format - * folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}, - * projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}, - * organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status} + * @param string $name Required. Name of the resource enrollment status, in one of the following + * formats: + * + * * `folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * * `projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * * `organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` * Please see {@see AuditManagerClient::resourceEnrollmentStatusName()} for help formatting this field. * * @return \Google\Cloud\AuditManager\V1\GetResourceEnrollmentStatusRequest @@ -49,10 +53,11 @@ public static function build(string $name): self * Optional. Data for populating the Message object. * * @type string $name - * Required. Format - * folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}, - * projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}, - * organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status} + * Required. Name of the resource enrollment status, in one of the following + * formats: + * * `folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * * `projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * * `organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` * } */ public function __construct($data = NULL) { @@ -61,10 +66,11 @@ public function __construct($data = NULL) { } /** - * Required. Format - * folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}, - * projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}, - * organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status} + * Required. Name of the resource enrollment status, in one of the following + * formats: + * * `folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * * `projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * * `organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string @@ -75,10 +81,11 @@ public function getName() } /** - * Required. Format - * folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}, - * projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}, - * organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status} + * Required. Name of the resource enrollment status, in one of the following + * formats: + * * `folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * * `projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * * `organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var diff --git a/AuditManager/src/V1/ListAuditReportsRequest.php b/AuditManager/src/V1/ListAuditReportsRequest.php index ba5f1497b89a..048052f5d864 100644 --- a/AuditManager/src/V1/ListAuditReportsRequest.php +++ b/AuditManager/src/V1/ListAuditReportsRequest.php @@ -9,35 +9,48 @@ use Google\Protobuf\RepeatedField; /** - * Message for requesting to list the audit reports. + * Request message for + * [ListAuditReports][google.cloud.auditmanager.v1.AuditManager.ListAuditReports]. * * Generated from protobuf message google.cloud.auditmanager.v1.ListAuditReportsRequest */ class ListAuditReportsRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The parent scope for which to list the reports. + * Required. Parent organization, folder, or project to list reports for, + * in one of the following formats: + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ protected $parent = ''; /** - * Optional. The maximum number of resources to return. + * Optional. Maximum number of items to return in a single page. The service + * might return fewer items than this value. If unspecified, the service picks + * an appropriate default. The maximum value is 100; values above 100 are + * reduced to 100. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; */ protected $page_size = 0; /** - * Optional. The next_page_token value returned from a previous List request, - * if any. + * Optional. A page token, received from a previous call, to retrieve the next + * page of results. * * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; */ protected $page_token = ''; /** - * @param string $parent Required. The parent scope for which to list the reports. Please see - * {@see AuditManagerClient::folderLocationName()} for help formatting this field. + * @param string $parent Required. Parent organization, folder, or project to list reports for, + * in one of the following formats: + * + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` + * Please see {@see AuditManagerClient::folderLocationName()} for help formatting this field. * * @return \Google\Cloud\AuditManager\V1\ListAuditReportsRequest * @@ -56,12 +69,19 @@ public static function build(string $parent): self * Optional. Data for populating the Message object. * * @type string $parent - * Required. The parent scope for which to list the reports. + * Required. Parent organization, folder, or project to list reports for, + * in one of the following formats: + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` * @type int $page_size - * Optional. The maximum number of resources to return. + * Optional. Maximum number of items to return in a single page. The service + * might return fewer items than this value. If unspecified, the service picks + * an appropriate default. The maximum value is 100; values above 100 are + * reduced to 100. * @type string $page_token - * Optional. The next_page_token value returned from a previous List request, - * if any. + * Optional. A page token, received from a previous call, to retrieve the next + * page of results. * } */ public function __construct($data = NULL) { @@ -70,7 +90,11 @@ public function __construct($data = NULL) { } /** - * Required. The parent scope for which to list the reports. + * Required. Parent organization, folder, or project to list reports for, + * in one of the following formats: + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string @@ -81,7 +105,11 @@ public function getParent() } /** - * Required. The parent scope for which to list the reports. + * Required. Parent organization, folder, or project to list reports for, + * in one of the following formats: + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var @@ -96,7 +124,10 @@ public function setParent($var) } /** - * Optional. The maximum number of resources to return. + * Optional. Maximum number of items to return in a single page. The service + * might return fewer items than this value. If unspecified, the service picks + * an appropriate default. The maximum value is 100; values above 100 are + * reduced to 100. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return int @@ -107,7 +138,10 @@ public function getPageSize() } /** - * Optional. The maximum number of resources to return. + * Optional. Maximum number of items to return in a single page. The service + * might return fewer items than this value. If unspecified, the service picks + * an appropriate default. The maximum value is 100; values above 100 are + * reduced to 100. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param int $var @@ -122,8 +156,8 @@ public function setPageSize($var) } /** - * Optional. The next_page_token value returned from a previous List request, - * if any. + * Optional. A page token, received from a previous call, to retrieve the next + * page of results. * * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * @return string @@ -134,8 +168,8 @@ public function getPageToken() } /** - * Optional. The next_page_token value returned from a previous List request, - * if any. + * Optional. A page token, received from a previous call, to retrieve the next + * page of results. * * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var diff --git a/AuditManager/src/V1/ListAuditReportsResponse.php b/AuditManager/src/V1/ListAuditReportsResponse.php index bab0af2906ca..17b03c5236ea 100644 --- a/AuditManager/src/V1/ListAuditReportsResponse.php +++ b/AuditManager/src/V1/ListAuditReportsResponse.php @@ -9,20 +9,23 @@ use Google\Protobuf\RepeatedField; /** - * Response message with all the audit reports. + * Response message for + * [ListAuditReports][google.cloud.auditmanager.v1.AuditManager.ListAuditReports]. * * Generated from protobuf message google.cloud.auditmanager.v1.ListAuditReportsResponse */ class ListAuditReportsResponse extends \Google\Protobuf\Internal\Message { /** - * Output only. The audit reports. + * Output only. Audit reports. * * Generated from protobuf field repeated .google.cloud.auditmanager.v1.AuditReport audit_reports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ private $audit_reports; /** - * Output only. The token to retrieve the next page of results. + * Output only. A token that you can send as the `page_token` in a subsequent + * request to retrieve the next page of results. If this field is empty, there + * are no subsequent pages. * * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ @@ -35,9 +38,11 @@ class ListAuditReportsResponse extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type \Google\Cloud\AuditManager\V1\AuditReport[] $audit_reports - * Output only. The audit reports. + * Output only. Audit reports. * @type string $next_page_token - * Output only. The token to retrieve the next page of results. + * Output only. A token that you can send as the `page_token` in a subsequent + * request to retrieve the next page of results. If this field is empty, there + * are no subsequent pages. * } */ public function __construct($data = NULL) { @@ -46,7 +51,7 @@ public function __construct($data = NULL) { } /** - * Output only. The audit reports. + * Output only. Audit reports. * * Generated from protobuf field repeated .google.cloud.auditmanager.v1.AuditReport audit_reports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return RepeatedField<\Google\Cloud\AuditManager\V1\AuditReport> @@ -57,7 +62,7 @@ public function getAuditReports() } /** - * Output only. The audit reports. + * Output only. Audit reports. * * Generated from protobuf field repeated .google.cloud.auditmanager.v1.AuditReport audit_reports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param \Google\Cloud\AuditManager\V1\AuditReport[] $var @@ -72,7 +77,9 @@ public function setAuditReports($var) } /** - * Output only. The token to retrieve the next page of results. + * Output only. A token that you can send as the `page_token` in a subsequent + * request to retrieve the next page of results. If this field is empty, there + * are no subsequent pages. * * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return string @@ -83,7 +90,9 @@ public function getNextPageToken() } /** - * Output only. The token to retrieve the next page of results. + * Output only. A token that you can send as the `page_token` in a subsequent + * request to retrieve the next page of results. If this field is empty, there + * are no subsequent pages. * * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param string $var diff --git a/AuditManager/src/V1/ListControlsRequest.php b/AuditManager/src/V1/ListControlsRequest.php index 8ebee680cbc5..c377232415e9 100644 --- a/AuditManager/src/V1/ListControlsRequest.php +++ b/AuditManager/src/V1/ListControlsRequest.php @@ -9,38 +9,45 @@ use Google\Protobuf\RepeatedField; /** - * Message for requesting all the controls for a compliance standard. + * Request message for + * [ListControls][google.cloud.auditmanager.v1.AuditManager.ListControls]. * * Generated from protobuf message google.cloud.auditmanager.v1.ListControlsRequest */ class ListControlsRequest extends \Google\Protobuf\Internal\Message { /** - * Required. Format - * projects/{project}/locations/{location}/standards/{standard}, - * folders/{folder}/locations/{location}/standards/{standard} + * Required. Standard to list controls for, in one of the following formats: + * * `projects/{project}/locations/{location}/standards/{standard}` + * * `folders/{folder}/locations/{location}/standards/{standard}` + * * `organizations/{organization}/locations/{location}/standards/{standard}` * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ protected $parent = ''; /** - * Optional. The maximum number of resources to return. + * Optional. Maximum number of items to return in a single page. The service + * might return fewer items than this value. If unspecified, the service picks + * an appropriate default. The maximum value is 100; values above 100 are + * reduced to 100. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; */ protected $page_size = 0; /** - * Optional. The next_page_token value returned from a previous List request, - * if any. + * Optional. A page token, received from a previous call, to retrieve the next + * page of results. * * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; */ protected $page_token = ''; /** - * @param string $parent Required. Format - * projects/{project}/locations/{location}/standards/{standard}, - * folders/{folder}/locations/{location}/standards/{standard} + * @param string $parent Required. Standard to list controls for, in one of the following formats: + * + * * `projects/{project}/locations/{location}/standards/{standard}` + * * `folders/{folder}/locations/{location}/standards/{standard}` + * * `organizations/{organization}/locations/{location}/standards/{standard}` * Please see {@see AuditManagerClient::standardName()} for help formatting this field. * * @return \Google\Cloud\AuditManager\V1\ListControlsRequest @@ -60,14 +67,18 @@ public static function build(string $parent): self * Optional. Data for populating the Message object. * * @type string $parent - * Required. Format - * projects/{project}/locations/{location}/standards/{standard}, - * folders/{folder}/locations/{location}/standards/{standard} + * Required. Standard to list controls for, in one of the following formats: + * * `projects/{project}/locations/{location}/standards/{standard}` + * * `folders/{folder}/locations/{location}/standards/{standard}` + * * `organizations/{organization}/locations/{location}/standards/{standard}` * @type int $page_size - * Optional. The maximum number of resources to return. + * Optional. Maximum number of items to return in a single page. The service + * might return fewer items than this value. If unspecified, the service picks + * an appropriate default. The maximum value is 100; values above 100 are + * reduced to 100. * @type string $page_token - * Optional. The next_page_token value returned from a previous List request, - * if any. + * Optional. A page token, received from a previous call, to retrieve the next + * page of results. * } */ public function __construct($data = NULL) { @@ -76,9 +87,10 @@ public function __construct($data = NULL) { } /** - * Required. Format - * projects/{project}/locations/{location}/standards/{standard}, - * folders/{folder}/locations/{location}/standards/{standard} + * Required. Standard to list controls for, in one of the following formats: + * * `projects/{project}/locations/{location}/standards/{standard}` + * * `folders/{folder}/locations/{location}/standards/{standard}` + * * `organizations/{organization}/locations/{location}/standards/{standard}` * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string @@ -89,9 +101,10 @@ public function getParent() } /** - * Required. Format - * projects/{project}/locations/{location}/standards/{standard}, - * folders/{folder}/locations/{location}/standards/{standard} + * Required. Standard to list controls for, in one of the following formats: + * * `projects/{project}/locations/{location}/standards/{standard}` + * * `folders/{folder}/locations/{location}/standards/{standard}` + * * `organizations/{organization}/locations/{location}/standards/{standard}` * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var @@ -106,7 +119,10 @@ public function setParent($var) } /** - * Optional. The maximum number of resources to return. + * Optional. Maximum number of items to return in a single page. The service + * might return fewer items than this value. If unspecified, the service picks + * an appropriate default. The maximum value is 100; values above 100 are + * reduced to 100. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return int @@ -117,7 +133,10 @@ public function getPageSize() } /** - * Optional. The maximum number of resources to return. + * Optional. Maximum number of items to return in a single page. The service + * might return fewer items than this value. If unspecified, the service picks + * an appropriate default. The maximum value is 100; values above 100 are + * reduced to 100. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param int $var @@ -132,8 +151,8 @@ public function setPageSize($var) } /** - * Optional. The next_page_token value returned from a previous List request, - * if any. + * Optional. A page token, received from a previous call, to retrieve the next + * page of results. * * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * @return string @@ -144,8 +163,8 @@ public function getPageToken() } /** - * Optional. The next_page_token value returned from a previous List request, - * if any. + * Optional. A page token, received from a previous call, to retrieve the next + * page of results. * * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var diff --git a/AuditManager/src/V1/ListControlsResponse.php b/AuditManager/src/V1/ListControlsResponse.php index 6888730ac5fc..df4f807cbd71 100644 --- a/AuditManager/src/V1/ListControlsResponse.php +++ b/AuditManager/src/V1/ListControlsResponse.php @@ -9,20 +9,23 @@ use Google\Protobuf\RepeatedField; /** - * Response message with all the controls for a compliance standard. + * Response message for + * [ListControls][google.cloud.auditmanager.v1.AuditManager.ListControls]. * * Generated from protobuf message google.cloud.auditmanager.v1.ListControlsResponse */ class ListControlsResponse extends \Google\Protobuf\Internal\Message { /** - * Output only. The controls for the compliance standard. + * Output only. Controls for a given regulatory standard. * * Generated from protobuf field repeated .google.cloud.auditmanager.v1.Control controls = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ private $controls; /** - * Output only. The token to retrieve the next page of results. + * Output only. A token that you can send as the `page_token` in a subsequent + * request to retrieve the next page of results. If this field is empty, there + * are no subsequent pages. * * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ @@ -35,9 +38,11 @@ class ListControlsResponse extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type \Google\Cloud\AuditManager\V1\Control[] $controls - * Output only. The controls for the compliance standard. + * Output only. Controls for a given regulatory standard. * @type string $next_page_token - * Output only. The token to retrieve the next page of results. + * Output only. A token that you can send as the `page_token` in a subsequent + * request to retrieve the next page of results. If this field is empty, there + * are no subsequent pages. * } */ public function __construct($data = NULL) { @@ -46,7 +51,7 @@ public function __construct($data = NULL) { } /** - * Output only. The controls for the compliance standard. + * Output only. Controls for a given regulatory standard. * * Generated from protobuf field repeated .google.cloud.auditmanager.v1.Control controls = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return RepeatedField<\Google\Cloud\AuditManager\V1\Control> @@ -57,7 +62,7 @@ public function getControls() } /** - * Output only. The controls for the compliance standard. + * Output only. Controls for a given regulatory standard. * * Generated from protobuf field repeated .google.cloud.auditmanager.v1.Control controls = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param \Google\Cloud\AuditManager\V1\Control[] $var @@ -72,7 +77,9 @@ public function setControls($var) } /** - * Output only. The token to retrieve the next page of results. + * Output only. A token that you can send as the `page_token` in a subsequent + * request to retrieve the next page of results. If this field is empty, there + * are no subsequent pages. * * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return string @@ -83,7 +90,9 @@ public function getNextPageToken() } /** - * Output only. The token to retrieve the next page of results. + * Output only. A token that you can send as the `page_token` in a subsequent + * request to retrieve the next page of results. If this field is empty, there + * are no subsequent pages. * * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param string $var diff --git a/AuditManager/src/V1/ListResourceEnrollmentStatusesRequest.php b/AuditManager/src/V1/ListResourceEnrollmentStatusesRequest.php index 8b5edc40a2db..6b11c3629db0 100644 --- a/AuditManager/src/V1/ListResourceEnrollmentStatusesRequest.php +++ b/AuditManager/src/V1/ListResourceEnrollmentStatusesRequest.php @@ -9,38 +9,46 @@ use Google\Protobuf\RepeatedField; /** - * Message for listing all the descendent resources under parent with - * enrollment. + * Request message for + * [ListResourceEnrollmentStatuses][google.cloud.auditmanager.v1.AuditManager.ListResourceEnrollmentStatuses]. * * Generated from protobuf message google.cloud.auditmanager.v1.ListResourceEnrollmentStatusesRequest */ class ListResourceEnrollmentStatusesRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The parent scope for which the list of resources with enrollments - * are required. + * Required. Parent organization or folder to list enrollment statuses for, + * in one of the following formats: + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ protected $parent = ''; /** - * Optional. The maximum number of resources to return. + * Optional. Maximum number of items to return in a single page. The service + * might return fewer items than this value. If unspecified, the service picks + * an appropriate default. The maximum value is 100; values above 100 are + * reduced to 100. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; */ protected $page_size = 0; /** - * Optional. The next_page_token value returned from a previous List request, - * if any. + * Optional. A page token, received from a previous call, to retrieve the next + * page of results. * * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; */ protected $page_token = ''; /** - * @param string $parent Required. The parent scope for which the list of resources with enrollments - * are required. Please see - * {@see AuditManagerClient::enrollmentStatusScopeName()} for help formatting this field. + * @param string $parent Required. Parent organization or folder to list enrollment statuses for, + * in one of the following formats: + * + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` + * Please see {@see AuditManagerClient::enrollmentStatusScopeName()} for help formatting this field. * * @return \Google\Cloud\AuditManager\V1\ListResourceEnrollmentStatusesRequest * @@ -59,13 +67,18 @@ public static function build(string $parent): self * Optional. Data for populating the Message object. * * @type string $parent - * Required. The parent scope for which the list of resources with enrollments - * are required. + * Required. Parent organization or folder to list enrollment statuses for, + * in one of the following formats: + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` * @type int $page_size - * Optional. The maximum number of resources to return. + * Optional. Maximum number of items to return in a single page. The service + * might return fewer items than this value. If unspecified, the service picks + * an appropriate default. The maximum value is 100; values above 100 are + * reduced to 100. * @type string $page_token - * Optional. The next_page_token value returned from a previous List request, - * if any. + * Optional. A page token, received from a previous call, to retrieve the next + * page of results. * } */ public function __construct($data = NULL) { @@ -74,8 +87,10 @@ public function __construct($data = NULL) { } /** - * Required. The parent scope for which the list of resources with enrollments - * are required. + * Required. Parent organization or folder to list enrollment statuses for, + * in one of the following formats: + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string @@ -86,8 +101,10 @@ public function getParent() } /** - * Required. The parent scope for which the list of resources with enrollments - * are required. + * Required. Parent organization or folder to list enrollment statuses for, + * in one of the following formats: + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var @@ -102,7 +119,10 @@ public function setParent($var) } /** - * Optional. The maximum number of resources to return. + * Optional. Maximum number of items to return in a single page. The service + * might return fewer items than this value. If unspecified, the service picks + * an appropriate default. The maximum value is 100; values above 100 are + * reduced to 100. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return int @@ -113,7 +133,10 @@ public function getPageSize() } /** - * Optional. The maximum number of resources to return. + * Optional. Maximum number of items to return in a single page. The service + * might return fewer items than this value. If unspecified, the service picks + * an appropriate default. The maximum value is 100; values above 100 are + * reduced to 100. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param int $var @@ -128,8 +151,8 @@ public function setPageSize($var) } /** - * Optional. The next_page_token value returned from a previous List request, - * if any. + * Optional. A page token, received from a previous call, to retrieve the next + * page of results. * * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * @return string @@ -140,8 +163,8 @@ public function getPageToken() } /** - * Optional. The next_page_token value returned from a previous List request, - * if any. + * Optional. A page token, received from a previous call, to retrieve the next + * page of results. * * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var diff --git a/AuditManager/src/V1/ListResourceEnrollmentStatusesResponse.php b/AuditManager/src/V1/ListResourceEnrollmentStatusesResponse.php index d3941c86c9d7..364a0db41947 100644 --- a/AuditManager/src/V1/ListResourceEnrollmentStatusesResponse.php +++ b/AuditManager/src/V1/ListResourceEnrollmentStatusesResponse.php @@ -9,20 +9,23 @@ use Google\Protobuf\RepeatedField; /** - * Response message with all the descendent resources with enrollment. + * Response message for + * [ListResourceEnrollmentStatuses][google.cloud.auditmanager.v1.AuditManager.ListResourceEnrollmentStatuses]. * * Generated from protobuf message google.cloud.auditmanager.v1.ListResourceEnrollmentStatusesResponse */ class ListResourceEnrollmentStatusesResponse extends \Google\Protobuf\Internal\Message { /** - * The resources with their enrollment status. + * Resources with their enrollment status. * * Generated from protobuf field repeated .google.cloud.auditmanager.v1.ResourceEnrollmentStatus resource_enrollment_statuses = 1; */ private $resource_enrollment_statuses; /** - * Output only. The token to retrieve the next page of results. + * Output only. A token that you can send as the `page_token` in a subsequent + * request to retrieve the next page of results. If this field is empty, there + * are no subsequent pages. * * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ @@ -35,9 +38,11 @@ class ListResourceEnrollmentStatusesResponse extends \Google\Protobuf\Internal\M * Optional. Data for populating the Message object. * * @type \Google\Cloud\AuditManager\V1\ResourceEnrollmentStatus[] $resource_enrollment_statuses - * The resources with their enrollment status. + * Resources with their enrollment status. * @type string $next_page_token - * Output only. The token to retrieve the next page of results. + * Output only. A token that you can send as the `page_token` in a subsequent + * request to retrieve the next page of results. If this field is empty, there + * are no subsequent pages. * } */ public function __construct($data = NULL) { @@ -46,7 +51,7 @@ public function __construct($data = NULL) { } /** - * The resources with their enrollment status. + * Resources with their enrollment status. * * Generated from protobuf field repeated .google.cloud.auditmanager.v1.ResourceEnrollmentStatus resource_enrollment_statuses = 1; * @return RepeatedField<\Google\Cloud\AuditManager\V1\ResourceEnrollmentStatus> @@ -57,7 +62,7 @@ public function getResourceEnrollmentStatuses() } /** - * The resources with their enrollment status. + * Resources with their enrollment status. * * Generated from protobuf field repeated .google.cloud.auditmanager.v1.ResourceEnrollmentStatus resource_enrollment_statuses = 1; * @param \Google\Cloud\AuditManager\V1\ResourceEnrollmentStatus[] $var @@ -72,7 +77,9 @@ public function setResourceEnrollmentStatuses($var) } /** - * Output only. The token to retrieve the next page of results. + * Output only. A token that you can send as the `page_token` in a subsequent + * request to retrieve the next page of results. If this field is empty, there + * are no subsequent pages. * * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return string @@ -83,7 +90,9 @@ public function getNextPageToken() } /** - * Output only. The token to retrieve the next page of results. + * Output only. A token that you can send as the `page_token` in a subsequent + * request to retrieve the next page of results. If this field is empty, there + * are no subsequent pages. * * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param string $var diff --git a/AuditManager/src/V1/OperationMetadata.php b/AuditManager/src/V1/OperationMetadata.php index bca8a30b43ab..5a51a0fa651f 100644 --- a/AuditManager/src/V1/OperationMetadata.php +++ b/AuditManager/src/V1/OperationMetadata.php @@ -9,54 +9,56 @@ use Google\Protobuf\RepeatedField; /** - * The metadata of the long-running operation. + * Metadata for the long-running operation. * * Generated from protobuf message google.cloud.auditmanager.v1.OperationMetadata */ class OperationMetadata extends \Google\Protobuf\Internal\Message { /** - * Output only. The time the operation was created. + * Output only. Time that the operation was created. * * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ protected $create_time = null; /** - * Output only. The time the operation finished running. + * Output only. Time that the operation finished running. * * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ protected $end_time = null; /** - * Output only. Server-defined resource path for the target of the operation. + * Output only. A server-defined resource path for the target of the + * operation. * * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ protected $target = ''; /** - * Output only. Name of the verb executed by the operation. + * Output only. The name of the verb that was executed by the operation. * * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ protected $verb = ''; /** - * Output only. Human-readable status of the operation, if any. + * Output only. A human-readable status of the operation, if any. * * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ protected $status_message = ''; /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have been cancelled successfully - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. + * Output only. Whether you requested that the operation be cancelled. + * Operations that were cancelled successfully have an + * [Operation.error][google.longrunning.Operation.error] + * value with a status code + * [Code.CANCELLED][google.rpc.Status.code.CANCELLED]. * * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ protected $requested_cancellation = false; /** - * Output only. API version used to start the operation. + * Output only. The API version used to start the operation. For example, + * `v1`. * * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ @@ -69,23 +71,25 @@ class OperationMetadata extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time the operation was created. + * Output only. Time that the operation was created. * @type \Google\Protobuf\Timestamp $end_time - * Output only. The time the operation finished running. + * Output only. Time that the operation finished running. * @type string $target - * Output only. Server-defined resource path for the target of the operation. + * Output only. A server-defined resource path for the target of the + * operation. * @type string $verb - * Output only. Name of the verb executed by the operation. + * Output only. The name of the verb that was executed by the operation. * @type string $status_message - * Output only. Human-readable status of the operation, if any. + * Output only. A human-readable status of the operation, if any. * @type bool $requested_cancellation - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have been cancelled successfully - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. + * Output only. Whether you requested that the operation be cancelled. + * Operations that were cancelled successfully have an + * [Operation.error][google.longrunning.Operation.error] + * value with a status code + * [Code.CANCELLED][google.rpc.Status.code.CANCELLED]. * @type string $api_version - * Output only. API version used to start the operation. + * Output only. The API version used to start the operation. For example, + * `v1`. * } */ public function __construct($data = NULL) { @@ -94,7 +98,7 @@ public function __construct($data = NULL) { } /** - * Output only. The time the operation was created. + * Output only. Time that the operation was created. * * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return \Google\Protobuf\Timestamp|null @@ -115,7 +119,7 @@ public function clearCreateTime() } /** - * Output only. The time the operation was created. + * Output only. Time that the operation was created. * * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param \Google\Protobuf\Timestamp $var @@ -130,7 +134,7 @@ public function setCreateTime($var) } /** - * Output only. The time the operation finished running. + * Output only. Time that the operation finished running. * * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return \Google\Protobuf\Timestamp|null @@ -151,7 +155,7 @@ public function clearEndTime() } /** - * Output only. The time the operation finished running. + * Output only. Time that the operation finished running. * * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param \Google\Protobuf\Timestamp $var @@ -166,7 +170,8 @@ public function setEndTime($var) } /** - * Output only. Server-defined resource path for the target of the operation. + * Output only. A server-defined resource path for the target of the + * operation. * * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return string @@ -177,7 +182,8 @@ public function getTarget() } /** - * Output only. Server-defined resource path for the target of the operation. + * Output only. A server-defined resource path for the target of the + * operation. * * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param string $var @@ -192,7 +198,7 @@ public function setTarget($var) } /** - * Output only. Name of the verb executed by the operation. + * Output only. The name of the verb that was executed by the operation. * * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return string @@ -203,7 +209,7 @@ public function getVerb() } /** - * Output only. Name of the verb executed by the operation. + * Output only. The name of the verb that was executed by the operation. * * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param string $var @@ -218,7 +224,7 @@ public function setVerb($var) } /** - * Output only. Human-readable status of the operation, if any. + * Output only. A human-readable status of the operation, if any. * * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return string @@ -229,7 +235,7 @@ public function getStatusMessage() } /** - * Output only. Human-readable status of the operation, if any. + * Output only. A human-readable status of the operation, if any. * * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param string $var @@ -244,11 +250,11 @@ public function setStatusMessage($var) } /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have been cancelled successfully - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. + * Output only. Whether you requested that the operation be cancelled. + * Operations that were cancelled successfully have an + * [Operation.error][google.longrunning.Operation.error] + * value with a status code + * [Code.CANCELLED][google.rpc.Status.code.CANCELLED]. * * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return bool @@ -259,11 +265,11 @@ public function getRequestedCancellation() } /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have been cancelled successfully - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. + * Output only. Whether you requested that the operation be cancelled. + * Operations that were cancelled successfully have an + * [Operation.error][google.longrunning.Operation.error] + * value with a status code + * [Code.CANCELLED][google.rpc.Status.code.CANCELLED]. * * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param bool $var @@ -278,7 +284,8 @@ public function setRequestedCancellation($var) } /** - * Output only. API version used to start the operation. + * Output only. The API version used to start the operation. For example, + * `v1`. * * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return string @@ -289,7 +296,8 @@ public function getApiVersion() } /** - * Output only. API version used to start the operation. + * Output only. The API version used to start the operation. For example, + * `v1`. * * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param string $var diff --git a/AuditManager/src/V1/OperationState.php b/AuditManager/src/V1/OperationState.php index 8abd675373a4..43de9a89b31d 100644 --- a/AuditManager/src/V1/OperationState.php +++ b/AuditManager/src/V1/OperationState.php @@ -7,64 +7,62 @@ use UnexpectedValueException; /** - * The different execution states of the Audit Manager service. + * Different execution states of the Audit Manager service. * * Protobuf type google.cloud.auditmanager.v1.OperationState */ class OperationState { /** - * Unspecified. Invalid state. + * Default value. This value is unused. * * Generated from protobuf enum OPERATION_STATE_UNSPECIFIED = 0; */ const OPERATION_STATE_UNSPECIFIED = 0; /** - * Audit report generation process has not started. + * Audit generation process hasn't started. * * Generated from protobuf enum OPERATION_STATE_NOT_STARTED = 10; */ const OPERATION_STATE_NOT_STARTED = 10; /** - * Audit Manager is currently evaluating the workloads against specific - * standard. + * Evaluation process is in progress. * * Generated from protobuf enum OPERATION_STATE_EVALUATION_IN_PROGRESS = 20; */ const OPERATION_STATE_EVALUATION_IN_PROGRESS = 20; /** - * Audit Manager has completed Evaluation for the workload. + * Evaluation process is completed. * * Generated from protobuf enum OPERATION_STATE_EVALUATION_DONE = 21; */ const OPERATION_STATE_EVALUATION_DONE = 21; /** - * Audit Manager is creating audit report from the evaluated data. + * Report generation process is in progress. * * Generated from protobuf enum OPERATION_STATE_EVIDENCE_REPORT_GENERATION_IN_PROGRESS = 30; */ const OPERATION_STATE_EVIDENCE_REPORT_GENERATION_IN_PROGRESS = 30; /** - * Audit Manager has completed generation of the audit report. + * Report generation process is completed. * * Generated from protobuf enum OPERATION_STATE_EVIDENCE_REPORT_GENERATION_DONE = 31; */ const OPERATION_STATE_EVIDENCE_REPORT_GENERATION_DONE = 31; /** - * Audit Manager is uploading the audit report and evidences to the customer - * provided destination. + * The audit report and evidence are being uploaded to your bucket. * * Generated from protobuf enum OPERATION_STATE_EVIDENCE_UPLOAD_IN_PROGRESS = 40; */ const OPERATION_STATE_EVIDENCE_UPLOAD_IN_PROGRESS = 40; /** - * Audit report generation process is completed. + * The audit report and evidence are uploaded to your bucket. * * Generated from protobuf enum OPERATION_STATE_DONE = 50; */ const OPERATION_STATE_DONE = 50; /** - * Audit report generation process has failed. + * Audit report generation process failed. * * Generated from protobuf enum OPERATION_STATE_FAILED = 60; */ diff --git a/AuditManager/src/V1/ReportGenerationProgress.php b/AuditManager/src/V1/ReportGenerationProgress.php index de9e4b86d089..8fccf8867285 100644 --- a/AuditManager/src/V1/ReportGenerationProgress.php +++ b/AuditManager/src/V1/ReportGenerationProgress.php @@ -9,64 +9,57 @@ use Google\Protobuf\RepeatedField; /** - * The `ReportGenerationProgress` is part of - * [google.longrunning.Operation][google.longrunning.Operation] returned to the - * client for every `GetOperation` request. + * Details about the current status of the report-generation process. * * Generated from protobuf message google.cloud.auditmanager.v1.ReportGenerationProgress */ class ReportGenerationProgress extends \Google\Protobuf\Internal\Message { /** - * Output only. The current state of execution for report generation. + * Output only. Current state of execution for report generation. * * Generated from protobuf field .google.cloud.auditmanager.v1.OperationState state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ protected $state = 0; /** - * Output only. States the reason of failure during the audit report - * generation process. This field is set only if the state attribute is - * OPERATION_STATE_FAILED. + * Output only. Reason for failure during the audit report generation process. + * This field is set only if the `OperationState` attribute is + * `OPERATION_STATE_FAILED`. * * Generated from protobuf field string failure_reason = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ protected $failure_reason = ''; /** - * Shows the progress of the CESS service evaluation process. The progress is - * defined in terms of percentage complete and is being fetched from the CESS - * service. + * Progress of the evaluation process. The progress is + * defined in terms of percentage complete. * * Generated from protobuf field double evaluation_percent_complete = 20; */ protected $evaluation_percent_complete = 0.0; /** - * Shows the report generation progress of the CESS Result Processor Service. - * The // progress is defined in terms of percentage complete and is being - * fetched from the CESS service. If report_generation_in_progress is non zero - * then evaluation_percent_complete will be 100%. + * Report generation progress, defined in terms of percentage complete. + * Until evaluation is complete, this value is always `0`. * * Generated from protobuf field double report_generation_percent_complete = 30; */ protected $report_generation_percent_complete = 0.0; /** - * Shows the report uploading progress of the CESS Result Processor Service. - * The progress is defined in terms of percentage complete and is being - * fetched from the CESS service. If report_uploading_in_progress is non zero - * then evaluation_percent_complete and report_generation_percent_complete - * will be 100%. + * Report uploading progress, defined in terms of percentage complete. + * Until evaluation and report generation are complete, this value is always + * `0`. * * Generated from protobuf field double report_uploading_percent_complete = 40; */ protected $report_uploading_percent_complete = 0.0; /** - * Output only. The Cloud Storage bucket where the audit report will be - * uploaded once the evaluation process is completed. + * Output only. Cloud Storage bucket where the audit report is uploaded to + * after the evaluation process is completed. * * Generated from protobuf field string destination_gcs_bucket = 50 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ protected $destination_gcs_bucket = ''; /** - * Output only. The name of the audit report. + * Output only. Name of the audit report. * * Generated from protobuf field string audit_report = 51 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { */ @@ -79,31 +72,26 @@ class ReportGenerationProgress extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type int $state - * Output only. The current state of execution for report generation. + * Output only. Current state of execution for report generation. * @type string $failure_reason - * Output only. States the reason of failure during the audit report - * generation process. This field is set only if the state attribute is - * OPERATION_STATE_FAILED. + * Output only. Reason for failure during the audit report generation process. + * This field is set only if the `OperationState` attribute is + * `OPERATION_STATE_FAILED`. * @type float $evaluation_percent_complete - * Shows the progress of the CESS service evaluation process. The progress is - * defined in terms of percentage complete and is being fetched from the CESS - * service. + * Progress of the evaluation process. The progress is + * defined in terms of percentage complete. * @type float $report_generation_percent_complete - * Shows the report generation progress of the CESS Result Processor Service. - * The // progress is defined in terms of percentage complete and is being - * fetched from the CESS service. If report_generation_in_progress is non zero - * then evaluation_percent_complete will be 100%. + * Report generation progress, defined in terms of percentage complete. + * Until evaluation is complete, this value is always `0`. * @type float $report_uploading_percent_complete - * Shows the report uploading progress of the CESS Result Processor Service. - * The progress is defined in terms of percentage complete and is being - * fetched from the CESS service. If report_uploading_in_progress is non zero - * then evaluation_percent_complete and report_generation_percent_complete - * will be 100%. + * Report uploading progress, defined in terms of percentage complete. + * Until evaluation and report generation are complete, this value is always + * `0`. * @type string $destination_gcs_bucket - * Output only. The Cloud Storage bucket where the audit report will be - * uploaded once the evaluation process is completed. + * Output only. Cloud Storage bucket where the audit report is uploaded to + * after the evaluation process is completed. * @type string $audit_report - * Output only. The name of the audit report. + * Output only. Name of the audit report. * } */ public function __construct($data = NULL) { @@ -112,7 +100,7 @@ public function __construct($data = NULL) { } /** - * Output only. The current state of execution for report generation. + * Output only. Current state of execution for report generation. * * Generated from protobuf field .google.cloud.auditmanager.v1.OperationState state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return int @@ -123,7 +111,7 @@ public function getState() } /** - * Output only. The current state of execution for report generation. + * Output only. Current state of execution for report generation. * * Generated from protobuf field .google.cloud.auditmanager.v1.OperationState state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param int $var @@ -138,9 +126,9 @@ public function setState($var) } /** - * Output only. States the reason of failure during the audit report - * generation process. This field is set only if the state attribute is - * OPERATION_STATE_FAILED. + * Output only. Reason for failure during the audit report generation process. + * This field is set only if the `OperationState` attribute is + * `OPERATION_STATE_FAILED`. * * Generated from protobuf field string failure_reason = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return string @@ -151,9 +139,9 @@ public function getFailureReason() } /** - * Output only. States the reason of failure during the audit report - * generation process. This field is set only if the state attribute is - * OPERATION_STATE_FAILED. + * Output only. Reason for failure during the audit report generation process. + * This field is set only if the `OperationState` attribute is + * `OPERATION_STATE_FAILED`. * * Generated from protobuf field string failure_reason = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param string $var @@ -168,9 +156,8 @@ public function setFailureReason($var) } /** - * Shows the progress of the CESS service evaluation process. The progress is - * defined in terms of percentage complete and is being fetched from the CESS - * service. + * Progress of the evaluation process. The progress is + * defined in terms of percentage complete. * * Generated from protobuf field double evaluation_percent_complete = 20; * @return float @@ -181,9 +168,8 @@ public function getEvaluationPercentComplete() } /** - * Shows the progress of the CESS service evaluation process. The progress is - * defined in terms of percentage complete and is being fetched from the CESS - * service. + * Progress of the evaluation process. The progress is + * defined in terms of percentage complete. * * Generated from protobuf field double evaluation_percent_complete = 20; * @param float $var @@ -198,10 +184,8 @@ public function setEvaluationPercentComplete($var) } /** - * Shows the report generation progress of the CESS Result Processor Service. - * The // progress is defined in terms of percentage complete and is being - * fetched from the CESS service. If report_generation_in_progress is non zero - * then evaluation_percent_complete will be 100%. + * Report generation progress, defined in terms of percentage complete. + * Until evaluation is complete, this value is always `0`. * * Generated from protobuf field double report_generation_percent_complete = 30; * @return float @@ -212,10 +196,8 @@ public function getReportGenerationPercentComplete() } /** - * Shows the report generation progress of the CESS Result Processor Service. - * The // progress is defined in terms of percentage complete and is being - * fetched from the CESS service. If report_generation_in_progress is non zero - * then evaluation_percent_complete will be 100%. + * Report generation progress, defined in terms of percentage complete. + * Until evaluation is complete, this value is always `0`. * * Generated from protobuf field double report_generation_percent_complete = 30; * @param float $var @@ -230,11 +212,9 @@ public function setReportGenerationPercentComplete($var) } /** - * Shows the report uploading progress of the CESS Result Processor Service. - * The progress is defined in terms of percentage complete and is being - * fetched from the CESS service. If report_uploading_in_progress is non zero - * then evaluation_percent_complete and report_generation_percent_complete - * will be 100%. + * Report uploading progress, defined in terms of percentage complete. + * Until evaluation and report generation are complete, this value is always + * `0`. * * Generated from protobuf field double report_uploading_percent_complete = 40; * @return float @@ -245,11 +225,9 @@ public function getReportUploadingPercentComplete() } /** - * Shows the report uploading progress of the CESS Result Processor Service. - * The progress is defined in terms of percentage complete and is being - * fetched from the CESS service. If report_uploading_in_progress is non zero - * then evaluation_percent_complete and report_generation_percent_complete - * will be 100%. + * Report uploading progress, defined in terms of percentage complete. + * Until evaluation and report generation are complete, this value is always + * `0`. * * Generated from protobuf field double report_uploading_percent_complete = 40; * @param float $var @@ -264,8 +242,8 @@ public function setReportUploadingPercentComplete($var) } /** - * Output only. The Cloud Storage bucket where the audit report will be - * uploaded once the evaluation process is completed. + * Output only. Cloud Storage bucket where the audit report is uploaded to + * after the evaluation process is completed. * * Generated from protobuf field string destination_gcs_bucket = 50 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return string @@ -276,8 +254,8 @@ public function getDestinationGcsBucket() } /** - * Output only. The Cloud Storage bucket where the audit report will be - * uploaded once the evaluation process is completed. + * Output only. Cloud Storage bucket where the audit report is uploaded to + * after the evaluation process is completed. * * Generated from protobuf field string destination_gcs_bucket = 50 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param string $var @@ -292,7 +270,7 @@ public function setDestinationGcsBucket($var) } /** - * Output only. The name of the audit report. + * Output only. Name of the audit report. * * Generated from protobuf field string audit_report = 51 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { * @return string @@ -303,7 +281,7 @@ public function getAuditReport() } /** - * Output only. The name of the audit report. + * Output only. Name of the audit report. * * Generated from protobuf field string audit_report = 51 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { * @param string $var diff --git a/AuditManager/src/V1/ReportSummary.php b/AuditManager/src/V1/ReportSummary.php index 4efd7ead747f..c7a70105fd15 100644 --- a/AuditManager/src/V1/ReportSummary.php +++ b/AuditManager/src/V1/ReportSummary.php @@ -9,14 +9,15 @@ use Google\Protobuf\RepeatedField; /** - * The additional information for an audit operation. + * Additional information about the number of checks that were made during an + * audit operation. * * Generated from protobuf message google.cloud.auditmanager.v1.ReportSummary */ class ReportSummary extends \Google\Protobuf\Internal\Message { /** - * Total number of checks. + * Total number of evaluated checks. * * Generated from protobuf field int32 total_count = 1; */ @@ -34,13 +35,13 @@ class ReportSummary extends \Google\Protobuf\Internal\Message */ protected $violation_count = 0; /** - * Number of checks with "manual review needed" status. + * Number of checks that require a manual review. * * Generated from protobuf field int32 manual_review_needed_count = 4; */ protected $manual_review_needed_count = 0; /** - * Number of checks that could not be performed due to errors. + * Number of checks that can't be performed due to errors. * * Generated from protobuf field int32 error_count = 5; */ @@ -53,15 +54,15 @@ class ReportSummary extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type int $total_count - * Total number of checks. + * Total number of evaluated checks. * @type int $compliant_count * Number of compliant checks. * @type int $violation_count * Number of checks with violations. * @type int $manual_review_needed_count - * Number of checks with "manual review needed" status. + * Number of checks that require a manual review. * @type int $error_count - * Number of checks that could not be performed due to errors. + * Number of checks that can't be performed due to errors. * } */ public function __construct($data = NULL) { @@ -70,7 +71,7 @@ public function __construct($data = NULL) { } /** - * Total number of checks. + * Total number of evaluated checks. * * Generated from protobuf field int32 total_count = 1; * @return int @@ -81,7 +82,7 @@ public function getTotalCount() } /** - * Total number of checks. + * Total number of evaluated checks. * * Generated from protobuf field int32 total_count = 1; * @param int $var @@ -148,7 +149,7 @@ public function setViolationCount($var) } /** - * Number of checks with "manual review needed" status. + * Number of checks that require a manual review. * * Generated from protobuf field int32 manual_review_needed_count = 4; * @return int @@ -159,7 +160,7 @@ public function getManualReviewNeededCount() } /** - * Number of checks with "manual review needed" status. + * Number of checks that require a manual review. * * Generated from protobuf field int32 manual_review_needed_count = 4; * @param int $var @@ -174,7 +175,7 @@ public function setManualReviewNeededCount($var) } /** - * Number of checks that could not be performed due to errors. + * Number of checks that can't be performed due to errors. * * Generated from protobuf field int32 error_count = 5; * @return int @@ -185,7 +186,7 @@ public function getErrorCount() } /** - * Number of checks that could not be performed due to errors. + * Number of checks that can't be performed due to errors. * * Generated from protobuf field int32 error_count = 5; * @param int $var diff --git a/AuditManager/src/V1/ResourceEnrollmentStatus.php b/AuditManager/src/V1/ResourceEnrollmentStatus.php index cfa29d9a7ea8..471449da2710 100644 --- a/AuditManager/src/V1/ResourceEnrollmentStatus.php +++ b/AuditManager/src/V1/ResourceEnrollmentStatus.php @@ -9,40 +9,45 @@ use Google\Protobuf\RepeatedField; /** - * A resource with its enrollment status. + * An organization, folder, or project with its enrollment status. * * Generated from protobuf message google.cloud.auditmanager.v1.ResourceEnrollmentStatus */ class ResourceEnrollmentStatus extends \Google\Protobuf\Internal\Message { /** - * Identifier. The name of this resource. + * Identifier. Name of the resource enrollment status, in one of the following + * formats: + * * `folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * * `projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * * `organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; */ protected $name = ''; /** - * Output only. Enrollment which contains enrolled destination details for a - * resource + * Output only. Enrolled destination details for the organization, folder, or + * project. * * Generated from protobuf field .google.cloud.auditmanager.v1.Enrollment enrollment = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ protected $enrollment = null; /** - * Output only. Is resource enrolled. + * Output only. Deprecated. Whether the organization, folder, or project is + * enrolled. Use `enrollment_state` instead. * * Generated from protobuf field bool enrolled = 3 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; * @deprecated */ protected $enrolled = false; /** - * Output only. Display name of the project/folder/organization. + * Output only. Display name for the organization, folder, or project. * * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ protected $display_name = ''; /** - * Output only. Enrollment state of the resource. + * Output only. Enrollment state of the organization, folder, or project. * * Generated from protobuf field .google.cloud.auditmanager.v1.ResourceEnrollmentStatus.ResourceEnrollmentState enrollment_state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ @@ -55,16 +60,21 @@ class ResourceEnrollmentStatus extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $name - * Identifier. The name of this resource. + * Identifier. Name of the resource enrollment status, in one of the following + * formats: + * * `folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * * `projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * * `organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` * @type \Google\Cloud\AuditManager\V1\Enrollment $enrollment - * Output only. Enrollment which contains enrolled destination details for a - * resource + * Output only. Enrolled destination details for the organization, folder, or + * project. * @type bool $enrolled - * Output only. Is resource enrolled. + * Output only. Deprecated. Whether the organization, folder, or project is + * enrolled. Use `enrollment_state` instead. * @type string $display_name - * Output only. Display name of the project/folder/organization. + * Output only. Display name for the organization, folder, or project. * @type int $enrollment_state - * Output only. Enrollment state of the resource. + * Output only. Enrollment state of the organization, folder, or project. * } */ public function __construct($data = NULL) { @@ -73,7 +83,11 @@ public function __construct($data = NULL) { } /** - * Identifier. The name of this resource. + * Identifier. Name of the resource enrollment status, in one of the following + * formats: + * * `folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * * `projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * * `organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * @return string @@ -84,7 +98,11 @@ public function getName() } /** - * Identifier. The name of this resource. + * Identifier. Name of the resource enrollment status, in one of the following + * formats: + * * `folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * * `projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * * `organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * @param string $var @@ -99,8 +117,8 @@ public function setName($var) } /** - * Output only. Enrollment which contains enrolled destination details for a - * resource + * Output only. Enrolled destination details for the organization, folder, or + * project. * * Generated from protobuf field .google.cloud.auditmanager.v1.Enrollment enrollment = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return \Google\Cloud\AuditManager\V1\Enrollment|null @@ -121,8 +139,8 @@ public function clearEnrollment() } /** - * Output only. Enrollment which contains enrolled destination details for a - * resource + * Output only. Enrolled destination details for the organization, folder, or + * project. * * Generated from protobuf field .google.cloud.auditmanager.v1.Enrollment enrollment = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param \Google\Cloud\AuditManager\V1\Enrollment $var @@ -137,7 +155,8 @@ public function setEnrollment($var) } /** - * Output only. Is resource enrolled. + * Output only. Deprecated. Whether the organization, folder, or project is + * enrolled. Use `enrollment_state` instead. * * Generated from protobuf field bool enrolled = 3 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; * @return bool @@ -152,7 +171,8 @@ public function getEnrolled() } /** - * Output only. Is resource enrolled. + * Output only. Deprecated. Whether the organization, folder, or project is + * enrolled. Use `enrollment_state` instead. * * Generated from protobuf field bool enrolled = 3 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; * @param bool $var @@ -169,7 +189,7 @@ public function setEnrolled($var) } /** - * Output only. Display name of the project/folder/organization. + * Output only. Display name for the organization, folder, or project. * * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return string @@ -180,7 +200,7 @@ public function getDisplayName() } /** - * Output only. Display name of the project/folder/organization. + * Output only. Display name for the organization, folder, or project. * * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param string $var @@ -195,7 +215,7 @@ public function setDisplayName($var) } /** - * Output only. Enrollment state of the resource. + * Output only. Enrollment state of the organization, folder, or project. * * Generated from protobuf field .google.cloud.auditmanager.v1.ResourceEnrollmentStatus.ResourceEnrollmentState enrollment_state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return int @@ -206,7 +226,7 @@ public function getEnrollmentState() } /** - * Output only. Enrollment state of the resource. + * Output only. Enrollment state of the organization, folder, or project. * * Generated from protobuf field .google.cloud.auditmanager.v1.ResourceEnrollmentStatus.ResourceEnrollmentState enrollment_state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param int $var diff --git a/AuditManager/src/V1/ResourceEnrollmentStatus/ResourceEnrollmentState.php b/AuditManager/src/V1/ResourceEnrollmentStatus/ResourceEnrollmentState.php index 5613f016947f..96ad488e33be 100644 --- a/AuditManager/src/V1/ResourceEnrollmentStatus/ResourceEnrollmentState.php +++ b/AuditManager/src/V1/ResourceEnrollmentStatus/ResourceEnrollmentState.php @@ -7,32 +7,32 @@ use UnexpectedValueException; /** - * The different enrollment states of a resource. + * Different enrollment states of the resource and its parent. * * Protobuf type google.cloud.auditmanager.v1.ResourceEnrollmentStatus.ResourceEnrollmentState */ class ResourceEnrollmentState { /** - * Unspecified. Invalid state. + * Default value. This value is unused. * * Generated from protobuf enum RESOURCE_ENROLLMENT_STATE_UNSPECIFIED = 0; */ const RESOURCE_ENROLLMENT_STATE_UNSPECIFIED = 0; /** - * Not enrolled. + * The resource isn't enrolled. * * Generated from protobuf enum NOT_ENROLLED = 1; */ const NOT_ENROLLED = 1; /** - * Resource is not enrolled but the parent is enrolled. + * The resource isn't enrolled but the parent is enrolled. * * Generated from protobuf enum INHERITED = 2; */ const INHERITED = 2; /** - * Enrolled. + * The resource is enrolled. * * Generated from protobuf enum ENROLLED = 3; */ diff --git a/AuditManager/src/V1/resources/audit_manager_descriptor_config.php b/AuditManager/src/V1/resources/audit_manager_descriptor_config.php index f769ad7d7c3f..98c9d30f4504 100644 --- a/AuditManager/src/V1/resources/audit_manager_descriptor_config.php +++ b/AuditManager/src/V1/resources/audit_manager_descriptor_config.php @@ -193,6 +193,7 @@ 'folderLocationStandard' => 'folders/{folder}/locations/{location}/standards/{standard}', 'location' => 'projects/{project}/locations/{location}', 'organizationLocation' => 'organizations/{organization}/locations/{location}', + 'organizationLocationAuditReport' => 'organizations/{organization}/locations/{location}/auditReports/{audit_report}', 'organizationLocationResourceEnrollmentStatus' => 'organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}', 'organizationLocationStandard' => 'organizations/{organization}/locations/{location}/standards/{standard}', 'projectLocationAuditReport' => 'projects/{project}/locations/{location}/auditReports/{audit_report}', diff --git a/AuditManager/src/V1/resources/audit_manager_rest_client_config.php b/AuditManager/src/V1/resources/audit_manager_rest_client_config.php index d8a89311d794..f7d758688248 100644 --- a/AuditManager/src/V1/resources/audit_manager_rest_client_config.php +++ b/AuditManager/src/V1/resources/audit_manager_rest_client_config.php @@ -57,6 +57,11 @@ 'uriTemplate' => '/v1/{scope=projects/*/locations/*}/auditReports:generate', 'body' => '*', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{scope=organizations/*/locations/*}/auditReports:generate', + 'body' => '*', + ], ], 'placeholders' => [ 'scope' => [ @@ -76,6 +81,11 @@ 'uriTemplate' => '/v1/{scope=projects/*/locations/*}/auditScopeReports:generate', 'body' => '*', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{scope=organizations/*/locations/*}/auditScopeReports:generate', + 'body' => '*', + ], ], 'placeholders' => [ 'scope' => [ @@ -93,6 +103,10 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/auditReports/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*/auditReports/*}', + ], ], 'placeholders' => [ 'name' => [ diff --git a/AuditManager/tests/Unit/V1/Client/AuditManagerClientTest.php b/AuditManager/tests/Unit/V1/Client/AuditManagerClientTest.php index bc37b9dd5141..9830a8248390 100644 --- a/AuditManager/tests/Unit/V1/Client/AuditManagerClientTest.php +++ b/AuditManager/tests/Unit/V1/Client/AuditManagerClientTest.php @@ -198,12 +198,10 @@ public function generateAuditReportTest() $operationsTransport->addResponse($completeOperation); // Mock request $scope = 'scope109264468'; - $complianceStandard = 'complianceStandard1339657825'; $reportFormat = AuditReportFormat::AUDIT_REPORT_FORMAT_UNSPECIFIED; $complianceFramework = 'complianceFramework1384085210'; $request = (new GenerateAuditReportRequest()) ->setScope($scope) - ->setComplianceStandard($complianceStandard) ->setReportFormat($reportFormat) ->setComplianceFramework($complianceFramework); $response = $gapicClient->generateAuditReport($request); @@ -218,8 +216,6 @@ public function generateAuditReportTest() $this->assertSame('/google.cloud.auditmanager.v1.AuditManager/GenerateAuditReport', $actualApiFuncCall); $actualValue = $actualApiRequestObject->getScope(); $this->assertProtobufEquals($scope, $actualValue); - $actualValue = $actualApiRequestObject->getComplianceStandard(); - $this->assertProtobufEquals($complianceStandard, $actualValue); $actualValue = $actualApiRequestObject->getReportFormat(); $this->assertProtobufEquals($reportFormat, $actualValue); $actualValue = $actualApiRequestObject->getComplianceFramework(); @@ -279,12 +275,10 @@ public function generateAuditReportExceptionTest() $operationsTransport->addResponse(null, $status); // Mock request $scope = 'scope109264468'; - $complianceStandard = 'complianceStandard1339657825'; $reportFormat = AuditReportFormat::AUDIT_REPORT_FORMAT_UNSPECIFIED; $complianceFramework = 'complianceFramework1384085210'; $request = (new GenerateAuditReportRequest()) ->setScope($scope) - ->setComplianceStandard($complianceStandard) ->setReportFormat($reportFormat) ->setComplianceFramework($complianceFramework); $response = $gapicClient->generateAuditReport($request); @@ -326,12 +320,10 @@ public function generateAuditScopeReportTest() $transport->addResponse($expectedResponse); // Mock request $scope = 'scope109264468'; - $complianceStandard = 'complianceStandard1339657825'; $reportFormat = AuditScopeReportFormat::AUDIT_SCOPE_REPORT_FORMAT_UNSPECIFIED; $complianceFramework = 'complianceFramework1384085210'; $request = (new GenerateAuditScopeReportRequest()) ->setScope($scope) - ->setComplianceStandard($complianceStandard) ->setReportFormat($reportFormat) ->setComplianceFramework($complianceFramework); $response = $gapicClient->generateAuditScopeReport($request); @@ -343,8 +335,6 @@ public function generateAuditScopeReportTest() $this->assertSame('/google.cloud.auditmanager.v1.AuditManager/GenerateAuditScopeReport', $actualFuncCall); $actualValue = $actualRequestObject->getScope(); $this->assertProtobufEquals($scope, $actualValue); - $actualValue = $actualRequestObject->getComplianceStandard(); - $this->assertProtobufEquals($complianceStandard, $actualValue); $actualValue = $actualRequestObject->getReportFormat(); $this->assertProtobufEquals($reportFormat, $actualValue); $actualValue = $actualRequestObject->getComplianceFramework(); @@ -375,12 +365,10 @@ public function generateAuditScopeReportExceptionTest() $transport->addResponse(null, $status); // Mock request $scope = 'scope109264468'; - $complianceStandard = 'complianceStandard1339657825'; $reportFormat = AuditScopeReportFormat::AUDIT_SCOPE_REPORT_FORMAT_UNSPECIFIED; $complianceFramework = 'complianceFramework1384085210'; $request = (new GenerateAuditScopeReportRequest()) ->setScope($scope) - ->setComplianceStandard($complianceStandard) ->setReportFormat($reportFormat) ->setComplianceFramework($complianceFramework); try { diff --git a/owl-bot-staging/AuditManager/v1/proto/src/GPBMetadata/Google/Cloud/Auditmanager/V1/Auditmanager.php b/owl-bot-staging/AuditManager/v1/proto/src/GPBMetadata/Google/Cloud/Auditmanager/V1/Auditmanager.php deleted file mode 100644 index 4a487ea26fcc..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/GPBMetadata/Google/Cloud/Auditmanager/V1/Auditmanager.php +++ /dev/null @@ -1,30 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xBCT\x0A/google/cloud/auditmanager/v1/auditmanager.proto\x12\x1Cgoogle.cloud.auditmanager.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A#google/longrunning/operations.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xDE\x01\x0A\x15EnrollResourceRequest\x12\x12\x0A\x05scope\x18\x01 \x01(\x09B\x03\xE0A\x02\x12b\x0A\x0Cdestinations\x18\x02 \x03(\x0B2G.google.cloud.auditmanager.v1.EnrollResourceRequest.EligibleDestinationB\x03\xE0A\x02\x1AM\x0A\x13EligibleDestination\x12\x1D\x0A\x13eligible_gcs_bucket\x18\x03 \x01(\x09H\x00B\x17\x0A\x15eligible_destinations\"\xD6\x02\x0A\x1FGenerateAuditScopeReportRequest\x12\x12\x0A\x05scope\x18\x02 \x01(\x09B\x03\xE0A\x02\x12\"\x0A\x13compliance_standard\x18\x03 \x01(\x09B\x05\x18\x01\xE0A\x01\x12p\x0A\x0Dreport_format\x18\x04 \x01(\x0E2T.google.cloud.auditmanager.v1.GenerateAuditScopeReportRequest.AuditScopeReportFormatB\x03\xE0A\x02\x12!\x0A\x14compliance_framework\x18\x05 \x01(\x09B\x03\xE0A\x02\"f\x0A\x16AuditScopeReportFormat\x12)\x0A%AUDIT_SCOPE_REPORT_FORMAT_UNSPECIFIED\x10\x00\x12!\x0A\x1DAUDIT_SCOPE_REPORT_FORMAT_ODF\x10\x01\"\xF4\x02\x0A\x1AGenerateAuditReportRequest\x12\x11\x0A\x07gcs_uri\x18\x02 \x01(\x09H\x00\x12\x12\x0A\x05scope\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\"\x0A\x13compliance_standard\x18\x03 \x01(\x09B\x05\x18\x01\xE0A\x01\x12f\x0A\x0Dreport_format\x18\x04 \x01(\x0E2J.google.cloud.auditmanager.v1.GenerateAuditReportRequest.AuditReportFormatB\x03\xE0A\x02\x12!\x0A\x14compliance_framework\x18\x05 \x01(\x09B\x03\xE0A\x02\x12\x1A\x0A\x0Dvalidate_only\x18\x08 \x01(\x08B\x03\xE0A\x01\"U\x0A\x11AuditReportFormat\x12#\x0A\x1FAUDIT_REPORT_FORMAT_UNSPECIFIED\x10\x00\x12\x1B\x0A\x17AUDIT_REPORT_FORMAT_ODF\x10\x01B\x0D\x0A\x0Bdestination\"p\x0A\"GetResourceEnrollmentStatusRequest\x12J\x0A\x04name\x18\x01 \x01(\x09B<\xE0A\x02\xFAA6\x0A4auditmanager.googleapis.com/ResourceEnrollmentStatus\"\xA3\x01\x0A%ListResourceEnrollmentStatusesRequest\x12I\x0A\x06parent\x18\x01 \x01(\x09B9\xE0A\x02\xFAA3\x0A1auditmanager.googleapis.com/EnrollmentStatusScope\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\"\xA4\x01\x0A&ListResourceEnrollmentStatusesResponse\x12\\\x0A\x1Cresource_enrollment_statuses\x18\x01 \x03(\x0B26.google.cloud.auditmanager.v1.ResourceEnrollmentStatus\x12\x1C\x0A\x0Fnext_page_token\x18\x02 \x01(\x09B\x03\xE0A\x03\"\x8B\x01\x0A\x17ListAuditReportsRequest\x12?\x0A\x06parent\x18\x01 \x01(\x09B/\xE0A\x02\xFAA)\x12'auditmanager.googleapis.com/AuditReport\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\"\x7F\x0A\x18ListAuditReportsResponse\x12E\x0A\x0Daudit_reports\x18\x01 \x03(\x0B2).google.cloud.auditmanager.v1.AuditReportB\x03\xE0A\x03\x12\x1C\x0A\x0Fnext_page_token\x18\x02 \x01(\x09B\x03\xE0A\x03\"V\x0A\x15GetAuditReportRequest\x12=\x0A\x04name\x18\x01 \x01(\x09B/\xE0A\x02\xFAA)\x0A'auditmanager.googleapis.com/AuditReport\"\x84\x01\x0A\x13ListControlsRequest\x12<\x0A\x06parent\x18\x01 \x01(\x09B,\xE0A\x02\xFAA&\x0A\$auditmanager.googleapis.com/Standard\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\"r\x0A\x14ListControlsResponse\x12<\x0A\x08controls\x18\x01 \x03(\x0B2%.google.cloud.auditmanager.v1.ControlB\x03\xE0A\x03\x12\x1C\x0A\x0Fnext_page_token\x18\x02 \x01(\x09B\x03\xE0A\x03\"\xE1\x02\x0A\x18ReportGenerationProgress\x12@\x0A\x05state\x18\x01 \x01(\x0E2,.google.cloud.auditmanager.v1.OperationStateB\x03\xE0A\x03\x12\x1B\x0A\x0Efailure_reason\x18\x02 \x01(\x09B\x03\xE0A\x03\x12#\x0A\x1Bevaluation_percent_complete\x18\x14 \x01(\x01\x12*\x0A\"report_generation_percent_complete\x18\x1E \x01(\x01\x12)\x0A!report_uploading_percent_complete\x18( \x01(\x01\x12#\x0A\x16destination_gcs_bucket\x182 \x01(\x09B\x03\xE0A\x03\x12E\x0A\x0Caudit_report\x183 \x01(\x09B/\xE0A\x03\xFAA)\x0A'auditmanager.googleapis.com/AuditReport\"\x89\x03\x0A\x0AEnrollment\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12R\x0A\x13destination_details\x18\x03 \x03(\x0B20.google.cloud.auditmanager.v1.DestinationDetailsB\x03\xE0A\x03:\x93\x02\xEAA\x8F\x02\x0A&auditmanager.googleapis.com/Enrollment\x12@projects/{project}/locations/{location}/enrollments/{enrollment}\x12>folders/{folder}/locations/{location}/enrollments/{enrollment}\x12Jorganizations/{organization}/locations/{location}/enrollments/{enrollment}*\x0Benrollments2\x0Aenrollment\"\xA8\x03\x0A\x10AuditScopeReport\x12\x1F\x0A\x15scope_report_contents\x18\x01 \x01(\x0CH\x00\x12\x11\x0A\x04name\x18\x02 \x01(\x09B\x03\xE0A\x08:\xCF\x02\xEAA\xCB\x02\x0A,auditmanager.googleapis.com/AuditScopeReport\x12Nprojects/{project}/locations/{location}/auditScopeReports/{audit_scope_report}\x12Lfolders/{folder}/locations/{location}/auditScopeReports/{audit_scope_report}\x12Xorganizations/{organization}/locations/{location}/auditScopeReports/{audit_scope_report}*\x11auditScopeReports2\x10auditScopeReportB\x0E\x0A\x0Caudit_report\"\x80\x02\x0A\x11OperationMetadata\x124\x0A\x0Bcreate_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x121\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\x13\x0A\x06target\x18\x03 \x01(\x09B\x03\xE0A\x03\x12\x11\x0A\x04verb\x18\x04 \x01(\x09B\x03\xE0A\x03\x12\x1B\x0A\x0Estatus_message\x18\x05 \x01(\x09B\x03\xE0A\x03\x12#\x0A\x16requested_cancellation\x18\x06 \x01(\x08B\x03\xE0A\x03\x12\x18\x0A\x0Bapi_version\x18\x07 \x01(\x09B\x03\xE0A\x03\"\xA6\x06\x0A\x18ResourceEnrollmentStatus\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12A\x0A\x0Aenrollment\x18\x02 \x01(\x0B2(.google.cloud.auditmanager.v1.EnrollmentB\x03\xE0A\x03\x12\x17\x0A\x08enrolled\x18\x03 \x01(\x08B\x05\x18\x01\xE0A\x03\x12\x19\x0A\x0Cdisplay_name\x18\x04 \x01(\x09B\x03\xE0A\x03\x12m\x0A\x10enrollment_state\x18\x05 \x01(\x0E2N.google.cloud.auditmanager.v1.ResourceEnrollmentStatus.ResourceEnrollmentStateB\x03\xE0A\x03\"s\x0A\x17ResourceEnrollmentState\x12)\x0A%RESOURCE_ENROLLMENT_STATE_UNSPECIFIED\x10\x00\x12\x10\x0A\x0CNOT_ENROLLED\x10\x01\x12\x0D\x0A\x09INHERITED\x10\x02\x12\x0C\x0A\x08ENROLLED\x10\x03:\x9B\x03\xEAA\x97\x03\x0A4auditmanager.googleapis.com/ResourceEnrollmentStatus\x12]folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}\x12_projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}\x12iorganizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}*\x1AresourceEnrollmentStatuses2\x18resourceEnrollmentStatus\"\xDA\x07\x0A\x0BAuditReport\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12H\x0A\x0Ereport_summary\x18\x02 \x01(\x0B2+.google.cloud.auditmanager.v1.ReportSummaryB\x03\xE0A\x03\x12\x19\x0A\x0Coperation_id\x18\x03 \x01(\x09B\x03\xE0A\x03\x12R\x0A\x13destination_details\x18\x04 \x01(\x0B20.google.cloud.auditmanager.v1.DestinationDetailsB\x03\xE0A\x03\x12\"\x0A\x13compliance_standard\x18\x05 \x01(\x09B\x05\x18\x01\xE0A\x03\x12\x12\x0A\x05scope\x18\x06 \x01(\x09B\x03\xE0A\x03\x124\x0A\x0Bcreate_time\x18\x07 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12J\x0A\x0Fcontrol_details\x18\x08 \x03(\x0B2,.google.cloud.auditmanager.v1.ControlDetailsB\x03\xE0A\x03\x12e\x0A\x17report_generation_state\x18\x09 \x01(\x0E2?.google.cloud.auditmanager.v1.AuditReport.ReportGenerationStateB\x03\xE0A\x03\x12!\x0A\x14compliance_framework\x18\x0A \x01(\x09B\x03\xE0A\x03\x12\x15\x0A\x08scope_id\x18\x0B \x01(\x09B\x03\xE0A\x03\"\x81\x01\x0A\x15ReportGenerationState\x12'\x0A#REPORT_GENERATION_STATE_UNSPECIFIED\x10\x00\x12\x0F\x0A\x0BIN_PROGRESS\x10\x01\x12\x0D\x0A\x09COMPLETED\x10\x02\x12\x0A\x0A\x06FAILED\x10\x03\x12\x13\x0A\x0FSUMMARY_UNKNOWN\x10\x04:\x9F\x02\xEAA\x9B\x02\x0A'auditmanager.googleapis.com/AuditReport\x12Cprojects/{project}/locations/{location}/auditReports/{audit_report}\x12Afolders/{folder}/locations/{location}/auditReports/{audit_report}\x12Morganizations/{organization}/locations/{location}/auditReports/{audit_report}*\x0CauditReports2\x0BauditReport\"8\x0A\x0DControlFamily\x12\x11\x0A\x09family_id\x18\x01 \x01(\x09\x12\x14\x0A\x0Cdisplay_name\x18\x02 \x01(\x09\"\xFB\x04\x0A\x07Control\x12\x0F\x0A\x02id\x18\x01 \x01(\x09B\x03\xE0A\x03\x12\x19\x0A\x0Cdisplay_name\x18\x02 \x01(\x09B\x03\xE0A\x03\x12A\x0A\x06family\x18\x03 \x01(\x0E2,.google.cloud.auditmanager.v1.Control.FamilyB\x03\xE0A\x03\x12H\x0A\x0Econtrol_family\x18\x0A \x01(\x0B2+.google.cloud.auditmanager.v1.ControlFamilyB\x03\xE0A\x03\x12\x18\x0A\x0Bdescription\x18\x04 \x01(\x09B\x03\xE0A\x03\x12 \x0A\x13responsibility_type\x18\x05 \x01(\x09B\x03\xE0A\x03\x12.\x0A!google_responsibility_description\x18\x06 \x01(\x09B\x03\xE0A\x03\x121\x0A\$google_responsibility_implementation\x18\x07 \x01(\x09B\x03\xE0A\x03\x120\x0A#customer_responsibility_description\x18\x08 \x01(\x09B\x03\xE0A\x03\x123\x0A&customer_responsibility_implementation\x18\x09 \x01(\x09B\x03\xE0A\x03\"\xB0\x01\x0A\x06Family\x12\x16\x0A\x12FAMILY_UNSPECIFIED\x10\x00\x12\x06\x0A\x02AC\x10\x01\x12\x06\x0A\x02AT\x10\x02\x12\x06\x0A\x02AU\x10\x03\x12\x06\x0A\x02CA\x10\x04\x12\x06\x0A\x02CM\x10\x05\x12\x06\x0A\x02CP\x10\x06\x12\x06\x0A\x02IA\x10\x07\x12\x06\x0A\x02IR\x10\x08\x12\x06\x0A\x02MA\x10\x09\x12\x06\x0A\x02MP\x10\x0A\x12\x06\x0A\x02PE\x10\x0B\x12\x06\x0A\x02PL\x10\x0C\x12\x06\x0A\x02PS\x10\x0D\x12\x06\x0A\x02RA\x10\x0E\x12\x06\x0A\x02SA\x10\x0F\x12\x06\x0A\x02SC\x10\x10\x12\x06\x0A\x02SI\x10\x11\x12\x06\x0A\x02SR\x10\x12\"=\x0A\x12DestinationDetails\x12\x18\x0A\x0Egcs_bucket_uri\x18\x01 \x01(\x09H\x00B\x0D\x0A\x0Bdestination\"\x8F\x01\x0A\x0DReportSummary\x12\x13\x0A\x0Btotal_count\x18\x01 \x01(\x05\x12\x17\x0A\x0Fcompliant_count\x18\x02 \x01(\x05\x12\x17\x0A\x0Fviolation_count\x18\x03 \x01(\x05\x12\"\x0A\x1Amanual_review_needed_count\x18\x04 \x01(\x05\x12\x13\x0A\x0Berror_count\x18\x05 \x01(\x05\"\xE3\x01\x0A\x0EControlDetails\x126\x0A\x07control\x18\x01 \x01(\x0B2%.google.cloud.auditmanager.v1.Control\x12L\x0A\x10compliance_state\x18\x02 \x01(\x0E2-.google.cloud.auditmanager.v1.ComplianceStateB\x03\xE0A\x03\x12K\x0A\x16control_report_summary\x18\x03 \x01(\x0B2+.google.cloud.auditmanager.v1.ReportSummary*\xFB\x02\x0A\x0EOperationState\x12\x1F\x0A\x1BOPERATION_STATE_UNSPECIFIED\x10\x00\x12\x1F\x0A\x1BOPERATION_STATE_NOT_STARTED\x10\x0A\x12*\x0A&OPERATION_STATE_EVALUATION_IN_PROGRESS\x10\x14\x12#\x0A\x1FOPERATION_STATE_EVALUATION_DONE\x10\x15\x12:\x0A6OPERATION_STATE_EVIDENCE_REPORT_GENERATION_IN_PROGRESS\x10\x1E\x123\x0A/OPERATION_STATE_EVIDENCE_REPORT_GENERATION_DONE\x10\x1F\x12/\x0A+OPERATION_STATE_EVIDENCE_UPLOAD_IN_PROGRESS\x10(\x12\x18\x0A\x14OPERATION_STATE_DONE\x102\x12\x1A\x0A\x16OPERATION_STATE_FAILED\x10<*\x8F\x01\x0A\x0FComplianceState\x12 \x0A\x1CCOMPLIANCE_STATE_UNSPECIFIED\x10\x00\x12\x0D\x0A\x09COMPLIANT\x10\x01\x12\x0D\x0A\x09VIOLATION\x10\x02\x12\x18\x0A\x14MANUAL_REVIEW_NEEDED\x10\x03\x12\x09\x0A\x05ERROR\x10\x04\x12\x17\x0A\x13AUDIT_NOT_SUPPORTED\x10\x052\xBD\x16\x0A\x0CAuditManager\x12\xB8\x02\x0A\x0EEnrollResource\x123.google.cloud.auditmanager.v1.EnrollResourceRequest\x1A(.google.cloud.auditmanager.v1.Enrollment\"\xC6\x01\xDAA\x12scope,destinations\x82\xD3\xE4\x93\x02\xAA\x01\"0/v1/{scope=folders/*/locations/*}:enrollResource:\x01*Z6\"1/v1/{scope=projects/*/locations/*}:enrollResource:\x01*Z;\"6/v1/{scope=organizations/*/locations/*}:enrollResource:\x01*\x12\x8B\x03\x0A\x18GenerateAuditScopeReport\x12=.google.cloud.auditmanager.v1.GenerateAuditScopeReportRequest\x1A..google.cloud.auditmanager.v1.AuditScopeReport\"\xFF\x01\xDAA'scope,compliance_standard,report_format\x82\xD3\xE4\x93\x02\xCE\x01\"/v1/{name=projects/*/locations/*/resourceEnrollmentStatuses/*}Z?\x12=/v1/{name=folders/*/locations/*/resourceEnrollmentStatuses/*}ZE\x12C/v1/{name=organizations/*/locations/*/resourceEnrollmentStatuses/*}\x12\xC4\x02\x0A\x1EListResourceEnrollmentStatuses\x12C.google.cloud.auditmanager.v1.ListResourceEnrollmentStatusesRequest\x1AD.google.cloud.auditmanager.v1.ListResourceEnrollmentStatusesResponse\"\x96\x01\xDAA\x06parent\x82\xD3\xE4\x93\x02\x86\x01\x12C/v1/{parent=organizations/*/locations/*}/resourceEnrollmentStatusesZ?\x12=/v1/{parent=folders/*/locations/*}/resourceEnrollmentStatuses\x12\xBE\x02\x0A\x0CListControls\x121.google.cloud.auditmanager.v1.ListControlsRequest\x1A2.google.cloud.auditmanager.v1.ListControlsResponse\"\xC6\x01\xDAA\x06parent\x82\xD3\xE4\x93\x02\xB6\x01\x12=/v1/{parent=organizations/*/locations/*/standards/*}/controlsZ9\x127/v1/{parent=folders/*/locations/*/standards/*}/controlsZ:\x128/v1/{parent=projects/*/locations/*/standards/*}/controls\x1A\x82\x01\xCAA\x1Bauditmanager.googleapis.com\xD2Aahttps://www.googleapis.com/auth/cloud-auditmanager,https://www.googleapis.com/auth/cloud-platformB\x92\x06\x0A com.google.cloud.auditmanager.v1B\x0BV1mainProtoP\x01ZDcloud.google.com/go/auditmanager/apiv1/auditmanagerpb;auditmanagerpb\xAA\x02\x1CGoogle.Cloud.AuditManager.V1\xCA\x02\x1CGoogle\\Cloud\\AuditManager\\V1\xEA\x02\x1FGoogle::Cloud::AuditManager::V1\xEAAS\x0A*auditmanager.googleapis.com/FolderLocation\x12%folders/{folder}/locations/{location}\xEAAe\x0A0auditmanager.googleapis.com/OrganizationLocation\x121organizations/{organization}/locations/{location}\xEAA\xE8\x01\x0A\$auditmanager.googleapis.com/Standard\x12google.cloud.auditmanager.v1.AuditReport - */ -class AuditReport extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. Name of the audit report, in one of the following formats: - * * `projects/{project}/locations/{location}/auditReports/{audit_report}` - * * `folders/{folder}/locations/{location}/auditReports/{audit_report}` - * * `organizations/{organization}/locations/{location}/auditReports/{audit_report}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Output only. Report summary that includes information about compliance and - * violation counts. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.ReportSummary report_summary = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $report_summary = null; - /** - * Output only. Client operation ID for the audit report. - * - * Generated from protobuf field string operation_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $operation_id = ''; - /** - * Output only. Cloud Storage bucket where the audit report is uploaded to. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.DestinationDetails destination_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $destination_details = null; - /** - * Output only. Deprecated. Compliance standard to be audited against. - * Use the `compliance_framework` field instead. - * - * Generated from protobuf field string compliance_standard = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @deprecated - */ - protected $compliance_standard = ''; - /** - * Output only. Organization, folder, or project that the report is generated - * for, in one of the following formats: - * * `projects/{project}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `organizations/{organization}/locations/{location}` - * - * Generated from protobuf field string scope = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $scope = ''; - /** - * Output only. Creation time of the audit report. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Overall status of the controls. - * - * Generated from protobuf field repeated .google.cloud.auditmanager.v1.ControlDetails control_details = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $control_details; - /** - * Output only. State of audit report generation. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.AuditReport.ReportGenerationState report_generation_state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $report_generation_state = 0; - /** - * Output only. Compliance framework to use for the audit report. For example, - * `CIS_GCP_FOUNDATIONS_V1_2_0`. - * - * Generated from protobuf field string compliance_framework = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $compliance_framework = ''; - /** - * Output only. Project number, folder ID, or organization ID that the audit - * report was generated for. - * - * Generated from protobuf field string scope_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $scope_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. Name of the audit report, in one of the following formats: - * * `projects/{project}/locations/{location}/auditReports/{audit_report}` - * * `folders/{folder}/locations/{location}/auditReports/{audit_report}` - * * `organizations/{organization}/locations/{location}/auditReports/{audit_report}` - * @type \Google\Cloud\AuditManager\V1\ReportSummary $report_summary - * Output only. Report summary that includes information about compliance and - * violation counts. - * @type string $operation_id - * Output only. Client operation ID for the audit report. - * @type \Google\Cloud\AuditManager\V1\DestinationDetails $destination_details - * Output only. Cloud Storage bucket where the audit report is uploaded to. - * @type string $compliance_standard - * Output only. Deprecated. Compliance standard to be audited against. - * Use the `compliance_framework` field instead. - * @type string $scope - * Output only. Organization, folder, or project that the report is generated - * for, in one of the following formats: - * * `projects/{project}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `organizations/{organization}/locations/{location}` - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Creation time of the audit report. - * @type \Google\Cloud\AuditManager\V1\ControlDetails[] $control_details - * Output only. Overall status of the controls. - * @type int $report_generation_state - * Output only. State of audit report generation. - * @type string $compliance_framework - * Output only. Compliance framework to use for the audit report. For example, - * `CIS_GCP_FOUNDATIONS_V1_2_0`. - * @type string $scope_id - * Output only. Project number, folder ID, or organization ID that the audit - * report was generated for. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. Name of the audit report, in one of the following formats: - * * `projects/{project}/locations/{location}/auditReports/{audit_report}` - * * `folders/{folder}/locations/{location}/auditReports/{audit_report}` - * * `organizations/{organization}/locations/{location}/auditReports/{audit_report}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. Name of the audit report, in one of the following formats: - * * `projects/{project}/locations/{location}/auditReports/{audit_report}` - * * `folders/{folder}/locations/{location}/auditReports/{audit_report}` - * * `organizations/{organization}/locations/{location}/auditReports/{audit_report}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. Report summary that includes information about compliance and - * violation counts. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.ReportSummary report_summary = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\AuditManager\V1\ReportSummary|null - */ - public function getReportSummary() - { - return $this->report_summary; - } - - public function hasReportSummary() - { - return isset($this->report_summary); - } - - public function clearReportSummary() - { - unset($this->report_summary); - } - - /** - * Output only. Report summary that includes information about compliance and - * violation counts. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.ReportSummary report_summary = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\AuditManager\V1\ReportSummary $var - * @return $this - */ - public function setReportSummary($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\AuditManager\V1\ReportSummary::class); - $this->report_summary = $var; - - return $this; - } - - /** - * Output only. Client operation ID for the audit report. - * - * Generated from protobuf field string operation_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getOperationId() - { - return $this->operation_id; - } - - /** - * Output only. Client operation ID for the audit report. - * - * Generated from protobuf field string operation_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setOperationId($var) - { - GPBUtil::checkString($var, True); - $this->operation_id = $var; - - return $this; - } - - /** - * Output only. Cloud Storage bucket where the audit report is uploaded to. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.DestinationDetails destination_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\AuditManager\V1\DestinationDetails|null - */ - public function getDestinationDetails() - { - return $this->destination_details; - } - - public function hasDestinationDetails() - { - return isset($this->destination_details); - } - - public function clearDestinationDetails() - { - unset($this->destination_details); - } - - /** - * Output only. Cloud Storage bucket where the audit report is uploaded to. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.DestinationDetails destination_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\AuditManager\V1\DestinationDetails $var - * @return $this - */ - public function setDestinationDetails($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\AuditManager\V1\DestinationDetails::class); - $this->destination_details = $var; - - return $this; - } - - /** - * Output only. Deprecated. Compliance standard to be audited against. - * Use the `compliance_framework` field instead. - * - * Generated from protobuf field string compliance_standard = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - * @deprecated - */ - public function getComplianceStandard() - { - if ($this->compliance_standard !== '') { - @trigger_error('compliance_standard is deprecated.', E_USER_DEPRECATED); - } - return $this->compliance_standard; - } - - /** - * Output only. Deprecated. Compliance standard to be audited against. - * Use the `compliance_framework` field instead. - * - * Generated from protobuf field string compliance_standard = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - * @deprecated - */ - public function setComplianceStandard($var) - { - @trigger_error('compliance_standard is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, True); - $this->compliance_standard = $var; - - return $this; - } - - /** - * Output only. Organization, folder, or project that the report is generated - * for, in one of the following formats: - * * `projects/{project}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `organizations/{organization}/locations/{location}` - * - * Generated from protobuf field string scope = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getScope() - { - return $this->scope; - } - - /** - * Output only. Organization, folder, or project that the report is generated - * for, in one of the following formats: - * * `projects/{project}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `organizations/{organization}/locations/{location}` - * - * Generated from protobuf field string scope = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setScope($var) - { - GPBUtil::checkString($var, True); - $this->scope = $var; - - return $this; - } - - /** - * Output only. Creation time of the audit report. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. Creation time of the audit report. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. Overall status of the controls. - * - * Generated from protobuf field repeated .google.cloud.auditmanager.v1.ControlDetails control_details = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return RepeatedField<\Google\Cloud\AuditManager\V1\ControlDetails> - */ - public function getControlDetails() - { - return $this->control_details; - } - - /** - * Output only. Overall status of the controls. - * - * Generated from protobuf field repeated .google.cloud.auditmanager.v1.ControlDetails control_details = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\AuditManager\V1\ControlDetails[] $var - * @return $this - */ - public function setControlDetails($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AuditManager\V1\ControlDetails::class); - $this->control_details = $arr; - - return $this; - } - - /** - * Output only. State of audit report generation. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.AuditReport.ReportGenerationState report_generation_state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getReportGenerationState() - { - return $this->report_generation_state; - } - - /** - * Output only. State of audit report generation. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.AuditReport.ReportGenerationState report_generation_state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setReportGenerationState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\AuditManager\V1\AuditReport\ReportGenerationState::class); - $this->report_generation_state = $var; - - return $this; - } - - /** - * Output only. Compliance framework to use for the audit report. For example, - * `CIS_GCP_FOUNDATIONS_V1_2_0`. - * - * Generated from protobuf field string compliance_framework = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getComplianceFramework() - { - return $this->compliance_framework; - } - - /** - * Output only. Compliance framework to use for the audit report. For example, - * `CIS_GCP_FOUNDATIONS_V1_2_0`. - * - * Generated from protobuf field string compliance_framework = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setComplianceFramework($var) - { - GPBUtil::checkString($var, True); - $this->compliance_framework = $var; - - return $this; - } - - /** - * Output only. Project number, folder ID, or organization ID that the audit - * report was generated for. - * - * Generated from protobuf field string scope_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getScopeId() - { - return $this->scope_id; - } - - /** - * Output only. Project number, folder ID, or organization ID that the audit - * report was generated for. - * - * Generated from protobuf field string scope_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setScopeId($var) - { - GPBUtil::checkString($var, True); - $this->scope_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/AuditReport/ReportGenerationState.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/AuditReport/ReportGenerationState.php deleted file mode 100644 index d34ee55388fe..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/AuditReport/ReportGenerationState.php +++ /dev/null @@ -1,79 +0,0 @@ -google.cloud.auditmanager.v1.AuditReport.ReportGenerationState - */ -class ReportGenerationState -{ - /** - * Default value. This value is unused. - * - * Generated from protobuf enum REPORT_GENERATION_STATE_UNSPECIFIED = 0; - */ - const REPORT_GENERATION_STATE_UNSPECIFIED = 0; - /** - * The process is in progress. The operation can have any state - * except for `OPERATION_STATE_DONE` or `OPERATION_STATE_FAILED`. - * - * Generated from protobuf enum IN_PROGRESS = 1; - */ - const IN_PROGRESS = 1; - /** - * The process is completed. The operation state is - * `OPERATION_STATE_DONE`. - * - * Generated from protobuf enum COMPLETED = 2; - */ - const COMPLETED = 2; - /** - * The process has failed. The operation state is - * `OPERATION_STATE_FAILED`. - * - * Generated from protobuf enum FAILED = 3; - */ - const FAILED = 3; - /** - * The process completed, but the report summary's status is unknown. This - * state isn't used for new reports. - * - * Generated from protobuf enum SUMMARY_UNKNOWN = 4; - */ - const SUMMARY_UNKNOWN = 4; - - private static $valueToName = [ - self::REPORT_GENERATION_STATE_UNSPECIFIED => 'REPORT_GENERATION_STATE_UNSPECIFIED', - self::IN_PROGRESS => 'IN_PROGRESS', - self::COMPLETED => 'COMPLETED', - self::FAILED => 'FAILED', - self::SUMMARY_UNKNOWN => 'SUMMARY_UNKNOWN', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/AuditScopeReport.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/AuditScopeReport.php deleted file mode 100644 index 89cb8c089869..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/AuditScopeReport.php +++ /dev/null @@ -1,125 +0,0 @@ -google.cloud.auditmanager.v1.AuditScopeReport - */ -class AuditScopeReport extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. Name for the audit scope report, in one of the following - * formats: - * * `projects/{project}/locations/{location}/auditScopeReports/{audit_scope_report}` - * * `folders/{folder}/locations/{location}/auditScopeReports/{audit_scope_report}` - * * `organizations/{organization}/locations/{location}/auditScopeReports/{audit_scope_report}` - * - * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - protected $audit_report; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $scope_report_contents - * Audit scope report content in byte format. - * @type string $name - * Identifier. Name for the audit scope report, in one of the following - * formats: - * * `projects/{project}/locations/{location}/auditScopeReports/{audit_scope_report}` - * * `folders/{folder}/locations/{location}/auditScopeReports/{audit_scope_report}` - * * `organizations/{organization}/locations/{location}/auditScopeReports/{audit_scope_report}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * Audit scope report content in byte format. - * - * Generated from protobuf field bytes scope_report_contents = 1; - * @return string - */ - public function getScopeReportContents() - { - return $this->readOneof(1); - } - - public function hasScopeReportContents() - { - return $this->hasOneof(1); - } - - /** - * Audit scope report content in byte format. - * - * Generated from protobuf field bytes scope_report_contents = 1; - * @param string $var - * @return $this - */ - public function setScopeReportContents($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Identifier. Name for the audit scope report, in one of the following - * formats: - * * `projects/{project}/locations/{location}/auditScopeReports/{audit_scope_report}` - * * `folders/{folder}/locations/{location}/auditScopeReports/{audit_scope_report}` - * * `organizations/{organization}/locations/{location}/auditScopeReports/{audit_scope_report}` - * - * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. Name for the audit scope report, in one of the following - * formats: - * * `projects/{project}/locations/{location}/auditScopeReports/{audit_scope_report}` - * * `folders/{folder}/locations/{location}/auditScopeReports/{audit_scope_report}` - * * `organizations/{organization}/locations/{location}/auditScopeReports/{audit_scope_report}` - * - * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * @return string - */ - public function getAuditReport() - { - return $this->whichOneof("audit_report"); - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ComplianceState.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ComplianceState.php deleted file mode 100644 index c67934babd70..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ComplianceState.php +++ /dev/null @@ -1,83 +0,0 @@ -google.cloud.auditmanager.v1.ComplianceState - */ -class ComplianceState -{ - /** - * Default value. This value is unused. - * - * Generated from protobuf enum COMPLIANCE_STATE_UNSPECIFIED = 0; - */ - const COMPLIANCE_STATE_UNSPECIFIED = 0; - /** - * The resource is compliant. - * - * Generated from protobuf enum COMPLIANT = 1; - */ - const COMPLIANT = 1; - /** - * The resource isn't compliant. - * - * Generated from protobuf enum VIOLATION = 2; - */ - const VIOLATION = 2; - /** - * You must complete a manual review. - * - * Generated from protobuf enum MANUAL_REVIEW_NEEDED = 3; - */ - const MANUAL_REVIEW_NEEDED = 3; - /** - * An error was encountered during the evaluation or evidence gathering - * process. - * - * Generated from protobuf enum ERROR = 4; - */ - const ERROR = 4; - /** - * The resource can't be audited. - * - * Generated from protobuf enum AUDIT_NOT_SUPPORTED = 5; - */ - const AUDIT_NOT_SUPPORTED = 5; - - private static $valueToName = [ - self::COMPLIANCE_STATE_UNSPECIFIED => 'COMPLIANCE_STATE_UNSPECIFIED', - self::COMPLIANT => 'COMPLIANT', - self::VIOLATION => 'VIOLATION', - self::MANUAL_REVIEW_NEEDED => 'MANUAL_REVIEW_NEEDED', - self::ERROR => 'ERROR', - self::AUDIT_NOT_SUPPORTED => 'AUDIT_NOT_SUPPORTED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Control.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Control.php deleted file mode 100644 index f41280aa8cc4..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Control.php +++ /dev/null @@ -1,399 +0,0 @@ -google.cloud.auditmanager.v1.Control - */ -class Control extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Control identifier that's used to fetch the findings. The - * identifier is the same as the control report name. - * - * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $id = ''; - /** - * Output only. Display name of the control. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $display_name = ''; - /** - * Output only. Category that the control belongs to. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.Control.Family family = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $family = 0; - /** - * Output only. Regulatory family of the control. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.ControlFamily control_family = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $control_family = null; - /** - * Output only. Description of the control. - * - * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $description = ''; - /** - * Output only. Who is responsible for implementing this control. Set to one - * of the following values: `GOOGLE`, `CUSTOMER`, or `SHARED`. - * - * Generated from protobuf field string responsibility_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $responsibility_type = ''; - /** - * Output only. A description of Google's responsibility for this control. - * - * Generated from protobuf field string google_responsibility_description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $google_responsibility_description = ''; - /** - * Output only. A description of how Google implements its responsibility for - * this control. - * - * Generated from protobuf field string google_responsibility_implementation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $google_responsibility_implementation = ''; - /** - * Output only. A description of your responsibility for this control. - * - * Generated from protobuf field string customer_responsibility_description = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $customer_responsibility_description = ''; - /** - * Output only. A description of how you can implement your responsibility for - * this control. - * - * Generated from protobuf field string customer_responsibility_implementation = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $customer_responsibility_implementation = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $id - * Output only. Control identifier that's used to fetch the findings. The - * identifier is the same as the control report name. - * @type string $display_name - * Output only. Display name of the control. - * @type int $family - * Output only. Category that the control belongs to. - * @type \Google\Cloud\AuditManager\V1\ControlFamily $control_family - * Output only. Regulatory family of the control. - * @type string $description - * Output only. Description of the control. - * @type string $responsibility_type - * Output only. Who is responsible for implementing this control. Set to one - * of the following values: `GOOGLE`, `CUSTOMER`, or `SHARED`. - * @type string $google_responsibility_description - * Output only. A description of Google's responsibility for this control. - * @type string $google_responsibility_implementation - * Output only. A description of how Google implements its responsibility for - * this control. - * @type string $customer_responsibility_description - * Output only. A description of your responsibility for this control. - * @type string $customer_responsibility_implementation - * Output only. A description of how you can implement your responsibility for - * this control. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Control identifier that's used to fetch the findings. The - * identifier is the same as the control report name. - * - * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Output only. Control identifier that's used to fetch the findings. The - * identifier is the same as the control report name. - * - * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * Output only. Display name of the control. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Output only. Display name of the control. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Output only. Category that the control belongs to. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.Control.Family family = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getFamily() - { - return $this->family; - } - - /** - * Output only. Category that the control belongs to. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.Control.Family family = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setFamily($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\AuditManager\V1\Control\Family::class); - $this->family = $var; - - return $this; - } - - /** - * Output only. Regulatory family of the control. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.ControlFamily control_family = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\AuditManager\V1\ControlFamily|null - */ - public function getControlFamily() - { - return $this->control_family; - } - - public function hasControlFamily() - { - return isset($this->control_family); - } - - public function clearControlFamily() - { - unset($this->control_family); - } - - /** - * Output only. Regulatory family of the control. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.ControlFamily control_family = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\AuditManager\V1\ControlFamily $var - * @return $this - */ - public function setControlFamily($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\AuditManager\V1\ControlFamily::class); - $this->control_family = $var; - - return $this; - } - - /** - * Output only. Description of the control. - * - * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Output only. Description of the control. - * - * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. Who is responsible for implementing this control. Set to one - * of the following values: `GOOGLE`, `CUSTOMER`, or `SHARED`. - * - * Generated from protobuf field string responsibility_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getResponsibilityType() - { - return $this->responsibility_type; - } - - /** - * Output only. Who is responsible for implementing this control. Set to one - * of the following values: `GOOGLE`, `CUSTOMER`, or `SHARED`. - * - * Generated from protobuf field string responsibility_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setResponsibilityType($var) - { - GPBUtil::checkString($var, True); - $this->responsibility_type = $var; - - return $this; - } - - /** - * Output only. A description of Google's responsibility for this control. - * - * Generated from protobuf field string google_responsibility_description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getGoogleResponsibilityDescription() - { - return $this->google_responsibility_description; - } - - /** - * Output only. A description of Google's responsibility for this control. - * - * Generated from protobuf field string google_responsibility_description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setGoogleResponsibilityDescription($var) - { - GPBUtil::checkString($var, True); - $this->google_responsibility_description = $var; - - return $this; - } - - /** - * Output only. A description of how Google implements its responsibility for - * this control. - * - * Generated from protobuf field string google_responsibility_implementation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getGoogleResponsibilityImplementation() - { - return $this->google_responsibility_implementation; - } - - /** - * Output only. A description of how Google implements its responsibility for - * this control. - * - * Generated from protobuf field string google_responsibility_implementation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setGoogleResponsibilityImplementation($var) - { - GPBUtil::checkString($var, True); - $this->google_responsibility_implementation = $var; - - return $this; - } - - /** - * Output only. A description of your responsibility for this control. - * - * Generated from protobuf field string customer_responsibility_description = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getCustomerResponsibilityDescription() - { - return $this->customer_responsibility_description; - } - - /** - * Output only. A description of your responsibility for this control. - * - * Generated from protobuf field string customer_responsibility_description = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setCustomerResponsibilityDescription($var) - { - GPBUtil::checkString($var, True); - $this->customer_responsibility_description = $var; - - return $this; - } - - /** - * Output only. A description of how you can implement your responsibility for - * this control. - * - * Generated from protobuf field string customer_responsibility_implementation = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getCustomerResponsibilityImplementation() - { - return $this->customer_responsibility_implementation; - } - - /** - * Output only. A description of how you can implement your responsibility for - * this control. - * - * Generated from protobuf field string customer_responsibility_implementation = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setCustomerResponsibilityImplementation($var) - { - GPBUtil::checkString($var, True); - $this->customer_responsibility_implementation = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Control/Family.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Control/Family.php deleted file mode 100644 index 7265a8c17a7d..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Control/Family.php +++ /dev/null @@ -1,173 +0,0 @@ -google.cloud.auditmanager.v1.Control.Family - */ -class Family -{ - /** - * Default value. This value is unused. - * - * Generated from protobuf enum FAMILY_UNSPECIFIED = 0; - */ - const FAMILY_UNSPECIFIED = 0; - /** - * Access control. - * - * Generated from protobuf enum AC = 1; - */ - const AC = 1; - /** - * Awareness and training. - * - * Generated from protobuf enum AT = 2; - */ - const AT = 2; - /** - * Audit and accountability. - * - * Generated from protobuf enum AU = 3; - */ - const AU = 3; - /** - * Certification, accreditation and security assessments. - * - * Generated from protobuf enum CA = 4; - */ - const CA = 4; - /** - * Configuration management and change control. - * - * Generated from protobuf enum CM = 5; - */ - const CM = 5; - /** - * Contingency planning and disaster recovery. - * - * Generated from protobuf enum CP = 6; - */ - const CP = 6; - /** - * Identification and authentication. - * - * Generated from protobuf enum IA = 7; - */ - const IA = 7; - /** - * Incident response. - * - * Generated from protobuf enum IR = 8; - */ - const IR = 8; - /** - * Maintenance. - * - * Generated from protobuf enum MA = 9; - */ - const MA = 9; - /** - * Media protection. - * - * Generated from protobuf enum MP = 10; - */ - const MP = 10; - /** - * Physical and environmental protection. - * - * Generated from protobuf enum PE = 11; - */ - const PE = 11; - /** - * Security planning. - * - * Generated from protobuf enum PL = 12; - */ - const PL = 12; - /** - * Personnel security. - * - * Generated from protobuf enum PS = 13; - */ - const PS = 13; - /** - * Risk assessment. - * - * Generated from protobuf enum RA = 14; - */ - const RA = 14; - /** - * System services and acquisition. - * - * Generated from protobuf enum SA = 15; - */ - const SA = 15; - /** - * System and communications protection. - * - * Generated from protobuf enum SC = 16; - */ - const SC = 16; - /** - * System and information integrity. - * - * Generated from protobuf enum SI = 17; - */ - const SI = 17; - /** - * Supply chain risk management. - * - * Generated from protobuf enum SR = 18; - */ - const SR = 18; - - private static $valueToName = [ - self::FAMILY_UNSPECIFIED => 'FAMILY_UNSPECIFIED', - self::AC => 'AC', - self::AT => 'AT', - self::AU => 'AU', - self::CA => 'CA', - self::CM => 'CM', - self::CP => 'CP', - self::IA => 'IA', - self::IR => 'IR', - self::MA => 'MA', - self::MP => 'MP', - self::PE => 'PE', - self::PL => 'PL', - self::PS => 'PS', - self::RA => 'RA', - self::SA => 'SA', - self::SC => 'SC', - self::SI => 'SI', - self::SR => 'SR', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ControlDetails.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ControlDetails.php deleted file mode 100644 index 11cf4310cd15..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ControlDetails.php +++ /dev/null @@ -1,159 +0,0 @@ -google.cloud.auditmanager.v1.ControlDetails - */ -class ControlDetails extends \Google\Protobuf\Internal\Message -{ - /** - * Control that the findings are being reported for. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.Control control = 1; - */ - protected $control = null; - /** - * Output only. Overall status of the findings for the control. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.ComplianceState compliance_state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $compliance_state = 0; - /** - * A control report summary that provides a high-level overview of the - * compliance controls and the assessment status. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.ReportSummary control_report_summary = 3; - */ - protected $control_report_summary = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\AuditManager\V1\Control $control - * Control that the findings are being reported for. - * @type int $compliance_state - * Output only. Overall status of the findings for the control. - * @type \Google\Cloud\AuditManager\V1\ReportSummary $control_report_summary - * A control report summary that provides a high-level overview of the - * compliance controls and the assessment status. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * Control that the findings are being reported for. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.Control control = 1; - * @return \Google\Cloud\AuditManager\V1\Control|null - */ - public function getControl() - { - return $this->control; - } - - public function hasControl() - { - return isset($this->control); - } - - public function clearControl() - { - unset($this->control); - } - - /** - * Control that the findings are being reported for. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.Control control = 1; - * @param \Google\Cloud\AuditManager\V1\Control $var - * @return $this - */ - public function setControl($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\AuditManager\V1\Control::class); - $this->control = $var; - - return $this; - } - - /** - * Output only. Overall status of the findings for the control. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.ComplianceState compliance_state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getComplianceState() - { - return $this->compliance_state; - } - - /** - * Output only. Overall status of the findings for the control. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.ComplianceState compliance_state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setComplianceState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\AuditManager\V1\ComplianceState::class); - $this->compliance_state = $var; - - return $this; - } - - /** - * A control report summary that provides a high-level overview of the - * compliance controls and the assessment status. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.ReportSummary control_report_summary = 3; - * @return \Google\Cloud\AuditManager\V1\ReportSummary|null - */ - public function getControlReportSummary() - { - return $this->control_report_summary; - } - - public function hasControlReportSummary() - { - return isset($this->control_report_summary); - } - - public function clearControlReportSummary() - { - unset($this->control_report_summary); - } - - /** - * A control report summary that provides a high-level overview of the - * compliance controls and the assessment status. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.ReportSummary control_report_summary = 3; - * @param \Google\Cloud\AuditManager\V1\ReportSummary $var - * @return $this - */ - public function setControlReportSummary($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\AuditManager\V1\ReportSummary::class); - $this->control_report_summary = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ControlFamily.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ControlFamily.php deleted file mode 100644 index 9a13b09e19e5..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ControlFamily.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.auditmanager.v1.ControlFamily - */ -class ControlFamily extends \Google\Protobuf\Internal\Message -{ - /** - * ID of the regulatory control family. To find the list of supported - * control families, use the - * [ListControls][google.cloud.auditmanager.v1.AuditManager.ListControls] - * method and review the `control_family` field in the response. - * - * Generated from protobuf field string family_id = 1; - */ - protected $family_id = ''; - /** - * Display name of the regulatory control family. - * - * Generated from protobuf field string display_name = 2; - */ - protected $display_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $family_id - * ID of the regulatory control family. To find the list of supported - * control families, use the - * [ListControls][google.cloud.auditmanager.v1.AuditManager.ListControls] - * method and review the `control_family` field in the response. - * @type string $display_name - * Display name of the regulatory control family. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * ID of the regulatory control family. To find the list of supported - * control families, use the - * [ListControls][google.cloud.auditmanager.v1.AuditManager.ListControls] - * method and review the `control_family` field in the response. - * - * Generated from protobuf field string family_id = 1; - * @return string - */ - public function getFamilyId() - { - return $this->family_id; - } - - /** - * ID of the regulatory control family. To find the list of supported - * control families, use the - * [ListControls][google.cloud.auditmanager.v1.AuditManager.ListControls] - * method and review the `control_family` field in the response. - * - * Generated from protobuf field string family_id = 1; - * @param string $var - * @return $this - */ - public function setFamilyId($var) - { - GPBUtil::checkString($var, True); - $this->family_id = $var; - - return $this; - } - - /** - * Display name of the regulatory control family. - * - * Generated from protobuf field string display_name = 2; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Display name of the regulatory control family. - * - * Generated from protobuf field string display_name = 2; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/DestinationDetails.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/DestinationDetails.php deleted file mode 100644 index 3e1a1308d6c3..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/DestinationDetails.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.auditmanager.v1.DestinationDetails - */ -class DestinationDetails extends \Google\Protobuf\Internal\Message -{ - protected $destination; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $gcs_bucket_uri - * URI for the Cloud Storage bucket, in the format - * `gs://{bucket_name}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * URI for the Cloud Storage bucket, in the format - * `gs://{bucket_name}`. - * - * Generated from protobuf field string gcs_bucket_uri = 1; - * @return string - */ - public function getGcsBucketUri() - { - return $this->readOneof(1); - } - - public function hasGcsBucketUri() - { - return $this->hasOneof(1); - } - - /** - * URI for the Cloud Storage bucket, in the format - * `gs://{bucket_name}`. - * - * Generated from protobuf field string gcs_bucket_uri = 1; - * @param string $var - * @return $this - */ - public function setGcsBucketUri($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * @return string - */ - public function getDestination() - { - return $this->whichOneof("destination"); - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/EnrollResourceRequest.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/EnrollResourceRequest.php deleted file mode 100644 index 65e8f85ebcc4..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/EnrollResourceRequest.php +++ /dev/null @@ -1,169 +0,0 @@ -google.cloud.auditmanager.v1.EnrollResourceRequest - */ -class EnrollResourceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Organization, folder, or project to enroll in Audit Manager, in - * one of the following formats: - * * `projects/{project}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `organizations/{organization}/locations/{location}` - * - * Generated from protobuf field string scope = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $scope = ''; - /** - * Required. Cloud Storage buckets that you can upload your audit reports to - * during the audit process. - * When you enroll an organization or folder, you can choose a Cloud Storage - * bucket from any project in the organization or folder. If you run an audit - * at the project level using the service agent at the organization or folder - * level, all the buckets that are associated with the service agent are - * available. - * - * Generated from protobuf field repeated .google.cloud.auditmanager.v1.EnrollResourceRequest.EligibleDestination destinations = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $destinations; - - /** - * @param string $scope Required. Organization, folder, or project to enroll in Audit Manager, in - * one of the following formats: - * - * * `projects/{project}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `organizations/{organization}/locations/{location}` - * @param \Google\Cloud\AuditManager\V1\EnrollResourceRequest\EligibleDestination[] $destinations Required. Cloud Storage buckets that you can upload your audit reports to - * during the audit process. - * - * When you enroll an organization or folder, you can choose a Cloud Storage - * bucket from any project in the organization or folder. If you run an audit - * at the project level using the service agent at the organization or folder - * level, all the buckets that are associated with the service agent are - * available. - * - * @return \Google\Cloud\AuditManager\V1\EnrollResourceRequest - * - * @experimental - */ - public static function build(string $scope, array $destinations): self - { - return (new self()) - ->setScope($scope) - ->setDestinations($destinations); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $scope - * Required. Organization, folder, or project to enroll in Audit Manager, in - * one of the following formats: - * * `projects/{project}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `organizations/{organization}/locations/{location}` - * @type \Google\Cloud\AuditManager\V1\EnrollResourceRequest\EligibleDestination[] $destinations - * Required. Cloud Storage buckets that you can upload your audit reports to - * during the audit process. - * When you enroll an organization or folder, you can choose a Cloud Storage - * bucket from any project in the organization or folder. If you run an audit - * at the project level using the service agent at the organization or folder - * level, all the buckets that are associated with the service agent are - * available. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * Required. Organization, folder, or project to enroll in Audit Manager, in - * one of the following formats: - * * `projects/{project}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `organizations/{organization}/locations/{location}` - * - * Generated from protobuf field string scope = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getScope() - { - return $this->scope; - } - - /** - * Required. Organization, folder, or project to enroll in Audit Manager, in - * one of the following formats: - * * `projects/{project}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `organizations/{organization}/locations/{location}` - * - * Generated from protobuf field string scope = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setScope($var) - { - GPBUtil::checkString($var, True); - $this->scope = $var; - - return $this; - } - - /** - * Required. Cloud Storage buckets that you can upload your audit reports to - * during the audit process. - * When you enroll an organization or folder, you can choose a Cloud Storage - * bucket from any project in the organization or folder. If you run an audit - * at the project level using the service agent at the organization or folder - * level, all the buckets that are associated with the service agent are - * available. - * - * Generated from protobuf field repeated .google.cloud.auditmanager.v1.EnrollResourceRequest.EligibleDestination destinations = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return RepeatedField<\Google\Cloud\AuditManager\V1\EnrollResourceRequest\EligibleDestination> - */ - public function getDestinations() - { - return $this->destinations; - } - - /** - * Required. Cloud Storage buckets that you can upload your audit reports to - * during the audit process. - * When you enroll an organization or folder, you can choose a Cloud Storage - * bucket from any project in the organization or folder. If you run an audit - * at the project level using the service agent at the organization or folder - * level, all the buckets that are associated with the service agent are - * available. - * - * Generated from protobuf field repeated .google.cloud.auditmanager.v1.EnrollResourceRequest.EligibleDestination destinations = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\AuditManager\V1\EnrollResourceRequest\EligibleDestination[] $var - * @return $this - */ - public function setDestinations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AuditManager\V1\EnrollResourceRequest\EligibleDestination::class); - $this->destinations = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/EnrollResourceRequest/EligibleDestination.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/EnrollResourceRequest/EligibleDestination.php deleted file mode 100644 index 3b7f309ebfdb..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/EnrollResourceRequest/EligibleDestination.php +++ /dev/null @@ -1,84 +0,0 @@ -google.cloud.auditmanager.v1.EnrollResourceRequest.EligibleDestination - */ -class EligibleDestination extends \Google\Protobuf\Internal\Message -{ - protected $eligible_destinations; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $eligible_gcs_bucket - * The location of the Cloud Storage bucket where you want to upload the - * audit report and evidence during the - * [GenerateAuditReport][google.cloud.auditmanager.v1.AuditManager.GenerateAuditReport] - * API call. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * The location of the Cloud Storage bucket where you want to upload the - * audit report and evidence during the - * [GenerateAuditReport][google.cloud.auditmanager.v1.AuditManager.GenerateAuditReport] - * API call. - * - * Generated from protobuf field string eligible_gcs_bucket = 3; - * @return string - */ - public function getEligibleGcsBucket() - { - return $this->readOneof(3); - } - - public function hasEligibleGcsBucket() - { - return $this->hasOneof(3); - } - - /** - * The location of the Cloud Storage bucket where you want to upload the - * audit report and evidence during the - * [GenerateAuditReport][google.cloud.auditmanager.v1.AuditManager.GenerateAuditReport] - * API call. - * - * Generated from protobuf field string eligible_gcs_bucket = 3; - * @param string $var - * @return $this - */ - public function setEligibleGcsBucket($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getEligibleDestinations() - { - return $this->whichOneof("eligible_destinations"); - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Enrollment.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Enrollment.php deleted file mode 100644 index 6f97b729a3f9..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Enrollment.php +++ /dev/null @@ -1,117 +0,0 @@ -google.cloud.auditmanager.v1.Enrollment - */ -class Enrollment extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. Name of the enrollment, in one of the following formats: - * * `projects/{project}/locations/{location}/enrollments/{enrollment}` - * * `folders/{folder}/locations/{location}/enrollments/{enrollment}` - * * `organizations/{organization}/locations/{location}/enrollments/{enrollment}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Output only. Cloud Storage buckets where you want to upload the audit - * reports. - * - * Generated from protobuf field repeated .google.cloud.auditmanager.v1.DestinationDetails destination_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $destination_details; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. Name of the enrollment, in one of the following formats: - * * `projects/{project}/locations/{location}/enrollments/{enrollment}` - * * `folders/{folder}/locations/{location}/enrollments/{enrollment}` - * * `organizations/{organization}/locations/{location}/enrollments/{enrollment}` - * @type \Google\Cloud\AuditManager\V1\DestinationDetails[] $destination_details - * Output only. Cloud Storage buckets where you want to upload the audit - * reports. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. Name of the enrollment, in one of the following formats: - * * `projects/{project}/locations/{location}/enrollments/{enrollment}` - * * `folders/{folder}/locations/{location}/enrollments/{enrollment}` - * * `organizations/{organization}/locations/{location}/enrollments/{enrollment}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. Name of the enrollment, in one of the following formats: - * * `projects/{project}/locations/{location}/enrollments/{enrollment}` - * * `folders/{folder}/locations/{location}/enrollments/{enrollment}` - * * `organizations/{organization}/locations/{location}/enrollments/{enrollment}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. Cloud Storage buckets where you want to upload the audit - * reports. - * - * Generated from protobuf field repeated .google.cloud.auditmanager.v1.DestinationDetails destination_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return RepeatedField<\Google\Cloud\AuditManager\V1\DestinationDetails> - */ - public function getDestinationDetails() - { - return $this->destination_details; - } - - /** - * Output only. Cloud Storage buckets where you want to upload the audit - * reports. - * - * Generated from protobuf field repeated .google.cloud.auditmanager.v1.DestinationDetails destination_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\AuditManager\V1\DestinationDetails[] $var - * @return $this - */ - public function setDestinationDetails($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AuditManager\V1\DestinationDetails::class); - $this->destination_details = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditReportRequest.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditReportRequest.php deleted file mode 100644 index 307a710e7cf8..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditReportRequest.php +++ /dev/null @@ -1,316 +0,0 @@ -google.cloud.auditmanager.v1.GenerateAuditReportRequest - */ -class GenerateAuditReportRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Organization, folder, or project that the audit applies to, in - * one of the following formats: - * * `projects/{project}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `organizations/{organization}/locations/{location}` - * - * Generated from protobuf field string scope = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $scope = ''; - /** - * Optional. Deprecated. Compliance standard for the audit report. - * Use the `compliance_framework` field instead. - * - * Generated from protobuf field string compliance_standard = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * @deprecated - */ - protected $compliance_standard = ''; - /** - * Required. Format for the audit report. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.GenerateAuditReportRequest.AuditReportFormat report_format = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $report_format = 0; - /** - * Required. The framework that's used for the audit report. For example, - * `NIST_800_53`. - * - * Generated from protobuf field string compliance_framework = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $compliance_framework = ''; - /** - * Optional. If `true`, only validate the request and don't generate the audit - * report. - * - * Generated from protobuf field bool validate_only = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - protected $destination; - - /** - * @param string $scope Required. Organization, folder, or project that the audit applies to, in - * one of the following formats: - * - * * `projects/{project}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `organizations/{organization}/locations/{location}` - * @param string $gcsUri URL for the Cloud Storage bucket where the report and evidence is - * uploaded. You must select a bucket that was provided during the - * enrollment process. - * @param string $complianceStandard Optional. Deprecated. Compliance standard for the audit report. - * - * Use the `compliance_framework` field instead. - * @param int $reportFormat Required. Format for the audit report. - * For allowed values, use constants defined on {@see \Google\Cloud\AuditManager\V1\GenerateAuditReportRequest\AuditReportFormat} - * - * @return \Google\Cloud\AuditManager\V1\GenerateAuditReportRequest - * - * @experimental - */ - public static function build(string $scope, string $gcsUri, string $complianceStandard, int $reportFormat): self - { - return (new self()) - ->setScope($scope) - ->setGcsUri($gcsUri) - ->setComplianceStandard($complianceStandard) - ->setReportFormat($reportFormat); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $gcs_uri - * URL for the Cloud Storage bucket where the report and evidence is - * uploaded. You must select a bucket that was provided during the - * enrollment process. - * @type string $scope - * Required. Organization, folder, or project that the audit applies to, in - * one of the following formats: - * * `projects/{project}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `organizations/{organization}/locations/{location}` - * @type string $compliance_standard - * Optional. Deprecated. Compliance standard for the audit report. - * Use the `compliance_framework` field instead. - * @type int $report_format - * Required. Format for the audit report. - * @type string $compliance_framework - * Required. The framework that's used for the audit report. For example, - * `NIST_800_53`. - * @type bool $validate_only - * Optional. If `true`, only validate the request and don't generate the audit - * report. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * URL for the Cloud Storage bucket where the report and evidence is - * uploaded. You must select a bucket that was provided during the - * enrollment process. - * - * Generated from protobuf field string gcs_uri = 2; - * @return string - */ - public function getGcsUri() - { - return $this->readOneof(2); - } - - public function hasGcsUri() - { - return $this->hasOneof(2); - } - - /** - * URL for the Cloud Storage bucket where the report and evidence is - * uploaded. You must select a bucket that was provided during the - * enrollment process. - * - * Generated from protobuf field string gcs_uri = 2; - * @param string $var - * @return $this - */ - public function setGcsUri($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Required. Organization, folder, or project that the audit applies to, in - * one of the following formats: - * * `projects/{project}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `organizations/{organization}/locations/{location}` - * - * Generated from protobuf field string scope = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getScope() - { - return $this->scope; - } - - /** - * Required. Organization, folder, or project that the audit applies to, in - * one of the following formats: - * * `projects/{project}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `organizations/{organization}/locations/{location}` - * - * Generated from protobuf field string scope = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setScope($var) - { - GPBUtil::checkString($var, True); - $this->scope = $var; - - return $this; - } - - /** - * Optional. Deprecated. Compliance standard for the audit report. - * Use the `compliance_framework` field instead. - * - * Generated from protobuf field string compliance_standard = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * @return string - * @deprecated - */ - public function getComplianceStandard() - { - if ($this->compliance_standard !== '') { - @trigger_error('compliance_standard is deprecated.', E_USER_DEPRECATED); - } - return $this->compliance_standard; - } - - /** - * Optional. Deprecated. Compliance standard for the audit report. - * Use the `compliance_framework` field instead. - * - * Generated from protobuf field string compliance_standard = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - * @deprecated - */ - public function setComplianceStandard($var) - { - @trigger_error('compliance_standard is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, True); - $this->compliance_standard = $var; - - return $this; - } - - /** - * Required. Format for the audit report. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.GenerateAuditReportRequest.AuditReportFormat report_format = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getReportFormat() - { - return $this->report_format; - } - - /** - * Required. Format for the audit report. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.GenerateAuditReportRequest.AuditReportFormat report_format = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setReportFormat($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\AuditManager\V1\GenerateAuditReportRequest\AuditReportFormat::class); - $this->report_format = $var; - - return $this; - } - - /** - * Required. The framework that's used for the audit report. For example, - * `NIST_800_53`. - * - * Generated from protobuf field string compliance_framework = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getComplianceFramework() - { - return $this->compliance_framework; - } - - /** - * Required. The framework that's used for the audit report. For example, - * `NIST_800_53`. - * - * Generated from protobuf field string compliance_framework = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setComplianceFramework($var) - { - GPBUtil::checkString($var, True); - $this->compliance_framework = $var; - - return $this; - } - - /** - * Optional. If `true`, only validate the request and don't generate the audit - * report. - * - * Generated from protobuf field bool validate_only = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. If `true`, only validate the request and don't generate the audit - * report. - * - * Generated from protobuf field bool validate_only = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - - /** - * @return string - */ - public function getDestination() - { - return $this->whichOneof("destination"); - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditReportRequest/AuditReportFormat.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditReportRequest/AuditReportFormat.php deleted file mode 100644 index d28fd35a05ed..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditReportRequest/AuditReportFormat.php +++ /dev/null @@ -1,54 +0,0 @@ -google.cloud.auditmanager.v1.GenerateAuditReportRequest.AuditReportFormat - */ -class AuditReportFormat -{ - /** - * Default value. This value is unused. - * - * Generated from protobuf enum AUDIT_REPORT_FORMAT_UNSPECIFIED = 0; - */ - const AUDIT_REPORT_FORMAT_UNSPECIFIED = 0; - /** - * Open Document format. - * - * Generated from protobuf enum AUDIT_REPORT_FORMAT_ODF = 1; - */ - const AUDIT_REPORT_FORMAT_ODF = 1; - - private static $valueToName = [ - self::AUDIT_REPORT_FORMAT_UNSPECIFIED => 'AUDIT_REPORT_FORMAT_UNSPECIFIED', - self::AUDIT_REPORT_FORMAT_ODF => 'AUDIT_REPORT_FORMAT_ODF', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditScopeReportRequest.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditScopeReportRequest.php deleted file mode 100644 index be64ad66d4aa..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditScopeReportRequest.php +++ /dev/null @@ -1,231 +0,0 @@ -google.cloud.auditmanager.v1.GenerateAuditScopeReportRequest - */ -class GenerateAuditScopeReportRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Project or folder that the audit scope report is generated for, - * in one of the following formats: - * * `projects/{project}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `organizations/{organization}/locations/{location}` - * - * Generated from protobuf field string scope = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $scope = ''; - /** - * Optional. Deprecated. The standard (industry or regulatory requirements) - * that the audit scope report is run against. - * Use the `compliance_framework` field instead. - * - * Generated from protobuf field string compliance_standard = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * @deprecated - */ - protected $compliance_standard = ''; - /** - * Required. Format for the audit scope report. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.GenerateAuditScopeReportRequest.AuditScopeReportFormat report_format = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $report_format = 0; - /** - * Required. Framework (set of controls) that the audit scope report is - * generated against. For example, `NIST_800_53`. - * - * Generated from protobuf field string compliance_framework = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $compliance_framework = ''; - - /** - * @param string $scope Required. Project or folder that the audit scope report is generated for, - * in one of the following formats: - * - * * `projects/{project}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `organizations/{organization}/locations/{location}` - * @param string $complianceStandard Optional. Deprecated. The standard (industry or regulatory requirements) - * that the audit scope report is run against. - * - * Use the `compliance_framework` field instead. - * @param int $reportFormat Required. Format for the audit scope report. - * For allowed values, use constants defined on {@see \Google\Cloud\AuditManager\V1\GenerateAuditScopeReportRequest\AuditScopeReportFormat} - * - * @return \Google\Cloud\AuditManager\V1\GenerateAuditScopeReportRequest - * - * @experimental - */ - public static function build(string $scope, string $complianceStandard, int $reportFormat): self - { - return (new self()) - ->setScope($scope) - ->setComplianceStandard($complianceStandard) - ->setReportFormat($reportFormat); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $scope - * Required. Project or folder that the audit scope report is generated for, - * in one of the following formats: - * * `projects/{project}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `organizations/{organization}/locations/{location}` - * @type string $compliance_standard - * Optional. Deprecated. The standard (industry or regulatory requirements) - * that the audit scope report is run against. - * Use the `compliance_framework` field instead. - * @type int $report_format - * Required. Format for the audit scope report. - * @type string $compliance_framework - * Required. Framework (set of controls) that the audit scope report is - * generated against. For example, `NIST_800_53`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * Required. Project or folder that the audit scope report is generated for, - * in one of the following formats: - * * `projects/{project}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `organizations/{organization}/locations/{location}` - * - * Generated from protobuf field string scope = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getScope() - { - return $this->scope; - } - - /** - * Required. Project or folder that the audit scope report is generated for, - * in one of the following formats: - * * `projects/{project}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `organizations/{organization}/locations/{location}` - * - * Generated from protobuf field string scope = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setScope($var) - { - GPBUtil::checkString($var, True); - $this->scope = $var; - - return $this; - } - - /** - * Optional. Deprecated. The standard (industry or regulatory requirements) - * that the audit scope report is run against. - * Use the `compliance_framework` field instead. - * - * Generated from protobuf field string compliance_standard = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * @return string - * @deprecated - */ - public function getComplianceStandard() - { - if ($this->compliance_standard !== '') { - @trigger_error('compliance_standard is deprecated.', E_USER_DEPRECATED); - } - return $this->compliance_standard; - } - - /** - * Optional. Deprecated. The standard (industry or regulatory requirements) - * that the audit scope report is run against. - * Use the `compliance_framework` field instead. - * - * Generated from protobuf field string compliance_standard = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - * @deprecated - */ - public function setComplianceStandard($var) - { - @trigger_error('compliance_standard is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, True); - $this->compliance_standard = $var; - - return $this; - } - - /** - * Required. Format for the audit scope report. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.GenerateAuditScopeReportRequest.AuditScopeReportFormat report_format = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getReportFormat() - { - return $this->report_format; - } - - /** - * Required. Format for the audit scope report. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.GenerateAuditScopeReportRequest.AuditScopeReportFormat report_format = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setReportFormat($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\AuditManager\V1\GenerateAuditScopeReportRequest\AuditScopeReportFormat::class); - $this->report_format = $var; - - return $this; - } - - /** - * Required. Framework (set of controls) that the audit scope report is - * generated against. For example, `NIST_800_53`. - * - * Generated from protobuf field string compliance_framework = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getComplianceFramework() - { - return $this->compliance_framework; - } - - /** - * Required. Framework (set of controls) that the audit scope report is - * generated against. For example, `NIST_800_53`. - * - * Generated from protobuf field string compliance_framework = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setComplianceFramework($var) - { - GPBUtil::checkString($var, True); - $this->compliance_framework = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditScopeReportRequest/AuditScopeReportFormat.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditScopeReportRequest/AuditScopeReportFormat.php deleted file mode 100644 index 05ee0385b32d..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditScopeReportRequest/AuditScopeReportFormat.php +++ /dev/null @@ -1,54 +0,0 @@ -google.cloud.auditmanager.v1.GenerateAuditScopeReportRequest.AuditScopeReportFormat - */ -class AuditScopeReportFormat -{ - /** - * Default value. This value is unused. - * - * Generated from protobuf enum AUDIT_SCOPE_REPORT_FORMAT_UNSPECIFIED = 0; - */ - const AUDIT_SCOPE_REPORT_FORMAT_UNSPECIFIED = 0; - /** - * Open Document format. - * - * Generated from protobuf enum AUDIT_SCOPE_REPORT_FORMAT_ODF = 1; - */ - const AUDIT_SCOPE_REPORT_FORMAT_ODF = 1; - - private static $valueToName = [ - self::AUDIT_SCOPE_REPORT_FORMAT_UNSPECIFIED => 'AUDIT_SCOPE_REPORT_FORMAT_UNSPECIFIED', - self::AUDIT_SCOPE_REPORT_FORMAT_ODF => 'AUDIT_SCOPE_REPORT_FORMAT_ODF', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GetAuditReportRequest.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GetAuditReportRequest.php deleted file mode 100644 index 938b2f0c35a8..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GetAuditReportRequest.php +++ /dev/null @@ -1,98 +0,0 @@ -google.cloud.auditmanager.v1.GetAuditReportRequest - */ -class GetAuditReportRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the audit report, in one of the following formats: - * * `projects/{project}/locations/{location}/auditReports/{audit_report}` - * * `folders/{folder}/locations/{location}/auditReports/{audit_report}` - * * `organizations/{organization}/locations/{location}/auditReports/{audit_report}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of the audit report, in one of the following formats: - * - * * `projects/{project}/locations/{location}/auditReports/{audit_report}` - * * `folders/{folder}/locations/{location}/auditReports/{audit_report}` - * * `organizations/{organization}/locations/{location}/auditReports/{audit_report}` - * Please see {@see AuditManagerClient::auditReportName()} for help formatting this field. - * - * @return \Google\Cloud\AuditManager\V1\GetAuditReportRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the audit report, in one of the following formats: - * * `projects/{project}/locations/{location}/auditReports/{audit_report}` - * * `folders/{folder}/locations/{location}/auditReports/{audit_report}` - * * `organizations/{organization}/locations/{location}/auditReports/{audit_report}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the audit report, in one of the following formats: - * * `projects/{project}/locations/{location}/auditReports/{audit_report}` - * * `folders/{folder}/locations/{location}/auditReports/{audit_report}` - * * `organizations/{organization}/locations/{location}/auditReports/{audit_report}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the audit report, in one of the following formats: - * * `projects/{project}/locations/{location}/auditReports/{audit_report}` - * * `folders/{folder}/locations/{location}/auditReports/{audit_report}` - * * `organizations/{organization}/locations/{location}/auditReports/{audit_report}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GetResourceEnrollmentStatusRequest.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GetResourceEnrollmentStatusRequest.php deleted file mode 100644 index cc5898abe2c0..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GetResourceEnrollmentStatusRequest.php +++ /dev/null @@ -1,103 +0,0 @@ -google.cloud.auditmanager.v1.GetResourceEnrollmentStatusRequest - */ -class GetResourceEnrollmentStatusRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource enrollment status, in one of the following - * formats: - * * `folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` - * * `projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` - * * `organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of the resource enrollment status, in one of the following - * formats: - * - * * `folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` - * * `projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` - * * `organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` - * Please see {@see AuditManagerClient::resourceEnrollmentStatusName()} for help formatting this field. - * - * @return \Google\Cloud\AuditManager\V1\GetResourceEnrollmentStatusRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the resource enrollment status, in one of the following - * formats: - * * `folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` - * * `projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` - * * `organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the resource enrollment status, in one of the following - * formats: - * * `folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` - * * `projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` - * * `organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the resource enrollment status, in one of the following - * formats: - * * `folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` - * * `projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` - * * `organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListAuditReportsRequest.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListAuditReportsRequest.php deleted file mode 100644 index 048052f5d864..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListAuditReportsRequest.php +++ /dev/null @@ -1,187 +0,0 @@ -google.cloud.auditmanager.v1.ListAuditReportsRequest - */ -class ListAuditReportsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent organization, folder, or project to list reports for, - * in one of the following formats: - * * `projects/{project}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `organizations/{organization}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Maximum number of items to return in a single page. The service - * might return fewer items than this value. If unspecified, the service picks - * an appropriate default. The maximum value is 100; values above 100 are - * reduced to 100. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A page token, received from a previous call, to retrieve the next - * page of results. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. Parent organization, folder, or project to list reports for, - * in one of the following formats: - * - * * `projects/{project}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `organizations/{organization}/locations/{location}` - * Please see {@see AuditManagerClient::folderLocationName()} for help formatting this field. - * - * @return \Google\Cloud\AuditManager\V1\ListAuditReportsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Parent organization, folder, or project to list reports for, - * in one of the following formats: - * * `projects/{project}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `organizations/{organization}/locations/{location}` - * @type int $page_size - * Optional. Maximum number of items to return in a single page. The service - * might return fewer items than this value. If unspecified, the service picks - * an appropriate default. The maximum value is 100; values above 100 are - * reduced to 100. - * @type string $page_token - * Optional. A page token, received from a previous call, to retrieve the next - * page of results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent organization, folder, or project to list reports for, - * in one of the following formats: - * * `projects/{project}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `organizations/{organization}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Parent organization, folder, or project to list reports for, - * in one of the following formats: - * * `projects/{project}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `organizations/{organization}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. Maximum number of items to return in a single page. The service - * might return fewer items than this value. If unspecified, the service picks - * an appropriate default. The maximum value is 100; values above 100 are - * reduced to 100. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Maximum number of items to return in a single page. The service - * might return fewer items than this value. If unspecified, the service picks - * an appropriate default. The maximum value is 100; values above 100 are - * reduced to 100. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. A page token, received from a previous call, to retrieve the next - * page of results. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A page token, received from a previous call, to retrieve the next - * page of results. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListAuditReportsResponse.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListAuditReportsResponse.php deleted file mode 100644 index 17b03c5236ea..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListAuditReportsResponse.php +++ /dev/null @@ -1,110 +0,0 @@ -google.cloud.auditmanager.v1.ListAuditReportsResponse - */ -class ListAuditReportsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Audit reports. - * - * Generated from protobuf field repeated .google.cloud.auditmanager.v1.AuditReport audit_reports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $audit_reports; - /** - * Output only. A token that you can send as the `page_token` in a subsequent - * request to retrieve the next page of results. If this field is empty, there - * are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\AuditManager\V1\AuditReport[] $audit_reports - * Output only. Audit reports. - * @type string $next_page_token - * Output only. A token that you can send as the `page_token` in a subsequent - * request to retrieve the next page of results. If this field is empty, there - * are no subsequent pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Audit reports. - * - * Generated from protobuf field repeated .google.cloud.auditmanager.v1.AuditReport audit_reports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return RepeatedField<\Google\Cloud\AuditManager\V1\AuditReport> - */ - public function getAuditReports() - { - return $this->audit_reports; - } - - /** - * Output only. Audit reports. - * - * Generated from protobuf field repeated .google.cloud.auditmanager.v1.AuditReport audit_reports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\AuditManager\V1\AuditReport[] $var - * @return $this - */ - public function setAuditReports($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AuditManager\V1\AuditReport::class); - $this->audit_reports = $arr; - - return $this; - } - - /** - * Output only. A token that you can send as the `page_token` in a subsequent - * request to retrieve the next page of results. If this field is empty, there - * are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Output only. A token that you can send as the `page_token` in a subsequent - * request to retrieve the next page of results. If this field is empty, there - * are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListControlsRequest.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListControlsRequest.php deleted file mode 100644 index c377232415e9..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListControlsRequest.php +++ /dev/null @@ -1,182 +0,0 @@ -google.cloud.auditmanager.v1.ListControlsRequest - */ -class ListControlsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Standard to list controls for, in one of the following formats: - * * `projects/{project}/locations/{location}/standards/{standard}` - * * `folders/{folder}/locations/{location}/standards/{standard}` - * * `organizations/{organization}/locations/{location}/standards/{standard}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Maximum number of items to return in a single page. The service - * might return fewer items than this value. If unspecified, the service picks - * an appropriate default. The maximum value is 100; values above 100 are - * reduced to 100. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A page token, received from a previous call, to retrieve the next - * page of results. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. Standard to list controls for, in one of the following formats: - * - * * `projects/{project}/locations/{location}/standards/{standard}` - * * `folders/{folder}/locations/{location}/standards/{standard}` - * * `organizations/{organization}/locations/{location}/standards/{standard}` - * Please see {@see AuditManagerClient::standardName()} for help formatting this field. - * - * @return \Google\Cloud\AuditManager\V1\ListControlsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Standard to list controls for, in one of the following formats: - * * `projects/{project}/locations/{location}/standards/{standard}` - * * `folders/{folder}/locations/{location}/standards/{standard}` - * * `organizations/{organization}/locations/{location}/standards/{standard}` - * @type int $page_size - * Optional. Maximum number of items to return in a single page. The service - * might return fewer items than this value. If unspecified, the service picks - * an appropriate default. The maximum value is 100; values above 100 are - * reduced to 100. - * @type string $page_token - * Optional. A page token, received from a previous call, to retrieve the next - * page of results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * Required. Standard to list controls for, in one of the following formats: - * * `projects/{project}/locations/{location}/standards/{standard}` - * * `folders/{folder}/locations/{location}/standards/{standard}` - * * `organizations/{organization}/locations/{location}/standards/{standard}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Standard to list controls for, in one of the following formats: - * * `projects/{project}/locations/{location}/standards/{standard}` - * * `folders/{folder}/locations/{location}/standards/{standard}` - * * `organizations/{organization}/locations/{location}/standards/{standard}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. Maximum number of items to return in a single page. The service - * might return fewer items than this value. If unspecified, the service picks - * an appropriate default. The maximum value is 100; values above 100 are - * reduced to 100. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Maximum number of items to return in a single page. The service - * might return fewer items than this value. If unspecified, the service picks - * an appropriate default. The maximum value is 100; values above 100 are - * reduced to 100. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. A page token, received from a previous call, to retrieve the next - * page of results. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A page token, received from a previous call, to retrieve the next - * page of results. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListControlsResponse.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListControlsResponse.php deleted file mode 100644 index df4f807cbd71..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListControlsResponse.php +++ /dev/null @@ -1,110 +0,0 @@ -google.cloud.auditmanager.v1.ListControlsResponse - */ -class ListControlsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Controls for a given regulatory standard. - * - * Generated from protobuf field repeated .google.cloud.auditmanager.v1.Control controls = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $controls; - /** - * Output only. A token that you can send as the `page_token` in a subsequent - * request to retrieve the next page of results. If this field is empty, there - * are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\AuditManager\V1\Control[] $controls - * Output only. Controls for a given regulatory standard. - * @type string $next_page_token - * Output only. A token that you can send as the `page_token` in a subsequent - * request to retrieve the next page of results. If this field is empty, there - * are no subsequent pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Controls for a given regulatory standard. - * - * Generated from protobuf field repeated .google.cloud.auditmanager.v1.Control controls = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return RepeatedField<\Google\Cloud\AuditManager\V1\Control> - */ - public function getControls() - { - return $this->controls; - } - - /** - * Output only. Controls for a given regulatory standard. - * - * Generated from protobuf field repeated .google.cloud.auditmanager.v1.Control controls = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\AuditManager\V1\Control[] $var - * @return $this - */ - public function setControls($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AuditManager\V1\Control::class); - $this->controls = $arr; - - return $this; - } - - /** - * Output only. A token that you can send as the `page_token` in a subsequent - * request to retrieve the next page of results. If this field is empty, there - * are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Output only. A token that you can send as the `page_token` in a subsequent - * request to retrieve the next page of results. If this field is empty, there - * are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListResourceEnrollmentStatusesRequest.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListResourceEnrollmentStatusesRequest.php deleted file mode 100644 index 6b11c3629db0..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListResourceEnrollmentStatusesRequest.php +++ /dev/null @@ -1,182 +0,0 @@ -google.cloud.auditmanager.v1.ListResourceEnrollmentStatusesRequest - */ -class ListResourceEnrollmentStatusesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent organization or folder to list enrollment statuses for, - * in one of the following formats: - * * `folders/{folder}/locations/{location}` - * * `organizations/{organization}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Maximum number of items to return in a single page. The service - * might return fewer items than this value. If unspecified, the service picks - * an appropriate default. The maximum value is 100; values above 100 are - * reduced to 100. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A page token, received from a previous call, to retrieve the next - * page of results. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. Parent organization or folder to list enrollment statuses for, - * in one of the following formats: - * - * * `folders/{folder}/locations/{location}` - * * `organizations/{organization}/locations/{location}` - * Please see {@see AuditManagerClient::enrollmentStatusScopeName()} for help formatting this field. - * - * @return \Google\Cloud\AuditManager\V1\ListResourceEnrollmentStatusesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Parent organization or folder to list enrollment statuses for, - * in one of the following formats: - * * `folders/{folder}/locations/{location}` - * * `organizations/{organization}/locations/{location}` - * @type int $page_size - * Optional. Maximum number of items to return in a single page. The service - * might return fewer items than this value. If unspecified, the service picks - * an appropriate default. The maximum value is 100; values above 100 are - * reduced to 100. - * @type string $page_token - * Optional. A page token, received from a previous call, to retrieve the next - * page of results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent organization or folder to list enrollment statuses for, - * in one of the following formats: - * * `folders/{folder}/locations/{location}` - * * `organizations/{organization}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Parent organization or folder to list enrollment statuses for, - * in one of the following formats: - * * `folders/{folder}/locations/{location}` - * * `organizations/{organization}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. Maximum number of items to return in a single page. The service - * might return fewer items than this value. If unspecified, the service picks - * an appropriate default. The maximum value is 100; values above 100 are - * reduced to 100. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Maximum number of items to return in a single page. The service - * might return fewer items than this value. If unspecified, the service picks - * an appropriate default. The maximum value is 100; values above 100 are - * reduced to 100. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. A page token, received from a previous call, to retrieve the next - * page of results. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A page token, received from a previous call, to retrieve the next - * page of results. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListResourceEnrollmentStatusesResponse.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListResourceEnrollmentStatusesResponse.php deleted file mode 100644 index 364a0db41947..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListResourceEnrollmentStatusesResponse.php +++ /dev/null @@ -1,110 +0,0 @@ -google.cloud.auditmanager.v1.ListResourceEnrollmentStatusesResponse - */ -class ListResourceEnrollmentStatusesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Resources with their enrollment status. - * - * Generated from protobuf field repeated .google.cloud.auditmanager.v1.ResourceEnrollmentStatus resource_enrollment_statuses = 1; - */ - private $resource_enrollment_statuses; - /** - * Output only. A token that you can send as the `page_token` in a subsequent - * request to retrieve the next page of results. If this field is empty, there - * are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\AuditManager\V1\ResourceEnrollmentStatus[] $resource_enrollment_statuses - * Resources with their enrollment status. - * @type string $next_page_token - * Output only. A token that you can send as the `page_token` in a subsequent - * request to retrieve the next page of results. If this field is empty, there - * are no subsequent pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * Resources with their enrollment status. - * - * Generated from protobuf field repeated .google.cloud.auditmanager.v1.ResourceEnrollmentStatus resource_enrollment_statuses = 1; - * @return RepeatedField<\Google\Cloud\AuditManager\V1\ResourceEnrollmentStatus> - */ - public function getResourceEnrollmentStatuses() - { - return $this->resource_enrollment_statuses; - } - - /** - * Resources with their enrollment status. - * - * Generated from protobuf field repeated .google.cloud.auditmanager.v1.ResourceEnrollmentStatus resource_enrollment_statuses = 1; - * @param \Google\Cloud\AuditManager\V1\ResourceEnrollmentStatus[] $var - * @return $this - */ - public function setResourceEnrollmentStatuses($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AuditManager\V1\ResourceEnrollmentStatus::class); - $this->resource_enrollment_statuses = $arr; - - return $this; - } - - /** - * Output only. A token that you can send as the `page_token` in a subsequent - * request to retrieve the next page of results. If this field is empty, there - * are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Output only. A token that you can send as the `page_token` in a subsequent - * request to retrieve the next page of results. If this field is empty, there - * are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/OperationMetadata.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/OperationMetadata.php deleted file mode 100644 index 5a51a0fa651f..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/OperationMetadata.php +++ /dev/null @@ -1,315 +0,0 @@ -google.cloud.auditmanager.v1.OperationMetadata - */ -class OperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Time that the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Time that the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $end_time = null; - /** - * Output only. A server-defined resource path for the target of the - * operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $target = ''; - /** - * Output only. The name of the verb that was executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $verb = ''; - /** - * Output only. A human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $status_message = ''; - /** - * Output only. Whether you requested that the operation be cancelled. - * Operations that were cancelled successfully have an - * [Operation.error][google.longrunning.Operation.error] - * value with a status code - * [Code.CANCELLED][google.rpc.Status.code.CANCELLED]. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $requested_cancellation = false; - /** - * Output only. The API version used to start the operation. For example, - * `v1`. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $api_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Time that the operation was created. - * @type \Google\Protobuf\Timestamp $end_time - * Output only. Time that the operation finished running. - * @type string $target - * Output only. A server-defined resource path for the target of the - * operation. - * @type string $verb - * Output only. The name of the verb that was executed by the operation. - * @type string $status_message - * Output only. A human-readable status of the operation, if any. - * @type bool $requested_cancellation - * Output only. Whether you requested that the operation be cancelled. - * Operations that were cancelled successfully have an - * [Operation.error][google.longrunning.Operation.error] - * value with a status code - * [Code.CANCELLED][google.rpc.Status.code.CANCELLED]. - * @type string $api_version - * Output only. The API version used to start the operation. For example, - * `v1`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Time that the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. Time that the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. Time that the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * Output only. Time that the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * Output only. A server-defined resource path for the target of the - * operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getTarget() - { - return $this->target; - } - - /** - * Output only. A server-defined resource path for the target of the - * operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setTarget($var) - { - GPBUtil::checkString($var, True); - $this->target = $var; - - return $this; - } - - /** - * Output only. The name of the verb that was executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getVerb() - { - return $this->verb; - } - - /** - * Output only. The name of the verb that was executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setVerb($var) - { - GPBUtil::checkString($var, True); - $this->verb = $var; - - return $this; - } - - /** - * Output only. A human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getStatusMessage() - { - return $this->status_message; - } - - /** - * Output only. A human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setStatusMessage($var) - { - GPBUtil::checkString($var, True); - $this->status_message = $var; - - return $this; - } - - /** - * Output only. Whether you requested that the operation be cancelled. - * Operations that were cancelled successfully have an - * [Operation.error][google.longrunning.Operation.error] - * value with a status code - * [Code.CANCELLED][google.rpc.Status.code.CANCELLED]. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getRequestedCancellation() - { - return $this->requested_cancellation; - } - - /** - * Output only. Whether you requested that the operation be cancelled. - * Operations that were cancelled successfully have an - * [Operation.error][google.longrunning.Operation.error] - * value with a status code - * [Code.CANCELLED][google.rpc.Status.code.CANCELLED]. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setRequestedCancellation($var) - { - GPBUtil::checkBool($var); - $this->requested_cancellation = $var; - - return $this; - } - - /** - * Output only. The API version used to start the operation. For example, - * `v1`. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getApiVersion() - { - return $this->api_version; - } - - /** - * Output only. The API version used to start the operation. For example, - * `v1`. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setApiVersion($var) - { - GPBUtil::checkString($var, True); - $this->api_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/OperationState.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/OperationState.php deleted file mode 100644 index 43de9a89b31d..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/OperationState.php +++ /dev/null @@ -1,103 +0,0 @@ -google.cloud.auditmanager.v1.OperationState - */ -class OperationState -{ - /** - * Default value. This value is unused. - * - * Generated from protobuf enum OPERATION_STATE_UNSPECIFIED = 0; - */ - const OPERATION_STATE_UNSPECIFIED = 0; - /** - * Audit generation process hasn't started. - * - * Generated from protobuf enum OPERATION_STATE_NOT_STARTED = 10; - */ - const OPERATION_STATE_NOT_STARTED = 10; - /** - * Evaluation process is in progress. - * - * Generated from protobuf enum OPERATION_STATE_EVALUATION_IN_PROGRESS = 20; - */ - const OPERATION_STATE_EVALUATION_IN_PROGRESS = 20; - /** - * Evaluation process is completed. - * - * Generated from protobuf enum OPERATION_STATE_EVALUATION_DONE = 21; - */ - const OPERATION_STATE_EVALUATION_DONE = 21; - /** - * Report generation process is in progress. - * - * Generated from protobuf enum OPERATION_STATE_EVIDENCE_REPORT_GENERATION_IN_PROGRESS = 30; - */ - const OPERATION_STATE_EVIDENCE_REPORT_GENERATION_IN_PROGRESS = 30; - /** - * Report generation process is completed. - * - * Generated from protobuf enum OPERATION_STATE_EVIDENCE_REPORT_GENERATION_DONE = 31; - */ - const OPERATION_STATE_EVIDENCE_REPORT_GENERATION_DONE = 31; - /** - * The audit report and evidence are being uploaded to your bucket. - * - * Generated from protobuf enum OPERATION_STATE_EVIDENCE_UPLOAD_IN_PROGRESS = 40; - */ - const OPERATION_STATE_EVIDENCE_UPLOAD_IN_PROGRESS = 40; - /** - * The audit report and evidence are uploaded to your bucket. - * - * Generated from protobuf enum OPERATION_STATE_DONE = 50; - */ - const OPERATION_STATE_DONE = 50; - /** - * Audit report generation process failed. - * - * Generated from protobuf enum OPERATION_STATE_FAILED = 60; - */ - const OPERATION_STATE_FAILED = 60; - - private static $valueToName = [ - self::OPERATION_STATE_UNSPECIFIED => 'OPERATION_STATE_UNSPECIFIED', - self::OPERATION_STATE_NOT_STARTED => 'OPERATION_STATE_NOT_STARTED', - self::OPERATION_STATE_EVALUATION_IN_PROGRESS => 'OPERATION_STATE_EVALUATION_IN_PROGRESS', - self::OPERATION_STATE_EVALUATION_DONE => 'OPERATION_STATE_EVALUATION_DONE', - self::OPERATION_STATE_EVIDENCE_REPORT_GENERATION_IN_PROGRESS => 'OPERATION_STATE_EVIDENCE_REPORT_GENERATION_IN_PROGRESS', - self::OPERATION_STATE_EVIDENCE_REPORT_GENERATION_DONE => 'OPERATION_STATE_EVIDENCE_REPORT_GENERATION_DONE', - self::OPERATION_STATE_EVIDENCE_UPLOAD_IN_PROGRESS => 'OPERATION_STATE_EVIDENCE_UPLOAD_IN_PROGRESS', - self::OPERATION_STATE_DONE => 'OPERATION_STATE_DONE', - self::OPERATION_STATE_FAILED => 'OPERATION_STATE_FAILED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ReportGenerationProgress.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ReportGenerationProgress.php deleted file mode 100644 index 8fccf8867285..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ReportGenerationProgress.php +++ /dev/null @@ -1,299 +0,0 @@ -google.cloud.auditmanager.v1.ReportGenerationProgress - */ -class ReportGenerationProgress extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Current state of execution for report generation. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.OperationState state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. Reason for failure during the audit report generation process. - * This field is set only if the `OperationState` attribute is - * `OPERATION_STATE_FAILED`. - * - * Generated from protobuf field string failure_reason = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $failure_reason = ''; - /** - * Progress of the evaluation process. The progress is - * defined in terms of percentage complete. - * - * Generated from protobuf field double evaluation_percent_complete = 20; - */ - protected $evaluation_percent_complete = 0.0; - /** - * Report generation progress, defined in terms of percentage complete. - * Until evaluation is complete, this value is always `0`. - * - * Generated from protobuf field double report_generation_percent_complete = 30; - */ - protected $report_generation_percent_complete = 0.0; - /** - * Report uploading progress, defined in terms of percentage complete. - * Until evaluation and report generation are complete, this value is always - * `0`. - * - * Generated from protobuf field double report_uploading_percent_complete = 40; - */ - protected $report_uploading_percent_complete = 0.0; - /** - * Output only. Cloud Storage bucket where the audit report is uploaded to - * after the evaluation process is completed. - * - * Generated from protobuf field string destination_gcs_bucket = 50 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $destination_gcs_bucket = ''; - /** - * Output only. Name of the audit report. - * - * Generated from protobuf field string audit_report = 51 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $audit_report = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $state - * Output only. Current state of execution for report generation. - * @type string $failure_reason - * Output only. Reason for failure during the audit report generation process. - * This field is set only if the `OperationState` attribute is - * `OPERATION_STATE_FAILED`. - * @type float $evaluation_percent_complete - * Progress of the evaluation process. The progress is - * defined in terms of percentage complete. - * @type float $report_generation_percent_complete - * Report generation progress, defined in terms of percentage complete. - * Until evaluation is complete, this value is always `0`. - * @type float $report_uploading_percent_complete - * Report uploading progress, defined in terms of percentage complete. - * Until evaluation and report generation are complete, this value is always - * `0`. - * @type string $destination_gcs_bucket - * Output only. Cloud Storage bucket where the audit report is uploaded to - * after the evaluation process is completed. - * @type string $audit_report - * Output only. Name of the audit report. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Current state of execution for report generation. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.OperationState state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. Current state of execution for report generation. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.OperationState state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\AuditManager\V1\OperationState::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. Reason for failure during the audit report generation process. - * This field is set only if the `OperationState` attribute is - * `OPERATION_STATE_FAILED`. - * - * Generated from protobuf field string failure_reason = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getFailureReason() - { - return $this->failure_reason; - } - - /** - * Output only. Reason for failure during the audit report generation process. - * This field is set only if the `OperationState` attribute is - * `OPERATION_STATE_FAILED`. - * - * Generated from protobuf field string failure_reason = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setFailureReason($var) - { - GPBUtil::checkString($var, True); - $this->failure_reason = $var; - - return $this; - } - - /** - * Progress of the evaluation process. The progress is - * defined in terms of percentage complete. - * - * Generated from protobuf field double evaluation_percent_complete = 20; - * @return float - */ - public function getEvaluationPercentComplete() - { - return $this->evaluation_percent_complete; - } - - /** - * Progress of the evaluation process. The progress is - * defined in terms of percentage complete. - * - * Generated from protobuf field double evaluation_percent_complete = 20; - * @param float $var - * @return $this - */ - public function setEvaluationPercentComplete($var) - { - GPBUtil::checkDouble($var); - $this->evaluation_percent_complete = $var; - - return $this; - } - - /** - * Report generation progress, defined in terms of percentage complete. - * Until evaluation is complete, this value is always `0`. - * - * Generated from protobuf field double report_generation_percent_complete = 30; - * @return float - */ - public function getReportGenerationPercentComplete() - { - return $this->report_generation_percent_complete; - } - - /** - * Report generation progress, defined in terms of percentage complete. - * Until evaluation is complete, this value is always `0`. - * - * Generated from protobuf field double report_generation_percent_complete = 30; - * @param float $var - * @return $this - */ - public function setReportGenerationPercentComplete($var) - { - GPBUtil::checkDouble($var); - $this->report_generation_percent_complete = $var; - - return $this; - } - - /** - * Report uploading progress, defined in terms of percentage complete. - * Until evaluation and report generation are complete, this value is always - * `0`. - * - * Generated from protobuf field double report_uploading_percent_complete = 40; - * @return float - */ - public function getReportUploadingPercentComplete() - { - return $this->report_uploading_percent_complete; - } - - /** - * Report uploading progress, defined in terms of percentage complete. - * Until evaluation and report generation are complete, this value is always - * `0`. - * - * Generated from protobuf field double report_uploading_percent_complete = 40; - * @param float $var - * @return $this - */ - public function setReportUploadingPercentComplete($var) - { - GPBUtil::checkDouble($var); - $this->report_uploading_percent_complete = $var; - - return $this; - } - - /** - * Output only. Cloud Storage bucket where the audit report is uploaded to - * after the evaluation process is completed. - * - * Generated from protobuf field string destination_gcs_bucket = 50 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDestinationGcsBucket() - { - return $this->destination_gcs_bucket; - } - - /** - * Output only. Cloud Storage bucket where the audit report is uploaded to - * after the evaluation process is completed. - * - * Generated from protobuf field string destination_gcs_bucket = 50 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDestinationGcsBucket($var) - { - GPBUtil::checkString($var, True); - $this->destination_gcs_bucket = $var; - - return $this; - } - - /** - * Output only. Name of the audit report. - * - * Generated from protobuf field string audit_report = 51 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getAuditReport() - { - return $this->audit_report; - } - - /** - * Output only. Name of the audit report. - * - * Generated from protobuf field string audit_report = 51 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setAuditReport($var) - { - GPBUtil::checkString($var, True); - $this->audit_report = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ReportSummary.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ReportSummary.php deleted file mode 100644 index c7a70105fd15..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ReportSummary.php +++ /dev/null @@ -1,204 +0,0 @@ -google.cloud.auditmanager.v1.ReportSummary - */ -class ReportSummary extends \Google\Protobuf\Internal\Message -{ - /** - * Total number of evaluated checks. - * - * Generated from protobuf field int32 total_count = 1; - */ - protected $total_count = 0; - /** - * Number of compliant checks. - * - * Generated from protobuf field int32 compliant_count = 2; - */ - protected $compliant_count = 0; - /** - * Number of checks with violations. - * - * Generated from protobuf field int32 violation_count = 3; - */ - protected $violation_count = 0; - /** - * Number of checks that require a manual review. - * - * Generated from protobuf field int32 manual_review_needed_count = 4; - */ - protected $manual_review_needed_count = 0; - /** - * Number of checks that can't be performed due to errors. - * - * Generated from protobuf field int32 error_count = 5; - */ - protected $error_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $total_count - * Total number of evaluated checks. - * @type int $compliant_count - * Number of compliant checks. - * @type int $violation_count - * Number of checks with violations. - * @type int $manual_review_needed_count - * Number of checks that require a manual review. - * @type int $error_count - * Number of checks that can't be performed due to errors. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * Total number of evaluated checks. - * - * Generated from protobuf field int32 total_count = 1; - * @return int - */ - public function getTotalCount() - { - return $this->total_count; - } - - /** - * Total number of evaluated checks. - * - * Generated from protobuf field int32 total_count = 1; - * @param int $var - * @return $this - */ - public function setTotalCount($var) - { - GPBUtil::checkInt32($var); - $this->total_count = $var; - - return $this; - } - - /** - * Number of compliant checks. - * - * Generated from protobuf field int32 compliant_count = 2; - * @return int - */ - public function getCompliantCount() - { - return $this->compliant_count; - } - - /** - * Number of compliant checks. - * - * Generated from protobuf field int32 compliant_count = 2; - * @param int $var - * @return $this - */ - public function setCompliantCount($var) - { - GPBUtil::checkInt32($var); - $this->compliant_count = $var; - - return $this; - } - - /** - * Number of checks with violations. - * - * Generated from protobuf field int32 violation_count = 3; - * @return int - */ - public function getViolationCount() - { - return $this->violation_count; - } - - /** - * Number of checks with violations. - * - * Generated from protobuf field int32 violation_count = 3; - * @param int $var - * @return $this - */ - public function setViolationCount($var) - { - GPBUtil::checkInt32($var); - $this->violation_count = $var; - - return $this; - } - - /** - * Number of checks that require a manual review. - * - * Generated from protobuf field int32 manual_review_needed_count = 4; - * @return int - */ - public function getManualReviewNeededCount() - { - return $this->manual_review_needed_count; - } - - /** - * Number of checks that require a manual review. - * - * Generated from protobuf field int32 manual_review_needed_count = 4; - * @param int $var - * @return $this - */ - public function setManualReviewNeededCount($var) - { - GPBUtil::checkInt32($var); - $this->manual_review_needed_count = $var; - - return $this; - } - - /** - * Number of checks that can't be performed due to errors. - * - * Generated from protobuf field int32 error_count = 5; - * @return int - */ - public function getErrorCount() - { - return $this->error_count; - } - - /** - * Number of checks that can't be performed due to errors. - * - * Generated from protobuf field int32 error_count = 5; - * @param int $var - * @return $this - */ - public function setErrorCount($var) - { - GPBUtil::checkInt32($var); - $this->error_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ResourceEnrollmentStatus.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ResourceEnrollmentStatus.php deleted file mode 100644 index 471449da2710..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ResourceEnrollmentStatus.php +++ /dev/null @@ -1,244 +0,0 @@ -google.cloud.auditmanager.v1.ResourceEnrollmentStatus - */ -class ResourceEnrollmentStatus extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. Name of the resource enrollment status, in one of the following - * formats: - * * `folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` - * * `projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` - * * `organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Output only. Enrolled destination details for the organization, folder, or - * project. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.Enrollment enrollment = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $enrollment = null; - /** - * Output only. Deprecated. Whether the organization, folder, or project is - * enrolled. Use `enrollment_state` instead. - * - * Generated from protobuf field bool enrolled = 3 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @deprecated - */ - protected $enrolled = false; - /** - * Output only. Display name for the organization, folder, or project. - * - * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $display_name = ''; - /** - * Output only. Enrollment state of the organization, folder, or project. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.ResourceEnrollmentStatus.ResourceEnrollmentState enrollment_state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $enrollment_state = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. Name of the resource enrollment status, in one of the following - * formats: - * * `folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` - * * `projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` - * * `organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` - * @type \Google\Cloud\AuditManager\V1\Enrollment $enrollment - * Output only. Enrolled destination details for the organization, folder, or - * project. - * @type bool $enrolled - * Output only. Deprecated. Whether the organization, folder, or project is - * enrolled. Use `enrollment_state` instead. - * @type string $display_name - * Output only. Display name for the organization, folder, or project. - * @type int $enrollment_state - * Output only. Enrollment state of the organization, folder, or project. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. Name of the resource enrollment status, in one of the following - * formats: - * * `folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` - * * `projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` - * * `organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. Name of the resource enrollment status, in one of the following - * formats: - * * `folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` - * * `projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` - * * `organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. Enrolled destination details for the organization, folder, or - * project. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.Enrollment enrollment = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\AuditManager\V1\Enrollment|null - */ - public function getEnrollment() - { - return $this->enrollment; - } - - public function hasEnrollment() - { - return isset($this->enrollment); - } - - public function clearEnrollment() - { - unset($this->enrollment); - } - - /** - * Output only. Enrolled destination details for the organization, folder, or - * project. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.Enrollment enrollment = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\AuditManager\V1\Enrollment $var - * @return $this - */ - public function setEnrollment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\AuditManager\V1\Enrollment::class); - $this->enrollment = $var; - - return $this; - } - - /** - * Output only. Deprecated. Whether the organization, folder, or project is - * enrolled. Use `enrollment_state` instead. - * - * Generated from protobuf field bool enrolled = 3 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - * @deprecated - */ - public function getEnrolled() - { - if ($this->enrolled !== false) { - @trigger_error('enrolled is deprecated.', E_USER_DEPRECATED); - } - return $this->enrolled; - } - - /** - * Output only. Deprecated. Whether the organization, folder, or project is - * enrolled. Use `enrollment_state` instead. - * - * Generated from protobuf field bool enrolled = 3 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - * @deprecated - */ - public function setEnrolled($var) - { - @trigger_error('enrolled is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkBool($var); - $this->enrolled = $var; - - return $this; - } - - /** - * Output only. Display name for the organization, folder, or project. - * - * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Output only. Display name for the organization, folder, or project. - * - * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Output only. Enrollment state of the organization, folder, or project. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.ResourceEnrollmentStatus.ResourceEnrollmentState enrollment_state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getEnrollmentState() - { - return $this->enrollment_state; - } - - /** - * Output only. Enrollment state of the organization, folder, or project. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.ResourceEnrollmentStatus.ResourceEnrollmentState enrollment_state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setEnrollmentState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\AuditManager\V1\ResourceEnrollmentStatus\ResourceEnrollmentState::class); - $this->enrollment_state = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ResourceEnrollmentStatus/ResourceEnrollmentState.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ResourceEnrollmentStatus/ResourceEnrollmentState.php deleted file mode 100644 index 96ad488e33be..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ResourceEnrollmentStatus/ResourceEnrollmentState.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.auditmanager.v1.ResourceEnrollmentStatus.ResourceEnrollmentState - */ -class ResourceEnrollmentState -{ - /** - * Default value. This value is unused. - * - * Generated from protobuf enum RESOURCE_ENROLLMENT_STATE_UNSPECIFIED = 0; - */ - const RESOURCE_ENROLLMENT_STATE_UNSPECIFIED = 0; - /** - * The resource isn't enrolled. - * - * Generated from protobuf enum NOT_ENROLLED = 1; - */ - const NOT_ENROLLED = 1; - /** - * The resource isn't enrolled but the parent is enrolled. - * - * Generated from protobuf enum INHERITED = 2; - */ - const INHERITED = 2; - /** - * The resource is enrolled. - * - * Generated from protobuf enum ENROLLED = 3; - */ - const ENROLLED = 3; - - private static $valueToName = [ - self::RESOURCE_ENROLLMENT_STATE_UNSPECIFIED => 'RESOURCE_ENROLLMENT_STATE_UNSPECIFIED', - self::NOT_ENROLLED => 'NOT_ENROLLED', - self::INHERITED => 'INHERITED', - self::ENROLLED => 'ENROLLED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/enroll_resource.php b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/enroll_resource.php deleted file mode 100644 index 0a2da65a1396..000000000000 --- a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/enroll_resource.php +++ /dev/null @@ -1,82 +0,0 @@ -setScope($scope) - ->setDestinations($destinations); - - // Call the API and handle any network failures. - try { - /** @var Enrollment $response */ - $response = $auditManagerClient->enrollResource($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $scope = '[SCOPE]'; - - enroll_resource_sample($scope); -} -// [END auditmanager_v1_generated_AuditManager_EnrollResource_sync] diff --git a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/generate_audit_report.php b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/generate_audit_report.php deleted file mode 100644 index 07b4a254ac4f..000000000000 --- a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/generate_audit_report.php +++ /dev/null @@ -1,100 +0,0 @@ -setScope($scope) - ->setReportFormat($reportFormat) - ->setComplianceFramework($complianceFramework); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $auditManagerClient->generateAuditReport($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AuditReport $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $scope = '[SCOPE]'; - $reportFormat = AuditReportFormat::AUDIT_REPORT_FORMAT_UNSPECIFIED; - $complianceFramework = '[COMPLIANCE_FRAMEWORK]'; - - generate_audit_report_sample($scope, $reportFormat, $complianceFramework); -} -// [END auditmanager_v1_generated_AuditManager_GenerateAuditReport_sync] diff --git a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/generate_audit_scope_report.php b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/generate_audit_scope_report.php deleted file mode 100644 index 9b58aa25f9b7..000000000000 --- a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/generate_audit_scope_report.php +++ /dev/null @@ -1,93 +0,0 @@ -setScope($scope) - ->setReportFormat($reportFormat) - ->setComplianceFramework($complianceFramework); - - // Call the API and handle any network failures. - try { - /** @var AuditScopeReport $response */ - $response = $auditManagerClient->generateAuditScopeReport($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $scope = '[SCOPE]'; - $reportFormat = AuditScopeReportFormat::AUDIT_SCOPE_REPORT_FORMAT_UNSPECIFIED; - $complianceFramework = '[COMPLIANCE_FRAMEWORK]'; - - generate_audit_scope_report_sample($scope, $reportFormat, $complianceFramework); -} -// [END auditmanager_v1_generated_AuditManager_GenerateAuditScopeReport_sync] diff --git a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_audit_report.php b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_audit_report.php deleted file mode 100644 index a61f67c74e98..000000000000 --- a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_audit_report.php +++ /dev/null @@ -1,75 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var AuditReport $response */ - $response = $auditManagerClient->getAuditReport($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = AuditManagerClient::auditReportName('[PROJECT]', '[LOCATION]', '[AUDIT_REPORT]'); - - get_audit_report_sample($formattedName); -} -// [END auditmanager_v1_generated_AuditManager_GetAuditReport_sync] diff --git a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_location.php b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_location.php deleted file mode 100644 index 1dea4b7c3f71..000000000000 --- a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END auditmanager_v1_generated_AuditManager_GetLocation_sync] diff --git a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_resource_enrollment_status.php b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_resource_enrollment_status.php deleted file mode 100644 index e3a24459cc3e..000000000000 --- a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_resource_enrollment_status.php +++ /dev/null @@ -1,80 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var ResourceEnrollmentStatus $response */ - $response = $auditManagerClient->getResourceEnrollmentStatus($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = AuditManagerClient::resourceEnrollmentStatusName( - '[FOLDER]', - '[LOCATION]', - '[RESOURCE_ENROLLMENT_STATUS]' - ); - - get_resource_enrollment_status_sample($formattedName); -} -// [END auditmanager_v1_generated_AuditManager_GetResourceEnrollmentStatus_sync] diff --git a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_audit_reports.php b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_audit_reports.php deleted file mode 100644 index 608134c484ab..000000000000 --- a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_audit_reports.php +++ /dev/null @@ -1,82 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $auditManagerClient->listAuditReports($request); - - /** @var AuditReport $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = AuditManagerClient::folderLocationName('[FOLDER]', '[LOCATION]'); - - list_audit_reports_sample($formattedParent); -} -// [END auditmanager_v1_generated_AuditManager_ListAuditReports_sync] diff --git a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_controls.php b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_controls.php deleted file mode 100644 index 29e6f80c0fa5..000000000000 --- a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_controls.php +++ /dev/null @@ -1,81 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $auditManagerClient->listControls($request); - - /** @var Control $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = AuditManagerClient::standardName('[PROJECT]', '[LOCATION]', '[STANDARD]'); - - list_controls_sample($formattedParent); -} -// [END auditmanager_v1_generated_AuditManager_ListControls_sync] diff --git a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_locations.php b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_locations.php deleted file mode 100644 index e556a3584ba8..000000000000 --- a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_locations.php +++ /dev/null @@ -1,77 +0,0 @@ -listLocations($request); - - /** @var Location $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END auditmanager_v1_generated_AuditManager_ListLocations_sync] diff --git a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_resource_enrollment_statuses.php b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_resource_enrollment_statuses.php deleted file mode 100644 index 64c6cf526f20..000000000000 --- a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_resource_enrollment_statuses.php +++ /dev/null @@ -1,81 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $auditManagerClient->listResourceEnrollmentStatuses($request); - - /** @var ResourceEnrollmentStatus $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = AuditManagerClient::enrollmentStatusScopeName('[FOLDER]', '[LOCATION]'); - - list_resource_enrollment_statuses_sample($formattedParent); -} -// [END auditmanager_v1_generated_AuditManager_ListResourceEnrollmentStatuses_sync] diff --git a/owl-bot-staging/AuditManager/v1/src/V1/Client/AuditManagerClient.php b/owl-bot-staging/AuditManager/v1/src/V1/Client/AuditManagerClient.php deleted file mode 100644 index 2d2902f7c0fb..000000000000 --- a/owl-bot-staging/AuditManager/v1/src/V1/Client/AuditManagerClient.php +++ /dev/null @@ -1,897 +0,0 @@ - enrollResourceAsync(EnrollResourceRequest $request, array $optionalArgs = []) - * @method PromiseInterface generateAuditReportAsync(GenerateAuditReportRequest $request, array $optionalArgs = []) - * @method PromiseInterface generateAuditScopeReportAsync(GenerateAuditScopeReportRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAuditReportAsync(GetAuditReportRequest $request, array $optionalArgs = []) - * @method PromiseInterface getResourceEnrollmentStatusAsync(GetResourceEnrollmentStatusRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAuditReportsAsync(ListAuditReportsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listControlsAsync(ListControlsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listResourceEnrollmentStatusesAsync(ListResourceEnrollmentStatusesRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - */ -final class AuditManagerClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.auditmanager.v1.AuditManager'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'auditmanager.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'auditmanager.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** - * The default scopes required by the service. - * - * @internal - */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-auditmanager', - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/audit_manager_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/audit_manager_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/audit_manager_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/audit_manager_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = $methodName && isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a audit_report - * resource. - * - * @param string $project - * @param string $location - * @param string $auditReport - * - * @return string The formatted audit_report resource. - */ - public static function auditReportName(string $project, string $location, string $auditReport): string - { - return self::getPathTemplate('auditReport')->render([ - 'project' => $project, - 'location' => $location, - 'audit_report' => $auditReport, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * enrollment_status_scope resource. - * - * @param string $folder - * @param string $location - * - * @return string The formatted enrollment_status_scope resource. - */ - public static function enrollmentStatusScopeName(string $folder, string $location): string - { - return self::getPathTemplate('enrollmentStatusScope')->render([ - 'folder' => $folder, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_location resource. - * - * @param string $folder - * @param string $location - * - * @return string The formatted folder_location resource. - */ - public static function folderLocationName(string $folder, string $location): string - { - return self::getPathTemplate('folderLocation')->render([ - 'folder' => $folder, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_location_audit_report resource. - * - * @param string $folder - * @param string $location - * @param string $auditReport - * - * @return string The formatted folder_location_audit_report resource. - */ - public static function folderLocationAuditReportName(string $folder, string $location, string $auditReport): string - { - return self::getPathTemplate('folderLocationAuditReport')->render([ - 'folder' => $folder, - 'location' => $location, - 'audit_report' => $auditReport, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_location_resource_enrollment_status resource. - * - * @param string $folder - * @param string $location - * @param string $resourceEnrollmentStatus - * - * @return string The formatted folder_location_resource_enrollment_status resource. - */ - public static function folderLocationResourceEnrollmentStatusName(string $folder, string $location, string $resourceEnrollmentStatus): string - { - return self::getPathTemplate('folderLocationResourceEnrollmentStatus')->render([ - 'folder' => $folder, - 'location' => $location, - 'resource_enrollment_status' => $resourceEnrollmentStatus, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_location_standard resource. - * - * @param string $folder - * @param string $location - * @param string $standard - * - * @return string The formatted folder_location_standard resource. - */ - public static function folderLocationStandardName(string $folder, string $location, string $standard): string - { - return self::getPathTemplate('folderLocationStandard')->render([ - 'folder' => $folder, - 'location' => $location, - 'standard' => $standard, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName(string $project, string $location): string - { - return self::getPathTemplate('location')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_location resource. - * - * @param string $organization - * @param string $location - * - * @return string The formatted organization_location resource. - */ - public static function organizationLocationName(string $organization, string $location): string - { - return self::getPathTemplate('organizationLocation')->render([ - 'organization' => $organization, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_location_audit_report resource. - * - * @param string $organization - * @param string $location - * @param string $auditReport - * - * @return string The formatted organization_location_audit_report resource. - */ - public static function organizationLocationAuditReportName(string $organization, string $location, string $auditReport): string - { - return self::getPathTemplate('organizationLocationAuditReport')->render([ - 'organization' => $organization, - 'location' => $location, - 'audit_report' => $auditReport, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_location_resource_enrollment_status resource. - * - * @param string $organization - * @param string $location - * @param string $resourceEnrollmentStatus - * - * @return string The formatted organization_location_resource_enrollment_status resource. - */ - public static function organizationLocationResourceEnrollmentStatusName(string $organization, string $location, string $resourceEnrollmentStatus): string - { - return self::getPathTemplate('organizationLocationResourceEnrollmentStatus')->render([ - 'organization' => $organization, - 'location' => $location, - 'resource_enrollment_status' => $resourceEnrollmentStatus, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_location_standard resource. - * - * @param string $organization - * @param string $location - * @param string $standard - * - * @return string The formatted organization_location_standard resource. - */ - public static function organizationLocationStandardName(string $organization, string $location, string $standard): string - { - return self::getPathTemplate('organizationLocationStandard')->render([ - 'organization' => $organization, - 'location' => $location, - 'standard' => $standard, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_audit_report resource. - * - * @param string $project - * @param string $location - * @param string $auditReport - * - * @return string The formatted project_location_audit_report resource. - */ - public static function projectLocationAuditReportName(string $project, string $location, string $auditReport): string - { - return self::getPathTemplate('projectLocationAuditReport')->render([ - 'project' => $project, - 'location' => $location, - 'audit_report' => $auditReport, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_resource_enrollment_status resource. - * - * @param string $project - * @param string $location - * @param string $resourceEnrollmentStatus - * - * @return string The formatted project_location_resource_enrollment_status resource. - */ - public static function projectLocationResourceEnrollmentStatusName(string $project, string $location, string $resourceEnrollmentStatus): string - { - return self::getPathTemplate('projectLocationResourceEnrollmentStatus')->render([ - 'project' => $project, - 'location' => $location, - 'resource_enrollment_status' => $resourceEnrollmentStatus, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_standard resource. - * - * @param string $project - * @param string $location - * @param string $standard - * - * @return string The formatted project_location_standard resource. - */ - public static function projectLocationStandardName(string $project, string $location, string $standard): string - { - return self::getPathTemplate('projectLocationStandard')->render([ - 'project' => $project, - 'location' => $location, - 'standard' => $standard, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * resource_enrollment_status resource. - * - * @param string $folder - * @param string $location - * @param string $resourceEnrollmentStatus - * - * @return string The formatted resource_enrollment_status resource. - */ - public static function resourceEnrollmentStatusName(string $folder, string $location, string $resourceEnrollmentStatus): string - { - return self::getPathTemplate('resourceEnrollmentStatus')->render([ - 'folder' => $folder, - 'location' => $location, - 'resource_enrollment_status' => $resourceEnrollmentStatus, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a standard - * resource. - * - * @param string $project - * @param string $location - * @param string $standard - * - * @return string The formatted standard resource. - */ - public static function standardName(string $project, string $location, string $standard): string - { - return self::getPathTemplate('standard')->render([ - 'project' => $project, - 'location' => $location, - 'standard' => $standard, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - auditReport: projects/{project}/locations/{location}/auditReports/{audit_report} - * - enrollmentStatusScope: folders/{folder}/locations/{location} - * - folderLocation: folders/{folder}/locations/{location} - * - folderLocationAuditReport: folders/{folder}/locations/{location}/auditReports/{audit_report} - * - folderLocationResourceEnrollmentStatus: folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status} - * - folderLocationStandard: folders/{folder}/locations/{location}/standards/{standard} - * - location: projects/{project}/locations/{location} - * - organizationLocation: organizations/{organization}/locations/{location} - * - organizationLocationAuditReport: organizations/{organization}/locations/{location}/auditReports/{audit_report} - * - organizationLocationResourceEnrollmentStatus: organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status} - * - organizationLocationStandard: organizations/{organization}/locations/{location}/standards/{standard} - * - projectLocationAuditReport: projects/{project}/locations/{location}/auditReports/{audit_report} - * - projectLocationResourceEnrollmentStatus: projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status} - * - projectLocationStandard: projects/{project}/locations/{location}/standards/{standard} - * - resourceEnrollmentStatus: folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status} - * - standard: projects/{project}/locations/{location}/standards/{standard} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array|ClientOptions $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'auditmanager.googleapis.com:443'. - * @type FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\AuditManager\V1\AuditManagerClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new AuditManagerClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Adds your project, folder, or organization to Audit - * Manager. This method creates the Audit Manager service agent in your - * workload and grants required permissions to the service agent. - * If you make this request on a workload that's already enrolled, - * then this method overrides the existing set of destinations. - * - * The async variant is {@see AuditManagerClient::enrollResourceAsync()} . - * - * @example samples/V1/AuditManagerClient/enroll_resource.php - * - * @param EnrollResourceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Enrollment - * - * @throws ApiException Thrown if the API call fails. - */ - public function enrollResource(EnrollResourceRequest $request, array $callOptions = []): Enrollment - { - return $this->startApiCall('EnrollResource', $request, $callOptions)->wait(); - } - - /** - * Registers audit report generation requests. This method returns the - * operation identifier that you can use to track the report generation - * progress. - * - * The async variant is {@see AuditManagerClient::generateAuditReportAsync()} . - * - * @example samples/V1/AuditManagerClient/generate_audit_report.php - * - * @param GenerateAuditReportRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function generateAuditReport(GenerateAuditReportRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('GenerateAuditReport', $request, $callOptions)->wait(); - } - - /** - * Generates an audit scope report for the given standard. - * - * The report includes the following: - * - * * The technical attributes and constraints that Audit Manager uses to - * verify your compliance with a framework. - * * A list of Google Cloud services and resources that are within the - * scope of the framework. - * - * The async variant is {@see AuditManagerClient::generateAuditScopeReportAsync()} - * . - * - * @example samples/V1/AuditManagerClient/generate_audit_scope_report.php - * - * @param GenerateAuditScopeReportRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return AuditScopeReport - * - * @throws ApiException Thrown if the API call fails. - */ - public function generateAuditScopeReport(GenerateAuditScopeReportRequest $request, array $callOptions = []): AuditScopeReport - { - return $this->startApiCall('GenerateAuditScopeReport', $request, $callOptions)->wait(); - } - - /** - * Gets the full metadata and findings for an audit report. - * - * The async variant is {@see AuditManagerClient::getAuditReportAsync()} . - * - * @example samples/V1/AuditManagerClient/get_audit_report.php - * - * @param GetAuditReportRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return AuditReport - * - * @throws ApiException Thrown if the API call fails. - */ - public function getAuditReport(GetAuditReportRequest $request, array $callOptions = []): AuditReport - { - return $this->startApiCall('GetAuditReport', $request, $callOptions)->wait(); - } - - /** - * Gets a resource and its enrollment status. - * - * The async variant is - * {@see AuditManagerClient::getResourceEnrollmentStatusAsync()} . - * - * @example samples/V1/AuditManagerClient/get_resource_enrollment_status.php - * - * @param GetResourceEnrollmentStatusRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ResourceEnrollmentStatus - * - * @throws ApiException Thrown if the API call fails. - */ - public function getResourceEnrollmentStatus(GetResourceEnrollmentStatusRequest $request, array $callOptions = []): ResourceEnrollmentStatus - { - return $this->startApiCall('GetResourceEnrollmentStatus', $request, $callOptions)->wait(); - } - - /** - * Lists the audit reports for the organization, folder, or project that you - * specify as the parent scope. - * - * The async variant is {@see AuditManagerClient::listAuditReportsAsync()} . - * - * @example samples/V1/AuditManagerClient/list_audit_reports.php - * - * @param ListAuditReportsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listAuditReports(ListAuditReportsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListAuditReports', $request, $callOptions); - } - - /** - * Lists the controls that you must implement to become compliant to a - * regulatory standard. - * - * The async variant is {@see AuditManagerClient::listControlsAsync()} . - * - * @example samples/V1/AuditManagerClient/list_controls.php - * - * @param ListControlsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listControls(ListControlsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListControls', $request, $callOptions); - } - - /** - * Lists all the folders and projects in an organization or folder, along with - * their enrollments. - * - * The async variant is - * {@see AuditManagerClient::listResourceEnrollmentStatusesAsync()} . - * - * @example samples/V1/AuditManagerClient/list_resource_enrollment_statuses.php - * - * @param ListResourceEnrollmentStatusesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listResourceEnrollmentStatuses(ListResourceEnrollmentStatusesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListResourceEnrollmentStatuses', $request, $callOptions); - } - - /** - * Gets information about a location. - * - * The async variant is {@see AuditManagerClient::getLocationAsync()} . - * - * @example samples/V1/AuditManagerClient/get_location.php - * - * @param GetLocationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * This method lists locations based on the resource scope provided in - * the [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field: * - * **Global locations**: If `name` is empty, the method lists the - * public locations available to all projects. * **Project-specific - * locations**: If `name` follows the format - * `projects/{project}`, the method lists locations visible to that - * specific project. This includes public, private, or other - * project-specific locations enabled for the project. - * - * For gRPC and client library implementations, the resource name is - * passed as the `name` field. For direct service calls, the resource - * name is - * incorporated into the request path based on the specific service - * implementation and version. - * - * The async variant is {@see AuditManagerClient::listLocationsAsync()} . - * - * @example samples/V1/AuditManagerClient/list_locations.php - * - * @param ListLocationsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } -} diff --git a/owl-bot-staging/AuditManager/v1/src/V1/gapic_metadata.json b/owl-bot-staging/AuditManager/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 30a70b3b0e35..000000000000 --- a/owl-bot-staging/AuditManager/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.auditmanager.v1", - "libraryPackage": "Google\\Cloud\\AuditManager\\V1", - "services": { - "AuditManager": { - "clients": { - "grpc": { - "libraryClient": "AuditManagerClient", - "rpcs": { - "EnrollResource": { - "methods": [ - "enrollResource" - ] - }, - "GenerateAuditReport": { - "methods": [ - "generateAuditReport" - ] - }, - "GenerateAuditScopeReport": { - "methods": [ - "generateAuditScopeReport" - ] - }, - "GetAuditReport": { - "methods": [ - "getAuditReport" - ] - }, - "GetResourceEnrollmentStatus": { - "methods": [ - "getResourceEnrollmentStatus" - ] - }, - "ListAuditReports": { - "methods": [ - "listAuditReports" - ] - }, - "ListControls": { - "methods": [ - "listControls" - ] - }, - "ListResourceEnrollmentStatuses": { - "methods": [ - "listResourceEnrollmentStatuses" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_client_config.json b/owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_client_config.json deleted file mode 100644 index 621862801f8f..000000000000 --- a/owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_client_config.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "interfaces": { - "google.cloud.auditmanager.v1.AuditManager": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ], - "no_retry_1_codes": [] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "EnrollResource": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GenerateAuditReport": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GenerateAuditScopeReport": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetAuditReport": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetResourceEnrollmentStatus": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListAuditReports": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListControls": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListResourceEnrollmentStatuses": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - } - } - } - } -} diff --git a/owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_descriptor_config.php b/owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_descriptor_config.php deleted file mode 100644 index 98c9d30f4504..000000000000 --- a/owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_descriptor_config.php +++ /dev/null @@ -1,207 +0,0 @@ - [ - 'google.cloud.auditmanager.v1.AuditManager' => [ - 'GenerateAuditReport' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\AuditManager\V1\AuditReport', - 'metadataReturnType' => '\Google\Cloud\AuditManager\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'scope', - 'fieldAccessors' => [ - 'getScope', - ], - ], - ], - ], - 'EnrollResource' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\AuditManager\V1\Enrollment', - 'headerParams' => [ - [ - 'keyName' => 'scope', - 'fieldAccessors' => [ - 'getScope', - ], - ], - ], - ], - 'GenerateAuditScopeReport' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\AuditManager\V1\AuditScopeReport', - 'headerParams' => [ - [ - 'keyName' => 'scope', - 'fieldAccessors' => [ - 'getScope', - ], - ], - ], - ], - 'GetAuditReport' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\AuditManager\V1\AuditReport', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetResourceEnrollmentStatus' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\AuditManager\V1\ResourceEnrollmentStatus', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListAuditReports' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getAuditReports', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\AuditManager\V1\ListAuditReportsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListControls' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getControls', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\AuditManager\V1\ListControlsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListResourceEnrollmentStatuses' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getResourceEnrollmentStatuses', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\AuditManager\V1\ListResourceEnrollmentStatusesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'templateMap' => [ - 'auditReport' => 'projects/{project}/locations/{location}/auditReports/{audit_report}', - 'enrollmentStatusScope' => 'folders/{folder}/locations/{location}', - 'folderLocation' => 'folders/{folder}/locations/{location}', - 'folderLocationAuditReport' => 'folders/{folder}/locations/{location}/auditReports/{audit_report}', - 'folderLocationResourceEnrollmentStatus' => 'folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}', - 'folderLocationStandard' => 'folders/{folder}/locations/{location}/standards/{standard}', - 'location' => 'projects/{project}/locations/{location}', - 'organizationLocation' => 'organizations/{organization}/locations/{location}', - 'organizationLocationAuditReport' => 'organizations/{organization}/locations/{location}/auditReports/{audit_report}', - 'organizationLocationResourceEnrollmentStatus' => 'organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}', - 'organizationLocationStandard' => 'organizations/{organization}/locations/{location}/standards/{standard}', - 'projectLocationAuditReport' => 'projects/{project}/locations/{location}/auditReports/{audit_report}', - 'projectLocationResourceEnrollmentStatus' => 'projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}', - 'projectLocationStandard' => 'projects/{project}/locations/{location}/standards/{standard}', - 'resourceEnrollmentStatus' => 'folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}', - 'standard' => 'projects/{project}/locations/{location}/standards/{standard}', - ], - ], - ], -]; diff --git a/owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_rest_client_config.php b/owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_rest_client_config.php deleted file mode 100644 index f7d758688248..000000000000 --- a/owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_rest_client_config.php +++ /dev/null @@ -1,298 +0,0 @@ - [ - 'google.cloud.auditmanager.v1.AuditManager' => [ - 'EnrollResource' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{scope=folders/*/locations/*}:enrollResource', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{scope=projects/*/locations/*}:enrollResource', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{scope=organizations/*/locations/*}:enrollResource', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'scope' => [ - 'getters' => [ - 'getScope', - ], - ], - ], - ], - 'GenerateAuditReport' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{scope=folders/*/locations/*}/auditReports:generate', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{scope=projects/*/locations/*}/auditReports:generate', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{scope=organizations/*/locations/*}/auditReports:generate', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'scope' => [ - 'getters' => [ - 'getScope', - ], - ], - ], - ], - 'GenerateAuditScopeReport' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{scope=folders/*/locations/*}/auditScopeReports:generate', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{scope=projects/*/locations/*}/auditScopeReports:generate', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{scope=organizations/*/locations/*}/auditScopeReports:generate', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'scope' => [ - 'getters' => [ - 'getScope', - ], - ], - ], - ], - 'GetAuditReport' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=folders/*/locations/*/auditReports/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/auditReports/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=organizations/*/locations/*/auditReports/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetResourceEnrollmentStatus' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/resourceEnrollmentStatuses/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=folders/*/locations/*/resourceEnrollmentStatuses/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=organizations/*/locations/*/resourceEnrollmentStatuses/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListAuditReports' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=organizations/*/locations/*}/auditReports', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=folders/*/locations/*}/auditReports', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/auditReports', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListControls' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=organizations/*/locations/*/standards/*}/controls', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=folders/*/locations/*/standards/*}/controls', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/standards/*}/controls', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListResourceEnrollmentStatuses' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=organizations/*/locations/*}/resourceEnrollmentStatuses', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=folders/*/locations/*}/resourceEnrollmentStatuses', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - ], - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=organizations/*/locations/*/operations/*}:cancel', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=organizations/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=organizations/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=organizations/*/locations/*}/operations', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/AuditManager/v1/tests/Unit/V1/Client/AuditManagerClientTest.php b/owl-bot-staging/AuditManager/v1/tests/Unit/V1/Client/AuditManagerClientTest.php deleted file mode 100644 index 16438f5b044a..000000000000 --- a/owl-bot-staging/AuditManager/v1/tests/Unit/V1/Client/AuditManagerClientTest.php +++ /dev/null @@ -1,894 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return AuditManagerClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new AuditManagerClient($options); - } - - /** @test */ - public function enrollResourceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new Enrollment(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $scope = 'scope109264468'; - $destinations = []; - $request = (new EnrollResourceRequest()) - ->setScope($scope) - ->setDestinations($destinations); - $response = $gapicClient->enrollResource($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.auditmanager.v1.AuditManager/EnrollResource', $actualFuncCall); - $actualValue = $actualRequestObject->getScope(); - $this->assertProtobufEquals($scope, $actualValue); - $actualValue = $actualRequestObject->getDestinations(); - $this->assertProtobufEquals($destinations, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function enrollResourceExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $scope = 'scope109264468'; - $destinations = []; - $request = (new EnrollResourceRequest()) - ->setScope($scope) - ->setDestinations($destinations); - try { - $gapicClient->enrollResource($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateAuditReportTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/generateAuditReportTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $operationId = 'operationId-274116877'; - $complianceStandard2 = 'complianceStandard2-1079015980'; - $scope2 = 'scope21923941639'; - $complianceFramework2 = 'complianceFramework2-1333971955'; - $scopeId = 'scopeId-487349530'; - $expectedResponse = new AuditReport(); - $expectedResponse->setName($name); - $expectedResponse->setOperationId($operationId); - $expectedResponse->setComplianceStandard($complianceStandard2); - $expectedResponse->setScope($scope2); - $expectedResponse->setComplianceFramework($complianceFramework2); - $expectedResponse->setScopeId($scopeId); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/generateAuditReportTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $scope = 'scope109264468'; - $reportFormat = AuditReportFormat::AUDIT_REPORT_FORMAT_UNSPECIFIED; - $complianceFramework = 'complianceFramework1384085210'; - $request = (new GenerateAuditReportRequest()) - ->setScope($scope) - ->setReportFormat($reportFormat) - ->setComplianceFramework($complianceFramework); - $response = $gapicClient->generateAuditReport($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.auditmanager.v1.AuditManager/GenerateAuditReport', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getScope(); - $this->assertProtobufEquals($scope, $actualValue); - $actualValue = $actualApiRequestObject->getReportFormat(); - $this->assertProtobufEquals($reportFormat, $actualValue); - $actualValue = $actualApiRequestObject->getComplianceFramework(); - $this->assertProtobufEquals($complianceFramework, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/generateAuditReportTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function generateAuditReportExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/generateAuditReportTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $scope = 'scope109264468'; - $reportFormat = AuditReportFormat::AUDIT_REPORT_FORMAT_UNSPECIFIED; - $complianceFramework = 'complianceFramework1384085210'; - $request = (new GenerateAuditReportRequest()) - ->setScope($scope) - ->setReportFormat($reportFormat) - ->setComplianceFramework($complianceFramework); - $response = $gapicClient->generateAuditReport($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/generateAuditReportTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function generateAuditScopeReportTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $scopeReportContents = '-38'; - $name = 'name3373707'; - $expectedResponse = new AuditScopeReport(); - $expectedResponse->setScopeReportContents($scopeReportContents); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $scope = 'scope109264468'; - $reportFormat = AuditScopeReportFormat::AUDIT_SCOPE_REPORT_FORMAT_UNSPECIFIED; - $complianceFramework = 'complianceFramework1384085210'; - $request = (new GenerateAuditScopeReportRequest()) - ->setScope($scope) - ->setReportFormat($reportFormat) - ->setComplianceFramework($complianceFramework); - $response = $gapicClient->generateAuditScopeReport($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.auditmanager.v1.AuditManager/GenerateAuditScopeReport', $actualFuncCall); - $actualValue = $actualRequestObject->getScope(); - $this->assertProtobufEquals($scope, $actualValue); - $actualValue = $actualRequestObject->getReportFormat(); - $this->assertProtobufEquals($reportFormat, $actualValue); - $actualValue = $actualRequestObject->getComplianceFramework(); - $this->assertProtobufEquals($complianceFramework, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateAuditScopeReportExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $scope = 'scope109264468'; - $reportFormat = AuditScopeReportFormat::AUDIT_SCOPE_REPORT_FORMAT_UNSPECIFIED; - $complianceFramework = 'complianceFramework1384085210'; - $request = (new GenerateAuditScopeReportRequest()) - ->setScope($scope) - ->setReportFormat($reportFormat) - ->setComplianceFramework($complianceFramework); - try { - $gapicClient->generateAuditScopeReport($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAuditReportTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $operationId = 'operationId-274116877'; - $complianceStandard = 'complianceStandard1339657825'; - $scope = 'scope109264468'; - $complianceFramework = 'complianceFramework1384085210'; - $scopeId = 'scopeId-487349530'; - $expectedResponse = new AuditReport(); - $expectedResponse->setName($name2); - $expectedResponse->setOperationId($operationId); - $expectedResponse->setComplianceStandard($complianceStandard); - $expectedResponse->setScope($scope); - $expectedResponse->setComplianceFramework($complianceFramework); - $expectedResponse->setScopeId($scopeId); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->auditReportName('[PROJECT]', '[LOCATION]', '[AUDIT_REPORT]'); - $request = (new GetAuditReportRequest()) - ->setName($formattedName); - $response = $gapicClient->getAuditReport($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.auditmanager.v1.AuditManager/GetAuditReport', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAuditReportExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->auditReportName('[PROJECT]', '[LOCATION]', '[AUDIT_REPORT]'); - $request = (new GetAuditReportRequest()) - ->setName($formattedName); - try { - $gapicClient->getAuditReport($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getResourceEnrollmentStatusTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $enrolled = false; - $displayName = 'displayName1615086568'; - $expectedResponse = new ResourceEnrollmentStatus(); - $expectedResponse->setName($name2); - $expectedResponse->setEnrolled($enrolled); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->resourceEnrollmentStatusName('[FOLDER]', '[LOCATION]', '[RESOURCE_ENROLLMENT_STATUS]'); - $request = (new GetResourceEnrollmentStatusRequest()) - ->setName($formattedName); - $response = $gapicClient->getResourceEnrollmentStatus($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.auditmanager.v1.AuditManager/GetResourceEnrollmentStatus', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getResourceEnrollmentStatusExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->resourceEnrollmentStatusName('[FOLDER]', '[LOCATION]', '[RESOURCE_ENROLLMENT_STATUS]'); - $request = (new GetResourceEnrollmentStatusRequest()) - ->setName($formattedName); - try { - $gapicClient->getResourceEnrollmentStatus($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAuditReportsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $auditReportsElement = new AuditReport(); - $auditReports = [ - $auditReportsElement, - ]; - $expectedResponse = new ListAuditReportsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAuditReports($auditReports); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->folderLocationName('[FOLDER]', '[LOCATION]'); - $request = (new ListAuditReportsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listAuditReports($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAuditReports()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.auditmanager.v1.AuditManager/ListAuditReports', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAuditReportsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->folderLocationName('[FOLDER]', '[LOCATION]'); - $request = (new ListAuditReportsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listAuditReports($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listControlsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $controlsElement = new Control(); - $controls = [ - $controlsElement, - ]; - $expectedResponse = new ListControlsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setControls($controls); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->standardName('[PROJECT]', '[LOCATION]', '[STANDARD]'); - $request = (new ListControlsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listControls($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getControls()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.auditmanager.v1.AuditManager/ListControls', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listControlsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->standardName('[PROJECT]', '[LOCATION]', '[STANDARD]'); - $request = (new ListControlsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listControls($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listResourceEnrollmentStatusesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $resourceEnrollmentStatusesElement = new ResourceEnrollmentStatus(); - $resourceEnrollmentStatuses = [ - $resourceEnrollmentStatusesElement, - ]; - $expectedResponse = new ListResourceEnrollmentStatusesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setResourceEnrollmentStatuses($resourceEnrollmentStatuses); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->enrollmentStatusScopeName('[FOLDER]', '[LOCATION]'); - $request = (new ListResourceEnrollmentStatusesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listResourceEnrollmentStatuses($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getResourceEnrollmentStatuses()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.auditmanager.v1.AuditManager/ListResourceEnrollmentStatuses', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listResourceEnrollmentStatusesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->enrollmentStatusScopeName('[FOLDER]', '[LOCATION]'); - $request = (new ListResourceEnrollmentStatusesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listResourceEnrollmentStatuses($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function enrollResourceAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new Enrollment(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $scope = 'scope109264468'; - $destinations = []; - $request = (new EnrollResourceRequest()) - ->setScope($scope) - ->setDestinations($destinations); - $response = $gapicClient->enrollResourceAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.auditmanager.v1.AuditManager/EnrollResource', $actualFuncCall); - $actualValue = $actualRequestObject->getScope(); - $this->assertProtobufEquals($scope, $actualValue); - $actualValue = $actualRequestObject->getDestinations(); - $this->assertProtobufEquals($destinations, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} From 8c412316f09da60241bbb84dbcaf463da252dfec Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 13 Aug 2026 20:01:48 +0000 Subject: [PATCH 3/4] docs: Update documentation for validate_only PiperOrigin-RevId: 964167093 Source-Link: https://github.com/googleapis/googleapis/commit/fa780596fb51e69a7cafb08d329bacc1d06434ad Source-Link: https://github.com/googleapis/googleapis-gen/commit/2b8c4632ac8d9e6f7e64bb8fbe6e2923c2dd3852 Copy-Tag: eyJwIjoiQXVkaXRNYW5hZ2VyLy5Pd2xCb3QueWFtbCIsImgiOiIyYjhjNDYzMmFjOGQ5ZTZmN2U2NGJiOGZiZTZlMjkyM2MyZGQzODUyIn0= --- .../Cloud/Auditmanager/V1/Auditmanager.php | 30 + .../Cloud/AuditManager/V1/AuditReport.php | 488 ++++++++++ .../V1/AuditReport/ReportGenerationState.php | 79 ++ .../AuditManager/V1/AuditScopeReport.php | 125 +++ .../Cloud/AuditManager/V1/ComplianceState.php | 83 ++ .../Google/Cloud/AuditManager/V1/Control.php | 399 ++++++++ .../Cloud/AuditManager/V1/Control/Family.php | 173 ++++ .../Cloud/AuditManager/V1/ControlDetails.php | 159 ++++ .../Cloud/AuditManager/V1/ControlFamily.php | 113 +++ .../AuditManager/V1/DestinationDetails.php | 78 ++ .../AuditManager/V1/EnrollResourceRequest.php | 169 ++++ .../EligibleDestination.php | 84 ++ .../Cloud/AuditManager/V1/Enrollment.php | 117 +++ .../V1/GenerateAuditReportRequest.php | 356 +++++++ .../AuditReportFormat.php | 54 ++ .../V1/GenerateAuditScopeReportRequest.php | 231 +++++ .../AuditScopeReportFormat.php | 54 ++ .../AuditManager/V1/GetAuditReportRequest.php | 98 ++ .../V1/GetResourceEnrollmentStatusRequest.php | 103 ++ .../V1/ListAuditReportsRequest.php | 187 ++++ .../V1/ListAuditReportsResponse.php | 110 +++ .../AuditManager/V1/ListControlsRequest.php | 182 ++++ .../AuditManager/V1/ListControlsResponse.php | 110 +++ .../ListResourceEnrollmentStatusesRequest.php | 182 ++++ ...ListResourceEnrollmentStatusesResponse.php | 110 +++ .../AuditManager/V1/OperationMetadata.php | 315 ++++++ .../Cloud/AuditManager/V1/OperationState.php | 103 ++ .../V1/ReportGenerationProgress.php | 299 ++++++ .../Cloud/AuditManager/V1/ReportSummary.php | 204 ++++ .../V1/ResourceEnrollmentStatus.php | 244 +++++ .../ResourceEnrollmentState.php | 68 ++ .../V1/AuditManagerClient/enroll_resource.php | 82 ++ .../generate_audit_report.php | 100 ++ .../generate_audit_scope_report.php | 93 ++ .../AuditManagerClient/get_audit_report.php | 75 ++ .../V1/AuditManagerClient/get_location.php | 57 ++ .../get_resource_enrollment_status.php | 80 ++ .../AuditManagerClient/list_audit_reports.php | 82 ++ .../V1/AuditManagerClient/list_controls.php | 81 ++ .../V1/AuditManagerClient/list_locations.php | 77 ++ .../list_resource_enrollment_statuses.php | 81 ++ .../v1/src/V1/Client/AuditManagerClient.php | 897 ++++++++++++++++++ .../v1/src/V1/gapic_metadata.json | 68 ++ .../audit_manager_client_config.json | 94 ++ .../audit_manager_descriptor_config.php | 207 ++++ .../audit_manager_rest_client_config.php | 298 ++++++ .../Unit/V1/Client/AuditManagerClientTest.php | 894 +++++++++++++++++ 47 files changed, 8373 insertions(+) create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/GPBMetadata/Google/Cloud/Auditmanager/V1/Auditmanager.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/AuditReport.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/AuditReport/ReportGenerationState.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/AuditScopeReport.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ComplianceState.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Control.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Control/Family.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ControlDetails.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ControlFamily.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/DestinationDetails.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/EnrollResourceRequest.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/EnrollResourceRequest/EligibleDestination.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Enrollment.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditReportRequest.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditReportRequest/AuditReportFormat.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditScopeReportRequest.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditScopeReportRequest/AuditScopeReportFormat.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GetAuditReportRequest.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GetResourceEnrollmentStatusRequest.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListAuditReportsRequest.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListAuditReportsResponse.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListControlsRequest.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListControlsResponse.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListResourceEnrollmentStatusesRequest.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListResourceEnrollmentStatusesResponse.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/OperationMetadata.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/OperationState.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ReportGenerationProgress.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ReportSummary.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ResourceEnrollmentStatus.php create mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ResourceEnrollmentStatus/ResourceEnrollmentState.php create mode 100644 owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/enroll_resource.php create mode 100644 owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/generate_audit_report.php create mode 100644 owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/generate_audit_scope_report.php create mode 100644 owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_audit_report.php create mode 100644 owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_location.php create mode 100644 owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_resource_enrollment_status.php create mode 100644 owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_audit_reports.php create mode 100644 owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_controls.php create mode 100644 owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_locations.php create mode 100644 owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_resource_enrollment_statuses.php create mode 100644 owl-bot-staging/AuditManager/v1/src/V1/Client/AuditManagerClient.php create mode 100644 owl-bot-staging/AuditManager/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_client_config.json create mode 100644 owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_descriptor_config.php create mode 100644 owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_rest_client_config.php create mode 100644 owl-bot-staging/AuditManager/v1/tests/Unit/V1/Client/AuditManagerClientTest.php diff --git a/owl-bot-staging/AuditManager/v1/proto/src/GPBMetadata/Google/Cloud/Auditmanager/V1/Auditmanager.php b/owl-bot-staging/AuditManager/v1/proto/src/GPBMetadata/Google/Cloud/Auditmanager/V1/Auditmanager.php new file mode 100644 index 000000000000..4a487ea26fcc --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/GPBMetadata/Google/Cloud/Auditmanager/V1/Auditmanager.php @@ -0,0 +1,30 @@ +internalAddGeneratedFile( + "\x0A\xBCT\x0A/google/cloud/auditmanager/v1/auditmanager.proto\x12\x1Cgoogle.cloud.auditmanager.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A#google/longrunning/operations.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xDE\x01\x0A\x15EnrollResourceRequest\x12\x12\x0A\x05scope\x18\x01 \x01(\x09B\x03\xE0A\x02\x12b\x0A\x0Cdestinations\x18\x02 \x03(\x0B2G.google.cloud.auditmanager.v1.EnrollResourceRequest.EligibleDestinationB\x03\xE0A\x02\x1AM\x0A\x13EligibleDestination\x12\x1D\x0A\x13eligible_gcs_bucket\x18\x03 \x01(\x09H\x00B\x17\x0A\x15eligible_destinations\"\xD6\x02\x0A\x1FGenerateAuditScopeReportRequest\x12\x12\x0A\x05scope\x18\x02 \x01(\x09B\x03\xE0A\x02\x12\"\x0A\x13compliance_standard\x18\x03 \x01(\x09B\x05\x18\x01\xE0A\x01\x12p\x0A\x0Dreport_format\x18\x04 \x01(\x0E2T.google.cloud.auditmanager.v1.GenerateAuditScopeReportRequest.AuditScopeReportFormatB\x03\xE0A\x02\x12!\x0A\x14compliance_framework\x18\x05 \x01(\x09B\x03\xE0A\x02\"f\x0A\x16AuditScopeReportFormat\x12)\x0A%AUDIT_SCOPE_REPORT_FORMAT_UNSPECIFIED\x10\x00\x12!\x0A\x1DAUDIT_SCOPE_REPORT_FORMAT_ODF\x10\x01\"\xF4\x02\x0A\x1AGenerateAuditReportRequest\x12\x11\x0A\x07gcs_uri\x18\x02 \x01(\x09H\x00\x12\x12\x0A\x05scope\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\"\x0A\x13compliance_standard\x18\x03 \x01(\x09B\x05\x18\x01\xE0A\x01\x12f\x0A\x0Dreport_format\x18\x04 \x01(\x0E2J.google.cloud.auditmanager.v1.GenerateAuditReportRequest.AuditReportFormatB\x03\xE0A\x02\x12!\x0A\x14compliance_framework\x18\x05 \x01(\x09B\x03\xE0A\x02\x12\x1A\x0A\x0Dvalidate_only\x18\x08 \x01(\x08B\x03\xE0A\x01\"U\x0A\x11AuditReportFormat\x12#\x0A\x1FAUDIT_REPORT_FORMAT_UNSPECIFIED\x10\x00\x12\x1B\x0A\x17AUDIT_REPORT_FORMAT_ODF\x10\x01B\x0D\x0A\x0Bdestination\"p\x0A\"GetResourceEnrollmentStatusRequest\x12J\x0A\x04name\x18\x01 \x01(\x09B<\xE0A\x02\xFAA6\x0A4auditmanager.googleapis.com/ResourceEnrollmentStatus\"\xA3\x01\x0A%ListResourceEnrollmentStatusesRequest\x12I\x0A\x06parent\x18\x01 \x01(\x09B9\xE0A\x02\xFAA3\x0A1auditmanager.googleapis.com/EnrollmentStatusScope\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\"\xA4\x01\x0A&ListResourceEnrollmentStatusesResponse\x12\\\x0A\x1Cresource_enrollment_statuses\x18\x01 \x03(\x0B26.google.cloud.auditmanager.v1.ResourceEnrollmentStatus\x12\x1C\x0A\x0Fnext_page_token\x18\x02 \x01(\x09B\x03\xE0A\x03\"\x8B\x01\x0A\x17ListAuditReportsRequest\x12?\x0A\x06parent\x18\x01 \x01(\x09B/\xE0A\x02\xFAA)\x12'auditmanager.googleapis.com/AuditReport\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\"\x7F\x0A\x18ListAuditReportsResponse\x12E\x0A\x0Daudit_reports\x18\x01 \x03(\x0B2).google.cloud.auditmanager.v1.AuditReportB\x03\xE0A\x03\x12\x1C\x0A\x0Fnext_page_token\x18\x02 \x01(\x09B\x03\xE0A\x03\"V\x0A\x15GetAuditReportRequest\x12=\x0A\x04name\x18\x01 \x01(\x09B/\xE0A\x02\xFAA)\x0A'auditmanager.googleapis.com/AuditReport\"\x84\x01\x0A\x13ListControlsRequest\x12<\x0A\x06parent\x18\x01 \x01(\x09B,\xE0A\x02\xFAA&\x0A\$auditmanager.googleapis.com/Standard\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\"r\x0A\x14ListControlsResponse\x12<\x0A\x08controls\x18\x01 \x03(\x0B2%.google.cloud.auditmanager.v1.ControlB\x03\xE0A\x03\x12\x1C\x0A\x0Fnext_page_token\x18\x02 \x01(\x09B\x03\xE0A\x03\"\xE1\x02\x0A\x18ReportGenerationProgress\x12@\x0A\x05state\x18\x01 \x01(\x0E2,.google.cloud.auditmanager.v1.OperationStateB\x03\xE0A\x03\x12\x1B\x0A\x0Efailure_reason\x18\x02 \x01(\x09B\x03\xE0A\x03\x12#\x0A\x1Bevaluation_percent_complete\x18\x14 \x01(\x01\x12*\x0A\"report_generation_percent_complete\x18\x1E \x01(\x01\x12)\x0A!report_uploading_percent_complete\x18( \x01(\x01\x12#\x0A\x16destination_gcs_bucket\x182 \x01(\x09B\x03\xE0A\x03\x12E\x0A\x0Caudit_report\x183 \x01(\x09B/\xE0A\x03\xFAA)\x0A'auditmanager.googleapis.com/AuditReport\"\x89\x03\x0A\x0AEnrollment\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12R\x0A\x13destination_details\x18\x03 \x03(\x0B20.google.cloud.auditmanager.v1.DestinationDetailsB\x03\xE0A\x03:\x93\x02\xEAA\x8F\x02\x0A&auditmanager.googleapis.com/Enrollment\x12@projects/{project}/locations/{location}/enrollments/{enrollment}\x12>folders/{folder}/locations/{location}/enrollments/{enrollment}\x12Jorganizations/{organization}/locations/{location}/enrollments/{enrollment}*\x0Benrollments2\x0Aenrollment\"\xA8\x03\x0A\x10AuditScopeReport\x12\x1F\x0A\x15scope_report_contents\x18\x01 \x01(\x0CH\x00\x12\x11\x0A\x04name\x18\x02 \x01(\x09B\x03\xE0A\x08:\xCF\x02\xEAA\xCB\x02\x0A,auditmanager.googleapis.com/AuditScopeReport\x12Nprojects/{project}/locations/{location}/auditScopeReports/{audit_scope_report}\x12Lfolders/{folder}/locations/{location}/auditScopeReports/{audit_scope_report}\x12Xorganizations/{organization}/locations/{location}/auditScopeReports/{audit_scope_report}*\x11auditScopeReports2\x10auditScopeReportB\x0E\x0A\x0Caudit_report\"\x80\x02\x0A\x11OperationMetadata\x124\x0A\x0Bcreate_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x121\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\x13\x0A\x06target\x18\x03 \x01(\x09B\x03\xE0A\x03\x12\x11\x0A\x04verb\x18\x04 \x01(\x09B\x03\xE0A\x03\x12\x1B\x0A\x0Estatus_message\x18\x05 \x01(\x09B\x03\xE0A\x03\x12#\x0A\x16requested_cancellation\x18\x06 \x01(\x08B\x03\xE0A\x03\x12\x18\x0A\x0Bapi_version\x18\x07 \x01(\x09B\x03\xE0A\x03\"\xA6\x06\x0A\x18ResourceEnrollmentStatus\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12A\x0A\x0Aenrollment\x18\x02 \x01(\x0B2(.google.cloud.auditmanager.v1.EnrollmentB\x03\xE0A\x03\x12\x17\x0A\x08enrolled\x18\x03 \x01(\x08B\x05\x18\x01\xE0A\x03\x12\x19\x0A\x0Cdisplay_name\x18\x04 \x01(\x09B\x03\xE0A\x03\x12m\x0A\x10enrollment_state\x18\x05 \x01(\x0E2N.google.cloud.auditmanager.v1.ResourceEnrollmentStatus.ResourceEnrollmentStateB\x03\xE0A\x03\"s\x0A\x17ResourceEnrollmentState\x12)\x0A%RESOURCE_ENROLLMENT_STATE_UNSPECIFIED\x10\x00\x12\x10\x0A\x0CNOT_ENROLLED\x10\x01\x12\x0D\x0A\x09INHERITED\x10\x02\x12\x0C\x0A\x08ENROLLED\x10\x03:\x9B\x03\xEAA\x97\x03\x0A4auditmanager.googleapis.com/ResourceEnrollmentStatus\x12]folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}\x12_projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}\x12iorganizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}*\x1AresourceEnrollmentStatuses2\x18resourceEnrollmentStatus\"\xDA\x07\x0A\x0BAuditReport\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12H\x0A\x0Ereport_summary\x18\x02 \x01(\x0B2+.google.cloud.auditmanager.v1.ReportSummaryB\x03\xE0A\x03\x12\x19\x0A\x0Coperation_id\x18\x03 \x01(\x09B\x03\xE0A\x03\x12R\x0A\x13destination_details\x18\x04 \x01(\x0B20.google.cloud.auditmanager.v1.DestinationDetailsB\x03\xE0A\x03\x12\"\x0A\x13compliance_standard\x18\x05 \x01(\x09B\x05\x18\x01\xE0A\x03\x12\x12\x0A\x05scope\x18\x06 \x01(\x09B\x03\xE0A\x03\x124\x0A\x0Bcreate_time\x18\x07 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12J\x0A\x0Fcontrol_details\x18\x08 \x03(\x0B2,.google.cloud.auditmanager.v1.ControlDetailsB\x03\xE0A\x03\x12e\x0A\x17report_generation_state\x18\x09 \x01(\x0E2?.google.cloud.auditmanager.v1.AuditReport.ReportGenerationStateB\x03\xE0A\x03\x12!\x0A\x14compliance_framework\x18\x0A \x01(\x09B\x03\xE0A\x03\x12\x15\x0A\x08scope_id\x18\x0B \x01(\x09B\x03\xE0A\x03\"\x81\x01\x0A\x15ReportGenerationState\x12'\x0A#REPORT_GENERATION_STATE_UNSPECIFIED\x10\x00\x12\x0F\x0A\x0BIN_PROGRESS\x10\x01\x12\x0D\x0A\x09COMPLETED\x10\x02\x12\x0A\x0A\x06FAILED\x10\x03\x12\x13\x0A\x0FSUMMARY_UNKNOWN\x10\x04:\x9F\x02\xEAA\x9B\x02\x0A'auditmanager.googleapis.com/AuditReport\x12Cprojects/{project}/locations/{location}/auditReports/{audit_report}\x12Afolders/{folder}/locations/{location}/auditReports/{audit_report}\x12Morganizations/{organization}/locations/{location}/auditReports/{audit_report}*\x0CauditReports2\x0BauditReport\"8\x0A\x0DControlFamily\x12\x11\x0A\x09family_id\x18\x01 \x01(\x09\x12\x14\x0A\x0Cdisplay_name\x18\x02 \x01(\x09\"\xFB\x04\x0A\x07Control\x12\x0F\x0A\x02id\x18\x01 \x01(\x09B\x03\xE0A\x03\x12\x19\x0A\x0Cdisplay_name\x18\x02 \x01(\x09B\x03\xE0A\x03\x12A\x0A\x06family\x18\x03 \x01(\x0E2,.google.cloud.auditmanager.v1.Control.FamilyB\x03\xE0A\x03\x12H\x0A\x0Econtrol_family\x18\x0A \x01(\x0B2+.google.cloud.auditmanager.v1.ControlFamilyB\x03\xE0A\x03\x12\x18\x0A\x0Bdescription\x18\x04 \x01(\x09B\x03\xE0A\x03\x12 \x0A\x13responsibility_type\x18\x05 \x01(\x09B\x03\xE0A\x03\x12.\x0A!google_responsibility_description\x18\x06 \x01(\x09B\x03\xE0A\x03\x121\x0A\$google_responsibility_implementation\x18\x07 \x01(\x09B\x03\xE0A\x03\x120\x0A#customer_responsibility_description\x18\x08 \x01(\x09B\x03\xE0A\x03\x123\x0A&customer_responsibility_implementation\x18\x09 \x01(\x09B\x03\xE0A\x03\"\xB0\x01\x0A\x06Family\x12\x16\x0A\x12FAMILY_UNSPECIFIED\x10\x00\x12\x06\x0A\x02AC\x10\x01\x12\x06\x0A\x02AT\x10\x02\x12\x06\x0A\x02AU\x10\x03\x12\x06\x0A\x02CA\x10\x04\x12\x06\x0A\x02CM\x10\x05\x12\x06\x0A\x02CP\x10\x06\x12\x06\x0A\x02IA\x10\x07\x12\x06\x0A\x02IR\x10\x08\x12\x06\x0A\x02MA\x10\x09\x12\x06\x0A\x02MP\x10\x0A\x12\x06\x0A\x02PE\x10\x0B\x12\x06\x0A\x02PL\x10\x0C\x12\x06\x0A\x02PS\x10\x0D\x12\x06\x0A\x02RA\x10\x0E\x12\x06\x0A\x02SA\x10\x0F\x12\x06\x0A\x02SC\x10\x10\x12\x06\x0A\x02SI\x10\x11\x12\x06\x0A\x02SR\x10\x12\"=\x0A\x12DestinationDetails\x12\x18\x0A\x0Egcs_bucket_uri\x18\x01 \x01(\x09H\x00B\x0D\x0A\x0Bdestination\"\x8F\x01\x0A\x0DReportSummary\x12\x13\x0A\x0Btotal_count\x18\x01 \x01(\x05\x12\x17\x0A\x0Fcompliant_count\x18\x02 \x01(\x05\x12\x17\x0A\x0Fviolation_count\x18\x03 \x01(\x05\x12\"\x0A\x1Amanual_review_needed_count\x18\x04 \x01(\x05\x12\x13\x0A\x0Berror_count\x18\x05 \x01(\x05\"\xE3\x01\x0A\x0EControlDetails\x126\x0A\x07control\x18\x01 \x01(\x0B2%.google.cloud.auditmanager.v1.Control\x12L\x0A\x10compliance_state\x18\x02 \x01(\x0E2-.google.cloud.auditmanager.v1.ComplianceStateB\x03\xE0A\x03\x12K\x0A\x16control_report_summary\x18\x03 \x01(\x0B2+.google.cloud.auditmanager.v1.ReportSummary*\xFB\x02\x0A\x0EOperationState\x12\x1F\x0A\x1BOPERATION_STATE_UNSPECIFIED\x10\x00\x12\x1F\x0A\x1BOPERATION_STATE_NOT_STARTED\x10\x0A\x12*\x0A&OPERATION_STATE_EVALUATION_IN_PROGRESS\x10\x14\x12#\x0A\x1FOPERATION_STATE_EVALUATION_DONE\x10\x15\x12:\x0A6OPERATION_STATE_EVIDENCE_REPORT_GENERATION_IN_PROGRESS\x10\x1E\x123\x0A/OPERATION_STATE_EVIDENCE_REPORT_GENERATION_DONE\x10\x1F\x12/\x0A+OPERATION_STATE_EVIDENCE_UPLOAD_IN_PROGRESS\x10(\x12\x18\x0A\x14OPERATION_STATE_DONE\x102\x12\x1A\x0A\x16OPERATION_STATE_FAILED\x10<*\x8F\x01\x0A\x0FComplianceState\x12 \x0A\x1CCOMPLIANCE_STATE_UNSPECIFIED\x10\x00\x12\x0D\x0A\x09COMPLIANT\x10\x01\x12\x0D\x0A\x09VIOLATION\x10\x02\x12\x18\x0A\x14MANUAL_REVIEW_NEEDED\x10\x03\x12\x09\x0A\x05ERROR\x10\x04\x12\x17\x0A\x13AUDIT_NOT_SUPPORTED\x10\x052\xBD\x16\x0A\x0CAuditManager\x12\xB8\x02\x0A\x0EEnrollResource\x123.google.cloud.auditmanager.v1.EnrollResourceRequest\x1A(.google.cloud.auditmanager.v1.Enrollment\"\xC6\x01\xDAA\x12scope,destinations\x82\xD3\xE4\x93\x02\xAA\x01\"0/v1/{scope=folders/*/locations/*}:enrollResource:\x01*Z6\"1/v1/{scope=projects/*/locations/*}:enrollResource:\x01*Z;\"6/v1/{scope=organizations/*/locations/*}:enrollResource:\x01*\x12\x8B\x03\x0A\x18GenerateAuditScopeReport\x12=.google.cloud.auditmanager.v1.GenerateAuditScopeReportRequest\x1A..google.cloud.auditmanager.v1.AuditScopeReport\"\xFF\x01\xDAA'scope,compliance_standard,report_format\x82\xD3\xE4\x93\x02\xCE\x01\"/v1/{name=projects/*/locations/*/resourceEnrollmentStatuses/*}Z?\x12=/v1/{name=folders/*/locations/*/resourceEnrollmentStatuses/*}ZE\x12C/v1/{name=organizations/*/locations/*/resourceEnrollmentStatuses/*}\x12\xC4\x02\x0A\x1EListResourceEnrollmentStatuses\x12C.google.cloud.auditmanager.v1.ListResourceEnrollmentStatusesRequest\x1AD.google.cloud.auditmanager.v1.ListResourceEnrollmentStatusesResponse\"\x96\x01\xDAA\x06parent\x82\xD3\xE4\x93\x02\x86\x01\x12C/v1/{parent=organizations/*/locations/*}/resourceEnrollmentStatusesZ?\x12=/v1/{parent=folders/*/locations/*}/resourceEnrollmentStatuses\x12\xBE\x02\x0A\x0CListControls\x121.google.cloud.auditmanager.v1.ListControlsRequest\x1A2.google.cloud.auditmanager.v1.ListControlsResponse\"\xC6\x01\xDAA\x06parent\x82\xD3\xE4\x93\x02\xB6\x01\x12=/v1/{parent=organizations/*/locations/*/standards/*}/controlsZ9\x127/v1/{parent=folders/*/locations/*/standards/*}/controlsZ:\x128/v1/{parent=projects/*/locations/*/standards/*}/controls\x1A\x82\x01\xCAA\x1Bauditmanager.googleapis.com\xD2Aahttps://www.googleapis.com/auth/cloud-auditmanager,https://www.googleapis.com/auth/cloud-platformB\x92\x06\x0A com.google.cloud.auditmanager.v1B\x0BV1mainProtoP\x01ZDcloud.google.com/go/auditmanager/apiv1/auditmanagerpb;auditmanagerpb\xAA\x02\x1CGoogle.Cloud.AuditManager.V1\xCA\x02\x1CGoogle\\Cloud\\AuditManager\\V1\xEA\x02\x1FGoogle::Cloud::AuditManager::V1\xEAAS\x0A*auditmanager.googleapis.com/FolderLocation\x12%folders/{folder}/locations/{location}\xEAAe\x0A0auditmanager.googleapis.com/OrganizationLocation\x121organizations/{organization}/locations/{location}\xEAA\xE8\x01\x0A\$auditmanager.googleapis.com/Standard\x12google.cloud.auditmanager.v1.AuditReport + */ +class AuditReport extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. Name of the audit report, in one of the following formats: + * * `projects/{project}/locations/{location}/auditReports/{audit_report}` + * * `folders/{folder}/locations/{location}/auditReports/{audit_report}` + * * `organizations/{organization}/locations/{location}/auditReports/{audit_report}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. Report summary that includes information about compliance and + * violation counts. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.ReportSummary report_summary = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $report_summary = null; + /** + * Output only. Client operation ID for the audit report. + * + * Generated from protobuf field string operation_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $operation_id = ''; + /** + * Output only. Cloud Storage bucket where the audit report is uploaded to. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.DestinationDetails destination_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $destination_details = null; + /** + * Output only. Deprecated. Compliance standard to be audited against. + * Use the `compliance_framework` field instead. + * + * Generated from protobuf field string compliance_standard = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @deprecated + */ + protected $compliance_standard = ''; + /** + * Output only. Organization, folder, or project that the report is generated + * for, in one of the following formats: + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` + * + * Generated from protobuf field string scope = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $scope = ''; + /** + * Output only. Creation time of the audit report. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Overall status of the controls. + * + * Generated from protobuf field repeated .google.cloud.auditmanager.v1.ControlDetails control_details = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $control_details; + /** + * Output only. State of audit report generation. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.AuditReport.ReportGenerationState report_generation_state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $report_generation_state = 0; + /** + * Output only. Compliance framework to use for the audit report. For example, + * `CIS_GCP_FOUNDATIONS_V1_2_0`. + * + * Generated from protobuf field string compliance_framework = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $compliance_framework = ''; + /** + * Output only. Project number, folder ID, or organization ID that the audit + * report was generated for. + * + * Generated from protobuf field string scope_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $scope_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. Name of the audit report, in one of the following formats: + * * `projects/{project}/locations/{location}/auditReports/{audit_report}` + * * `folders/{folder}/locations/{location}/auditReports/{audit_report}` + * * `organizations/{organization}/locations/{location}/auditReports/{audit_report}` + * @type \Google\Cloud\AuditManager\V1\ReportSummary $report_summary + * Output only. Report summary that includes information about compliance and + * violation counts. + * @type string $operation_id + * Output only. Client operation ID for the audit report. + * @type \Google\Cloud\AuditManager\V1\DestinationDetails $destination_details + * Output only. Cloud Storage bucket where the audit report is uploaded to. + * @type string $compliance_standard + * Output only. Deprecated. Compliance standard to be audited against. + * Use the `compliance_framework` field instead. + * @type string $scope + * Output only. Organization, folder, or project that the report is generated + * for, in one of the following formats: + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Creation time of the audit report. + * @type \Google\Cloud\AuditManager\V1\ControlDetails[] $control_details + * Output only. Overall status of the controls. + * @type int $report_generation_state + * Output only. State of audit report generation. + * @type string $compliance_framework + * Output only. Compliance framework to use for the audit report. For example, + * `CIS_GCP_FOUNDATIONS_V1_2_0`. + * @type string $scope_id + * Output only. Project number, folder ID, or organization ID that the audit + * report was generated for. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. Name of the audit report, in one of the following formats: + * * `projects/{project}/locations/{location}/auditReports/{audit_report}` + * * `folders/{folder}/locations/{location}/auditReports/{audit_report}` + * * `organizations/{organization}/locations/{location}/auditReports/{audit_report}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. Name of the audit report, in one of the following formats: + * * `projects/{project}/locations/{location}/auditReports/{audit_report}` + * * `folders/{folder}/locations/{location}/auditReports/{audit_report}` + * * `organizations/{organization}/locations/{location}/auditReports/{audit_report}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. Report summary that includes information about compliance and + * violation counts. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.ReportSummary report_summary = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\AuditManager\V1\ReportSummary|null + */ + public function getReportSummary() + { + return $this->report_summary; + } + + public function hasReportSummary() + { + return isset($this->report_summary); + } + + public function clearReportSummary() + { + unset($this->report_summary); + } + + /** + * Output only. Report summary that includes information about compliance and + * violation counts. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.ReportSummary report_summary = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\AuditManager\V1\ReportSummary $var + * @return $this + */ + public function setReportSummary($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AuditManager\V1\ReportSummary::class); + $this->report_summary = $var; + + return $this; + } + + /** + * Output only. Client operation ID for the audit report. + * + * Generated from protobuf field string operation_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getOperationId() + { + return $this->operation_id; + } + + /** + * Output only. Client operation ID for the audit report. + * + * Generated from protobuf field string operation_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setOperationId($var) + { + GPBUtil::checkString($var, True); + $this->operation_id = $var; + + return $this; + } + + /** + * Output only. Cloud Storage bucket where the audit report is uploaded to. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.DestinationDetails destination_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\AuditManager\V1\DestinationDetails|null + */ + public function getDestinationDetails() + { + return $this->destination_details; + } + + public function hasDestinationDetails() + { + return isset($this->destination_details); + } + + public function clearDestinationDetails() + { + unset($this->destination_details); + } + + /** + * Output only. Cloud Storage bucket where the audit report is uploaded to. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.DestinationDetails destination_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\AuditManager\V1\DestinationDetails $var + * @return $this + */ + public function setDestinationDetails($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AuditManager\V1\DestinationDetails::class); + $this->destination_details = $var; + + return $this; + } + + /** + * Output only. Deprecated. Compliance standard to be audited against. + * Use the `compliance_framework` field instead. + * + * Generated from protobuf field string compliance_standard = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + * @deprecated + */ + public function getComplianceStandard() + { + if ($this->compliance_standard !== '') { + @trigger_error('compliance_standard is deprecated.', E_USER_DEPRECATED); + } + return $this->compliance_standard; + } + + /** + * Output only. Deprecated. Compliance standard to be audited against. + * Use the `compliance_framework` field instead. + * + * Generated from protobuf field string compliance_standard = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + * @deprecated + */ + public function setComplianceStandard($var) + { + @trigger_error('compliance_standard is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkString($var, True); + $this->compliance_standard = $var; + + return $this; + } + + /** + * Output only. Organization, folder, or project that the report is generated + * for, in one of the following formats: + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` + * + * Generated from protobuf field string scope = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getScope() + { + return $this->scope; + } + + /** + * Output only. Organization, folder, or project that the report is generated + * for, in one of the following formats: + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` + * + * Generated from protobuf field string scope = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setScope($var) + { + GPBUtil::checkString($var, True); + $this->scope = $var; + + return $this; + } + + /** + * Output only. Creation time of the audit report. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. Creation time of the audit report. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. Overall status of the controls. + * + * Generated from protobuf field repeated .google.cloud.auditmanager.v1.ControlDetails control_details = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField<\Google\Cloud\AuditManager\V1\ControlDetails> + */ + public function getControlDetails() + { + return $this->control_details; + } + + /** + * Output only. Overall status of the controls. + * + * Generated from protobuf field repeated .google.cloud.auditmanager.v1.ControlDetails control_details = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\AuditManager\V1\ControlDetails[] $var + * @return $this + */ + public function setControlDetails($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AuditManager\V1\ControlDetails::class); + $this->control_details = $arr; + + return $this; + } + + /** + * Output only. State of audit report generation. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.AuditReport.ReportGenerationState report_generation_state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getReportGenerationState() + { + return $this->report_generation_state; + } + + /** + * Output only. State of audit report generation. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.AuditReport.ReportGenerationState report_generation_state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setReportGenerationState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\AuditManager\V1\AuditReport\ReportGenerationState::class); + $this->report_generation_state = $var; + + return $this; + } + + /** + * Output only. Compliance framework to use for the audit report. For example, + * `CIS_GCP_FOUNDATIONS_V1_2_0`. + * + * Generated from protobuf field string compliance_framework = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getComplianceFramework() + { + return $this->compliance_framework; + } + + /** + * Output only. Compliance framework to use for the audit report. For example, + * `CIS_GCP_FOUNDATIONS_V1_2_0`. + * + * Generated from protobuf field string compliance_framework = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setComplianceFramework($var) + { + GPBUtil::checkString($var, True); + $this->compliance_framework = $var; + + return $this; + } + + /** + * Output only. Project number, folder ID, or organization ID that the audit + * report was generated for. + * + * Generated from protobuf field string scope_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getScopeId() + { + return $this->scope_id; + } + + /** + * Output only. Project number, folder ID, or organization ID that the audit + * report was generated for. + * + * Generated from protobuf field string scope_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setScopeId($var) + { + GPBUtil::checkString($var, True); + $this->scope_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/AuditReport/ReportGenerationState.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/AuditReport/ReportGenerationState.php new file mode 100644 index 000000000000..d34ee55388fe --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/AuditReport/ReportGenerationState.php @@ -0,0 +1,79 @@ +google.cloud.auditmanager.v1.AuditReport.ReportGenerationState + */ +class ReportGenerationState +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum REPORT_GENERATION_STATE_UNSPECIFIED = 0; + */ + const REPORT_GENERATION_STATE_UNSPECIFIED = 0; + /** + * The process is in progress. The operation can have any state + * except for `OPERATION_STATE_DONE` or `OPERATION_STATE_FAILED`. + * + * Generated from protobuf enum IN_PROGRESS = 1; + */ + const IN_PROGRESS = 1; + /** + * The process is completed. The operation state is + * `OPERATION_STATE_DONE`. + * + * Generated from protobuf enum COMPLETED = 2; + */ + const COMPLETED = 2; + /** + * The process has failed. The operation state is + * `OPERATION_STATE_FAILED`. + * + * Generated from protobuf enum FAILED = 3; + */ + const FAILED = 3; + /** + * The process completed, but the report summary's status is unknown. This + * state isn't used for new reports. + * + * Generated from protobuf enum SUMMARY_UNKNOWN = 4; + */ + const SUMMARY_UNKNOWN = 4; + + private static $valueToName = [ + self::REPORT_GENERATION_STATE_UNSPECIFIED => 'REPORT_GENERATION_STATE_UNSPECIFIED', + self::IN_PROGRESS => 'IN_PROGRESS', + self::COMPLETED => 'COMPLETED', + self::FAILED => 'FAILED', + self::SUMMARY_UNKNOWN => 'SUMMARY_UNKNOWN', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/AuditScopeReport.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/AuditScopeReport.php new file mode 100644 index 000000000000..89cb8c089869 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/AuditScopeReport.php @@ -0,0 +1,125 @@ +google.cloud.auditmanager.v1.AuditScopeReport + */ +class AuditScopeReport extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. Name for the audit scope report, in one of the following + * formats: + * * `projects/{project}/locations/{location}/auditScopeReports/{audit_scope_report}` + * * `folders/{folder}/locations/{location}/auditScopeReports/{audit_scope_report}` + * * `organizations/{organization}/locations/{location}/auditScopeReports/{audit_scope_report}` + * + * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + protected $audit_report; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $scope_report_contents + * Audit scope report content in byte format. + * @type string $name + * Identifier. Name for the audit scope report, in one of the following + * formats: + * * `projects/{project}/locations/{location}/auditScopeReports/{audit_scope_report}` + * * `folders/{folder}/locations/{location}/auditScopeReports/{audit_scope_report}` + * * `organizations/{organization}/locations/{location}/auditScopeReports/{audit_scope_report}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * Audit scope report content in byte format. + * + * Generated from protobuf field bytes scope_report_contents = 1; + * @return string + */ + public function getScopeReportContents() + { + return $this->readOneof(1); + } + + public function hasScopeReportContents() + { + return $this->hasOneof(1); + } + + /** + * Audit scope report content in byte format. + * + * Generated from protobuf field bytes scope_report_contents = 1; + * @param string $var + * @return $this + */ + public function setScopeReportContents($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Identifier. Name for the audit scope report, in one of the following + * formats: + * * `projects/{project}/locations/{location}/auditScopeReports/{audit_scope_report}` + * * `folders/{folder}/locations/{location}/auditScopeReports/{audit_scope_report}` + * * `organizations/{organization}/locations/{location}/auditScopeReports/{audit_scope_report}` + * + * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. Name for the audit scope report, in one of the following + * formats: + * * `projects/{project}/locations/{location}/auditScopeReports/{audit_scope_report}` + * * `folders/{folder}/locations/{location}/auditScopeReports/{audit_scope_report}` + * * `organizations/{organization}/locations/{location}/auditScopeReports/{audit_scope_report}` + * + * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * @return string + */ + public function getAuditReport() + { + return $this->whichOneof("audit_report"); + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ComplianceState.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ComplianceState.php new file mode 100644 index 000000000000..c67934babd70 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ComplianceState.php @@ -0,0 +1,83 @@ +google.cloud.auditmanager.v1.ComplianceState + */ +class ComplianceState +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum COMPLIANCE_STATE_UNSPECIFIED = 0; + */ + const COMPLIANCE_STATE_UNSPECIFIED = 0; + /** + * The resource is compliant. + * + * Generated from protobuf enum COMPLIANT = 1; + */ + const COMPLIANT = 1; + /** + * The resource isn't compliant. + * + * Generated from protobuf enum VIOLATION = 2; + */ + const VIOLATION = 2; + /** + * You must complete a manual review. + * + * Generated from protobuf enum MANUAL_REVIEW_NEEDED = 3; + */ + const MANUAL_REVIEW_NEEDED = 3; + /** + * An error was encountered during the evaluation or evidence gathering + * process. + * + * Generated from protobuf enum ERROR = 4; + */ + const ERROR = 4; + /** + * The resource can't be audited. + * + * Generated from protobuf enum AUDIT_NOT_SUPPORTED = 5; + */ + const AUDIT_NOT_SUPPORTED = 5; + + private static $valueToName = [ + self::COMPLIANCE_STATE_UNSPECIFIED => 'COMPLIANCE_STATE_UNSPECIFIED', + self::COMPLIANT => 'COMPLIANT', + self::VIOLATION => 'VIOLATION', + self::MANUAL_REVIEW_NEEDED => 'MANUAL_REVIEW_NEEDED', + self::ERROR => 'ERROR', + self::AUDIT_NOT_SUPPORTED => 'AUDIT_NOT_SUPPORTED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Control.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Control.php new file mode 100644 index 000000000000..f41280aa8cc4 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Control.php @@ -0,0 +1,399 @@ +google.cloud.auditmanager.v1.Control + */ +class Control extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Control identifier that's used to fetch the findings. The + * identifier is the same as the control report name. + * + * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $id = ''; + /** + * Output only. Display name of the control. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $display_name = ''; + /** + * Output only. Category that the control belongs to. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.Control.Family family = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $family = 0; + /** + * Output only. Regulatory family of the control. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.ControlFamily control_family = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $control_family = null; + /** + * Output only. Description of the control. + * + * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $description = ''; + /** + * Output only. Who is responsible for implementing this control. Set to one + * of the following values: `GOOGLE`, `CUSTOMER`, or `SHARED`. + * + * Generated from protobuf field string responsibility_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $responsibility_type = ''; + /** + * Output only. A description of Google's responsibility for this control. + * + * Generated from protobuf field string google_responsibility_description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $google_responsibility_description = ''; + /** + * Output only. A description of how Google implements its responsibility for + * this control. + * + * Generated from protobuf field string google_responsibility_implementation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $google_responsibility_implementation = ''; + /** + * Output only. A description of your responsibility for this control. + * + * Generated from protobuf field string customer_responsibility_description = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $customer_responsibility_description = ''; + /** + * Output only. A description of how you can implement your responsibility for + * this control. + * + * Generated from protobuf field string customer_responsibility_implementation = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $customer_responsibility_implementation = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * Output only. Control identifier that's used to fetch the findings. The + * identifier is the same as the control report name. + * @type string $display_name + * Output only. Display name of the control. + * @type int $family + * Output only. Category that the control belongs to. + * @type \Google\Cloud\AuditManager\V1\ControlFamily $control_family + * Output only. Regulatory family of the control. + * @type string $description + * Output only. Description of the control. + * @type string $responsibility_type + * Output only. Who is responsible for implementing this control. Set to one + * of the following values: `GOOGLE`, `CUSTOMER`, or `SHARED`. + * @type string $google_responsibility_description + * Output only. A description of Google's responsibility for this control. + * @type string $google_responsibility_implementation + * Output only. A description of how Google implements its responsibility for + * this control. + * @type string $customer_responsibility_description + * Output only. A description of your responsibility for this control. + * @type string $customer_responsibility_implementation + * Output only. A description of how you can implement your responsibility for + * this control. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Control identifier that's used to fetch the findings. The + * identifier is the same as the control report name. + * + * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Output only. Control identifier that's used to fetch the findings. The + * identifier is the same as the control report name. + * + * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * Output only. Display name of the control. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Output only. Display name of the control. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Output only. Category that the control belongs to. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.Control.Family family = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getFamily() + { + return $this->family; + } + + /** + * Output only. Category that the control belongs to. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.Control.Family family = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setFamily($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\AuditManager\V1\Control\Family::class); + $this->family = $var; + + return $this; + } + + /** + * Output only. Regulatory family of the control. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.ControlFamily control_family = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\AuditManager\V1\ControlFamily|null + */ + public function getControlFamily() + { + return $this->control_family; + } + + public function hasControlFamily() + { + return isset($this->control_family); + } + + public function clearControlFamily() + { + unset($this->control_family); + } + + /** + * Output only. Regulatory family of the control. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.ControlFamily control_family = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\AuditManager\V1\ControlFamily $var + * @return $this + */ + public function setControlFamily($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AuditManager\V1\ControlFamily::class); + $this->control_family = $var; + + return $this; + } + + /** + * Output only. Description of the control. + * + * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Output only. Description of the control. + * + * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. Who is responsible for implementing this control. Set to one + * of the following values: `GOOGLE`, `CUSTOMER`, or `SHARED`. + * + * Generated from protobuf field string responsibility_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getResponsibilityType() + { + return $this->responsibility_type; + } + + /** + * Output only. Who is responsible for implementing this control. Set to one + * of the following values: `GOOGLE`, `CUSTOMER`, or `SHARED`. + * + * Generated from protobuf field string responsibility_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setResponsibilityType($var) + { + GPBUtil::checkString($var, True); + $this->responsibility_type = $var; + + return $this; + } + + /** + * Output only. A description of Google's responsibility for this control. + * + * Generated from protobuf field string google_responsibility_description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getGoogleResponsibilityDescription() + { + return $this->google_responsibility_description; + } + + /** + * Output only. A description of Google's responsibility for this control. + * + * Generated from protobuf field string google_responsibility_description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setGoogleResponsibilityDescription($var) + { + GPBUtil::checkString($var, True); + $this->google_responsibility_description = $var; + + return $this; + } + + /** + * Output only. A description of how Google implements its responsibility for + * this control. + * + * Generated from protobuf field string google_responsibility_implementation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getGoogleResponsibilityImplementation() + { + return $this->google_responsibility_implementation; + } + + /** + * Output only. A description of how Google implements its responsibility for + * this control. + * + * Generated from protobuf field string google_responsibility_implementation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setGoogleResponsibilityImplementation($var) + { + GPBUtil::checkString($var, True); + $this->google_responsibility_implementation = $var; + + return $this; + } + + /** + * Output only. A description of your responsibility for this control. + * + * Generated from protobuf field string customer_responsibility_description = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getCustomerResponsibilityDescription() + { + return $this->customer_responsibility_description; + } + + /** + * Output only. A description of your responsibility for this control. + * + * Generated from protobuf field string customer_responsibility_description = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setCustomerResponsibilityDescription($var) + { + GPBUtil::checkString($var, True); + $this->customer_responsibility_description = $var; + + return $this; + } + + /** + * Output only. A description of how you can implement your responsibility for + * this control. + * + * Generated from protobuf field string customer_responsibility_implementation = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getCustomerResponsibilityImplementation() + { + return $this->customer_responsibility_implementation; + } + + /** + * Output only. A description of how you can implement your responsibility for + * this control. + * + * Generated from protobuf field string customer_responsibility_implementation = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setCustomerResponsibilityImplementation($var) + { + GPBUtil::checkString($var, True); + $this->customer_responsibility_implementation = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Control/Family.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Control/Family.php new file mode 100644 index 000000000000..7265a8c17a7d --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Control/Family.php @@ -0,0 +1,173 @@ +google.cloud.auditmanager.v1.Control.Family + */ +class Family +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum FAMILY_UNSPECIFIED = 0; + */ + const FAMILY_UNSPECIFIED = 0; + /** + * Access control. + * + * Generated from protobuf enum AC = 1; + */ + const AC = 1; + /** + * Awareness and training. + * + * Generated from protobuf enum AT = 2; + */ + const AT = 2; + /** + * Audit and accountability. + * + * Generated from protobuf enum AU = 3; + */ + const AU = 3; + /** + * Certification, accreditation and security assessments. + * + * Generated from protobuf enum CA = 4; + */ + const CA = 4; + /** + * Configuration management and change control. + * + * Generated from protobuf enum CM = 5; + */ + const CM = 5; + /** + * Contingency planning and disaster recovery. + * + * Generated from protobuf enum CP = 6; + */ + const CP = 6; + /** + * Identification and authentication. + * + * Generated from protobuf enum IA = 7; + */ + const IA = 7; + /** + * Incident response. + * + * Generated from protobuf enum IR = 8; + */ + const IR = 8; + /** + * Maintenance. + * + * Generated from protobuf enum MA = 9; + */ + const MA = 9; + /** + * Media protection. + * + * Generated from protobuf enum MP = 10; + */ + const MP = 10; + /** + * Physical and environmental protection. + * + * Generated from protobuf enum PE = 11; + */ + const PE = 11; + /** + * Security planning. + * + * Generated from protobuf enum PL = 12; + */ + const PL = 12; + /** + * Personnel security. + * + * Generated from protobuf enum PS = 13; + */ + const PS = 13; + /** + * Risk assessment. + * + * Generated from protobuf enum RA = 14; + */ + const RA = 14; + /** + * System services and acquisition. + * + * Generated from protobuf enum SA = 15; + */ + const SA = 15; + /** + * System and communications protection. + * + * Generated from protobuf enum SC = 16; + */ + const SC = 16; + /** + * System and information integrity. + * + * Generated from protobuf enum SI = 17; + */ + const SI = 17; + /** + * Supply chain risk management. + * + * Generated from protobuf enum SR = 18; + */ + const SR = 18; + + private static $valueToName = [ + self::FAMILY_UNSPECIFIED => 'FAMILY_UNSPECIFIED', + self::AC => 'AC', + self::AT => 'AT', + self::AU => 'AU', + self::CA => 'CA', + self::CM => 'CM', + self::CP => 'CP', + self::IA => 'IA', + self::IR => 'IR', + self::MA => 'MA', + self::MP => 'MP', + self::PE => 'PE', + self::PL => 'PL', + self::PS => 'PS', + self::RA => 'RA', + self::SA => 'SA', + self::SC => 'SC', + self::SI => 'SI', + self::SR => 'SR', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ControlDetails.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ControlDetails.php new file mode 100644 index 000000000000..11cf4310cd15 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ControlDetails.php @@ -0,0 +1,159 @@ +google.cloud.auditmanager.v1.ControlDetails + */ +class ControlDetails extends \Google\Protobuf\Internal\Message +{ + /** + * Control that the findings are being reported for. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.Control control = 1; + */ + protected $control = null; + /** + * Output only. Overall status of the findings for the control. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.ComplianceState compliance_state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $compliance_state = 0; + /** + * A control report summary that provides a high-level overview of the + * compliance controls and the assessment status. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.ReportSummary control_report_summary = 3; + */ + protected $control_report_summary = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AuditManager\V1\Control $control + * Control that the findings are being reported for. + * @type int $compliance_state + * Output only. Overall status of the findings for the control. + * @type \Google\Cloud\AuditManager\V1\ReportSummary $control_report_summary + * A control report summary that provides a high-level overview of the + * compliance controls and the assessment status. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * Control that the findings are being reported for. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.Control control = 1; + * @return \Google\Cloud\AuditManager\V1\Control|null + */ + public function getControl() + { + return $this->control; + } + + public function hasControl() + { + return isset($this->control); + } + + public function clearControl() + { + unset($this->control); + } + + /** + * Control that the findings are being reported for. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.Control control = 1; + * @param \Google\Cloud\AuditManager\V1\Control $var + * @return $this + */ + public function setControl($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AuditManager\V1\Control::class); + $this->control = $var; + + return $this; + } + + /** + * Output only. Overall status of the findings for the control. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.ComplianceState compliance_state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getComplianceState() + { + return $this->compliance_state; + } + + /** + * Output only. Overall status of the findings for the control. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.ComplianceState compliance_state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setComplianceState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\AuditManager\V1\ComplianceState::class); + $this->compliance_state = $var; + + return $this; + } + + /** + * A control report summary that provides a high-level overview of the + * compliance controls and the assessment status. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.ReportSummary control_report_summary = 3; + * @return \Google\Cloud\AuditManager\V1\ReportSummary|null + */ + public function getControlReportSummary() + { + return $this->control_report_summary; + } + + public function hasControlReportSummary() + { + return isset($this->control_report_summary); + } + + public function clearControlReportSummary() + { + unset($this->control_report_summary); + } + + /** + * A control report summary that provides a high-level overview of the + * compliance controls and the assessment status. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.ReportSummary control_report_summary = 3; + * @param \Google\Cloud\AuditManager\V1\ReportSummary $var + * @return $this + */ + public function setControlReportSummary($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AuditManager\V1\ReportSummary::class); + $this->control_report_summary = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ControlFamily.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ControlFamily.php new file mode 100644 index 000000000000..9a13b09e19e5 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ControlFamily.php @@ -0,0 +1,113 @@ +google.cloud.auditmanager.v1.ControlFamily + */ +class ControlFamily extends \Google\Protobuf\Internal\Message +{ + /** + * ID of the regulatory control family. To find the list of supported + * control families, use the + * [ListControls][google.cloud.auditmanager.v1.AuditManager.ListControls] + * method and review the `control_family` field in the response. + * + * Generated from protobuf field string family_id = 1; + */ + protected $family_id = ''; + /** + * Display name of the regulatory control family. + * + * Generated from protobuf field string display_name = 2; + */ + protected $display_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $family_id + * ID of the regulatory control family. To find the list of supported + * control families, use the + * [ListControls][google.cloud.auditmanager.v1.AuditManager.ListControls] + * method and review the `control_family` field in the response. + * @type string $display_name + * Display name of the regulatory control family. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * ID of the regulatory control family. To find the list of supported + * control families, use the + * [ListControls][google.cloud.auditmanager.v1.AuditManager.ListControls] + * method and review the `control_family` field in the response. + * + * Generated from protobuf field string family_id = 1; + * @return string + */ + public function getFamilyId() + { + return $this->family_id; + } + + /** + * ID of the regulatory control family. To find the list of supported + * control families, use the + * [ListControls][google.cloud.auditmanager.v1.AuditManager.ListControls] + * method and review the `control_family` field in the response. + * + * Generated from protobuf field string family_id = 1; + * @param string $var + * @return $this + */ + public function setFamilyId($var) + { + GPBUtil::checkString($var, True); + $this->family_id = $var; + + return $this; + } + + /** + * Display name of the regulatory control family. + * + * Generated from protobuf field string display_name = 2; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Display name of the regulatory control family. + * + * Generated from protobuf field string display_name = 2; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/DestinationDetails.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/DestinationDetails.php new file mode 100644 index 000000000000..3e1a1308d6c3 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/DestinationDetails.php @@ -0,0 +1,78 @@ +google.cloud.auditmanager.v1.DestinationDetails + */ +class DestinationDetails extends \Google\Protobuf\Internal\Message +{ + protected $destination; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $gcs_bucket_uri + * URI for the Cloud Storage bucket, in the format + * `gs://{bucket_name}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * URI for the Cloud Storage bucket, in the format + * `gs://{bucket_name}`. + * + * Generated from protobuf field string gcs_bucket_uri = 1; + * @return string + */ + public function getGcsBucketUri() + { + return $this->readOneof(1); + } + + public function hasGcsBucketUri() + { + return $this->hasOneof(1); + } + + /** + * URI for the Cloud Storage bucket, in the format + * `gs://{bucket_name}`. + * + * Generated from protobuf field string gcs_bucket_uri = 1; + * @param string $var + * @return $this + */ + public function setGcsBucketUri($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getDestination() + { + return $this->whichOneof("destination"); + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/EnrollResourceRequest.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/EnrollResourceRequest.php new file mode 100644 index 000000000000..65e8f85ebcc4 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/EnrollResourceRequest.php @@ -0,0 +1,169 @@ +google.cloud.auditmanager.v1.EnrollResourceRequest + */ +class EnrollResourceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Organization, folder, or project to enroll in Audit Manager, in + * one of the following formats: + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` + * + * Generated from protobuf field string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $scope = ''; + /** + * Required. Cloud Storage buckets that you can upload your audit reports to + * during the audit process. + * When you enroll an organization or folder, you can choose a Cloud Storage + * bucket from any project in the organization or folder. If you run an audit + * at the project level using the service agent at the organization or folder + * level, all the buckets that are associated with the service agent are + * available. + * + * Generated from protobuf field repeated .google.cloud.auditmanager.v1.EnrollResourceRequest.EligibleDestination destinations = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $destinations; + + /** + * @param string $scope Required. Organization, folder, or project to enroll in Audit Manager, in + * one of the following formats: + * + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` + * @param \Google\Cloud\AuditManager\V1\EnrollResourceRequest\EligibleDestination[] $destinations Required. Cloud Storage buckets that you can upload your audit reports to + * during the audit process. + * + * When you enroll an organization or folder, you can choose a Cloud Storage + * bucket from any project in the organization or folder. If you run an audit + * at the project level using the service agent at the organization or folder + * level, all the buckets that are associated with the service agent are + * available. + * + * @return \Google\Cloud\AuditManager\V1\EnrollResourceRequest + * + * @experimental + */ + public static function build(string $scope, array $destinations): self + { + return (new self()) + ->setScope($scope) + ->setDestinations($destinations); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $scope + * Required. Organization, folder, or project to enroll in Audit Manager, in + * one of the following formats: + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` + * @type \Google\Cloud\AuditManager\V1\EnrollResourceRequest\EligibleDestination[] $destinations + * Required. Cloud Storage buckets that you can upload your audit reports to + * during the audit process. + * When you enroll an organization or folder, you can choose a Cloud Storage + * bucket from any project in the organization or folder. If you run an audit + * at the project level using the service agent at the organization or folder + * level, all the buckets that are associated with the service agent are + * available. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * Required. Organization, folder, or project to enroll in Audit Manager, in + * one of the following formats: + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` + * + * Generated from protobuf field string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getScope() + { + return $this->scope; + } + + /** + * Required. Organization, folder, or project to enroll in Audit Manager, in + * one of the following formats: + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` + * + * Generated from protobuf field string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setScope($var) + { + GPBUtil::checkString($var, True); + $this->scope = $var; + + return $this; + } + + /** + * Required. Cloud Storage buckets that you can upload your audit reports to + * during the audit process. + * When you enroll an organization or folder, you can choose a Cloud Storage + * bucket from any project in the organization or folder. If you run an audit + * at the project level using the service agent at the organization or folder + * level, all the buckets that are associated with the service agent are + * available. + * + * Generated from protobuf field repeated .google.cloud.auditmanager.v1.EnrollResourceRequest.EligibleDestination destinations = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return RepeatedField<\Google\Cloud\AuditManager\V1\EnrollResourceRequest\EligibleDestination> + */ + public function getDestinations() + { + return $this->destinations; + } + + /** + * Required. Cloud Storage buckets that you can upload your audit reports to + * during the audit process. + * When you enroll an organization or folder, you can choose a Cloud Storage + * bucket from any project in the organization or folder. If you run an audit + * at the project level using the service agent at the organization or folder + * level, all the buckets that are associated with the service agent are + * available. + * + * Generated from protobuf field repeated .google.cloud.auditmanager.v1.EnrollResourceRequest.EligibleDestination destinations = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\AuditManager\V1\EnrollResourceRequest\EligibleDestination[] $var + * @return $this + */ + public function setDestinations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AuditManager\V1\EnrollResourceRequest\EligibleDestination::class); + $this->destinations = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/EnrollResourceRequest/EligibleDestination.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/EnrollResourceRequest/EligibleDestination.php new file mode 100644 index 000000000000..3b7f309ebfdb --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/EnrollResourceRequest/EligibleDestination.php @@ -0,0 +1,84 @@ +google.cloud.auditmanager.v1.EnrollResourceRequest.EligibleDestination + */ +class EligibleDestination extends \Google\Protobuf\Internal\Message +{ + protected $eligible_destinations; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $eligible_gcs_bucket + * The location of the Cloud Storage bucket where you want to upload the + * audit report and evidence during the + * [GenerateAuditReport][google.cloud.auditmanager.v1.AuditManager.GenerateAuditReport] + * API call. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * The location of the Cloud Storage bucket where you want to upload the + * audit report and evidence during the + * [GenerateAuditReport][google.cloud.auditmanager.v1.AuditManager.GenerateAuditReport] + * API call. + * + * Generated from protobuf field string eligible_gcs_bucket = 3; + * @return string + */ + public function getEligibleGcsBucket() + { + return $this->readOneof(3); + } + + public function hasEligibleGcsBucket() + { + return $this->hasOneof(3); + } + + /** + * The location of the Cloud Storage bucket where you want to upload the + * audit report and evidence during the + * [GenerateAuditReport][google.cloud.auditmanager.v1.AuditManager.GenerateAuditReport] + * API call. + * + * Generated from protobuf field string eligible_gcs_bucket = 3; + * @param string $var + * @return $this + */ + public function setEligibleGcsBucket($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getEligibleDestinations() + { + return $this->whichOneof("eligible_destinations"); + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Enrollment.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Enrollment.php new file mode 100644 index 000000000000..6f97b729a3f9 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Enrollment.php @@ -0,0 +1,117 @@ +google.cloud.auditmanager.v1.Enrollment + */ +class Enrollment extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. Name of the enrollment, in one of the following formats: + * * `projects/{project}/locations/{location}/enrollments/{enrollment}` + * * `folders/{folder}/locations/{location}/enrollments/{enrollment}` + * * `organizations/{organization}/locations/{location}/enrollments/{enrollment}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. Cloud Storage buckets where you want to upload the audit + * reports. + * + * Generated from protobuf field repeated .google.cloud.auditmanager.v1.DestinationDetails destination_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $destination_details; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. Name of the enrollment, in one of the following formats: + * * `projects/{project}/locations/{location}/enrollments/{enrollment}` + * * `folders/{folder}/locations/{location}/enrollments/{enrollment}` + * * `organizations/{organization}/locations/{location}/enrollments/{enrollment}` + * @type \Google\Cloud\AuditManager\V1\DestinationDetails[] $destination_details + * Output only. Cloud Storage buckets where you want to upload the audit + * reports. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. Name of the enrollment, in one of the following formats: + * * `projects/{project}/locations/{location}/enrollments/{enrollment}` + * * `folders/{folder}/locations/{location}/enrollments/{enrollment}` + * * `organizations/{organization}/locations/{location}/enrollments/{enrollment}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. Name of the enrollment, in one of the following formats: + * * `projects/{project}/locations/{location}/enrollments/{enrollment}` + * * `folders/{folder}/locations/{location}/enrollments/{enrollment}` + * * `organizations/{organization}/locations/{location}/enrollments/{enrollment}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. Cloud Storage buckets where you want to upload the audit + * reports. + * + * Generated from protobuf field repeated .google.cloud.auditmanager.v1.DestinationDetails destination_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField<\Google\Cloud\AuditManager\V1\DestinationDetails> + */ + public function getDestinationDetails() + { + return $this->destination_details; + } + + /** + * Output only. Cloud Storage buckets where you want to upload the audit + * reports. + * + * Generated from protobuf field repeated .google.cloud.auditmanager.v1.DestinationDetails destination_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\AuditManager\V1\DestinationDetails[] $var + * @return $this + */ + public function setDestinationDetails($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AuditManager\V1\DestinationDetails::class); + $this->destination_details = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditReportRequest.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditReportRequest.php new file mode 100644 index 000000000000..a116ec9f7cf0 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditReportRequest.php @@ -0,0 +1,356 @@ +google.cloud.auditmanager.v1.GenerateAuditReportRequest + */ +class GenerateAuditReportRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Organization, folder, or project that the audit applies to, in + * one of the following formats: + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` + * + * Generated from protobuf field string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $scope = ''; + /** + * Optional. Deprecated. Compliance standard for the audit report. + * Use the `compliance_framework` field instead. + * + * Generated from protobuf field string compliance_standard = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @deprecated + */ + protected $compliance_standard = ''; + /** + * Required. Format for the audit report. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.GenerateAuditReportRequest.AuditReportFormat report_format = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $report_format = 0; + /** + * Required. The framework that's used for the audit report. For example, + * `NIST_800_53`. + * + * Generated from protobuf field string compliance_framework = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $compliance_framework = ''; + /** + * Optional. If `true`, only validates the request and does not generate the + * audit report. This executes standard request validation (such as schema, + * framework existence, scope, and IAM checks) and skips the apply phase. + * Use this field for the following purposes: + * * **Infrastructure as Code (IaC)**: Allow tools like Terraform to run + * dry-run mutations (e.g., `terraform plan`) without creating real + * resources or incurring costs. + * * **User Interface Validation**: Enable real-time form and permission + * validation in custom UIs before submitting requests. + * * **CI/CD & Automation**: Test your scripts, permissions, and parameters + * safely without triggering expensive Long-Running Operations (LROs) or + * consuming resource quotas. + * + * Generated from protobuf field bool validate_only = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $validate_only = false; + protected $destination; + + /** + * @param string $scope Required. Organization, folder, or project that the audit applies to, in + * one of the following formats: + * + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` + * @param string $gcsUri URL for the Cloud Storage bucket where the report and evidence is + * uploaded. You must select a bucket that was provided during the + * enrollment process. + * @param string $complianceStandard Optional. Deprecated. Compliance standard for the audit report. + * + * Use the `compliance_framework` field instead. + * @param int $reportFormat Required. Format for the audit report. + * For allowed values, use constants defined on {@see \Google\Cloud\AuditManager\V1\GenerateAuditReportRequest\AuditReportFormat} + * + * @return \Google\Cloud\AuditManager\V1\GenerateAuditReportRequest + * + * @experimental + */ + public static function build(string $scope, string $gcsUri, string $complianceStandard, int $reportFormat): self + { + return (new self()) + ->setScope($scope) + ->setGcsUri($gcsUri) + ->setComplianceStandard($complianceStandard) + ->setReportFormat($reportFormat); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $gcs_uri + * URL for the Cloud Storage bucket where the report and evidence is + * uploaded. You must select a bucket that was provided during the + * enrollment process. + * @type string $scope + * Required. Organization, folder, or project that the audit applies to, in + * one of the following formats: + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` + * @type string $compliance_standard + * Optional. Deprecated. Compliance standard for the audit report. + * Use the `compliance_framework` field instead. + * @type int $report_format + * Required. Format for the audit report. + * @type string $compliance_framework + * Required. The framework that's used for the audit report. For example, + * `NIST_800_53`. + * @type bool $validate_only + * Optional. If `true`, only validates the request and does not generate the + * audit report. This executes standard request validation (such as schema, + * framework existence, scope, and IAM checks) and skips the apply phase. + * Use this field for the following purposes: + * * **Infrastructure as Code (IaC)**: Allow tools like Terraform to run + * dry-run mutations (e.g., `terraform plan`) without creating real + * resources or incurring costs. + * * **User Interface Validation**: Enable real-time form and permission + * validation in custom UIs before submitting requests. + * * **CI/CD & Automation**: Test your scripts, permissions, and parameters + * safely without triggering expensive Long-Running Operations (LROs) or + * consuming resource quotas. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * URL for the Cloud Storage bucket where the report and evidence is + * uploaded. You must select a bucket that was provided during the + * enrollment process. + * + * Generated from protobuf field string gcs_uri = 2; + * @return string + */ + public function getGcsUri() + { + return $this->readOneof(2); + } + + public function hasGcsUri() + { + return $this->hasOneof(2); + } + + /** + * URL for the Cloud Storage bucket where the report and evidence is + * uploaded. You must select a bucket that was provided during the + * enrollment process. + * + * Generated from protobuf field string gcs_uri = 2; + * @param string $var + * @return $this + */ + public function setGcsUri($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Required. Organization, folder, or project that the audit applies to, in + * one of the following formats: + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` + * + * Generated from protobuf field string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getScope() + { + return $this->scope; + } + + /** + * Required. Organization, folder, or project that the audit applies to, in + * one of the following formats: + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` + * + * Generated from protobuf field string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setScope($var) + { + GPBUtil::checkString($var, True); + $this->scope = $var; + + return $this; + } + + /** + * Optional. Deprecated. Compliance standard for the audit report. + * Use the `compliance_framework` field instead. + * + * Generated from protobuf field string compliance_standard = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @return string + * @deprecated + */ + public function getComplianceStandard() + { + if ($this->compliance_standard !== '') { + @trigger_error('compliance_standard is deprecated.', E_USER_DEPRECATED); + } + return $this->compliance_standard; + } + + /** + * Optional. Deprecated. Compliance standard for the audit report. + * Use the `compliance_framework` field instead. + * + * Generated from protobuf field string compliance_standard = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + * @deprecated + */ + public function setComplianceStandard($var) + { + @trigger_error('compliance_standard is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkString($var, True); + $this->compliance_standard = $var; + + return $this; + } + + /** + * Required. Format for the audit report. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.GenerateAuditReportRequest.AuditReportFormat report_format = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getReportFormat() + { + return $this->report_format; + } + + /** + * Required. Format for the audit report. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.GenerateAuditReportRequest.AuditReportFormat report_format = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setReportFormat($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\AuditManager\V1\GenerateAuditReportRequest\AuditReportFormat::class); + $this->report_format = $var; + + return $this; + } + + /** + * Required. The framework that's used for the audit report. For example, + * `NIST_800_53`. + * + * Generated from protobuf field string compliance_framework = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getComplianceFramework() + { + return $this->compliance_framework; + } + + /** + * Required. The framework that's used for the audit report. For example, + * `NIST_800_53`. + * + * Generated from protobuf field string compliance_framework = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setComplianceFramework($var) + { + GPBUtil::checkString($var, True); + $this->compliance_framework = $var; + + return $this; + } + + /** + * Optional. If `true`, only validates the request and does not generate the + * audit report. This executes standard request validation (such as schema, + * framework existence, scope, and IAM checks) and skips the apply phase. + * Use this field for the following purposes: + * * **Infrastructure as Code (IaC)**: Allow tools like Terraform to run + * dry-run mutations (e.g., `terraform plan`) without creating real + * resources or incurring costs. + * * **User Interface Validation**: Enable real-time form and permission + * validation in custom UIs before submitting requests. + * * **CI/CD & Automation**: Test your scripts, permissions, and parameters + * safely without triggering expensive Long-Running Operations (LROs) or + * consuming resource quotas. + * + * Generated from protobuf field bool validate_only = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Optional. If `true`, only validates the request and does not generate the + * audit report. This executes standard request validation (such as schema, + * framework existence, scope, and IAM checks) and skips the apply phase. + * Use this field for the following purposes: + * * **Infrastructure as Code (IaC)**: Allow tools like Terraform to run + * dry-run mutations (e.g., `terraform plan`) without creating real + * resources or incurring costs. + * * **User Interface Validation**: Enable real-time form and permission + * validation in custom UIs before submitting requests. + * * **CI/CD & Automation**: Test your scripts, permissions, and parameters + * safely without triggering expensive Long-Running Operations (LROs) or + * consuming resource quotas. + * + * Generated from protobuf field bool validate_only = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + + /** + * @return string + */ + public function getDestination() + { + return $this->whichOneof("destination"); + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditReportRequest/AuditReportFormat.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditReportRequest/AuditReportFormat.php new file mode 100644 index 000000000000..d28fd35a05ed --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditReportRequest/AuditReportFormat.php @@ -0,0 +1,54 @@ +google.cloud.auditmanager.v1.GenerateAuditReportRequest.AuditReportFormat + */ +class AuditReportFormat +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum AUDIT_REPORT_FORMAT_UNSPECIFIED = 0; + */ + const AUDIT_REPORT_FORMAT_UNSPECIFIED = 0; + /** + * Open Document format. + * + * Generated from protobuf enum AUDIT_REPORT_FORMAT_ODF = 1; + */ + const AUDIT_REPORT_FORMAT_ODF = 1; + + private static $valueToName = [ + self::AUDIT_REPORT_FORMAT_UNSPECIFIED => 'AUDIT_REPORT_FORMAT_UNSPECIFIED', + self::AUDIT_REPORT_FORMAT_ODF => 'AUDIT_REPORT_FORMAT_ODF', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditScopeReportRequest.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditScopeReportRequest.php new file mode 100644 index 000000000000..be64ad66d4aa --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditScopeReportRequest.php @@ -0,0 +1,231 @@ +google.cloud.auditmanager.v1.GenerateAuditScopeReportRequest + */ +class GenerateAuditScopeReportRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Project or folder that the audit scope report is generated for, + * in one of the following formats: + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` + * + * Generated from protobuf field string scope = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $scope = ''; + /** + * Optional. Deprecated. The standard (industry or regulatory requirements) + * that the audit scope report is run against. + * Use the `compliance_framework` field instead. + * + * Generated from protobuf field string compliance_standard = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @deprecated + */ + protected $compliance_standard = ''; + /** + * Required. Format for the audit scope report. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.GenerateAuditScopeReportRequest.AuditScopeReportFormat report_format = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $report_format = 0; + /** + * Required. Framework (set of controls) that the audit scope report is + * generated against. For example, `NIST_800_53`. + * + * Generated from protobuf field string compliance_framework = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $compliance_framework = ''; + + /** + * @param string $scope Required. Project or folder that the audit scope report is generated for, + * in one of the following formats: + * + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` + * @param string $complianceStandard Optional. Deprecated. The standard (industry or regulatory requirements) + * that the audit scope report is run against. + * + * Use the `compliance_framework` field instead. + * @param int $reportFormat Required. Format for the audit scope report. + * For allowed values, use constants defined on {@see \Google\Cloud\AuditManager\V1\GenerateAuditScopeReportRequest\AuditScopeReportFormat} + * + * @return \Google\Cloud\AuditManager\V1\GenerateAuditScopeReportRequest + * + * @experimental + */ + public static function build(string $scope, string $complianceStandard, int $reportFormat): self + { + return (new self()) + ->setScope($scope) + ->setComplianceStandard($complianceStandard) + ->setReportFormat($reportFormat); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $scope + * Required. Project or folder that the audit scope report is generated for, + * in one of the following formats: + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` + * @type string $compliance_standard + * Optional. Deprecated. The standard (industry or regulatory requirements) + * that the audit scope report is run against. + * Use the `compliance_framework` field instead. + * @type int $report_format + * Required. Format for the audit scope report. + * @type string $compliance_framework + * Required. Framework (set of controls) that the audit scope report is + * generated against. For example, `NIST_800_53`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * Required. Project or folder that the audit scope report is generated for, + * in one of the following formats: + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` + * + * Generated from protobuf field string scope = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getScope() + { + return $this->scope; + } + + /** + * Required. Project or folder that the audit scope report is generated for, + * in one of the following formats: + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` + * + * Generated from protobuf field string scope = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setScope($var) + { + GPBUtil::checkString($var, True); + $this->scope = $var; + + return $this; + } + + /** + * Optional. Deprecated. The standard (industry or regulatory requirements) + * that the audit scope report is run against. + * Use the `compliance_framework` field instead. + * + * Generated from protobuf field string compliance_standard = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @return string + * @deprecated + */ + public function getComplianceStandard() + { + if ($this->compliance_standard !== '') { + @trigger_error('compliance_standard is deprecated.', E_USER_DEPRECATED); + } + return $this->compliance_standard; + } + + /** + * Optional. Deprecated. The standard (industry or regulatory requirements) + * that the audit scope report is run against. + * Use the `compliance_framework` field instead. + * + * Generated from protobuf field string compliance_standard = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + * @deprecated + */ + public function setComplianceStandard($var) + { + @trigger_error('compliance_standard is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkString($var, True); + $this->compliance_standard = $var; + + return $this; + } + + /** + * Required. Format for the audit scope report. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.GenerateAuditScopeReportRequest.AuditScopeReportFormat report_format = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getReportFormat() + { + return $this->report_format; + } + + /** + * Required. Format for the audit scope report. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.GenerateAuditScopeReportRequest.AuditScopeReportFormat report_format = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setReportFormat($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\AuditManager\V1\GenerateAuditScopeReportRequest\AuditScopeReportFormat::class); + $this->report_format = $var; + + return $this; + } + + /** + * Required. Framework (set of controls) that the audit scope report is + * generated against. For example, `NIST_800_53`. + * + * Generated from protobuf field string compliance_framework = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getComplianceFramework() + { + return $this->compliance_framework; + } + + /** + * Required. Framework (set of controls) that the audit scope report is + * generated against. For example, `NIST_800_53`. + * + * Generated from protobuf field string compliance_framework = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setComplianceFramework($var) + { + GPBUtil::checkString($var, True); + $this->compliance_framework = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditScopeReportRequest/AuditScopeReportFormat.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditScopeReportRequest/AuditScopeReportFormat.php new file mode 100644 index 000000000000..05ee0385b32d --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditScopeReportRequest/AuditScopeReportFormat.php @@ -0,0 +1,54 @@ +google.cloud.auditmanager.v1.GenerateAuditScopeReportRequest.AuditScopeReportFormat + */ +class AuditScopeReportFormat +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum AUDIT_SCOPE_REPORT_FORMAT_UNSPECIFIED = 0; + */ + const AUDIT_SCOPE_REPORT_FORMAT_UNSPECIFIED = 0; + /** + * Open Document format. + * + * Generated from protobuf enum AUDIT_SCOPE_REPORT_FORMAT_ODF = 1; + */ + const AUDIT_SCOPE_REPORT_FORMAT_ODF = 1; + + private static $valueToName = [ + self::AUDIT_SCOPE_REPORT_FORMAT_UNSPECIFIED => 'AUDIT_SCOPE_REPORT_FORMAT_UNSPECIFIED', + self::AUDIT_SCOPE_REPORT_FORMAT_ODF => 'AUDIT_SCOPE_REPORT_FORMAT_ODF', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GetAuditReportRequest.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GetAuditReportRequest.php new file mode 100644 index 000000000000..938b2f0c35a8 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GetAuditReportRequest.php @@ -0,0 +1,98 @@ +google.cloud.auditmanager.v1.GetAuditReportRequest + */ +class GetAuditReportRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the audit report, in one of the following formats: + * * `projects/{project}/locations/{location}/auditReports/{audit_report}` + * * `folders/{folder}/locations/{location}/auditReports/{audit_report}` + * * `organizations/{organization}/locations/{location}/auditReports/{audit_report}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the audit report, in one of the following formats: + * + * * `projects/{project}/locations/{location}/auditReports/{audit_report}` + * * `folders/{folder}/locations/{location}/auditReports/{audit_report}` + * * `organizations/{organization}/locations/{location}/auditReports/{audit_report}` + * Please see {@see AuditManagerClient::auditReportName()} for help formatting this field. + * + * @return \Google\Cloud\AuditManager\V1\GetAuditReportRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the audit report, in one of the following formats: + * * `projects/{project}/locations/{location}/auditReports/{audit_report}` + * * `folders/{folder}/locations/{location}/auditReports/{audit_report}` + * * `organizations/{organization}/locations/{location}/auditReports/{audit_report}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the audit report, in one of the following formats: + * * `projects/{project}/locations/{location}/auditReports/{audit_report}` + * * `folders/{folder}/locations/{location}/auditReports/{audit_report}` + * * `organizations/{organization}/locations/{location}/auditReports/{audit_report}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the audit report, in one of the following formats: + * * `projects/{project}/locations/{location}/auditReports/{audit_report}` + * * `folders/{folder}/locations/{location}/auditReports/{audit_report}` + * * `organizations/{organization}/locations/{location}/auditReports/{audit_report}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GetResourceEnrollmentStatusRequest.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GetResourceEnrollmentStatusRequest.php new file mode 100644 index 000000000000..cc5898abe2c0 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GetResourceEnrollmentStatusRequest.php @@ -0,0 +1,103 @@ +google.cloud.auditmanager.v1.GetResourceEnrollmentStatusRequest + */ +class GetResourceEnrollmentStatusRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource enrollment status, in one of the following + * formats: + * * `folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * * `projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * * `organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the resource enrollment status, in one of the following + * formats: + * + * * `folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * * `projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * * `organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * Please see {@see AuditManagerClient::resourceEnrollmentStatusName()} for help formatting this field. + * + * @return \Google\Cloud\AuditManager\V1\GetResourceEnrollmentStatusRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the resource enrollment status, in one of the following + * formats: + * * `folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * * `projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * * `organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource enrollment status, in one of the following + * formats: + * * `folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * * `projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * * `organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the resource enrollment status, in one of the following + * formats: + * * `folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * * `projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * * `organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListAuditReportsRequest.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListAuditReportsRequest.php new file mode 100644 index 000000000000..048052f5d864 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListAuditReportsRequest.php @@ -0,0 +1,187 @@ +google.cloud.auditmanager.v1.ListAuditReportsRequest + */ +class ListAuditReportsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent organization, folder, or project to list reports for, + * in one of the following formats: + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Maximum number of items to return in a single page. The service + * might return fewer items than this value. If unspecified, the service picks + * an appropriate default. The maximum value is 100; values above 100 are + * reduced to 100. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A page token, received from a previous call, to retrieve the next + * page of results. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. Parent organization, folder, or project to list reports for, + * in one of the following formats: + * + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` + * Please see {@see AuditManagerClient::folderLocationName()} for help formatting this field. + * + * @return \Google\Cloud\AuditManager\V1\ListAuditReportsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Parent organization, folder, or project to list reports for, + * in one of the following formats: + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` + * @type int $page_size + * Optional. Maximum number of items to return in a single page. The service + * might return fewer items than this value. If unspecified, the service picks + * an appropriate default. The maximum value is 100; values above 100 are + * reduced to 100. + * @type string $page_token + * Optional. A page token, received from a previous call, to retrieve the next + * page of results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent organization, folder, or project to list reports for, + * in one of the following formats: + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Parent organization, folder, or project to list reports for, + * in one of the following formats: + * * `projects/{project}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. Maximum number of items to return in a single page. The service + * might return fewer items than this value. If unspecified, the service picks + * an appropriate default. The maximum value is 100; values above 100 are + * reduced to 100. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. Maximum number of items to return in a single page. The service + * might return fewer items than this value. If unspecified, the service picks + * an appropriate default. The maximum value is 100; values above 100 are + * reduced to 100. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A page token, received from a previous call, to retrieve the next + * page of results. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A page token, received from a previous call, to retrieve the next + * page of results. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListAuditReportsResponse.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListAuditReportsResponse.php new file mode 100644 index 000000000000..17b03c5236ea --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListAuditReportsResponse.php @@ -0,0 +1,110 @@ +google.cloud.auditmanager.v1.ListAuditReportsResponse + */ +class ListAuditReportsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Audit reports. + * + * Generated from protobuf field repeated .google.cloud.auditmanager.v1.AuditReport audit_reports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $audit_reports; + /** + * Output only. A token that you can send as the `page_token` in a subsequent + * request to retrieve the next page of results. If this field is empty, there + * are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AuditManager\V1\AuditReport[] $audit_reports + * Output only. Audit reports. + * @type string $next_page_token + * Output only. A token that you can send as the `page_token` in a subsequent + * request to retrieve the next page of results. If this field is empty, there + * are no subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Audit reports. + * + * Generated from protobuf field repeated .google.cloud.auditmanager.v1.AuditReport audit_reports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField<\Google\Cloud\AuditManager\V1\AuditReport> + */ + public function getAuditReports() + { + return $this->audit_reports; + } + + /** + * Output only. Audit reports. + * + * Generated from protobuf field repeated .google.cloud.auditmanager.v1.AuditReport audit_reports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\AuditManager\V1\AuditReport[] $var + * @return $this + */ + public function setAuditReports($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AuditManager\V1\AuditReport::class); + $this->audit_reports = $arr; + + return $this; + } + + /** + * Output only. A token that you can send as the `page_token` in a subsequent + * request to retrieve the next page of results. If this field is empty, there + * are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Output only. A token that you can send as the `page_token` in a subsequent + * request to retrieve the next page of results. If this field is empty, there + * are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListControlsRequest.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListControlsRequest.php new file mode 100644 index 000000000000..c377232415e9 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListControlsRequest.php @@ -0,0 +1,182 @@ +google.cloud.auditmanager.v1.ListControlsRequest + */ +class ListControlsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Standard to list controls for, in one of the following formats: + * * `projects/{project}/locations/{location}/standards/{standard}` + * * `folders/{folder}/locations/{location}/standards/{standard}` + * * `organizations/{organization}/locations/{location}/standards/{standard}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Maximum number of items to return in a single page. The service + * might return fewer items than this value. If unspecified, the service picks + * an appropriate default. The maximum value is 100; values above 100 are + * reduced to 100. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A page token, received from a previous call, to retrieve the next + * page of results. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. Standard to list controls for, in one of the following formats: + * + * * `projects/{project}/locations/{location}/standards/{standard}` + * * `folders/{folder}/locations/{location}/standards/{standard}` + * * `organizations/{organization}/locations/{location}/standards/{standard}` + * Please see {@see AuditManagerClient::standardName()} for help formatting this field. + * + * @return \Google\Cloud\AuditManager\V1\ListControlsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Standard to list controls for, in one of the following formats: + * * `projects/{project}/locations/{location}/standards/{standard}` + * * `folders/{folder}/locations/{location}/standards/{standard}` + * * `organizations/{organization}/locations/{location}/standards/{standard}` + * @type int $page_size + * Optional. Maximum number of items to return in a single page. The service + * might return fewer items than this value. If unspecified, the service picks + * an appropriate default. The maximum value is 100; values above 100 are + * reduced to 100. + * @type string $page_token + * Optional. A page token, received from a previous call, to retrieve the next + * page of results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * Required. Standard to list controls for, in one of the following formats: + * * `projects/{project}/locations/{location}/standards/{standard}` + * * `folders/{folder}/locations/{location}/standards/{standard}` + * * `organizations/{organization}/locations/{location}/standards/{standard}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Standard to list controls for, in one of the following formats: + * * `projects/{project}/locations/{location}/standards/{standard}` + * * `folders/{folder}/locations/{location}/standards/{standard}` + * * `organizations/{organization}/locations/{location}/standards/{standard}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. Maximum number of items to return in a single page. The service + * might return fewer items than this value. If unspecified, the service picks + * an appropriate default. The maximum value is 100; values above 100 are + * reduced to 100. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. Maximum number of items to return in a single page. The service + * might return fewer items than this value. If unspecified, the service picks + * an appropriate default. The maximum value is 100; values above 100 are + * reduced to 100. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A page token, received from a previous call, to retrieve the next + * page of results. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A page token, received from a previous call, to retrieve the next + * page of results. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListControlsResponse.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListControlsResponse.php new file mode 100644 index 000000000000..df4f807cbd71 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListControlsResponse.php @@ -0,0 +1,110 @@ +google.cloud.auditmanager.v1.ListControlsResponse + */ +class ListControlsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Controls for a given regulatory standard. + * + * Generated from protobuf field repeated .google.cloud.auditmanager.v1.Control controls = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $controls; + /** + * Output only. A token that you can send as the `page_token` in a subsequent + * request to retrieve the next page of results. If this field is empty, there + * are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AuditManager\V1\Control[] $controls + * Output only. Controls for a given regulatory standard. + * @type string $next_page_token + * Output only. A token that you can send as the `page_token` in a subsequent + * request to retrieve the next page of results. If this field is empty, there + * are no subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Controls for a given regulatory standard. + * + * Generated from protobuf field repeated .google.cloud.auditmanager.v1.Control controls = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField<\Google\Cloud\AuditManager\V1\Control> + */ + public function getControls() + { + return $this->controls; + } + + /** + * Output only. Controls for a given regulatory standard. + * + * Generated from protobuf field repeated .google.cloud.auditmanager.v1.Control controls = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\AuditManager\V1\Control[] $var + * @return $this + */ + public function setControls($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AuditManager\V1\Control::class); + $this->controls = $arr; + + return $this; + } + + /** + * Output only. A token that you can send as the `page_token` in a subsequent + * request to retrieve the next page of results. If this field is empty, there + * are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Output only. A token that you can send as the `page_token` in a subsequent + * request to retrieve the next page of results. If this field is empty, there + * are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListResourceEnrollmentStatusesRequest.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListResourceEnrollmentStatusesRequest.php new file mode 100644 index 000000000000..6b11c3629db0 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListResourceEnrollmentStatusesRequest.php @@ -0,0 +1,182 @@ +google.cloud.auditmanager.v1.ListResourceEnrollmentStatusesRequest + */ +class ListResourceEnrollmentStatusesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent organization or folder to list enrollment statuses for, + * in one of the following formats: + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Maximum number of items to return in a single page. The service + * might return fewer items than this value. If unspecified, the service picks + * an appropriate default. The maximum value is 100; values above 100 are + * reduced to 100. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A page token, received from a previous call, to retrieve the next + * page of results. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. Parent organization or folder to list enrollment statuses for, + * in one of the following formats: + * + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` + * Please see {@see AuditManagerClient::enrollmentStatusScopeName()} for help formatting this field. + * + * @return \Google\Cloud\AuditManager\V1\ListResourceEnrollmentStatusesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Parent organization or folder to list enrollment statuses for, + * in one of the following formats: + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` + * @type int $page_size + * Optional. Maximum number of items to return in a single page. The service + * might return fewer items than this value. If unspecified, the service picks + * an appropriate default. The maximum value is 100; values above 100 are + * reduced to 100. + * @type string $page_token + * Optional. A page token, received from a previous call, to retrieve the next + * page of results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent organization or folder to list enrollment statuses for, + * in one of the following formats: + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Parent organization or folder to list enrollment statuses for, + * in one of the following formats: + * * `folders/{folder}/locations/{location}` + * * `organizations/{organization}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. Maximum number of items to return in a single page. The service + * might return fewer items than this value. If unspecified, the service picks + * an appropriate default. The maximum value is 100; values above 100 are + * reduced to 100. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. Maximum number of items to return in a single page. The service + * might return fewer items than this value. If unspecified, the service picks + * an appropriate default. The maximum value is 100; values above 100 are + * reduced to 100. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A page token, received from a previous call, to retrieve the next + * page of results. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A page token, received from a previous call, to retrieve the next + * page of results. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListResourceEnrollmentStatusesResponse.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListResourceEnrollmentStatusesResponse.php new file mode 100644 index 000000000000..364a0db41947 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListResourceEnrollmentStatusesResponse.php @@ -0,0 +1,110 @@ +google.cloud.auditmanager.v1.ListResourceEnrollmentStatusesResponse + */ +class ListResourceEnrollmentStatusesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Resources with their enrollment status. + * + * Generated from protobuf field repeated .google.cloud.auditmanager.v1.ResourceEnrollmentStatus resource_enrollment_statuses = 1; + */ + private $resource_enrollment_statuses; + /** + * Output only. A token that you can send as the `page_token` in a subsequent + * request to retrieve the next page of results. If this field is empty, there + * are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AuditManager\V1\ResourceEnrollmentStatus[] $resource_enrollment_statuses + * Resources with their enrollment status. + * @type string $next_page_token + * Output only. A token that you can send as the `page_token` in a subsequent + * request to retrieve the next page of results. If this field is empty, there + * are no subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * Resources with their enrollment status. + * + * Generated from protobuf field repeated .google.cloud.auditmanager.v1.ResourceEnrollmentStatus resource_enrollment_statuses = 1; + * @return RepeatedField<\Google\Cloud\AuditManager\V1\ResourceEnrollmentStatus> + */ + public function getResourceEnrollmentStatuses() + { + return $this->resource_enrollment_statuses; + } + + /** + * Resources with their enrollment status. + * + * Generated from protobuf field repeated .google.cloud.auditmanager.v1.ResourceEnrollmentStatus resource_enrollment_statuses = 1; + * @param \Google\Cloud\AuditManager\V1\ResourceEnrollmentStatus[] $var + * @return $this + */ + public function setResourceEnrollmentStatuses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AuditManager\V1\ResourceEnrollmentStatus::class); + $this->resource_enrollment_statuses = $arr; + + return $this; + } + + /** + * Output only. A token that you can send as the `page_token` in a subsequent + * request to retrieve the next page of results. If this field is empty, there + * are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Output only. A token that you can send as the `page_token` in a subsequent + * request to retrieve the next page of results. If this field is empty, there + * are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/OperationMetadata.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/OperationMetadata.php new file mode 100644 index 000000000000..5a51a0fa651f --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/OperationMetadata.php @@ -0,0 +1,315 @@ +google.cloud.auditmanager.v1.OperationMetadata + */ +class OperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Time that the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Time that the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_time = null; + /** + * Output only. A server-defined resource path for the target of the + * operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $target = ''; + /** + * Output only. The name of the verb that was executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $verb = ''; + /** + * Output only. A human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $status_message = ''; + /** + * Output only. Whether you requested that the operation be cancelled. + * Operations that were cancelled successfully have an + * [Operation.error][google.longrunning.Operation.error] + * value with a status code + * [Code.CANCELLED][google.rpc.Status.code.CANCELLED]. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $requested_cancellation = false; + /** + * Output only. The API version used to start the operation. For example, + * `v1`. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $api_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Time that the operation was created. + * @type \Google\Protobuf\Timestamp $end_time + * Output only. Time that the operation finished running. + * @type string $target + * Output only. A server-defined resource path for the target of the + * operation. + * @type string $verb + * Output only. The name of the verb that was executed by the operation. + * @type string $status_message + * Output only. A human-readable status of the operation, if any. + * @type bool $requested_cancellation + * Output only. Whether you requested that the operation be cancelled. + * Operations that were cancelled successfully have an + * [Operation.error][google.longrunning.Operation.error] + * value with a status code + * [Code.CANCELLED][google.rpc.Status.code.CANCELLED]. + * @type string $api_version + * Output only. The API version used to start the operation. For example, + * `v1`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Time that the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. Time that the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. Time that the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * Output only. Time that the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * Output only. A server-defined resource path for the target of the + * operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getTarget() + { + return $this->target; + } + + /** + * Output only. A server-defined resource path for the target of the + * operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setTarget($var) + { + GPBUtil::checkString($var, True); + $this->target = $var; + + return $this; + } + + /** + * Output only. The name of the verb that was executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getVerb() + { + return $this->verb; + } + + /** + * Output only. The name of the verb that was executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setVerb($var) + { + GPBUtil::checkString($var, True); + $this->verb = $var; + + return $this; + } + + /** + * Output only. A human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getStatusMessage() + { + return $this->status_message; + } + + /** + * Output only. A human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setStatusMessage($var) + { + GPBUtil::checkString($var, True); + $this->status_message = $var; + + return $this; + } + + /** + * Output only. Whether you requested that the operation be cancelled. + * Operations that were cancelled successfully have an + * [Operation.error][google.longrunning.Operation.error] + * value with a status code + * [Code.CANCELLED][google.rpc.Status.code.CANCELLED]. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getRequestedCancellation() + { + return $this->requested_cancellation; + } + + /** + * Output only. Whether you requested that the operation be cancelled. + * Operations that were cancelled successfully have an + * [Operation.error][google.longrunning.Operation.error] + * value with a status code + * [Code.CANCELLED][google.rpc.Status.code.CANCELLED]. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setRequestedCancellation($var) + { + GPBUtil::checkBool($var); + $this->requested_cancellation = $var; + + return $this; + } + + /** + * Output only. The API version used to start the operation. For example, + * `v1`. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getApiVersion() + { + return $this->api_version; + } + + /** + * Output only. The API version used to start the operation. For example, + * `v1`. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setApiVersion($var) + { + GPBUtil::checkString($var, True); + $this->api_version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/OperationState.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/OperationState.php new file mode 100644 index 000000000000..43de9a89b31d --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/OperationState.php @@ -0,0 +1,103 @@ +google.cloud.auditmanager.v1.OperationState + */ +class OperationState +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum OPERATION_STATE_UNSPECIFIED = 0; + */ + const OPERATION_STATE_UNSPECIFIED = 0; + /** + * Audit generation process hasn't started. + * + * Generated from protobuf enum OPERATION_STATE_NOT_STARTED = 10; + */ + const OPERATION_STATE_NOT_STARTED = 10; + /** + * Evaluation process is in progress. + * + * Generated from protobuf enum OPERATION_STATE_EVALUATION_IN_PROGRESS = 20; + */ + const OPERATION_STATE_EVALUATION_IN_PROGRESS = 20; + /** + * Evaluation process is completed. + * + * Generated from protobuf enum OPERATION_STATE_EVALUATION_DONE = 21; + */ + const OPERATION_STATE_EVALUATION_DONE = 21; + /** + * Report generation process is in progress. + * + * Generated from protobuf enum OPERATION_STATE_EVIDENCE_REPORT_GENERATION_IN_PROGRESS = 30; + */ + const OPERATION_STATE_EVIDENCE_REPORT_GENERATION_IN_PROGRESS = 30; + /** + * Report generation process is completed. + * + * Generated from protobuf enum OPERATION_STATE_EVIDENCE_REPORT_GENERATION_DONE = 31; + */ + const OPERATION_STATE_EVIDENCE_REPORT_GENERATION_DONE = 31; + /** + * The audit report and evidence are being uploaded to your bucket. + * + * Generated from protobuf enum OPERATION_STATE_EVIDENCE_UPLOAD_IN_PROGRESS = 40; + */ + const OPERATION_STATE_EVIDENCE_UPLOAD_IN_PROGRESS = 40; + /** + * The audit report and evidence are uploaded to your bucket. + * + * Generated from protobuf enum OPERATION_STATE_DONE = 50; + */ + const OPERATION_STATE_DONE = 50; + /** + * Audit report generation process failed. + * + * Generated from protobuf enum OPERATION_STATE_FAILED = 60; + */ + const OPERATION_STATE_FAILED = 60; + + private static $valueToName = [ + self::OPERATION_STATE_UNSPECIFIED => 'OPERATION_STATE_UNSPECIFIED', + self::OPERATION_STATE_NOT_STARTED => 'OPERATION_STATE_NOT_STARTED', + self::OPERATION_STATE_EVALUATION_IN_PROGRESS => 'OPERATION_STATE_EVALUATION_IN_PROGRESS', + self::OPERATION_STATE_EVALUATION_DONE => 'OPERATION_STATE_EVALUATION_DONE', + self::OPERATION_STATE_EVIDENCE_REPORT_GENERATION_IN_PROGRESS => 'OPERATION_STATE_EVIDENCE_REPORT_GENERATION_IN_PROGRESS', + self::OPERATION_STATE_EVIDENCE_REPORT_GENERATION_DONE => 'OPERATION_STATE_EVIDENCE_REPORT_GENERATION_DONE', + self::OPERATION_STATE_EVIDENCE_UPLOAD_IN_PROGRESS => 'OPERATION_STATE_EVIDENCE_UPLOAD_IN_PROGRESS', + self::OPERATION_STATE_DONE => 'OPERATION_STATE_DONE', + self::OPERATION_STATE_FAILED => 'OPERATION_STATE_FAILED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ReportGenerationProgress.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ReportGenerationProgress.php new file mode 100644 index 000000000000..8fccf8867285 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ReportGenerationProgress.php @@ -0,0 +1,299 @@ +google.cloud.auditmanager.v1.ReportGenerationProgress + */ +class ReportGenerationProgress extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Current state of execution for report generation. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.OperationState state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. Reason for failure during the audit report generation process. + * This field is set only if the `OperationState` attribute is + * `OPERATION_STATE_FAILED`. + * + * Generated from protobuf field string failure_reason = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $failure_reason = ''; + /** + * Progress of the evaluation process. The progress is + * defined in terms of percentage complete. + * + * Generated from protobuf field double evaluation_percent_complete = 20; + */ + protected $evaluation_percent_complete = 0.0; + /** + * Report generation progress, defined in terms of percentage complete. + * Until evaluation is complete, this value is always `0`. + * + * Generated from protobuf field double report_generation_percent_complete = 30; + */ + protected $report_generation_percent_complete = 0.0; + /** + * Report uploading progress, defined in terms of percentage complete. + * Until evaluation and report generation are complete, this value is always + * `0`. + * + * Generated from protobuf field double report_uploading_percent_complete = 40; + */ + protected $report_uploading_percent_complete = 0.0; + /** + * Output only. Cloud Storage bucket where the audit report is uploaded to + * after the evaluation process is completed. + * + * Generated from protobuf field string destination_gcs_bucket = 50 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $destination_gcs_bucket = ''; + /** + * Output only. Name of the audit report. + * + * Generated from protobuf field string audit_report = 51 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $audit_report = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $state + * Output only. Current state of execution for report generation. + * @type string $failure_reason + * Output only. Reason for failure during the audit report generation process. + * This field is set only if the `OperationState` attribute is + * `OPERATION_STATE_FAILED`. + * @type float $evaluation_percent_complete + * Progress of the evaluation process. The progress is + * defined in terms of percentage complete. + * @type float $report_generation_percent_complete + * Report generation progress, defined in terms of percentage complete. + * Until evaluation is complete, this value is always `0`. + * @type float $report_uploading_percent_complete + * Report uploading progress, defined in terms of percentage complete. + * Until evaluation and report generation are complete, this value is always + * `0`. + * @type string $destination_gcs_bucket + * Output only. Cloud Storage bucket where the audit report is uploaded to + * after the evaluation process is completed. + * @type string $audit_report + * Output only. Name of the audit report. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Current state of execution for report generation. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.OperationState state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. Current state of execution for report generation. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.OperationState state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\AuditManager\V1\OperationState::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. Reason for failure during the audit report generation process. + * This field is set only if the `OperationState` attribute is + * `OPERATION_STATE_FAILED`. + * + * Generated from protobuf field string failure_reason = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getFailureReason() + { + return $this->failure_reason; + } + + /** + * Output only. Reason for failure during the audit report generation process. + * This field is set only if the `OperationState` attribute is + * `OPERATION_STATE_FAILED`. + * + * Generated from protobuf field string failure_reason = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setFailureReason($var) + { + GPBUtil::checkString($var, True); + $this->failure_reason = $var; + + return $this; + } + + /** + * Progress of the evaluation process. The progress is + * defined in terms of percentage complete. + * + * Generated from protobuf field double evaluation_percent_complete = 20; + * @return float + */ + public function getEvaluationPercentComplete() + { + return $this->evaluation_percent_complete; + } + + /** + * Progress of the evaluation process. The progress is + * defined in terms of percentage complete. + * + * Generated from protobuf field double evaluation_percent_complete = 20; + * @param float $var + * @return $this + */ + public function setEvaluationPercentComplete($var) + { + GPBUtil::checkDouble($var); + $this->evaluation_percent_complete = $var; + + return $this; + } + + /** + * Report generation progress, defined in terms of percentage complete. + * Until evaluation is complete, this value is always `0`. + * + * Generated from protobuf field double report_generation_percent_complete = 30; + * @return float + */ + public function getReportGenerationPercentComplete() + { + return $this->report_generation_percent_complete; + } + + /** + * Report generation progress, defined in terms of percentage complete. + * Until evaluation is complete, this value is always `0`. + * + * Generated from protobuf field double report_generation_percent_complete = 30; + * @param float $var + * @return $this + */ + public function setReportGenerationPercentComplete($var) + { + GPBUtil::checkDouble($var); + $this->report_generation_percent_complete = $var; + + return $this; + } + + /** + * Report uploading progress, defined in terms of percentage complete. + * Until evaluation and report generation are complete, this value is always + * `0`. + * + * Generated from protobuf field double report_uploading_percent_complete = 40; + * @return float + */ + public function getReportUploadingPercentComplete() + { + return $this->report_uploading_percent_complete; + } + + /** + * Report uploading progress, defined in terms of percentage complete. + * Until evaluation and report generation are complete, this value is always + * `0`. + * + * Generated from protobuf field double report_uploading_percent_complete = 40; + * @param float $var + * @return $this + */ + public function setReportUploadingPercentComplete($var) + { + GPBUtil::checkDouble($var); + $this->report_uploading_percent_complete = $var; + + return $this; + } + + /** + * Output only. Cloud Storage bucket where the audit report is uploaded to + * after the evaluation process is completed. + * + * Generated from protobuf field string destination_gcs_bucket = 50 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDestinationGcsBucket() + { + return $this->destination_gcs_bucket; + } + + /** + * Output only. Cloud Storage bucket where the audit report is uploaded to + * after the evaluation process is completed. + * + * Generated from protobuf field string destination_gcs_bucket = 50 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDestinationGcsBucket($var) + { + GPBUtil::checkString($var, True); + $this->destination_gcs_bucket = $var; + + return $this; + } + + /** + * Output only. Name of the audit report. + * + * Generated from protobuf field string audit_report = 51 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getAuditReport() + { + return $this->audit_report; + } + + /** + * Output only. Name of the audit report. + * + * Generated from protobuf field string audit_report = 51 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setAuditReport($var) + { + GPBUtil::checkString($var, True); + $this->audit_report = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ReportSummary.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ReportSummary.php new file mode 100644 index 000000000000..c7a70105fd15 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ReportSummary.php @@ -0,0 +1,204 @@ +google.cloud.auditmanager.v1.ReportSummary + */ +class ReportSummary extends \Google\Protobuf\Internal\Message +{ + /** + * Total number of evaluated checks. + * + * Generated from protobuf field int32 total_count = 1; + */ + protected $total_count = 0; + /** + * Number of compliant checks. + * + * Generated from protobuf field int32 compliant_count = 2; + */ + protected $compliant_count = 0; + /** + * Number of checks with violations. + * + * Generated from protobuf field int32 violation_count = 3; + */ + protected $violation_count = 0; + /** + * Number of checks that require a manual review. + * + * Generated from protobuf field int32 manual_review_needed_count = 4; + */ + protected $manual_review_needed_count = 0; + /** + * Number of checks that can't be performed due to errors. + * + * Generated from protobuf field int32 error_count = 5; + */ + protected $error_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $total_count + * Total number of evaluated checks. + * @type int $compliant_count + * Number of compliant checks. + * @type int $violation_count + * Number of checks with violations. + * @type int $manual_review_needed_count + * Number of checks that require a manual review. + * @type int $error_count + * Number of checks that can't be performed due to errors. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * Total number of evaluated checks. + * + * Generated from protobuf field int32 total_count = 1; + * @return int + */ + public function getTotalCount() + { + return $this->total_count; + } + + /** + * Total number of evaluated checks. + * + * Generated from protobuf field int32 total_count = 1; + * @param int $var + * @return $this + */ + public function setTotalCount($var) + { + GPBUtil::checkInt32($var); + $this->total_count = $var; + + return $this; + } + + /** + * Number of compliant checks. + * + * Generated from protobuf field int32 compliant_count = 2; + * @return int + */ + public function getCompliantCount() + { + return $this->compliant_count; + } + + /** + * Number of compliant checks. + * + * Generated from protobuf field int32 compliant_count = 2; + * @param int $var + * @return $this + */ + public function setCompliantCount($var) + { + GPBUtil::checkInt32($var); + $this->compliant_count = $var; + + return $this; + } + + /** + * Number of checks with violations. + * + * Generated from protobuf field int32 violation_count = 3; + * @return int + */ + public function getViolationCount() + { + return $this->violation_count; + } + + /** + * Number of checks with violations. + * + * Generated from protobuf field int32 violation_count = 3; + * @param int $var + * @return $this + */ + public function setViolationCount($var) + { + GPBUtil::checkInt32($var); + $this->violation_count = $var; + + return $this; + } + + /** + * Number of checks that require a manual review. + * + * Generated from protobuf field int32 manual_review_needed_count = 4; + * @return int + */ + public function getManualReviewNeededCount() + { + return $this->manual_review_needed_count; + } + + /** + * Number of checks that require a manual review. + * + * Generated from protobuf field int32 manual_review_needed_count = 4; + * @param int $var + * @return $this + */ + public function setManualReviewNeededCount($var) + { + GPBUtil::checkInt32($var); + $this->manual_review_needed_count = $var; + + return $this; + } + + /** + * Number of checks that can't be performed due to errors. + * + * Generated from protobuf field int32 error_count = 5; + * @return int + */ + public function getErrorCount() + { + return $this->error_count; + } + + /** + * Number of checks that can't be performed due to errors. + * + * Generated from protobuf field int32 error_count = 5; + * @param int $var + * @return $this + */ + public function setErrorCount($var) + { + GPBUtil::checkInt32($var); + $this->error_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ResourceEnrollmentStatus.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ResourceEnrollmentStatus.php new file mode 100644 index 000000000000..471449da2710 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ResourceEnrollmentStatus.php @@ -0,0 +1,244 @@ +google.cloud.auditmanager.v1.ResourceEnrollmentStatus + */ +class ResourceEnrollmentStatus extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. Name of the resource enrollment status, in one of the following + * formats: + * * `folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * * `projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * * `organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. Enrolled destination details for the organization, folder, or + * project. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.Enrollment enrollment = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $enrollment = null; + /** + * Output only. Deprecated. Whether the organization, folder, or project is + * enrolled. Use `enrollment_state` instead. + * + * Generated from protobuf field bool enrolled = 3 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @deprecated + */ + protected $enrolled = false; + /** + * Output only. Display name for the organization, folder, or project. + * + * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $display_name = ''; + /** + * Output only. Enrollment state of the organization, folder, or project. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.ResourceEnrollmentStatus.ResourceEnrollmentState enrollment_state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $enrollment_state = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. Name of the resource enrollment status, in one of the following + * formats: + * * `folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * * `projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * * `organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * @type \Google\Cloud\AuditManager\V1\Enrollment $enrollment + * Output only. Enrolled destination details for the organization, folder, or + * project. + * @type bool $enrolled + * Output only. Deprecated. Whether the organization, folder, or project is + * enrolled. Use `enrollment_state` instead. + * @type string $display_name + * Output only. Display name for the organization, folder, or project. + * @type int $enrollment_state + * Output only. Enrollment state of the organization, folder, or project. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. Name of the resource enrollment status, in one of the following + * formats: + * * `folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * * `projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * * `organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. Name of the resource enrollment status, in one of the following + * formats: + * * `folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * * `projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * * `organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. Enrolled destination details for the organization, folder, or + * project. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.Enrollment enrollment = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\AuditManager\V1\Enrollment|null + */ + public function getEnrollment() + { + return $this->enrollment; + } + + public function hasEnrollment() + { + return isset($this->enrollment); + } + + public function clearEnrollment() + { + unset($this->enrollment); + } + + /** + * Output only. Enrolled destination details for the organization, folder, or + * project. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.Enrollment enrollment = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\AuditManager\V1\Enrollment $var + * @return $this + */ + public function setEnrollment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AuditManager\V1\Enrollment::class); + $this->enrollment = $var; + + return $this; + } + + /** + * Output only. Deprecated. Whether the organization, folder, or project is + * enrolled. Use `enrollment_state` instead. + * + * Generated from protobuf field bool enrolled = 3 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + * @deprecated + */ + public function getEnrolled() + { + if ($this->enrolled !== false) { + @trigger_error('enrolled is deprecated.', E_USER_DEPRECATED); + } + return $this->enrolled; + } + + /** + * Output only. Deprecated. Whether the organization, folder, or project is + * enrolled. Use `enrollment_state` instead. + * + * Generated from protobuf field bool enrolled = 3 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + * @deprecated + */ + public function setEnrolled($var) + { + @trigger_error('enrolled is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkBool($var); + $this->enrolled = $var; + + return $this; + } + + /** + * Output only. Display name for the organization, folder, or project. + * + * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Output only. Display name for the organization, folder, or project. + * + * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Output only. Enrollment state of the organization, folder, or project. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.ResourceEnrollmentStatus.ResourceEnrollmentState enrollment_state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getEnrollmentState() + { + return $this->enrollment_state; + } + + /** + * Output only. Enrollment state of the organization, folder, or project. + * + * Generated from protobuf field .google.cloud.auditmanager.v1.ResourceEnrollmentStatus.ResourceEnrollmentState enrollment_state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setEnrollmentState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\AuditManager\V1\ResourceEnrollmentStatus\ResourceEnrollmentState::class); + $this->enrollment_state = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ResourceEnrollmentStatus/ResourceEnrollmentState.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ResourceEnrollmentStatus/ResourceEnrollmentState.php new file mode 100644 index 000000000000..96ad488e33be --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ResourceEnrollmentStatus/ResourceEnrollmentState.php @@ -0,0 +1,68 @@ +google.cloud.auditmanager.v1.ResourceEnrollmentStatus.ResourceEnrollmentState + */ +class ResourceEnrollmentState +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum RESOURCE_ENROLLMENT_STATE_UNSPECIFIED = 0; + */ + const RESOURCE_ENROLLMENT_STATE_UNSPECIFIED = 0; + /** + * The resource isn't enrolled. + * + * Generated from protobuf enum NOT_ENROLLED = 1; + */ + const NOT_ENROLLED = 1; + /** + * The resource isn't enrolled but the parent is enrolled. + * + * Generated from protobuf enum INHERITED = 2; + */ + const INHERITED = 2; + /** + * The resource is enrolled. + * + * Generated from protobuf enum ENROLLED = 3; + */ + const ENROLLED = 3; + + private static $valueToName = [ + self::RESOURCE_ENROLLMENT_STATE_UNSPECIFIED => 'RESOURCE_ENROLLMENT_STATE_UNSPECIFIED', + self::NOT_ENROLLED => 'NOT_ENROLLED', + self::INHERITED => 'INHERITED', + self::ENROLLED => 'ENROLLED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/enroll_resource.php b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/enroll_resource.php new file mode 100644 index 000000000000..0a2da65a1396 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/enroll_resource.php @@ -0,0 +1,82 @@ +setScope($scope) + ->setDestinations($destinations); + + // Call the API and handle any network failures. + try { + /** @var Enrollment $response */ + $response = $auditManagerClient->enrollResource($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $scope = '[SCOPE]'; + + enroll_resource_sample($scope); +} +// [END auditmanager_v1_generated_AuditManager_EnrollResource_sync] diff --git a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/generate_audit_report.php b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/generate_audit_report.php new file mode 100644 index 000000000000..07b4a254ac4f --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/generate_audit_report.php @@ -0,0 +1,100 @@ +setScope($scope) + ->setReportFormat($reportFormat) + ->setComplianceFramework($complianceFramework); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $auditManagerClient->generateAuditReport($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var AuditReport $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $scope = '[SCOPE]'; + $reportFormat = AuditReportFormat::AUDIT_REPORT_FORMAT_UNSPECIFIED; + $complianceFramework = '[COMPLIANCE_FRAMEWORK]'; + + generate_audit_report_sample($scope, $reportFormat, $complianceFramework); +} +// [END auditmanager_v1_generated_AuditManager_GenerateAuditReport_sync] diff --git a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/generate_audit_scope_report.php b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/generate_audit_scope_report.php new file mode 100644 index 000000000000..9b58aa25f9b7 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/generate_audit_scope_report.php @@ -0,0 +1,93 @@ +setScope($scope) + ->setReportFormat($reportFormat) + ->setComplianceFramework($complianceFramework); + + // Call the API and handle any network failures. + try { + /** @var AuditScopeReport $response */ + $response = $auditManagerClient->generateAuditScopeReport($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $scope = '[SCOPE]'; + $reportFormat = AuditScopeReportFormat::AUDIT_SCOPE_REPORT_FORMAT_UNSPECIFIED; + $complianceFramework = '[COMPLIANCE_FRAMEWORK]'; + + generate_audit_scope_report_sample($scope, $reportFormat, $complianceFramework); +} +// [END auditmanager_v1_generated_AuditManager_GenerateAuditScopeReport_sync] diff --git a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_audit_report.php b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_audit_report.php new file mode 100644 index 000000000000..a61f67c74e98 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_audit_report.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var AuditReport $response */ + $response = $auditManagerClient->getAuditReport($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = AuditManagerClient::auditReportName('[PROJECT]', '[LOCATION]', '[AUDIT_REPORT]'); + + get_audit_report_sample($formattedName); +} +// [END auditmanager_v1_generated_AuditManager_GetAuditReport_sync] diff --git a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_location.php b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_location.php new file mode 100644 index 000000000000..1dea4b7c3f71 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END auditmanager_v1_generated_AuditManager_GetLocation_sync] diff --git a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_resource_enrollment_status.php b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_resource_enrollment_status.php new file mode 100644 index 000000000000..e3a24459cc3e --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_resource_enrollment_status.php @@ -0,0 +1,80 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var ResourceEnrollmentStatus $response */ + $response = $auditManagerClient->getResourceEnrollmentStatus($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = AuditManagerClient::resourceEnrollmentStatusName( + '[FOLDER]', + '[LOCATION]', + '[RESOURCE_ENROLLMENT_STATUS]' + ); + + get_resource_enrollment_status_sample($formattedName); +} +// [END auditmanager_v1_generated_AuditManager_GetResourceEnrollmentStatus_sync] diff --git a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_audit_reports.php b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_audit_reports.php new file mode 100644 index 000000000000..608134c484ab --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_audit_reports.php @@ -0,0 +1,82 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $auditManagerClient->listAuditReports($request); + + /** @var AuditReport $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = AuditManagerClient::folderLocationName('[FOLDER]', '[LOCATION]'); + + list_audit_reports_sample($formattedParent); +} +// [END auditmanager_v1_generated_AuditManager_ListAuditReports_sync] diff --git a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_controls.php b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_controls.php new file mode 100644 index 000000000000..29e6f80c0fa5 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_controls.php @@ -0,0 +1,81 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $auditManagerClient->listControls($request); + + /** @var Control $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = AuditManagerClient::standardName('[PROJECT]', '[LOCATION]', '[STANDARD]'); + + list_controls_sample($formattedParent); +} +// [END auditmanager_v1_generated_AuditManager_ListControls_sync] diff --git a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_locations.php b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_locations.php new file mode 100644 index 000000000000..e556a3584ba8 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_locations.php @@ -0,0 +1,77 @@ +listLocations($request); + + /** @var Location $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END auditmanager_v1_generated_AuditManager_ListLocations_sync] diff --git a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_resource_enrollment_statuses.php b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_resource_enrollment_statuses.php new file mode 100644 index 000000000000..64c6cf526f20 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_resource_enrollment_statuses.php @@ -0,0 +1,81 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $auditManagerClient->listResourceEnrollmentStatuses($request); + + /** @var ResourceEnrollmentStatus $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = AuditManagerClient::enrollmentStatusScopeName('[FOLDER]', '[LOCATION]'); + + list_resource_enrollment_statuses_sample($formattedParent); +} +// [END auditmanager_v1_generated_AuditManager_ListResourceEnrollmentStatuses_sync] diff --git a/owl-bot-staging/AuditManager/v1/src/V1/Client/AuditManagerClient.php b/owl-bot-staging/AuditManager/v1/src/V1/Client/AuditManagerClient.php new file mode 100644 index 000000000000..2d2902f7c0fb --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/src/V1/Client/AuditManagerClient.php @@ -0,0 +1,897 @@ + enrollResourceAsync(EnrollResourceRequest $request, array $optionalArgs = []) + * @method PromiseInterface generateAuditReportAsync(GenerateAuditReportRequest $request, array $optionalArgs = []) + * @method PromiseInterface generateAuditScopeReportAsync(GenerateAuditScopeReportRequest $request, array $optionalArgs = []) + * @method PromiseInterface getAuditReportAsync(GetAuditReportRequest $request, array $optionalArgs = []) + * @method PromiseInterface getResourceEnrollmentStatusAsync(GetResourceEnrollmentStatusRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAuditReportsAsync(ListAuditReportsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listControlsAsync(ListControlsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listResourceEnrollmentStatusesAsync(ListResourceEnrollmentStatusesRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + */ +final class AuditManagerClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.auditmanager.v1.AuditManager'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'auditmanager.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'auditmanager.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** + * The default scopes required by the service. + * + * @internal + */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-auditmanager', + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/audit_manager_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/audit_manager_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/audit_manager_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/audit_manager_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = $methodName && isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a audit_report + * resource. + * + * @param string $project + * @param string $location + * @param string $auditReport + * + * @return string The formatted audit_report resource. + */ + public static function auditReportName(string $project, string $location, string $auditReport): string + { + return self::getPathTemplate('auditReport')->render([ + 'project' => $project, + 'location' => $location, + 'audit_report' => $auditReport, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * enrollment_status_scope resource. + * + * @param string $folder + * @param string $location + * + * @return string The formatted enrollment_status_scope resource. + */ + public static function enrollmentStatusScopeName(string $folder, string $location): string + { + return self::getPathTemplate('enrollmentStatusScope')->render([ + 'folder' => $folder, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * folder_location resource. + * + * @param string $folder + * @param string $location + * + * @return string The formatted folder_location resource. + */ + public static function folderLocationName(string $folder, string $location): string + { + return self::getPathTemplate('folderLocation')->render([ + 'folder' => $folder, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * folder_location_audit_report resource. + * + * @param string $folder + * @param string $location + * @param string $auditReport + * + * @return string The formatted folder_location_audit_report resource. + */ + public static function folderLocationAuditReportName(string $folder, string $location, string $auditReport): string + { + return self::getPathTemplate('folderLocationAuditReport')->render([ + 'folder' => $folder, + 'location' => $location, + 'audit_report' => $auditReport, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * folder_location_resource_enrollment_status resource. + * + * @param string $folder + * @param string $location + * @param string $resourceEnrollmentStatus + * + * @return string The formatted folder_location_resource_enrollment_status resource. + */ + public static function folderLocationResourceEnrollmentStatusName(string $folder, string $location, string $resourceEnrollmentStatus): string + { + return self::getPathTemplate('folderLocationResourceEnrollmentStatus')->render([ + 'folder' => $folder, + 'location' => $location, + 'resource_enrollment_status' => $resourceEnrollmentStatus, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * folder_location_standard resource. + * + * @param string $folder + * @param string $location + * @param string $standard + * + * @return string The formatted folder_location_standard resource. + */ + public static function folderLocationStandardName(string $folder, string $location, string $standard): string + { + return self::getPathTemplate('folderLocationStandard')->render([ + 'folder' => $folder, + 'location' => $location, + 'standard' => $standard, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName(string $project, string $location): string + { + return self::getPathTemplate('location')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_location resource. + * + * @param string $organization + * @param string $location + * + * @return string The formatted organization_location resource. + */ + public static function organizationLocationName(string $organization, string $location): string + { + return self::getPathTemplate('organizationLocation')->render([ + 'organization' => $organization, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_location_audit_report resource. + * + * @param string $organization + * @param string $location + * @param string $auditReport + * + * @return string The formatted organization_location_audit_report resource. + */ + public static function organizationLocationAuditReportName(string $organization, string $location, string $auditReport): string + { + return self::getPathTemplate('organizationLocationAuditReport')->render([ + 'organization' => $organization, + 'location' => $location, + 'audit_report' => $auditReport, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_location_resource_enrollment_status resource. + * + * @param string $organization + * @param string $location + * @param string $resourceEnrollmentStatus + * + * @return string The formatted organization_location_resource_enrollment_status resource. + */ + public static function organizationLocationResourceEnrollmentStatusName(string $organization, string $location, string $resourceEnrollmentStatus): string + { + return self::getPathTemplate('organizationLocationResourceEnrollmentStatus')->render([ + 'organization' => $organization, + 'location' => $location, + 'resource_enrollment_status' => $resourceEnrollmentStatus, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_location_standard resource. + * + * @param string $organization + * @param string $location + * @param string $standard + * + * @return string The formatted organization_location_standard resource. + */ + public static function organizationLocationStandardName(string $organization, string $location, string $standard): string + { + return self::getPathTemplate('organizationLocationStandard')->render([ + 'organization' => $organization, + 'location' => $location, + 'standard' => $standard, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_audit_report resource. + * + * @param string $project + * @param string $location + * @param string $auditReport + * + * @return string The formatted project_location_audit_report resource. + */ + public static function projectLocationAuditReportName(string $project, string $location, string $auditReport): string + { + return self::getPathTemplate('projectLocationAuditReport')->render([ + 'project' => $project, + 'location' => $location, + 'audit_report' => $auditReport, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_resource_enrollment_status resource. + * + * @param string $project + * @param string $location + * @param string $resourceEnrollmentStatus + * + * @return string The formatted project_location_resource_enrollment_status resource. + */ + public static function projectLocationResourceEnrollmentStatusName(string $project, string $location, string $resourceEnrollmentStatus): string + { + return self::getPathTemplate('projectLocationResourceEnrollmentStatus')->render([ + 'project' => $project, + 'location' => $location, + 'resource_enrollment_status' => $resourceEnrollmentStatus, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_standard resource. + * + * @param string $project + * @param string $location + * @param string $standard + * + * @return string The formatted project_location_standard resource. + */ + public static function projectLocationStandardName(string $project, string $location, string $standard): string + { + return self::getPathTemplate('projectLocationStandard')->render([ + 'project' => $project, + 'location' => $location, + 'standard' => $standard, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * resource_enrollment_status resource. + * + * @param string $folder + * @param string $location + * @param string $resourceEnrollmentStatus + * + * @return string The formatted resource_enrollment_status resource. + */ + public static function resourceEnrollmentStatusName(string $folder, string $location, string $resourceEnrollmentStatus): string + { + return self::getPathTemplate('resourceEnrollmentStatus')->render([ + 'folder' => $folder, + 'location' => $location, + 'resource_enrollment_status' => $resourceEnrollmentStatus, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a standard + * resource. + * + * @param string $project + * @param string $location + * @param string $standard + * + * @return string The formatted standard resource. + */ + public static function standardName(string $project, string $location, string $standard): string + { + return self::getPathTemplate('standard')->render([ + 'project' => $project, + 'location' => $location, + 'standard' => $standard, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - auditReport: projects/{project}/locations/{location}/auditReports/{audit_report} + * - enrollmentStatusScope: folders/{folder}/locations/{location} + * - folderLocation: folders/{folder}/locations/{location} + * - folderLocationAuditReport: folders/{folder}/locations/{location}/auditReports/{audit_report} + * - folderLocationResourceEnrollmentStatus: folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status} + * - folderLocationStandard: folders/{folder}/locations/{location}/standards/{standard} + * - location: projects/{project}/locations/{location} + * - organizationLocation: organizations/{organization}/locations/{location} + * - organizationLocationAuditReport: organizations/{organization}/locations/{location}/auditReports/{audit_report} + * - organizationLocationResourceEnrollmentStatus: organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status} + * - organizationLocationStandard: organizations/{organization}/locations/{location}/standards/{standard} + * - projectLocationAuditReport: projects/{project}/locations/{location}/auditReports/{audit_report} + * - projectLocationResourceEnrollmentStatus: projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status} + * - projectLocationStandard: projects/{project}/locations/{location}/standards/{standard} + * - resourceEnrollmentStatus: folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status} + * - standard: projects/{project}/locations/{location}/standards/{standard} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'auditmanager.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\AuditManager\V1\AuditManagerClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new AuditManagerClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Adds your project, folder, or organization to Audit + * Manager. This method creates the Audit Manager service agent in your + * workload and grants required permissions to the service agent. + * If you make this request on a workload that's already enrolled, + * then this method overrides the existing set of destinations. + * + * The async variant is {@see AuditManagerClient::enrollResourceAsync()} . + * + * @example samples/V1/AuditManagerClient/enroll_resource.php + * + * @param EnrollResourceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Enrollment + * + * @throws ApiException Thrown if the API call fails. + */ + public function enrollResource(EnrollResourceRequest $request, array $callOptions = []): Enrollment + { + return $this->startApiCall('EnrollResource', $request, $callOptions)->wait(); + } + + /** + * Registers audit report generation requests. This method returns the + * operation identifier that you can use to track the report generation + * progress. + * + * The async variant is {@see AuditManagerClient::generateAuditReportAsync()} . + * + * @example samples/V1/AuditManagerClient/generate_audit_report.php + * + * @param GenerateAuditReportRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function generateAuditReport(GenerateAuditReportRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('GenerateAuditReport', $request, $callOptions)->wait(); + } + + /** + * Generates an audit scope report for the given standard. + * + * The report includes the following: + * + * * The technical attributes and constraints that Audit Manager uses to + * verify your compliance with a framework. + * * A list of Google Cloud services and resources that are within the + * scope of the framework. + * + * The async variant is {@see AuditManagerClient::generateAuditScopeReportAsync()} + * . + * + * @example samples/V1/AuditManagerClient/generate_audit_scope_report.php + * + * @param GenerateAuditScopeReportRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return AuditScopeReport + * + * @throws ApiException Thrown if the API call fails. + */ + public function generateAuditScopeReport(GenerateAuditScopeReportRequest $request, array $callOptions = []): AuditScopeReport + { + return $this->startApiCall('GenerateAuditScopeReport', $request, $callOptions)->wait(); + } + + /** + * Gets the full metadata and findings for an audit report. + * + * The async variant is {@see AuditManagerClient::getAuditReportAsync()} . + * + * @example samples/V1/AuditManagerClient/get_audit_report.php + * + * @param GetAuditReportRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return AuditReport + * + * @throws ApiException Thrown if the API call fails. + */ + public function getAuditReport(GetAuditReportRequest $request, array $callOptions = []): AuditReport + { + return $this->startApiCall('GetAuditReport', $request, $callOptions)->wait(); + } + + /** + * Gets a resource and its enrollment status. + * + * The async variant is + * {@see AuditManagerClient::getResourceEnrollmentStatusAsync()} . + * + * @example samples/V1/AuditManagerClient/get_resource_enrollment_status.php + * + * @param GetResourceEnrollmentStatusRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ResourceEnrollmentStatus + * + * @throws ApiException Thrown if the API call fails. + */ + public function getResourceEnrollmentStatus(GetResourceEnrollmentStatusRequest $request, array $callOptions = []): ResourceEnrollmentStatus + { + return $this->startApiCall('GetResourceEnrollmentStatus', $request, $callOptions)->wait(); + } + + /** + * Lists the audit reports for the organization, folder, or project that you + * specify as the parent scope. + * + * The async variant is {@see AuditManagerClient::listAuditReportsAsync()} . + * + * @example samples/V1/AuditManagerClient/list_audit_reports.php + * + * @param ListAuditReportsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listAuditReports(ListAuditReportsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListAuditReports', $request, $callOptions); + } + + /** + * Lists the controls that you must implement to become compliant to a + * regulatory standard. + * + * The async variant is {@see AuditManagerClient::listControlsAsync()} . + * + * @example samples/V1/AuditManagerClient/list_controls.php + * + * @param ListControlsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listControls(ListControlsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListControls', $request, $callOptions); + } + + /** + * Lists all the folders and projects in an organization or folder, along with + * their enrollments. + * + * The async variant is + * {@see AuditManagerClient::listResourceEnrollmentStatusesAsync()} . + * + * @example samples/V1/AuditManagerClient/list_resource_enrollment_statuses.php + * + * @param ListResourceEnrollmentStatusesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listResourceEnrollmentStatuses(ListResourceEnrollmentStatusesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListResourceEnrollmentStatuses', $request, $callOptions); + } + + /** + * Gets information about a location. + * + * The async variant is {@see AuditManagerClient::getLocationAsync()} . + * + * @example samples/V1/AuditManagerClient/get_location.php + * + * @param GetLocationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * This method lists locations based on the resource scope provided in + * the [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field: * + * **Global locations**: If `name` is empty, the method lists the + * public locations available to all projects. * **Project-specific + * locations**: If `name` follows the format + * `projects/{project}`, the method lists locations visible to that + * specific project. This includes public, private, or other + * project-specific locations enabled for the project. + * + * For gRPC and client library implementations, the resource name is + * passed as the `name` field. For direct service calls, the resource + * name is + * incorporated into the request path based on the specific service + * implementation and version. + * + * The async variant is {@see AuditManagerClient::listLocationsAsync()} . + * + * @example samples/V1/AuditManagerClient/list_locations.php + * + * @param ListLocationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } +} diff --git a/owl-bot-staging/AuditManager/v1/src/V1/gapic_metadata.json b/owl-bot-staging/AuditManager/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..30a70b3b0e35 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/src/V1/gapic_metadata.json @@ -0,0 +1,68 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.auditmanager.v1", + "libraryPackage": "Google\\Cloud\\AuditManager\\V1", + "services": { + "AuditManager": { + "clients": { + "grpc": { + "libraryClient": "AuditManagerClient", + "rpcs": { + "EnrollResource": { + "methods": [ + "enrollResource" + ] + }, + "GenerateAuditReport": { + "methods": [ + "generateAuditReport" + ] + }, + "GenerateAuditScopeReport": { + "methods": [ + "generateAuditScopeReport" + ] + }, + "GetAuditReport": { + "methods": [ + "getAuditReport" + ] + }, + "GetResourceEnrollmentStatus": { + "methods": [ + "getResourceEnrollmentStatus" + ] + }, + "ListAuditReports": { + "methods": [ + "listAuditReports" + ] + }, + "ListControls": { + "methods": [ + "listControls" + ] + }, + "ListResourceEnrollmentStatuses": { + "methods": [ + "listResourceEnrollmentStatuses" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_client_config.json b/owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_client_config.json new file mode 100644 index 000000000000..621862801f8f --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_client_config.json @@ -0,0 +1,94 @@ +{ + "interfaces": { + "google.cloud.auditmanager.v1.AuditManager": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ], + "no_retry_1_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "EnrollResource": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GenerateAuditReport": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GenerateAuditScopeReport": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetAuditReport": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetResourceEnrollmentStatus": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListAuditReports": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListControls": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListResourceEnrollmentStatuses": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_descriptor_config.php b/owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_descriptor_config.php new file mode 100644 index 000000000000..98c9d30f4504 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_descriptor_config.php @@ -0,0 +1,207 @@ + [ + 'google.cloud.auditmanager.v1.AuditManager' => [ + 'GenerateAuditReport' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\AuditManager\V1\AuditReport', + 'metadataReturnType' => '\Google\Cloud\AuditManager\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'scope', + 'fieldAccessors' => [ + 'getScope', + ], + ], + ], + ], + 'EnrollResource' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\AuditManager\V1\Enrollment', + 'headerParams' => [ + [ + 'keyName' => 'scope', + 'fieldAccessors' => [ + 'getScope', + ], + ], + ], + ], + 'GenerateAuditScopeReport' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\AuditManager\V1\AuditScopeReport', + 'headerParams' => [ + [ + 'keyName' => 'scope', + 'fieldAccessors' => [ + 'getScope', + ], + ], + ], + ], + 'GetAuditReport' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\AuditManager\V1\AuditReport', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetResourceEnrollmentStatus' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\AuditManager\V1\ResourceEnrollmentStatus', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListAuditReports' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getAuditReports', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\AuditManager\V1\ListAuditReportsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListControls' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getControls', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\AuditManager\V1\ListControlsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListResourceEnrollmentStatuses' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getResourceEnrollmentStatuses', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\AuditManager\V1\ListResourceEnrollmentStatusesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'templateMap' => [ + 'auditReport' => 'projects/{project}/locations/{location}/auditReports/{audit_report}', + 'enrollmentStatusScope' => 'folders/{folder}/locations/{location}', + 'folderLocation' => 'folders/{folder}/locations/{location}', + 'folderLocationAuditReport' => 'folders/{folder}/locations/{location}/auditReports/{audit_report}', + 'folderLocationResourceEnrollmentStatus' => 'folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}', + 'folderLocationStandard' => 'folders/{folder}/locations/{location}/standards/{standard}', + 'location' => 'projects/{project}/locations/{location}', + 'organizationLocation' => 'organizations/{organization}/locations/{location}', + 'organizationLocationAuditReport' => 'organizations/{organization}/locations/{location}/auditReports/{audit_report}', + 'organizationLocationResourceEnrollmentStatus' => 'organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}', + 'organizationLocationStandard' => 'organizations/{organization}/locations/{location}/standards/{standard}', + 'projectLocationAuditReport' => 'projects/{project}/locations/{location}/auditReports/{audit_report}', + 'projectLocationResourceEnrollmentStatus' => 'projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}', + 'projectLocationStandard' => 'projects/{project}/locations/{location}/standards/{standard}', + 'resourceEnrollmentStatus' => 'folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}', + 'standard' => 'projects/{project}/locations/{location}/standards/{standard}', + ], + ], + ], +]; diff --git a/owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_rest_client_config.php b/owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_rest_client_config.php new file mode 100644 index 000000000000..f7d758688248 --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_rest_client_config.php @@ -0,0 +1,298 @@ + [ + 'google.cloud.auditmanager.v1.AuditManager' => [ + 'EnrollResource' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{scope=folders/*/locations/*}:enrollResource', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{scope=projects/*/locations/*}:enrollResource', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{scope=organizations/*/locations/*}:enrollResource', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'scope' => [ + 'getters' => [ + 'getScope', + ], + ], + ], + ], + 'GenerateAuditReport' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{scope=folders/*/locations/*}/auditReports:generate', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{scope=projects/*/locations/*}/auditReports:generate', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{scope=organizations/*/locations/*}/auditReports:generate', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'scope' => [ + 'getters' => [ + 'getScope', + ], + ], + ], + ], + 'GenerateAuditScopeReport' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{scope=folders/*/locations/*}/auditScopeReports:generate', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{scope=projects/*/locations/*}/auditScopeReports:generate', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{scope=organizations/*/locations/*}/auditScopeReports:generate', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'scope' => [ + 'getters' => [ + 'getScope', + ], + ], + ], + ], + 'GetAuditReport' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=folders/*/locations/*/auditReports/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/auditReports/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*/auditReports/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetResourceEnrollmentStatus' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/resourceEnrollmentStatuses/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=folders/*/locations/*/resourceEnrollmentStatuses/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*/resourceEnrollmentStatuses/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListAuditReports' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=organizations/*/locations/*}/auditReports', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=folders/*/locations/*}/auditReports', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/auditReports', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListControls' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=organizations/*/locations/*/standards/*}/controls', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=folders/*/locations/*/standards/*}/controls', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/standards/*}/controls', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListResourceEnrollmentStatuses' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=organizations/*/locations/*}/resourceEnrollmentStatuses', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=folders/*/locations/*}/resourceEnrollmentStatuses', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*/operations/*}:cancel', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*}/operations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/AuditManager/v1/tests/Unit/V1/Client/AuditManagerClientTest.php b/owl-bot-staging/AuditManager/v1/tests/Unit/V1/Client/AuditManagerClientTest.php new file mode 100644 index 000000000000..16438f5b044a --- /dev/null +++ b/owl-bot-staging/AuditManager/v1/tests/Unit/V1/Client/AuditManagerClientTest.php @@ -0,0 +1,894 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return AuditManagerClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new AuditManagerClient($options); + } + + /** @test */ + public function enrollResourceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new Enrollment(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $scope = 'scope109264468'; + $destinations = []; + $request = (new EnrollResourceRequest()) + ->setScope($scope) + ->setDestinations($destinations); + $response = $gapicClient->enrollResource($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.auditmanager.v1.AuditManager/EnrollResource', $actualFuncCall); + $actualValue = $actualRequestObject->getScope(); + $this->assertProtobufEquals($scope, $actualValue); + $actualValue = $actualRequestObject->getDestinations(); + $this->assertProtobufEquals($destinations, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function enrollResourceExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $scope = 'scope109264468'; + $destinations = []; + $request = (new EnrollResourceRequest()) + ->setScope($scope) + ->setDestinations($destinations); + try { + $gapicClient->enrollResource($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function generateAuditReportTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/generateAuditReportTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $operationId = 'operationId-274116877'; + $complianceStandard2 = 'complianceStandard2-1079015980'; + $scope2 = 'scope21923941639'; + $complianceFramework2 = 'complianceFramework2-1333971955'; + $scopeId = 'scopeId-487349530'; + $expectedResponse = new AuditReport(); + $expectedResponse->setName($name); + $expectedResponse->setOperationId($operationId); + $expectedResponse->setComplianceStandard($complianceStandard2); + $expectedResponse->setScope($scope2); + $expectedResponse->setComplianceFramework($complianceFramework2); + $expectedResponse->setScopeId($scopeId); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/generateAuditReportTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $scope = 'scope109264468'; + $reportFormat = AuditReportFormat::AUDIT_REPORT_FORMAT_UNSPECIFIED; + $complianceFramework = 'complianceFramework1384085210'; + $request = (new GenerateAuditReportRequest()) + ->setScope($scope) + ->setReportFormat($reportFormat) + ->setComplianceFramework($complianceFramework); + $response = $gapicClient->generateAuditReport($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.auditmanager.v1.AuditManager/GenerateAuditReport', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getScope(); + $this->assertProtobufEquals($scope, $actualValue); + $actualValue = $actualApiRequestObject->getReportFormat(); + $this->assertProtobufEquals($reportFormat, $actualValue); + $actualValue = $actualApiRequestObject->getComplianceFramework(); + $this->assertProtobufEquals($complianceFramework, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/generateAuditReportTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function generateAuditReportExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/generateAuditReportTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $scope = 'scope109264468'; + $reportFormat = AuditReportFormat::AUDIT_REPORT_FORMAT_UNSPECIFIED; + $complianceFramework = 'complianceFramework1384085210'; + $request = (new GenerateAuditReportRequest()) + ->setScope($scope) + ->setReportFormat($reportFormat) + ->setComplianceFramework($complianceFramework); + $response = $gapicClient->generateAuditReport($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/generateAuditReportTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function generateAuditScopeReportTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $scopeReportContents = '-38'; + $name = 'name3373707'; + $expectedResponse = new AuditScopeReport(); + $expectedResponse->setScopeReportContents($scopeReportContents); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $scope = 'scope109264468'; + $reportFormat = AuditScopeReportFormat::AUDIT_SCOPE_REPORT_FORMAT_UNSPECIFIED; + $complianceFramework = 'complianceFramework1384085210'; + $request = (new GenerateAuditScopeReportRequest()) + ->setScope($scope) + ->setReportFormat($reportFormat) + ->setComplianceFramework($complianceFramework); + $response = $gapicClient->generateAuditScopeReport($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.auditmanager.v1.AuditManager/GenerateAuditScopeReport', $actualFuncCall); + $actualValue = $actualRequestObject->getScope(); + $this->assertProtobufEquals($scope, $actualValue); + $actualValue = $actualRequestObject->getReportFormat(); + $this->assertProtobufEquals($reportFormat, $actualValue); + $actualValue = $actualRequestObject->getComplianceFramework(); + $this->assertProtobufEquals($complianceFramework, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function generateAuditScopeReportExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $scope = 'scope109264468'; + $reportFormat = AuditScopeReportFormat::AUDIT_SCOPE_REPORT_FORMAT_UNSPECIFIED; + $complianceFramework = 'complianceFramework1384085210'; + $request = (new GenerateAuditScopeReportRequest()) + ->setScope($scope) + ->setReportFormat($reportFormat) + ->setComplianceFramework($complianceFramework); + try { + $gapicClient->generateAuditScopeReport($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAuditReportTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $operationId = 'operationId-274116877'; + $complianceStandard = 'complianceStandard1339657825'; + $scope = 'scope109264468'; + $complianceFramework = 'complianceFramework1384085210'; + $scopeId = 'scopeId-487349530'; + $expectedResponse = new AuditReport(); + $expectedResponse->setName($name2); + $expectedResponse->setOperationId($operationId); + $expectedResponse->setComplianceStandard($complianceStandard); + $expectedResponse->setScope($scope); + $expectedResponse->setComplianceFramework($complianceFramework); + $expectedResponse->setScopeId($scopeId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->auditReportName('[PROJECT]', '[LOCATION]', '[AUDIT_REPORT]'); + $request = (new GetAuditReportRequest()) + ->setName($formattedName); + $response = $gapicClient->getAuditReport($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.auditmanager.v1.AuditManager/GetAuditReport', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAuditReportExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->auditReportName('[PROJECT]', '[LOCATION]', '[AUDIT_REPORT]'); + $request = (new GetAuditReportRequest()) + ->setName($formattedName); + try { + $gapicClient->getAuditReport($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getResourceEnrollmentStatusTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $enrolled = false; + $displayName = 'displayName1615086568'; + $expectedResponse = new ResourceEnrollmentStatus(); + $expectedResponse->setName($name2); + $expectedResponse->setEnrolled($enrolled); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->resourceEnrollmentStatusName('[FOLDER]', '[LOCATION]', '[RESOURCE_ENROLLMENT_STATUS]'); + $request = (new GetResourceEnrollmentStatusRequest()) + ->setName($formattedName); + $response = $gapicClient->getResourceEnrollmentStatus($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.auditmanager.v1.AuditManager/GetResourceEnrollmentStatus', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getResourceEnrollmentStatusExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->resourceEnrollmentStatusName('[FOLDER]', '[LOCATION]', '[RESOURCE_ENROLLMENT_STATUS]'); + $request = (new GetResourceEnrollmentStatusRequest()) + ->setName($formattedName); + try { + $gapicClient->getResourceEnrollmentStatus($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAuditReportsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $auditReportsElement = new AuditReport(); + $auditReports = [ + $auditReportsElement, + ]; + $expectedResponse = new ListAuditReportsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAuditReports($auditReports); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->folderLocationName('[FOLDER]', '[LOCATION]'); + $request = (new ListAuditReportsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listAuditReports($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAuditReports()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.auditmanager.v1.AuditManager/ListAuditReports', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAuditReportsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->folderLocationName('[FOLDER]', '[LOCATION]'); + $request = (new ListAuditReportsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listAuditReports($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listControlsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $controlsElement = new Control(); + $controls = [ + $controlsElement, + ]; + $expectedResponse = new ListControlsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setControls($controls); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->standardName('[PROJECT]', '[LOCATION]', '[STANDARD]'); + $request = (new ListControlsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listControls($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getControls()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.auditmanager.v1.AuditManager/ListControls', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listControlsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->standardName('[PROJECT]', '[LOCATION]', '[STANDARD]'); + $request = (new ListControlsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listControls($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listResourceEnrollmentStatusesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $resourceEnrollmentStatusesElement = new ResourceEnrollmentStatus(); + $resourceEnrollmentStatuses = [ + $resourceEnrollmentStatusesElement, + ]; + $expectedResponse = new ListResourceEnrollmentStatusesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setResourceEnrollmentStatuses($resourceEnrollmentStatuses); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->enrollmentStatusScopeName('[FOLDER]', '[LOCATION]'); + $request = (new ListResourceEnrollmentStatusesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listResourceEnrollmentStatuses($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getResourceEnrollmentStatuses()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.auditmanager.v1.AuditManager/ListResourceEnrollmentStatuses', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listResourceEnrollmentStatusesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->enrollmentStatusScopeName('[FOLDER]', '[LOCATION]'); + $request = (new ListResourceEnrollmentStatusesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listResourceEnrollmentStatuses($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function enrollResourceAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new Enrollment(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $scope = 'scope109264468'; + $destinations = []; + $request = (new EnrollResourceRequest()) + ->setScope($scope) + ->setDestinations($destinations); + $response = $gapicClient->enrollResourceAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.auditmanager.v1.AuditManager/EnrollResource', $actualFuncCall); + $actualValue = $actualRequestObject->getScope(); + $this->assertProtobufEquals($scope, $actualValue); + $actualValue = $actualRequestObject->getDestinations(); + $this->assertProtobufEquals($destinations, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} From 835317884200a62efd19e1fb7e6942fdce4a79da Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 13 Aug 2026 20:04:27 +0000 Subject: [PATCH 4/4] =?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 --- .../src/V1/GenerateAuditReportRequest.php | 56 +- .../Cloud/Auditmanager/V1/Auditmanager.php | 30 - .../Cloud/AuditManager/V1/AuditReport.php | 488 ---------- .../V1/AuditReport/ReportGenerationState.php | 79 -- .../AuditManager/V1/AuditScopeReport.php | 125 --- .../Cloud/AuditManager/V1/ComplianceState.php | 83 -- .../Google/Cloud/AuditManager/V1/Control.php | 399 -------- .../Cloud/AuditManager/V1/Control/Family.php | 173 ---- .../Cloud/AuditManager/V1/ControlDetails.php | 159 ---- .../Cloud/AuditManager/V1/ControlFamily.php | 113 --- .../AuditManager/V1/DestinationDetails.php | 78 -- .../AuditManager/V1/EnrollResourceRequest.php | 169 ---- .../EligibleDestination.php | 84 -- .../Cloud/AuditManager/V1/Enrollment.php | 117 --- .../V1/GenerateAuditReportRequest.php | 356 ------- .../AuditReportFormat.php | 54 -- .../V1/GenerateAuditScopeReportRequest.php | 231 ----- .../AuditScopeReportFormat.php | 54 -- .../AuditManager/V1/GetAuditReportRequest.php | 98 -- .../V1/GetResourceEnrollmentStatusRequest.php | 103 -- .../V1/ListAuditReportsRequest.php | 187 ---- .../V1/ListAuditReportsResponse.php | 110 --- .../AuditManager/V1/ListControlsRequest.php | 182 ---- .../AuditManager/V1/ListControlsResponse.php | 110 --- .../ListResourceEnrollmentStatusesRequest.php | 182 ---- ...ListResourceEnrollmentStatusesResponse.php | 110 --- .../AuditManager/V1/OperationMetadata.php | 315 ------ .../Cloud/AuditManager/V1/OperationState.php | 103 -- .../V1/ReportGenerationProgress.php | 299 ------ .../Cloud/AuditManager/V1/ReportSummary.php | 204 ---- .../V1/ResourceEnrollmentStatus.php | 244 ----- .../ResourceEnrollmentState.php | 68 -- .../V1/AuditManagerClient/enroll_resource.php | 82 -- .../generate_audit_report.php | 100 -- .../generate_audit_scope_report.php | 93 -- .../AuditManagerClient/get_audit_report.php | 75 -- .../V1/AuditManagerClient/get_location.php | 57 -- .../get_resource_enrollment_status.php | 80 -- .../AuditManagerClient/list_audit_reports.php | 82 -- .../V1/AuditManagerClient/list_controls.php | 81 -- .../V1/AuditManagerClient/list_locations.php | 77 -- .../list_resource_enrollment_statuses.php | 81 -- .../v1/src/V1/Client/AuditManagerClient.php | 897 ------------------ .../v1/src/V1/gapic_metadata.json | 68 -- .../audit_manager_client_config.json | 94 -- .../audit_manager_descriptor_config.php | 207 ---- .../audit_manager_rest_client_config.php | 298 ------ .../Unit/V1/Client/AuditManagerClientTest.php | 894 ----------------- 48 files changed, 48 insertions(+), 8381 deletions(-) delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/GPBMetadata/Google/Cloud/Auditmanager/V1/Auditmanager.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/AuditReport.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/AuditReport/ReportGenerationState.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/AuditScopeReport.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ComplianceState.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Control.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Control/Family.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ControlDetails.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ControlFamily.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/DestinationDetails.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/EnrollResourceRequest.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/EnrollResourceRequest/EligibleDestination.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Enrollment.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditReportRequest.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditReportRequest/AuditReportFormat.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditScopeReportRequest.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditScopeReportRequest/AuditScopeReportFormat.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GetAuditReportRequest.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GetResourceEnrollmentStatusRequest.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListAuditReportsRequest.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListAuditReportsResponse.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListControlsRequest.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListControlsResponse.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListResourceEnrollmentStatusesRequest.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListResourceEnrollmentStatusesResponse.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/OperationMetadata.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/OperationState.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ReportGenerationProgress.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ReportSummary.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ResourceEnrollmentStatus.php delete mode 100644 owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ResourceEnrollmentStatus/ResourceEnrollmentState.php delete mode 100644 owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/enroll_resource.php delete mode 100644 owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/generate_audit_report.php delete mode 100644 owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/generate_audit_scope_report.php delete mode 100644 owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_audit_report.php delete mode 100644 owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_location.php delete mode 100644 owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_resource_enrollment_status.php delete mode 100644 owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_audit_reports.php delete mode 100644 owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_controls.php delete mode 100644 owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_locations.php delete mode 100644 owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_resource_enrollment_statuses.php delete mode 100644 owl-bot-staging/AuditManager/v1/src/V1/Client/AuditManagerClient.php delete mode 100644 owl-bot-staging/AuditManager/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_client_config.json delete mode 100644 owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_descriptor_config.php delete mode 100644 owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_rest_client_config.php delete mode 100644 owl-bot-staging/AuditManager/v1/tests/Unit/V1/Client/AuditManagerClientTest.php diff --git a/AuditManager/src/V1/GenerateAuditReportRequest.php b/AuditManager/src/V1/GenerateAuditReportRequest.php index 307a710e7cf8..a116ec9f7cf0 100644 --- a/AuditManager/src/V1/GenerateAuditReportRequest.php +++ b/AuditManager/src/V1/GenerateAuditReportRequest.php @@ -48,8 +48,18 @@ class GenerateAuditReportRequest extends \Google\Protobuf\Internal\Message */ protected $compliance_framework = ''; /** - * Optional. If `true`, only validate the request and don't generate the audit - * report. + * Optional. If `true`, only validates the request and does not generate the + * audit report. This executes standard request validation (such as schema, + * framework existence, scope, and IAM checks) and skips the apply phase. + * Use this field for the following purposes: + * * **Infrastructure as Code (IaC)**: Allow tools like Terraform to run + * dry-run mutations (e.g., `terraform plan`) without creating real + * resources or incurring costs. + * * **User Interface Validation**: Enable real-time form and permission + * validation in custom UIs before submitting requests. + * * **CI/CD & Automation**: Test your scripts, permissions, and parameters + * safely without triggering expensive Long-Running Operations (LROs) or + * consuming resource quotas. * * Generated from protobuf field bool validate_only = 8 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -110,8 +120,18 @@ public static function build(string $scope, string $gcsUri, string $complianceSt * Required. The framework that's used for the audit report. For example, * `NIST_800_53`. * @type bool $validate_only - * Optional. If `true`, only validate the request and don't generate the audit - * report. + * Optional. If `true`, only validates the request and does not generate the + * audit report. This executes standard request validation (such as schema, + * framework existence, scope, and IAM checks) and skips the apply phase. + * Use this field for the following purposes: + * * **Infrastructure as Code (IaC)**: Allow tools like Terraform to run + * dry-run mutations (e.g., `terraform plan`) without creating real + * resources or incurring costs. + * * **User Interface Validation**: Enable real-time form and permission + * validation in custom UIs before submitting requests. + * * **CI/CD & Automation**: Test your scripts, permissions, and parameters + * safely without triggering expensive Long-Running Operations (LROs) or + * consuming resource quotas. * } */ public function __construct($data = NULL) { @@ -277,8 +297,18 @@ public function setComplianceFramework($var) } /** - * Optional. If `true`, only validate the request and don't generate the audit - * report. + * Optional. If `true`, only validates the request and does not generate the + * audit report. This executes standard request validation (such as schema, + * framework existence, scope, and IAM checks) and skips the apply phase. + * Use this field for the following purposes: + * * **Infrastructure as Code (IaC)**: Allow tools like Terraform to run + * dry-run mutations (e.g., `terraform plan`) without creating real + * resources or incurring costs. + * * **User Interface Validation**: Enable real-time form and permission + * validation in custom UIs before submitting requests. + * * **CI/CD & Automation**: Test your scripts, permissions, and parameters + * safely without triggering expensive Long-Running Operations (LROs) or + * consuming resource quotas. * * Generated from protobuf field bool validate_only = 8 [(.google.api.field_behavior) = OPTIONAL]; * @return bool @@ -289,8 +319,18 @@ public function getValidateOnly() } /** - * Optional. If `true`, only validate the request and don't generate the audit - * report. + * Optional. If `true`, only validates the request and does not generate the + * audit report. This executes standard request validation (such as schema, + * framework existence, scope, and IAM checks) and skips the apply phase. + * Use this field for the following purposes: + * * **Infrastructure as Code (IaC)**: Allow tools like Terraform to run + * dry-run mutations (e.g., `terraform plan`) without creating real + * resources or incurring costs. + * * **User Interface Validation**: Enable real-time form and permission + * validation in custom UIs before submitting requests. + * * **CI/CD & Automation**: Test your scripts, permissions, and parameters + * safely without triggering expensive Long-Running Operations (LROs) or + * consuming resource quotas. * * Generated from protobuf field bool validate_only = 8 [(.google.api.field_behavior) = OPTIONAL]; * @param bool $var diff --git a/owl-bot-staging/AuditManager/v1/proto/src/GPBMetadata/Google/Cloud/Auditmanager/V1/Auditmanager.php b/owl-bot-staging/AuditManager/v1/proto/src/GPBMetadata/Google/Cloud/Auditmanager/V1/Auditmanager.php deleted file mode 100644 index 4a487ea26fcc..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/GPBMetadata/Google/Cloud/Auditmanager/V1/Auditmanager.php +++ /dev/null @@ -1,30 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xBCT\x0A/google/cloud/auditmanager/v1/auditmanager.proto\x12\x1Cgoogle.cloud.auditmanager.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A#google/longrunning/operations.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xDE\x01\x0A\x15EnrollResourceRequest\x12\x12\x0A\x05scope\x18\x01 \x01(\x09B\x03\xE0A\x02\x12b\x0A\x0Cdestinations\x18\x02 \x03(\x0B2G.google.cloud.auditmanager.v1.EnrollResourceRequest.EligibleDestinationB\x03\xE0A\x02\x1AM\x0A\x13EligibleDestination\x12\x1D\x0A\x13eligible_gcs_bucket\x18\x03 \x01(\x09H\x00B\x17\x0A\x15eligible_destinations\"\xD6\x02\x0A\x1FGenerateAuditScopeReportRequest\x12\x12\x0A\x05scope\x18\x02 \x01(\x09B\x03\xE0A\x02\x12\"\x0A\x13compliance_standard\x18\x03 \x01(\x09B\x05\x18\x01\xE0A\x01\x12p\x0A\x0Dreport_format\x18\x04 \x01(\x0E2T.google.cloud.auditmanager.v1.GenerateAuditScopeReportRequest.AuditScopeReportFormatB\x03\xE0A\x02\x12!\x0A\x14compliance_framework\x18\x05 \x01(\x09B\x03\xE0A\x02\"f\x0A\x16AuditScopeReportFormat\x12)\x0A%AUDIT_SCOPE_REPORT_FORMAT_UNSPECIFIED\x10\x00\x12!\x0A\x1DAUDIT_SCOPE_REPORT_FORMAT_ODF\x10\x01\"\xF4\x02\x0A\x1AGenerateAuditReportRequest\x12\x11\x0A\x07gcs_uri\x18\x02 \x01(\x09H\x00\x12\x12\x0A\x05scope\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\"\x0A\x13compliance_standard\x18\x03 \x01(\x09B\x05\x18\x01\xE0A\x01\x12f\x0A\x0Dreport_format\x18\x04 \x01(\x0E2J.google.cloud.auditmanager.v1.GenerateAuditReportRequest.AuditReportFormatB\x03\xE0A\x02\x12!\x0A\x14compliance_framework\x18\x05 \x01(\x09B\x03\xE0A\x02\x12\x1A\x0A\x0Dvalidate_only\x18\x08 \x01(\x08B\x03\xE0A\x01\"U\x0A\x11AuditReportFormat\x12#\x0A\x1FAUDIT_REPORT_FORMAT_UNSPECIFIED\x10\x00\x12\x1B\x0A\x17AUDIT_REPORT_FORMAT_ODF\x10\x01B\x0D\x0A\x0Bdestination\"p\x0A\"GetResourceEnrollmentStatusRequest\x12J\x0A\x04name\x18\x01 \x01(\x09B<\xE0A\x02\xFAA6\x0A4auditmanager.googleapis.com/ResourceEnrollmentStatus\"\xA3\x01\x0A%ListResourceEnrollmentStatusesRequest\x12I\x0A\x06parent\x18\x01 \x01(\x09B9\xE0A\x02\xFAA3\x0A1auditmanager.googleapis.com/EnrollmentStatusScope\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\"\xA4\x01\x0A&ListResourceEnrollmentStatusesResponse\x12\\\x0A\x1Cresource_enrollment_statuses\x18\x01 \x03(\x0B26.google.cloud.auditmanager.v1.ResourceEnrollmentStatus\x12\x1C\x0A\x0Fnext_page_token\x18\x02 \x01(\x09B\x03\xE0A\x03\"\x8B\x01\x0A\x17ListAuditReportsRequest\x12?\x0A\x06parent\x18\x01 \x01(\x09B/\xE0A\x02\xFAA)\x12'auditmanager.googleapis.com/AuditReport\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\"\x7F\x0A\x18ListAuditReportsResponse\x12E\x0A\x0Daudit_reports\x18\x01 \x03(\x0B2).google.cloud.auditmanager.v1.AuditReportB\x03\xE0A\x03\x12\x1C\x0A\x0Fnext_page_token\x18\x02 \x01(\x09B\x03\xE0A\x03\"V\x0A\x15GetAuditReportRequest\x12=\x0A\x04name\x18\x01 \x01(\x09B/\xE0A\x02\xFAA)\x0A'auditmanager.googleapis.com/AuditReport\"\x84\x01\x0A\x13ListControlsRequest\x12<\x0A\x06parent\x18\x01 \x01(\x09B,\xE0A\x02\xFAA&\x0A\$auditmanager.googleapis.com/Standard\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\"r\x0A\x14ListControlsResponse\x12<\x0A\x08controls\x18\x01 \x03(\x0B2%.google.cloud.auditmanager.v1.ControlB\x03\xE0A\x03\x12\x1C\x0A\x0Fnext_page_token\x18\x02 \x01(\x09B\x03\xE0A\x03\"\xE1\x02\x0A\x18ReportGenerationProgress\x12@\x0A\x05state\x18\x01 \x01(\x0E2,.google.cloud.auditmanager.v1.OperationStateB\x03\xE0A\x03\x12\x1B\x0A\x0Efailure_reason\x18\x02 \x01(\x09B\x03\xE0A\x03\x12#\x0A\x1Bevaluation_percent_complete\x18\x14 \x01(\x01\x12*\x0A\"report_generation_percent_complete\x18\x1E \x01(\x01\x12)\x0A!report_uploading_percent_complete\x18( \x01(\x01\x12#\x0A\x16destination_gcs_bucket\x182 \x01(\x09B\x03\xE0A\x03\x12E\x0A\x0Caudit_report\x183 \x01(\x09B/\xE0A\x03\xFAA)\x0A'auditmanager.googleapis.com/AuditReport\"\x89\x03\x0A\x0AEnrollment\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12R\x0A\x13destination_details\x18\x03 \x03(\x0B20.google.cloud.auditmanager.v1.DestinationDetailsB\x03\xE0A\x03:\x93\x02\xEAA\x8F\x02\x0A&auditmanager.googleapis.com/Enrollment\x12@projects/{project}/locations/{location}/enrollments/{enrollment}\x12>folders/{folder}/locations/{location}/enrollments/{enrollment}\x12Jorganizations/{organization}/locations/{location}/enrollments/{enrollment}*\x0Benrollments2\x0Aenrollment\"\xA8\x03\x0A\x10AuditScopeReport\x12\x1F\x0A\x15scope_report_contents\x18\x01 \x01(\x0CH\x00\x12\x11\x0A\x04name\x18\x02 \x01(\x09B\x03\xE0A\x08:\xCF\x02\xEAA\xCB\x02\x0A,auditmanager.googleapis.com/AuditScopeReport\x12Nprojects/{project}/locations/{location}/auditScopeReports/{audit_scope_report}\x12Lfolders/{folder}/locations/{location}/auditScopeReports/{audit_scope_report}\x12Xorganizations/{organization}/locations/{location}/auditScopeReports/{audit_scope_report}*\x11auditScopeReports2\x10auditScopeReportB\x0E\x0A\x0Caudit_report\"\x80\x02\x0A\x11OperationMetadata\x124\x0A\x0Bcreate_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x121\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\x13\x0A\x06target\x18\x03 \x01(\x09B\x03\xE0A\x03\x12\x11\x0A\x04verb\x18\x04 \x01(\x09B\x03\xE0A\x03\x12\x1B\x0A\x0Estatus_message\x18\x05 \x01(\x09B\x03\xE0A\x03\x12#\x0A\x16requested_cancellation\x18\x06 \x01(\x08B\x03\xE0A\x03\x12\x18\x0A\x0Bapi_version\x18\x07 \x01(\x09B\x03\xE0A\x03\"\xA6\x06\x0A\x18ResourceEnrollmentStatus\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12A\x0A\x0Aenrollment\x18\x02 \x01(\x0B2(.google.cloud.auditmanager.v1.EnrollmentB\x03\xE0A\x03\x12\x17\x0A\x08enrolled\x18\x03 \x01(\x08B\x05\x18\x01\xE0A\x03\x12\x19\x0A\x0Cdisplay_name\x18\x04 \x01(\x09B\x03\xE0A\x03\x12m\x0A\x10enrollment_state\x18\x05 \x01(\x0E2N.google.cloud.auditmanager.v1.ResourceEnrollmentStatus.ResourceEnrollmentStateB\x03\xE0A\x03\"s\x0A\x17ResourceEnrollmentState\x12)\x0A%RESOURCE_ENROLLMENT_STATE_UNSPECIFIED\x10\x00\x12\x10\x0A\x0CNOT_ENROLLED\x10\x01\x12\x0D\x0A\x09INHERITED\x10\x02\x12\x0C\x0A\x08ENROLLED\x10\x03:\x9B\x03\xEAA\x97\x03\x0A4auditmanager.googleapis.com/ResourceEnrollmentStatus\x12]folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}\x12_projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}\x12iorganizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}*\x1AresourceEnrollmentStatuses2\x18resourceEnrollmentStatus\"\xDA\x07\x0A\x0BAuditReport\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12H\x0A\x0Ereport_summary\x18\x02 \x01(\x0B2+.google.cloud.auditmanager.v1.ReportSummaryB\x03\xE0A\x03\x12\x19\x0A\x0Coperation_id\x18\x03 \x01(\x09B\x03\xE0A\x03\x12R\x0A\x13destination_details\x18\x04 \x01(\x0B20.google.cloud.auditmanager.v1.DestinationDetailsB\x03\xE0A\x03\x12\"\x0A\x13compliance_standard\x18\x05 \x01(\x09B\x05\x18\x01\xE0A\x03\x12\x12\x0A\x05scope\x18\x06 \x01(\x09B\x03\xE0A\x03\x124\x0A\x0Bcreate_time\x18\x07 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12J\x0A\x0Fcontrol_details\x18\x08 \x03(\x0B2,.google.cloud.auditmanager.v1.ControlDetailsB\x03\xE0A\x03\x12e\x0A\x17report_generation_state\x18\x09 \x01(\x0E2?.google.cloud.auditmanager.v1.AuditReport.ReportGenerationStateB\x03\xE0A\x03\x12!\x0A\x14compliance_framework\x18\x0A \x01(\x09B\x03\xE0A\x03\x12\x15\x0A\x08scope_id\x18\x0B \x01(\x09B\x03\xE0A\x03\"\x81\x01\x0A\x15ReportGenerationState\x12'\x0A#REPORT_GENERATION_STATE_UNSPECIFIED\x10\x00\x12\x0F\x0A\x0BIN_PROGRESS\x10\x01\x12\x0D\x0A\x09COMPLETED\x10\x02\x12\x0A\x0A\x06FAILED\x10\x03\x12\x13\x0A\x0FSUMMARY_UNKNOWN\x10\x04:\x9F\x02\xEAA\x9B\x02\x0A'auditmanager.googleapis.com/AuditReport\x12Cprojects/{project}/locations/{location}/auditReports/{audit_report}\x12Afolders/{folder}/locations/{location}/auditReports/{audit_report}\x12Morganizations/{organization}/locations/{location}/auditReports/{audit_report}*\x0CauditReports2\x0BauditReport\"8\x0A\x0DControlFamily\x12\x11\x0A\x09family_id\x18\x01 \x01(\x09\x12\x14\x0A\x0Cdisplay_name\x18\x02 \x01(\x09\"\xFB\x04\x0A\x07Control\x12\x0F\x0A\x02id\x18\x01 \x01(\x09B\x03\xE0A\x03\x12\x19\x0A\x0Cdisplay_name\x18\x02 \x01(\x09B\x03\xE0A\x03\x12A\x0A\x06family\x18\x03 \x01(\x0E2,.google.cloud.auditmanager.v1.Control.FamilyB\x03\xE0A\x03\x12H\x0A\x0Econtrol_family\x18\x0A \x01(\x0B2+.google.cloud.auditmanager.v1.ControlFamilyB\x03\xE0A\x03\x12\x18\x0A\x0Bdescription\x18\x04 \x01(\x09B\x03\xE0A\x03\x12 \x0A\x13responsibility_type\x18\x05 \x01(\x09B\x03\xE0A\x03\x12.\x0A!google_responsibility_description\x18\x06 \x01(\x09B\x03\xE0A\x03\x121\x0A\$google_responsibility_implementation\x18\x07 \x01(\x09B\x03\xE0A\x03\x120\x0A#customer_responsibility_description\x18\x08 \x01(\x09B\x03\xE0A\x03\x123\x0A&customer_responsibility_implementation\x18\x09 \x01(\x09B\x03\xE0A\x03\"\xB0\x01\x0A\x06Family\x12\x16\x0A\x12FAMILY_UNSPECIFIED\x10\x00\x12\x06\x0A\x02AC\x10\x01\x12\x06\x0A\x02AT\x10\x02\x12\x06\x0A\x02AU\x10\x03\x12\x06\x0A\x02CA\x10\x04\x12\x06\x0A\x02CM\x10\x05\x12\x06\x0A\x02CP\x10\x06\x12\x06\x0A\x02IA\x10\x07\x12\x06\x0A\x02IR\x10\x08\x12\x06\x0A\x02MA\x10\x09\x12\x06\x0A\x02MP\x10\x0A\x12\x06\x0A\x02PE\x10\x0B\x12\x06\x0A\x02PL\x10\x0C\x12\x06\x0A\x02PS\x10\x0D\x12\x06\x0A\x02RA\x10\x0E\x12\x06\x0A\x02SA\x10\x0F\x12\x06\x0A\x02SC\x10\x10\x12\x06\x0A\x02SI\x10\x11\x12\x06\x0A\x02SR\x10\x12\"=\x0A\x12DestinationDetails\x12\x18\x0A\x0Egcs_bucket_uri\x18\x01 \x01(\x09H\x00B\x0D\x0A\x0Bdestination\"\x8F\x01\x0A\x0DReportSummary\x12\x13\x0A\x0Btotal_count\x18\x01 \x01(\x05\x12\x17\x0A\x0Fcompliant_count\x18\x02 \x01(\x05\x12\x17\x0A\x0Fviolation_count\x18\x03 \x01(\x05\x12\"\x0A\x1Amanual_review_needed_count\x18\x04 \x01(\x05\x12\x13\x0A\x0Berror_count\x18\x05 \x01(\x05\"\xE3\x01\x0A\x0EControlDetails\x126\x0A\x07control\x18\x01 \x01(\x0B2%.google.cloud.auditmanager.v1.Control\x12L\x0A\x10compliance_state\x18\x02 \x01(\x0E2-.google.cloud.auditmanager.v1.ComplianceStateB\x03\xE0A\x03\x12K\x0A\x16control_report_summary\x18\x03 \x01(\x0B2+.google.cloud.auditmanager.v1.ReportSummary*\xFB\x02\x0A\x0EOperationState\x12\x1F\x0A\x1BOPERATION_STATE_UNSPECIFIED\x10\x00\x12\x1F\x0A\x1BOPERATION_STATE_NOT_STARTED\x10\x0A\x12*\x0A&OPERATION_STATE_EVALUATION_IN_PROGRESS\x10\x14\x12#\x0A\x1FOPERATION_STATE_EVALUATION_DONE\x10\x15\x12:\x0A6OPERATION_STATE_EVIDENCE_REPORT_GENERATION_IN_PROGRESS\x10\x1E\x123\x0A/OPERATION_STATE_EVIDENCE_REPORT_GENERATION_DONE\x10\x1F\x12/\x0A+OPERATION_STATE_EVIDENCE_UPLOAD_IN_PROGRESS\x10(\x12\x18\x0A\x14OPERATION_STATE_DONE\x102\x12\x1A\x0A\x16OPERATION_STATE_FAILED\x10<*\x8F\x01\x0A\x0FComplianceState\x12 \x0A\x1CCOMPLIANCE_STATE_UNSPECIFIED\x10\x00\x12\x0D\x0A\x09COMPLIANT\x10\x01\x12\x0D\x0A\x09VIOLATION\x10\x02\x12\x18\x0A\x14MANUAL_REVIEW_NEEDED\x10\x03\x12\x09\x0A\x05ERROR\x10\x04\x12\x17\x0A\x13AUDIT_NOT_SUPPORTED\x10\x052\xBD\x16\x0A\x0CAuditManager\x12\xB8\x02\x0A\x0EEnrollResource\x123.google.cloud.auditmanager.v1.EnrollResourceRequest\x1A(.google.cloud.auditmanager.v1.Enrollment\"\xC6\x01\xDAA\x12scope,destinations\x82\xD3\xE4\x93\x02\xAA\x01\"0/v1/{scope=folders/*/locations/*}:enrollResource:\x01*Z6\"1/v1/{scope=projects/*/locations/*}:enrollResource:\x01*Z;\"6/v1/{scope=organizations/*/locations/*}:enrollResource:\x01*\x12\x8B\x03\x0A\x18GenerateAuditScopeReport\x12=.google.cloud.auditmanager.v1.GenerateAuditScopeReportRequest\x1A..google.cloud.auditmanager.v1.AuditScopeReport\"\xFF\x01\xDAA'scope,compliance_standard,report_format\x82\xD3\xE4\x93\x02\xCE\x01\"/v1/{name=projects/*/locations/*/resourceEnrollmentStatuses/*}Z?\x12=/v1/{name=folders/*/locations/*/resourceEnrollmentStatuses/*}ZE\x12C/v1/{name=organizations/*/locations/*/resourceEnrollmentStatuses/*}\x12\xC4\x02\x0A\x1EListResourceEnrollmentStatuses\x12C.google.cloud.auditmanager.v1.ListResourceEnrollmentStatusesRequest\x1AD.google.cloud.auditmanager.v1.ListResourceEnrollmentStatusesResponse\"\x96\x01\xDAA\x06parent\x82\xD3\xE4\x93\x02\x86\x01\x12C/v1/{parent=organizations/*/locations/*}/resourceEnrollmentStatusesZ?\x12=/v1/{parent=folders/*/locations/*}/resourceEnrollmentStatuses\x12\xBE\x02\x0A\x0CListControls\x121.google.cloud.auditmanager.v1.ListControlsRequest\x1A2.google.cloud.auditmanager.v1.ListControlsResponse\"\xC6\x01\xDAA\x06parent\x82\xD3\xE4\x93\x02\xB6\x01\x12=/v1/{parent=organizations/*/locations/*/standards/*}/controlsZ9\x127/v1/{parent=folders/*/locations/*/standards/*}/controlsZ:\x128/v1/{parent=projects/*/locations/*/standards/*}/controls\x1A\x82\x01\xCAA\x1Bauditmanager.googleapis.com\xD2Aahttps://www.googleapis.com/auth/cloud-auditmanager,https://www.googleapis.com/auth/cloud-platformB\x92\x06\x0A com.google.cloud.auditmanager.v1B\x0BV1mainProtoP\x01ZDcloud.google.com/go/auditmanager/apiv1/auditmanagerpb;auditmanagerpb\xAA\x02\x1CGoogle.Cloud.AuditManager.V1\xCA\x02\x1CGoogle\\Cloud\\AuditManager\\V1\xEA\x02\x1FGoogle::Cloud::AuditManager::V1\xEAAS\x0A*auditmanager.googleapis.com/FolderLocation\x12%folders/{folder}/locations/{location}\xEAAe\x0A0auditmanager.googleapis.com/OrganizationLocation\x121organizations/{organization}/locations/{location}\xEAA\xE8\x01\x0A\$auditmanager.googleapis.com/Standard\x12google.cloud.auditmanager.v1.AuditReport - */ -class AuditReport extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. Name of the audit report, in one of the following formats: - * * `projects/{project}/locations/{location}/auditReports/{audit_report}` - * * `folders/{folder}/locations/{location}/auditReports/{audit_report}` - * * `organizations/{organization}/locations/{location}/auditReports/{audit_report}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Output only. Report summary that includes information about compliance and - * violation counts. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.ReportSummary report_summary = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $report_summary = null; - /** - * Output only. Client operation ID for the audit report. - * - * Generated from protobuf field string operation_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $operation_id = ''; - /** - * Output only. Cloud Storage bucket where the audit report is uploaded to. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.DestinationDetails destination_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $destination_details = null; - /** - * Output only. Deprecated. Compliance standard to be audited against. - * Use the `compliance_framework` field instead. - * - * Generated from protobuf field string compliance_standard = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @deprecated - */ - protected $compliance_standard = ''; - /** - * Output only. Organization, folder, or project that the report is generated - * for, in one of the following formats: - * * `projects/{project}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `organizations/{organization}/locations/{location}` - * - * Generated from protobuf field string scope = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $scope = ''; - /** - * Output only. Creation time of the audit report. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Overall status of the controls. - * - * Generated from protobuf field repeated .google.cloud.auditmanager.v1.ControlDetails control_details = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $control_details; - /** - * Output only. State of audit report generation. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.AuditReport.ReportGenerationState report_generation_state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $report_generation_state = 0; - /** - * Output only. Compliance framework to use for the audit report. For example, - * `CIS_GCP_FOUNDATIONS_V1_2_0`. - * - * Generated from protobuf field string compliance_framework = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $compliance_framework = ''; - /** - * Output only. Project number, folder ID, or organization ID that the audit - * report was generated for. - * - * Generated from protobuf field string scope_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $scope_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. Name of the audit report, in one of the following formats: - * * `projects/{project}/locations/{location}/auditReports/{audit_report}` - * * `folders/{folder}/locations/{location}/auditReports/{audit_report}` - * * `organizations/{organization}/locations/{location}/auditReports/{audit_report}` - * @type \Google\Cloud\AuditManager\V1\ReportSummary $report_summary - * Output only. Report summary that includes information about compliance and - * violation counts. - * @type string $operation_id - * Output only. Client operation ID for the audit report. - * @type \Google\Cloud\AuditManager\V1\DestinationDetails $destination_details - * Output only. Cloud Storage bucket where the audit report is uploaded to. - * @type string $compliance_standard - * Output only. Deprecated. Compliance standard to be audited against. - * Use the `compliance_framework` field instead. - * @type string $scope - * Output only. Organization, folder, or project that the report is generated - * for, in one of the following formats: - * * `projects/{project}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `organizations/{organization}/locations/{location}` - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Creation time of the audit report. - * @type \Google\Cloud\AuditManager\V1\ControlDetails[] $control_details - * Output only. Overall status of the controls. - * @type int $report_generation_state - * Output only. State of audit report generation. - * @type string $compliance_framework - * Output only. Compliance framework to use for the audit report. For example, - * `CIS_GCP_FOUNDATIONS_V1_2_0`. - * @type string $scope_id - * Output only. Project number, folder ID, or organization ID that the audit - * report was generated for. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. Name of the audit report, in one of the following formats: - * * `projects/{project}/locations/{location}/auditReports/{audit_report}` - * * `folders/{folder}/locations/{location}/auditReports/{audit_report}` - * * `organizations/{organization}/locations/{location}/auditReports/{audit_report}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. Name of the audit report, in one of the following formats: - * * `projects/{project}/locations/{location}/auditReports/{audit_report}` - * * `folders/{folder}/locations/{location}/auditReports/{audit_report}` - * * `organizations/{organization}/locations/{location}/auditReports/{audit_report}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. Report summary that includes information about compliance and - * violation counts. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.ReportSummary report_summary = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\AuditManager\V1\ReportSummary|null - */ - public function getReportSummary() - { - return $this->report_summary; - } - - public function hasReportSummary() - { - return isset($this->report_summary); - } - - public function clearReportSummary() - { - unset($this->report_summary); - } - - /** - * Output only. Report summary that includes information about compliance and - * violation counts. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.ReportSummary report_summary = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\AuditManager\V1\ReportSummary $var - * @return $this - */ - public function setReportSummary($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\AuditManager\V1\ReportSummary::class); - $this->report_summary = $var; - - return $this; - } - - /** - * Output only. Client operation ID for the audit report. - * - * Generated from protobuf field string operation_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getOperationId() - { - return $this->operation_id; - } - - /** - * Output only. Client operation ID for the audit report. - * - * Generated from protobuf field string operation_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setOperationId($var) - { - GPBUtil::checkString($var, True); - $this->operation_id = $var; - - return $this; - } - - /** - * Output only. Cloud Storage bucket where the audit report is uploaded to. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.DestinationDetails destination_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\AuditManager\V1\DestinationDetails|null - */ - public function getDestinationDetails() - { - return $this->destination_details; - } - - public function hasDestinationDetails() - { - return isset($this->destination_details); - } - - public function clearDestinationDetails() - { - unset($this->destination_details); - } - - /** - * Output only. Cloud Storage bucket where the audit report is uploaded to. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.DestinationDetails destination_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\AuditManager\V1\DestinationDetails $var - * @return $this - */ - public function setDestinationDetails($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\AuditManager\V1\DestinationDetails::class); - $this->destination_details = $var; - - return $this; - } - - /** - * Output only. Deprecated. Compliance standard to be audited against. - * Use the `compliance_framework` field instead. - * - * Generated from protobuf field string compliance_standard = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - * @deprecated - */ - public function getComplianceStandard() - { - if ($this->compliance_standard !== '') { - @trigger_error('compliance_standard is deprecated.', E_USER_DEPRECATED); - } - return $this->compliance_standard; - } - - /** - * Output only. Deprecated. Compliance standard to be audited against. - * Use the `compliance_framework` field instead. - * - * Generated from protobuf field string compliance_standard = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - * @deprecated - */ - public function setComplianceStandard($var) - { - @trigger_error('compliance_standard is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, True); - $this->compliance_standard = $var; - - return $this; - } - - /** - * Output only. Organization, folder, or project that the report is generated - * for, in one of the following formats: - * * `projects/{project}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `organizations/{organization}/locations/{location}` - * - * Generated from protobuf field string scope = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getScope() - { - return $this->scope; - } - - /** - * Output only. Organization, folder, or project that the report is generated - * for, in one of the following formats: - * * `projects/{project}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `organizations/{organization}/locations/{location}` - * - * Generated from protobuf field string scope = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setScope($var) - { - GPBUtil::checkString($var, True); - $this->scope = $var; - - return $this; - } - - /** - * Output only. Creation time of the audit report. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. Creation time of the audit report. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. Overall status of the controls. - * - * Generated from protobuf field repeated .google.cloud.auditmanager.v1.ControlDetails control_details = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return RepeatedField<\Google\Cloud\AuditManager\V1\ControlDetails> - */ - public function getControlDetails() - { - return $this->control_details; - } - - /** - * Output only. Overall status of the controls. - * - * Generated from protobuf field repeated .google.cloud.auditmanager.v1.ControlDetails control_details = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\AuditManager\V1\ControlDetails[] $var - * @return $this - */ - public function setControlDetails($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AuditManager\V1\ControlDetails::class); - $this->control_details = $arr; - - return $this; - } - - /** - * Output only. State of audit report generation. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.AuditReport.ReportGenerationState report_generation_state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getReportGenerationState() - { - return $this->report_generation_state; - } - - /** - * Output only. State of audit report generation. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.AuditReport.ReportGenerationState report_generation_state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setReportGenerationState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\AuditManager\V1\AuditReport\ReportGenerationState::class); - $this->report_generation_state = $var; - - return $this; - } - - /** - * Output only. Compliance framework to use for the audit report. For example, - * `CIS_GCP_FOUNDATIONS_V1_2_0`. - * - * Generated from protobuf field string compliance_framework = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getComplianceFramework() - { - return $this->compliance_framework; - } - - /** - * Output only. Compliance framework to use for the audit report. For example, - * `CIS_GCP_FOUNDATIONS_V1_2_0`. - * - * Generated from protobuf field string compliance_framework = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setComplianceFramework($var) - { - GPBUtil::checkString($var, True); - $this->compliance_framework = $var; - - return $this; - } - - /** - * Output only. Project number, folder ID, or organization ID that the audit - * report was generated for. - * - * Generated from protobuf field string scope_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getScopeId() - { - return $this->scope_id; - } - - /** - * Output only. Project number, folder ID, or organization ID that the audit - * report was generated for. - * - * Generated from protobuf field string scope_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setScopeId($var) - { - GPBUtil::checkString($var, True); - $this->scope_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/AuditReport/ReportGenerationState.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/AuditReport/ReportGenerationState.php deleted file mode 100644 index d34ee55388fe..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/AuditReport/ReportGenerationState.php +++ /dev/null @@ -1,79 +0,0 @@ -google.cloud.auditmanager.v1.AuditReport.ReportGenerationState - */ -class ReportGenerationState -{ - /** - * Default value. This value is unused. - * - * Generated from protobuf enum REPORT_GENERATION_STATE_UNSPECIFIED = 0; - */ - const REPORT_GENERATION_STATE_UNSPECIFIED = 0; - /** - * The process is in progress. The operation can have any state - * except for `OPERATION_STATE_DONE` or `OPERATION_STATE_FAILED`. - * - * Generated from protobuf enum IN_PROGRESS = 1; - */ - const IN_PROGRESS = 1; - /** - * The process is completed. The operation state is - * `OPERATION_STATE_DONE`. - * - * Generated from protobuf enum COMPLETED = 2; - */ - const COMPLETED = 2; - /** - * The process has failed. The operation state is - * `OPERATION_STATE_FAILED`. - * - * Generated from protobuf enum FAILED = 3; - */ - const FAILED = 3; - /** - * The process completed, but the report summary's status is unknown. This - * state isn't used for new reports. - * - * Generated from protobuf enum SUMMARY_UNKNOWN = 4; - */ - const SUMMARY_UNKNOWN = 4; - - private static $valueToName = [ - self::REPORT_GENERATION_STATE_UNSPECIFIED => 'REPORT_GENERATION_STATE_UNSPECIFIED', - self::IN_PROGRESS => 'IN_PROGRESS', - self::COMPLETED => 'COMPLETED', - self::FAILED => 'FAILED', - self::SUMMARY_UNKNOWN => 'SUMMARY_UNKNOWN', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/AuditScopeReport.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/AuditScopeReport.php deleted file mode 100644 index 89cb8c089869..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/AuditScopeReport.php +++ /dev/null @@ -1,125 +0,0 @@ -google.cloud.auditmanager.v1.AuditScopeReport - */ -class AuditScopeReport extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. Name for the audit scope report, in one of the following - * formats: - * * `projects/{project}/locations/{location}/auditScopeReports/{audit_scope_report}` - * * `folders/{folder}/locations/{location}/auditScopeReports/{audit_scope_report}` - * * `organizations/{organization}/locations/{location}/auditScopeReports/{audit_scope_report}` - * - * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - protected $audit_report; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $scope_report_contents - * Audit scope report content in byte format. - * @type string $name - * Identifier. Name for the audit scope report, in one of the following - * formats: - * * `projects/{project}/locations/{location}/auditScopeReports/{audit_scope_report}` - * * `folders/{folder}/locations/{location}/auditScopeReports/{audit_scope_report}` - * * `organizations/{organization}/locations/{location}/auditScopeReports/{audit_scope_report}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * Audit scope report content in byte format. - * - * Generated from protobuf field bytes scope_report_contents = 1; - * @return string - */ - public function getScopeReportContents() - { - return $this->readOneof(1); - } - - public function hasScopeReportContents() - { - return $this->hasOneof(1); - } - - /** - * Audit scope report content in byte format. - * - * Generated from protobuf field bytes scope_report_contents = 1; - * @param string $var - * @return $this - */ - public function setScopeReportContents($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Identifier. Name for the audit scope report, in one of the following - * formats: - * * `projects/{project}/locations/{location}/auditScopeReports/{audit_scope_report}` - * * `folders/{folder}/locations/{location}/auditScopeReports/{audit_scope_report}` - * * `organizations/{organization}/locations/{location}/auditScopeReports/{audit_scope_report}` - * - * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. Name for the audit scope report, in one of the following - * formats: - * * `projects/{project}/locations/{location}/auditScopeReports/{audit_scope_report}` - * * `folders/{folder}/locations/{location}/auditScopeReports/{audit_scope_report}` - * * `organizations/{organization}/locations/{location}/auditScopeReports/{audit_scope_report}` - * - * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * @return string - */ - public function getAuditReport() - { - return $this->whichOneof("audit_report"); - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ComplianceState.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ComplianceState.php deleted file mode 100644 index c67934babd70..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ComplianceState.php +++ /dev/null @@ -1,83 +0,0 @@ -google.cloud.auditmanager.v1.ComplianceState - */ -class ComplianceState -{ - /** - * Default value. This value is unused. - * - * Generated from protobuf enum COMPLIANCE_STATE_UNSPECIFIED = 0; - */ - const COMPLIANCE_STATE_UNSPECIFIED = 0; - /** - * The resource is compliant. - * - * Generated from protobuf enum COMPLIANT = 1; - */ - const COMPLIANT = 1; - /** - * The resource isn't compliant. - * - * Generated from protobuf enum VIOLATION = 2; - */ - const VIOLATION = 2; - /** - * You must complete a manual review. - * - * Generated from protobuf enum MANUAL_REVIEW_NEEDED = 3; - */ - const MANUAL_REVIEW_NEEDED = 3; - /** - * An error was encountered during the evaluation or evidence gathering - * process. - * - * Generated from protobuf enum ERROR = 4; - */ - const ERROR = 4; - /** - * The resource can't be audited. - * - * Generated from protobuf enum AUDIT_NOT_SUPPORTED = 5; - */ - const AUDIT_NOT_SUPPORTED = 5; - - private static $valueToName = [ - self::COMPLIANCE_STATE_UNSPECIFIED => 'COMPLIANCE_STATE_UNSPECIFIED', - self::COMPLIANT => 'COMPLIANT', - self::VIOLATION => 'VIOLATION', - self::MANUAL_REVIEW_NEEDED => 'MANUAL_REVIEW_NEEDED', - self::ERROR => 'ERROR', - self::AUDIT_NOT_SUPPORTED => 'AUDIT_NOT_SUPPORTED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Control.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Control.php deleted file mode 100644 index f41280aa8cc4..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Control.php +++ /dev/null @@ -1,399 +0,0 @@ -google.cloud.auditmanager.v1.Control - */ -class Control extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Control identifier that's used to fetch the findings. The - * identifier is the same as the control report name. - * - * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $id = ''; - /** - * Output only. Display name of the control. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $display_name = ''; - /** - * Output only. Category that the control belongs to. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.Control.Family family = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $family = 0; - /** - * Output only. Regulatory family of the control. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.ControlFamily control_family = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $control_family = null; - /** - * Output only. Description of the control. - * - * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $description = ''; - /** - * Output only. Who is responsible for implementing this control. Set to one - * of the following values: `GOOGLE`, `CUSTOMER`, or `SHARED`. - * - * Generated from protobuf field string responsibility_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $responsibility_type = ''; - /** - * Output only. A description of Google's responsibility for this control. - * - * Generated from protobuf field string google_responsibility_description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $google_responsibility_description = ''; - /** - * Output only. A description of how Google implements its responsibility for - * this control. - * - * Generated from protobuf field string google_responsibility_implementation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $google_responsibility_implementation = ''; - /** - * Output only. A description of your responsibility for this control. - * - * Generated from protobuf field string customer_responsibility_description = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $customer_responsibility_description = ''; - /** - * Output only. A description of how you can implement your responsibility for - * this control. - * - * Generated from protobuf field string customer_responsibility_implementation = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $customer_responsibility_implementation = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $id - * Output only. Control identifier that's used to fetch the findings. The - * identifier is the same as the control report name. - * @type string $display_name - * Output only. Display name of the control. - * @type int $family - * Output only. Category that the control belongs to. - * @type \Google\Cloud\AuditManager\V1\ControlFamily $control_family - * Output only. Regulatory family of the control. - * @type string $description - * Output only. Description of the control. - * @type string $responsibility_type - * Output only. Who is responsible for implementing this control. Set to one - * of the following values: `GOOGLE`, `CUSTOMER`, or `SHARED`. - * @type string $google_responsibility_description - * Output only. A description of Google's responsibility for this control. - * @type string $google_responsibility_implementation - * Output only. A description of how Google implements its responsibility for - * this control. - * @type string $customer_responsibility_description - * Output only. A description of your responsibility for this control. - * @type string $customer_responsibility_implementation - * Output only. A description of how you can implement your responsibility for - * this control. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Control identifier that's used to fetch the findings. The - * identifier is the same as the control report name. - * - * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Output only. Control identifier that's used to fetch the findings. The - * identifier is the same as the control report name. - * - * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * Output only. Display name of the control. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Output only. Display name of the control. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Output only. Category that the control belongs to. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.Control.Family family = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getFamily() - { - return $this->family; - } - - /** - * Output only. Category that the control belongs to. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.Control.Family family = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setFamily($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\AuditManager\V1\Control\Family::class); - $this->family = $var; - - return $this; - } - - /** - * Output only. Regulatory family of the control. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.ControlFamily control_family = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\AuditManager\V1\ControlFamily|null - */ - public function getControlFamily() - { - return $this->control_family; - } - - public function hasControlFamily() - { - return isset($this->control_family); - } - - public function clearControlFamily() - { - unset($this->control_family); - } - - /** - * Output only. Regulatory family of the control. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.ControlFamily control_family = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\AuditManager\V1\ControlFamily $var - * @return $this - */ - public function setControlFamily($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\AuditManager\V1\ControlFamily::class); - $this->control_family = $var; - - return $this; - } - - /** - * Output only. Description of the control. - * - * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Output only. Description of the control. - * - * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. Who is responsible for implementing this control. Set to one - * of the following values: `GOOGLE`, `CUSTOMER`, or `SHARED`. - * - * Generated from protobuf field string responsibility_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getResponsibilityType() - { - return $this->responsibility_type; - } - - /** - * Output only. Who is responsible for implementing this control. Set to one - * of the following values: `GOOGLE`, `CUSTOMER`, or `SHARED`. - * - * Generated from protobuf field string responsibility_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setResponsibilityType($var) - { - GPBUtil::checkString($var, True); - $this->responsibility_type = $var; - - return $this; - } - - /** - * Output only. A description of Google's responsibility for this control. - * - * Generated from protobuf field string google_responsibility_description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getGoogleResponsibilityDescription() - { - return $this->google_responsibility_description; - } - - /** - * Output only. A description of Google's responsibility for this control. - * - * Generated from protobuf field string google_responsibility_description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setGoogleResponsibilityDescription($var) - { - GPBUtil::checkString($var, True); - $this->google_responsibility_description = $var; - - return $this; - } - - /** - * Output only. A description of how Google implements its responsibility for - * this control. - * - * Generated from protobuf field string google_responsibility_implementation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getGoogleResponsibilityImplementation() - { - return $this->google_responsibility_implementation; - } - - /** - * Output only. A description of how Google implements its responsibility for - * this control. - * - * Generated from protobuf field string google_responsibility_implementation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setGoogleResponsibilityImplementation($var) - { - GPBUtil::checkString($var, True); - $this->google_responsibility_implementation = $var; - - return $this; - } - - /** - * Output only. A description of your responsibility for this control. - * - * Generated from protobuf field string customer_responsibility_description = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getCustomerResponsibilityDescription() - { - return $this->customer_responsibility_description; - } - - /** - * Output only. A description of your responsibility for this control. - * - * Generated from protobuf field string customer_responsibility_description = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setCustomerResponsibilityDescription($var) - { - GPBUtil::checkString($var, True); - $this->customer_responsibility_description = $var; - - return $this; - } - - /** - * Output only. A description of how you can implement your responsibility for - * this control. - * - * Generated from protobuf field string customer_responsibility_implementation = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getCustomerResponsibilityImplementation() - { - return $this->customer_responsibility_implementation; - } - - /** - * Output only. A description of how you can implement your responsibility for - * this control. - * - * Generated from protobuf field string customer_responsibility_implementation = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setCustomerResponsibilityImplementation($var) - { - GPBUtil::checkString($var, True); - $this->customer_responsibility_implementation = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Control/Family.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Control/Family.php deleted file mode 100644 index 7265a8c17a7d..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Control/Family.php +++ /dev/null @@ -1,173 +0,0 @@ -google.cloud.auditmanager.v1.Control.Family - */ -class Family -{ - /** - * Default value. This value is unused. - * - * Generated from protobuf enum FAMILY_UNSPECIFIED = 0; - */ - const FAMILY_UNSPECIFIED = 0; - /** - * Access control. - * - * Generated from protobuf enum AC = 1; - */ - const AC = 1; - /** - * Awareness and training. - * - * Generated from protobuf enum AT = 2; - */ - const AT = 2; - /** - * Audit and accountability. - * - * Generated from protobuf enum AU = 3; - */ - const AU = 3; - /** - * Certification, accreditation and security assessments. - * - * Generated from protobuf enum CA = 4; - */ - const CA = 4; - /** - * Configuration management and change control. - * - * Generated from protobuf enum CM = 5; - */ - const CM = 5; - /** - * Contingency planning and disaster recovery. - * - * Generated from protobuf enum CP = 6; - */ - const CP = 6; - /** - * Identification and authentication. - * - * Generated from protobuf enum IA = 7; - */ - const IA = 7; - /** - * Incident response. - * - * Generated from protobuf enum IR = 8; - */ - const IR = 8; - /** - * Maintenance. - * - * Generated from protobuf enum MA = 9; - */ - const MA = 9; - /** - * Media protection. - * - * Generated from protobuf enum MP = 10; - */ - const MP = 10; - /** - * Physical and environmental protection. - * - * Generated from protobuf enum PE = 11; - */ - const PE = 11; - /** - * Security planning. - * - * Generated from protobuf enum PL = 12; - */ - const PL = 12; - /** - * Personnel security. - * - * Generated from protobuf enum PS = 13; - */ - const PS = 13; - /** - * Risk assessment. - * - * Generated from protobuf enum RA = 14; - */ - const RA = 14; - /** - * System services and acquisition. - * - * Generated from protobuf enum SA = 15; - */ - const SA = 15; - /** - * System and communications protection. - * - * Generated from protobuf enum SC = 16; - */ - const SC = 16; - /** - * System and information integrity. - * - * Generated from protobuf enum SI = 17; - */ - const SI = 17; - /** - * Supply chain risk management. - * - * Generated from protobuf enum SR = 18; - */ - const SR = 18; - - private static $valueToName = [ - self::FAMILY_UNSPECIFIED => 'FAMILY_UNSPECIFIED', - self::AC => 'AC', - self::AT => 'AT', - self::AU => 'AU', - self::CA => 'CA', - self::CM => 'CM', - self::CP => 'CP', - self::IA => 'IA', - self::IR => 'IR', - self::MA => 'MA', - self::MP => 'MP', - self::PE => 'PE', - self::PL => 'PL', - self::PS => 'PS', - self::RA => 'RA', - self::SA => 'SA', - self::SC => 'SC', - self::SI => 'SI', - self::SR => 'SR', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ControlDetails.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ControlDetails.php deleted file mode 100644 index 11cf4310cd15..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ControlDetails.php +++ /dev/null @@ -1,159 +0,0 @@ -google.cloud.auditmanager.v1.ControlDetails - */ -class ControlDetails extends \Google\Protobuf\Internal\Message -{ - /** - * Control that the findings are being reported for. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.Control control = 1; - */ - protected $control = null; - /** - * Output only. Overall status of the findings for the control. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.ComplianceState compliance_state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $compliance_state = 0; - /** - * A control report summary that provides a high-level overview of the - * compliance controls and the assessment status. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.ReportSummary control_report_summary = 3; - */ - protected $control_report_summary = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\AuditManager\V1\Control $control - * Control that the findings are being reported for. - * @type int $compliance_state - * Output only. Overall status of the findings for the control. - * @type \Google\Cloud\AuditManager\V1\ReportSummary $control_report_summary - * A control report summary that provides a high-level overview of the - * compliance controls and the assessment status. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * Control that the findings are being reported for. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.Control control = 1; - * @return \Google\Cloud\AuditManager\V1\Control|null - */ - public function getControl() - { - return $this->control; - } - - public function hasControl() - { - return isset($this->control); - } - - public function clearControl() - { - unset($this->control); - } - - /** - * Control that the findings are being reported for. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.Control control = 1; - * @param \Google\Cloud\AuditManager\V1\Control $var - * @return $this - */ - public function setControl($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\AuditManager\V1\Control::class); - $this->control = $var; - - return $this; - } - - /** - * Output only. Overall status of the findings for the control. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.ComplianceState compliance_state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getComplianceState() - { - return $this->compliance_state; - } - - /** - * Output only. Overall status of the findings for the control. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.ComplianceState compliance_state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setComplianceState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\AuditManager\V1\ComplianceState::class); - $this->compliance_state = $var; - - return $this; - } - - /** - * A control report summary that provides a high-level overview of the - * compliance controls and the assessment status. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.ReportSummary control_report_summary = 3; - * @return \Google\Cloud\AuditManager\V1\ReportSummary|null - */ - public function getControlReportSummary() - { - return $this->control_report_summary; - } - - public function hasControlReportSummary() - { - return isset($this->control_report_summary); - } - - public function clearControlReportSummary() - { - unset($this->control_report_summary); - } - - /** - * A control report summary that provides a high-level overview of the - * compliance controls and the assessment status. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.ReportSummary control_report_summary = 3; - * @param \Google\Cloud\AuditManager\V1\ReportSummary $var - * @return $this - */ - public function setControlReportSummary($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\AuditManager\V1\ReportSummary::class); - $this->control_report_summary = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ControlFamily.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ControlFamily.php deleted file mode 100644 index 9a13b09e19e5..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ControlFamily.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.auditmanager.v1.ControlFamily - */ -class ControlFamily extends \Google\Protobuf\Internal\Message -{ - /** - * ID of the regulatory control family. To find the list of supported - * control families, use the - * [ListControls][google.cloud.auditmanager.v1.AuditManager.ListControls] - * method and review the `control_family` field in the response. - * - * Generated from protobuf field string family_id = 1; - */ - protected $family_id = ''; - /** - * Display name of the regulatory control family. - * - * Generated from protobuf field string display_name = 2; - */ - protected $display_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $family_id - * ID of the regulatory control family. To find the list of supported - * control families, use the - * [ListControls][google.cloud.auditmanager.v1.AuditManager.ListControls] - * method and review the `control_family` field in the response. - * @type string $display_name - * Display name of the regulatory control family. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * ID of the regulatory control family. To find the list of supported - * control families, use the - * [ListControls][google.cloud.auditmanager.v1.AuditManager.ListControls] - * method and review the `control_family` field in the response. - * - * Generated from protobuf field string family_id = 1; - * @return string - */ - public function getFamilyId() - { - return $this->family_id; - } - - /** - * ID of the regulatory control family. To find the list of supported - * control families, use the - * [ListControls][google.cloud.auditmanager.v1.AuditManager.ListControls] - * method and review the `control_family` field in the response. - * - * Generated from protobuf field string family_id = 1; - * @param string $var - * @return $this - */ - public function setFamilyId($var) - { - GPBUtil::checkString($var, True); - $this->family_id = $var; - - return $this; - } - - /** - * Display name of the regulatory control family. - * - * Generated from protobuf field string display_name = 2; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Display name of the regulatory control family. - * - * Generated from protobuf field string display_name = 2; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/DestinationDetails.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/DestinationDetails.php deleted file mode 100644 index 3e1a1308d6c3..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/DestinationDetails.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.auditmanager.v1.DestinationDetails - */ -class DestinationDetails extends \Google\Protobuf\Internal\Message -{ - protected $destination; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $gcs_bucket_uri - * URI for the Cloud Storage bucket, in the format - * `gs://{bucket_name}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * URI for the Cloud Storage bucket, in the format - * `gs://{bucket_name}`. - * - * Generated from protobuf field string gcs_bucket_uri = 1; - * @return string - */ - public function getGcsBucketUri() - { - return $this->readOneof(1); - } - - public function hasGcsBucketUri() - { - return $this->hasOneof(1); - } - - /** - * URI for the Cloud Storage bucket, in the format - * `gs://{bucket_name}`. - * - * Generated from protobuf field string gcs_bucket_uri = 1; - * @param string $var - * @return $this - */ - public function setGcsBucketUri($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * @return string - */ - public function getDestination() - { - return $this->whichOneof("destination"); - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/EnrollResourceRequest.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/EnrollResourceRequest.php deleted file mode 100644 index 65e8f85ebcc4..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/EnrollResourceRequest.php +++ /dev/null @@ -1,169 +0,0 @@ -google.cloud.auditmanager.v1.EnrollResourceRequest - */ -class EnrollResourceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Organization, folder, or project to enroll in Audit Manager, in - * one of the following formats: - * * `projects/{project}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `organizations/{organization}/locations/{location}` - * - * Generated from protobuf field string scope = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $scope = ''; - /** - * Required. Cloud Storage buckets that you can upload your audit reports to - * during the audit process. - * When you enroll an organization or folder, you can choose a Cloud Storage - * bucket from any project in the organization or folder. If you run an audit - * at the project level using the service agent at the organization or folder - * level, all the buckets that are associated with the service agent are - * available. - * - * Generated from protobuf field repeated .google.cloud.auditmanager.v1.EnrollResourceRequest.EligibleDestination destinations = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $destinations; - - /** - * @param string $scope Required. Organization, folder, or project to enroll in Audit Manager, in - * one of the following formats: - * - * * `projects/{project}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `organizations/{organization}/locations/{location}` - * @param \Google\Cloud\AuditManager\V1\EnrollResourceRequest\EligibleDestination[] $destinations Required. Cloud Storage buckets that you can upload your audit reports to - * during the audit process. - * - * When you enroll an organization or folder, you can choose a Cloud Storage - * bucket from any project in the organization or folder. If you run an audit - * at the project level using the service agent at the organization or folder - * level, all the buckets that are associated with the service agent are - * available. - * - * @return \Google\Cloud\AuditManager\V1\EnrollResourceRequest - * - * @experimental - */ - public static function build(string $scope, array $destinations): self - { - return (new self()) - ->setScope($scope) - ->setDestinations($destinations); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $scope - * Required. Organization, folder, or project to enroll in Audit Manager, in - * one of the following formats: - * * `projects/{project}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `organizations/{organization}/locations/{location}` - * @type \Google\Cloud\AuditManager\V1\EnrollResourceRequest\EligibleDestination[] $destinations - * Required. Cloud Storage buckets that you can upload your audit reports to - * during the audit process. - * When you enroll an organization or folder, you can choose a Cloud Storage - * bucket from any project in the organization or folder. If you run an audit - * at the project level using the service agent at the organization or folder - * level, all the buckets that are associated with the service agent are - * available. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * Required. Organization, folder, or project to enroll in Audit Manager, in - * one of the following formats: - * * `projects/{project}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `organizations/{organization}/locations/{location}` - * - * Generated from protobuf field string scope = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getScope() - { - return $this->scope; - } - - /** - * Required. Organization, folder, or project to enroll in Audit Manager, in - * one of the following formats: - * * `projects/{project}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `organizations/{organization}/locations/{location}` - * - * Generated from protobuf field string scope = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setScope($var) - { - GPBUtil::checkString($var, True); - $this->scope = $var; - - return $this; - } - - /** - * Required. Cloud Storage buckets that you can upload your audit reports to - * during the audit process. - * When you enroll an organization or folder, you can choose a Cloud Storage - * bucket from any project in the organization or folder. If you run an audit - * at the project level using the service agent at the organization or folder - * level, all the buckets that are associated with the service agent are - * available. - * - * Generated from protobuf field repeated .google.cloud.auditmanager.v1.EnrollResourceRequest.EligibleDestination destinations = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return RepeatedField<\Google\Cloud\AuditManager\V1\EnrollResourceRequest\EligibleDestination> - */ - public function getDestinations() - { - return $this->destinations; - } - - /** - * Required. Cloud Storage buckets that you can upload your audit reports to - * during the audit process. - * When you enroll an organization or folder, you can choose a Cloud Storage - * bucket from any project in the organization or folder. If you run an audit - * at the project level using the service agent at the organization or folder - * level, all the buckets that are associated with the service agent are - * available. - * - * Generated from protobuf field repeated .google.cloud.auditmanager.v1.EnrollResourceRequest.EligibleDestination destinations = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\AuditManager\V1\EnrollResourceRequest\EligibleDestination[] $var - * @return $this - */ - public function setDestinations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AuditManager\V1\EnrollResourceRequest\EligibleDestination::class); - $this->destinations = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/EnrollResourceRequest/EligibleDestination.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/EnrollResourceRequest/EligibleDestination.php deleted file mode 100644 index 3b7f309ebfdb..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/EnrollResourceRequest/EligibleDestination.php +++ /dev/null @@ -1,84 +0,0 @@ -google.cloud.auditmanager.v1.EnrollResourceRequest.EligibleDestination - */ -class EligibleDestination extends \Google\Protobuf\Internal\Message -{ - protected $eligible_destinations; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $eligible_gcs_bucket - * The location of the Cloud Storage bucket where you want to upload the - * audit report and evidence during the - * [GenerateAuditReport][google.cloud.auditmanager.v1.AuditManager.GenerateAuditReport] - * API call. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * The location of the Cloud Storage bucket where you want to upload the - * audit report and evidence during the - * [GenerateAuditReport][google.cloud.auditmanager.v1.AuditManager.GenerateAuditReport] - * API call. - * - * Generated from protobuf field string eligible_gcs_bucket = 3; - * @return string - */ - public function getEligibleGcsBucket() - { - return $this->readOneof(3); - } - - public function hasEligibleGcsBucket() - { - return $this->hasOneof(3); - } - - /** - * The location of the Cloud Storage bucket where you want to upload the - * audit report and evidence during the - * [GenerateAuditReport][google.cloud.auditmanager.v1.AuditManager.GenerateAuditReport] - * API call. - * - * Generated from protobuf field string eligible_gcs_bucket = 3; - * @param string $var - * @return $this - */ - public function setEligibleGcsBucket($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getEligibleDestinations() - { - return $this->whichOneof("eligible_destinations"); - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Enrollment.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Enrollment.php deleted file mode 100644 index 6f97b729a3f9..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/Enrollment.php +++ /dev/null @@ -1,117 +0,0 @@ -google.cloud.auditmanager.v1.Enrollment - */ -class Enrollment extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. Name of the enrollment, in one of the following formats: - * * `projects/{project}/locations/{location}/enrollments/{enrollment}` - * * `folders/{folder}/locations/{location}/enrollments/{enrollment}` - * * `organizations/{organization}/locations/{location}/enrollments/{enrollment}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Output only. Cloud Storage buckets where you want to upload the audit - * reports. - * - * Generated from protobuf field repeated .google.cloud.auditmanager.v1.DestinationDetails destination_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $destination_details; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. Name of the enrollment, in one of the following formats: - * * `projects/{project}/locations/{location}/enrollments/{enrollment}` - * * `folders/{folder}/locations/{location}/enrollments/{enrollment}` - * * `organizations/{organization}/locations/{location}/enrollments/{enrollment}` - * @type \Google\Cloud\AuditManager\V1\DestinationDetails[] $destination_details - * Output only. Cloud Storage buckets where you want to upload the audit - * reports. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. Name of the enrollment, in one of the following formats: - * * `projects/{project}/locations/{location}/enrollments/{enrollment}` - * * `folders/{folder}/locations/{location}/enrollments/{enrollment}` - * * `organizations/{organization}/locations/{location}/enrollments/{enrollment}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. Name of the enrollment, in one of the following formats: - * * `projects/{project}/locations/{location}/enrollments/{enrollment}` - * * `folders/{folder}/locations/{location}/enrollments/{enrollment}` - * * `organizations/{organization}/locations/{location}/enrollments/{enrollment}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. Cloud Storage buckets where you want to upload the audit - * reports. - * - * Generated from protobuf field repeated .google.cloud.auditmanager.v1.DestinationDetails destination_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return RepeatedField<\Google\Cloud\AuditManager\V1\DestinationDetails> - */ - public function getDestinationDetails() - { - return $this->destination_details; - } - - /** - * Output only. Cloud Storage buckets where you want to upload the audit - * reports. - * - * Generated from protobuf field repeated .google.cloud.auditmanager.v1.DestinationDetails destination_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\AuditManager\V1\DestinationDetails[] $var - * @return $this - */ - public function setDestinationDetails($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AuditManager\V1\DestinationDetails::class); - $this->destination_details = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditReportRequest.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditReportRequest.php deleted file mode 100644 index a116ec9f7cf0..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditReportRequest.php +++ /dev/null @@ -1,356 +0,0 @@ -google.cloud.auditmanager.v1.GenerateAuditReportRequest - */ -class GenerateAuditReportRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Organization, folder, or project that the audit applies to, in - * one of the following formats: - * * `projects/{project}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `organizations/{organization}/locations/{location}` - * - * Generated from protobuf field string scope = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $scope = ''; - /** - * Optional. Deprecated. Compliance standard for the audit report. - * Use the `compliance_framework` field instead. - * - * Generated from protobuf field string compliance_standard = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * @deprecated - */ - protected $compliance_standard = ''; - /** - * Required. Format for the audit report. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.GenerateAuditReportRequest.AuditReportFormat report_format = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $report_format = 0; - /** - * Required. The framework that's used for the audit report. For example, - * `NIST_800_53`. - * - * Generated from protobuf field string compliance_framework = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $compliance_framework = ''; - /** - * Optional. If `true`, only validates the request and does not generate the - * audit report. This executes standard request validation (such as schema, - * framework existence, scope, and IAM checks) and skips the apply phase. - * Use this field for the following purposes: - * * **Infrastructure as Code (IaC)**: Allow tools like Terraform to run - * dry-run mutations (e.g., `terraform plan`) without creating real - * resources or incurring costs. - * * **User Interface Validation**: Enable real-time form and permission - * validation in custom UIs before submitting requests. - * * **CI/CD & Automation**: Test your scripts, permissions, and parameters - * safely without triggering expensive Long-Running Operations (LROs) or - * consuming resource quotas. - * - * Generated from protobuf field bool validate_only = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - protected $destination; - - /** - * @param string $scope Required. Organization, folder, or project that the audit applies to, in - * one of the following formats: - * - * * `projects/{project}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `organizations/{organization}/locations/{location}` - * @param string $gcsUri URL for the Cloud Storage bucket where the report and evidence is - * uploaded. You must select a bucket that was provided during the - * enrollment process. - * @param string $complianceStandard Optional. Deprecated. Compliance standard for the audit report. - * - * Use the `compliance_framework` field instead. - * @param int $reportFormat Required. Format for the audit report. - * For allowed values, use constants defined on {@see \Google\Cloud\AuditManager\V1\GenerateAuditReportRequest\AuditReportFormat} - * - * @return \Google\Cloud\AuditManager\V1\GenerateAuditReportRequest - * - * @experimental - */ - public static function build(string $scope, string $gcsUri, string $complianceStandard, int $reportFormat): self - { - return (new self()) - ->setScope($scope) - ->setGcsUri($gcsUri) - ->setComplianceStandard($complianceStandard) - ->setReportFormat($reportFormat); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $gcs_uri - * URL for the Cloud Storage bucket where the report and evidence is - * uploaded. You must select a bucket that was provided during the - * enrollment process. - * @type string $scope - * Required. Organization, folder, or project that the audit applies to, in - * one of the following formats: - * * `projects/{project}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `organizations/{organization}/locations/{location}` - * @type string $compliance_standard - * Optional. Deprecated. Compliance standard for the audit report. - * Use the `compliance_framework` field instead. - * @type int $report_format - * Required. Format for the audit report. - * @type string $compliance_framework - * Required. The framework that's used for the audit report. For example, - * `NIST_800_53`. - * @type bool $validate_only - * Optional. If `true`, only validates the request and does not generate the - * audit report. This executes standard request validation (such as schema, - * framework existence, scope, and IAM checks) and skips the apply phase. - * Use this field for the following purposes: - * * **Infrastructure as Code (IaC)**: Allow tools like Terraform to run - * dry-run mutations (e.g., `terraform plan`) without creating real - * resources or incurring costs. - * * **User Interface Validation**: Enable real-time form and permission - * validation in custom UIs before submitting requests. - * * **CI/CD & Automation**: Test your scripts, permissions, and parameters - * safely without triggering expensive Long-Running Operations (LROs) or - * consuming resource quotas. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * URL for the Cloud Storage bucket where the report and evidence is - * uploaded. You must select a bucket that was provided during the - * enrollment process. - * - * Generated from protobuf field string gcs_uri = 2; - * @return string - */ - public function getGcsUri() - { - return $this->readOneof(2); - } - - public function hasGcsUri() - { - return $this->hasOneof(2); - } - - /** - * URL for the Cloud Storage bucket where the report and evidence is - * uploaded. You must select a bucket that was provided during the - * enrollment process. - * - * Generated from protobuf field string gcs_uri = 2; - * @param string $var - * @return $this - */ - public function setGcsUri($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Required. Organization, folder, or project that the audit applies to, in - * one of the following formats: - * * `projects/{project}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `organizations/{organization}/locations/{location}` - * - * Generated from protobuf field string scope = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getScope() - { - return $this->scope; - } - - /** - * Required. Organization, folder, or project that the audit applies to, in - * one of the following formats: - * * `projects/{project}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `organizations/{organization}/locations/{location}` - * - * Generated from protobuf field string scope = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setScope($var) - { - GPBUtil::checkString($var, True); - $this->scope = $var; - - return $this; - } - - /** - * Optional. Deprecated. Compliance standard for the audit report. - * Use the `compliance_framework` field instead. - * - * Generated from protobuf field string compliance_standard = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * @return string - * @deprecated - */ - public function getComplianceStandard() - { - if ($this->compliance_standard !== '') { - @trigger_error('compliance_standard is deprecated.', E_USER_DEPRECATED); - } - return $this->compliance_standard; - } - - /** - * Optional. Deprecated. Compliance standard for the audit report. - * Use the `compliance_framework` field instead. - * - * Generated from protobuf field string compliance_standard = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - * @deprecated - */ - public function setComplianceStandard($var) - { - @trigger_error('compliance_standard is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, True); - $this->compliance_standard = $var; - - return $this; - } - - /** - * Required. Format for the audit report. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.GenerateAuditReportRequest.AuditReportFormat report_format = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getReportFormat() - { - return $this->report_format; - } - - /** - * Required. Format for the audit report. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.GenerateAuditReportRequest.AuditReportFormat report_format = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setReportFormat($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\AuditManager\V1\GenerateAuditReportRequest\AuditReportFormat::class); - $this->report_format = $var; - - return $this; - } - - /** - * Required. The framework that's used for the audit report. For example, - * `NIST_800_53`. - * - * Generated from protobuf field string compliance_framework = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getComplianceFramework() - { - return $this->compliance_framework; - } - - /** - * Required. The framework that's used for the audit report. For example, - * `NIST_800_53`. - * - * Generated from protobuf field string compliance_framework = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setComplianceFramework($var) - { - GPBUtil::checkString($var, True); - $this->compliance_framework = $var; - - return $this; - } - - /** - * Optional. If `true`, only validates the request and does not generate the - * audit report. This executes standard request validation (such as schema, - * framework existence, scope, and IAM checks) and skips the apply phase. - * Use this field for the following purposes: - * * **Infrastructure as Code (IaC)**: Allow tools like Terraform to run - * dry-run mutations (e.g., `terraform plan`) without creating real - * resources or incurring costs. - * * **User Interface Validation**: Enable real-time form and permission - * validation in custom UIs before submitting requests. - * * **CI/CD & Automation**: Test your scripts, permissions, and parameters - * safely without triggering expensive Long-Running Operations (LROs) or - * consuming resource quotas. - * - * Generated from protobuf field bool validate_only = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. If `true`, only validates the request and does not generate the - * audit report. This executes standard request validation (such as schema, - * framework existence, scope, and IAM checks) and skips the apply phase. - * Use this field for the following purposes: - * * **Infrastructure as Code (IaC)**: Allow tools like Terraform to run - * dry-run mutations (e.g., `terraform plan`) without creating real - * resources or incurring costs. - * * **User Interface Validation**: Enable real-time form and permission - * validation in custom UIs before submitting requests. - * * **CI/CD & Automation**: Test your scripts, permissions, and parameters - * safely without triggering expensive Long-Running Operations (LROs) or - * consuming resource quotas. - * - * Generated from protobuf field bool validate_only = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - - /** - * @return string - */ - public function getDestination() - { - return $this->whichOneof("destination"); - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditReportRequest/AuditReportFormat.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditReportRequest/AuditReportFormat.php deleted file mode 100644 index d28fd35a05ed..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditReportRequest/AuditReportFormat.php +++ /dev/null @@ -1,54 +0,0 @@ -google.cloud.auditmanager.v1.GenerateAuditReportRequest.AuditReportFormat - */ -class AuditReportFormat -{ - /** - * Default value. This value is unused. - * - * Generated from protobuf enum AUDIT_REPORT_FORMAT_UNSPECIFIED = 0; - */ - const AUDIT_REPORT_FORMAT_UNSPECIFIED = 0; - /** - * Open Document format. - * - * Generated from protobuf enum AUDIT_REPORT_FORMAT_ODF = 1; - */ - const AUDIT_REPORT_FORMAT_ODF = 1; - - private static $valueToName = [ - self::AUDIT_REPORT_FORMAT_UNSPECIFIED => 'AUDIT_REPORT_FORMAT_UNSPECIFIED', - self::AUDIT_REPORT_FORMAT_ODF => 'AUDIT_REPORT_FORMAT_ODF', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditScopeReportRequest.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditScopeReportRequest.php deleted file mode 100644 index be64ad66d4aa..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditScopeReportRequest.php +++ /dev/null @@ -1,231 +0,0 @@ -google.cloud.auditmanager.v1.GenerateAuditScopeReportRequest - */ -class GenerateAuditScopeReportRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Project or folder that the audit scope report is generated for, - * in one of the following formats: - * * `projects/{project}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `organizations/{organization}/locations/{location}` - * - * Generated from protobuf field string scope = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $scope = ''; - /** - * Optional. Deprecated. The standard (industry or regulatory requirements) - * that the audit scope report is run against. - * Use the `compliance_framework` field instead. - * - * Generated from protobuf field string compliance_standard = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * @deprecated - */ - protected $compliance_standard = ''; - /** - * Required. Format for the audit scope report. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.GenerateAuditScopeReportRequest.AuditScopeReportFormat report_format = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $report_format = 0; - /** - * Required. Framework (set of controls) that the audit scope report is - * generated against. For example, `NIST_800_53`. - * - * Generated from protobuf field string compliance_framework = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $compliance_framework = ''; - - /** - * @param string $scope Required. Project or folder that the audit scope report is generated for, - * in one of the following formats: - * - * * `projects/{project}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `organizations/{organization}/locations/{location}` - * @param string $complianceStandard Optional. Deprecated. The standard (industry or regulatory requirements) - * that the audit scope report is run against. - * - * Use the `compliance_framework` field instead. - * @param int $reportFormat Required. Format for the audit scope report. - * For allowed values, use constants defined on {@see \Google\Cloud\AuditManager\V1\GenerateAuditScopeReportRequest\AuditScopeReportFormat} - * - * @return \Google\Cloud\AuditManager\V1\GenerateAuditScopeReportRequest - * - * @experimental - */ - public static function build(string $scope, string $complianceStandard, int $reportFormat): self - { - return (new self()) - ->setScope($scope) - ->setComplianceStandard($complianceStandard) - ->setReportFormat($reportFormat); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $scope - * Required. Project or folder that the audit scope report is generated for, - * in one of the following formats: - * * `projects/{project}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `organizations/{organization}/locations/{location}` - * @type string $compliance_standard - * Optional. Deprecated. The standard (industry or regulatory requirements) - * that the audit scope report is run against. - * Use the `compliance_framework` field instead. - * @type int $report_format - * Required. Format for the audit scope report. - * @type string $compliance_framework - * Required. Framework (set of controls) that the audit scope report is - * generated against. For example, `NIST_800_53`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * Required. Project or folder that the audit scope report is generated for, - * in one of the following formats: - * * `projects/{project}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `organizations/{organization}/locations/{location}` - * - * Generated from protobuf field string scope = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getScope() - { - return $this->scope; - } - - /** - * Required. Project or folder that the audit scope report is generated for, - * in one of the following formats: - * * `projects/{project}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `organizations/{organization}/locations/{location}` - * - * Generated from protobuf field string scope = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setScope($var) - { - GPBUtil::checkString($var, True); - $this->scope = $var; - - return $this; - } - - /** - * Optional. Deprecated. The standard (industry or regulatory requirements) - * that the audit scope report is run against. - * Use the `compliance_framework` field instead. - * - * Generated from protobuf field string compliance_standard = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * @return string - * @deprecated - */ - public function getComplianceStandard() - { - if ($this->compliance_standard !== '') { - @trigger_error('compliance_standard is deprecated.', E_USER_DEPRECATED); - } - return $this->compliance_standard; - } - - /** - * Optional. Deprecated. The standard (industry or regulatory requirements) - * that the audit scope report is run against. - * Use the `compliance_framework` field instead. - * - * Generated from protobuf field string compliance_standard = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - * @deprecated - */ - public function setComplianceStandard($var) - { - @trigger_error('compliance_standard is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, True); - $this->compliance_standard = $var; - - return $this; - } - - /** - * Required. Format for the audit scope report. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.GenerateAuditScopeReportRequest.AuditScopeReportFormat report_format = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getReportFormat() - { - return $this->report_format; - } - - /** - * Required. Format for the audit scope report. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.GenerateAuditScopeReportRequest.AuditScopeReportFormat report_format = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setReportFormat($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\AuditManager\V1\GenerateAuditScopeReportRequest\AuditScopeReportFormat::class); - $this->report_format = $var; - - return $this; - } - - /** - * Required. Framework (set of controls) that the audit scope report is - * generated against. For example, `NIST_800_53`. - * - * Generated from protobuf field string compliance_framework = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getComplianceFramework() - { - return $this->compliance_framework; - } - - /** - * Required. Framework (set of controls) that the audit scope report is - * generated against. For example, `NIST_800_53`. - * - * Generated from protobuf field string compliance_framework = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setComplianceFramework($var) - { - GPBUtil::checkString($var, True); - $this->compliance_framework = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditScopeReportRequest/AuditScopeReportFormat.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditScopeReportRequest/AuditScopeReportFormat.php deleted file mode 100644 index 05ee0385b32d..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GenerateAuditScopeReportRequest/AuditScopeReportFormat.php +++ /dev/null @@ -1,54 +0,0 @@ -google.cloud.auditmanager.v1.GenerateAuditScopeReportRequest.AuditScopeReportFormat - */ -class AuditScopeReportFormat -{ - /** - * Default value. This value is unused. - * - * Generated from protobuf enum AUDIT_SCOPE_REPORT_FORMAT_UNSPECIFIED = 0; - */ - const AUDIT_SCOPE_REPORT_FORMAT_UNSPECIFIED = 0; - /** - * Open Document format. - * - * Generated from protobuf enum AUDIT_SCOPE_REPORT_FORMAT_ODF = 1; - */ - const AUDIT_SCOPE_REPORT_FORMAT_ODF = 1; - - private static $valueToName = [ - self::AUDIT_SCOPE_REPORT_FORMAT_UNSPECIFIED => 'AUDIT_SCOPE_REPORT_FORMAT_UNSPECIFIED', - self::AUDIT_SCOPE_REPORT_FORMAT_ODF => 'AUDIT_SCOPE_REPORT_FORMAT_ODF', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GetAuditReportRequest.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GetAuditReportRequest.php deleted file mode 100644 index 938b2f0c35a8..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GetAuditReportRequest.php +++ /dev/null @@ -1,98 +0,0 @@ -google.cloud.auditmanager.v1.GetAuditReportRequest - */ -class GetAuditReportRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the audit report, in one of the following formats: - * * `projects/{project}/locations/{location}/auditReports/{audit_report}` - * * `folders/{folder}/locations/{location}/auditReports/{audit_report}` - * * `organizations/{organization}/locations/{location}/auditReports/{audit_report}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of the audit report, in one of the following formats: - * - * * `projects/{project}/locations/{location}/auditReports/{audit_report}` - * * `folders/{folder}/locations/{location}/auditReports/{audit_report}` - * * `organizations/{organization}/locations/{location}/auditReports/{audit_report}` - * Please see {@see AuditManagerClient::auditReportName()} for help formatting this field. - * - * @return \Google\Cloud\AuditManager\V1\GetAuditReportRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the audit report, in one of the following formats: - * * `projects/{project}/locations/{location}/auditReports/{audit_report}` - * * `folders/{folder}/locations/{location}/auditReports/{audit_report}` - * * `organizations/{organization}/locations/{location}/auditReports/{audit_report}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the audit report, in one of the following formats: - * * `projects/{project}/locations/{location}/auditReports/{audit_report}` - * * `folders/{folder}/locations/{location}/auditReports/{audit_report}` - * * `organizations/{organization}/locations/{location}/auditReports/{audit_report}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the audit report, in one of the following formats: - * * `projects/{project}/locations/{location}/auditReports/{audit_report}` - * * `folders/{folder}/locations/{location}/auditReports/{audit_report}` - * * `organizations/{organization}/locations/{location}/auditReports/{audit_report}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GetResourceEnrollmentStatusRequest.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GetResourceEnrollmentStatusRequest.php deleted file mode 100644 index cc5898abe2c0..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/GetResourceEnrollmentStatusRequest.php +++ /dev/null @@ -1,103 +0,0 @@ -google.cloud.auditmanager.v1.GetResourceEnrollmentStatusRequest - */ -class GetResourceEnrollmentStatusRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource enrollment status, in one of the following - * formats: - * * `folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` - * * `projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` - * * `organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of the resource enrollment status, in one of the following - * formats: - * - * * `folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` - * * `projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` - * * `organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` - * Please see {@see AuditManagerClient::resourceEnrollmentStatusName()} for help formatting this field. - * - * @return \Google\Cloud\AuditManager\V1\GetResourceEnrollmentStatusRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the resource enrollment status, in one of the following - * formats: - * * `folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` - * * `projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` - * * `organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the resource enrollment status, in one of the following - * formats: - * * `folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` - * * `projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` - * * `organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the resource enrollment status, in one of the following - * formats: - * * `folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` - * * `projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` - * * `organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListAuditReportsRequest.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListAuditReportsRequest.php deleted file mode 100644 index 048052f5d864..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListAuditReportsRequest.php +++ /dev/null @@ -1,187 +0,0 @@ -google.cloud.auditmanager.v1.ListAuditReportsRequest - */ -class ListAuditReportsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent organization, folder, or project to list reports for, - * in one of the following formats: - * * `projects/{project}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `organizations/{organization}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Maximum number of items to return in a single page. The service - * might return fewer items than this value. If unspecified, the service picks - * an appropriate default. The maximum value is 100; values above 100 are - * reduced to 100. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A page token, received from a previous call, to retrieve the next - * page of results. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. Parent organization, folder, or project to list reports for, - * in one of the following formats: - * - * * `projects/{project}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `organizations/{organization}/locations/{location}` - * Please see {@see AuditManagerClient::folderLocationName()} for help formatting this field. - * - * @return \Google\Cloud\AuditManager\V1\ListAuditReportsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Parent organization, folder, or project to list reports for, - * in one of the following formats: - * * `projects/{project}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `organizations/{organization}/locations/{location}` - * @type int $page_size - * Optional. Maximum number of items to return in a single page. The service - * might return fewer items than this value. If unspecified, the service picks - * an appropriate default. The maximum value is 100; values above 100 are - * reduced to 100. - * @type string $page_token - * Optional. A page token, received from a previous call, to retrieve the next - * page of results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent organization, folder, or project to list reports for, - * in one of the following formats: - * * `projects/{project}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `organizations/{organization}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Parent organization, folder, or project to list reports for, - * in one of the following formats: - * * `projects/{project}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `organizations/{organization}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. Maximum number of items to return in a single page. The service - * might return fewer items than this value. If unspecified, the service picks - * an appropriate default. The maximum value is 100; values above 100 are - * reduced to 100. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Maximum number of items to return in a single page. The service - * might return fewer items than this value. If unspecified, the service picks - * an appropriate default. The maximum value is 100; values above 100 are - * reduced to 100. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. A page token, received from a previous call, to retrieve the next - * page of results. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A page token, received from a previous call, to retrieve the next - * page of results. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListAuditReportsResponse.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListAuditReportsResponse.php deleted file mode 100644 index 17b03c5236ea..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListAuditReportsResponse.php +++ /dev/null @@ -1,110 +0,0 @@ -google.cloud.auditmanager.v1.ListAuditReportsResponse - */ -class ListAuditReportsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Audit reports. - * - * Generated from protobuf field repeated .google.cloud.auditmanager.v1.AuditReport audit_reports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $audit_reports; - /** - * Output only. A token that you can send as the `page_token` in a subsequent - * request to retrieve the next page of results. If this field is empty, there - * are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\AuditManager\V1\AuditReport[] $audit_reports - * Output only. Audit reports. - * @type string $next_page_token - * Output only. A token that you can send as the `page_token` in a subsequent - * request to retrieve the next page of results. If this field is empty, there - * are no subsequent pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Audit reports. - * - * Generated from protobuf field repeated .google.cloud.auditmanager.v1.AuditReport audit_reports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return RepeatedField<\Google\Cloud\AuditManager\V1\AuditReport> - */ - public function getAuditReports() - { - return $this->audit_reports; - } - - /** - * Output only. Audit reports. - * - * Generated from protobuf field repeated .google.cloud.auditmanager.v1.AuditReport audit_reports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\AuditManager\V1\AuditReport[] $var - * @return $this - */ - public function setAuditReports($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AuditManager\V1\AuditReport::class); - $this->audit_reports = $arr; - - return $this; - } - - /** - * Output only. A token that you can send as the `page_token` in a subsequent - * request to retrieve the next page of results. If this field is empty, there - * are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Output only. A token that you can send as the `page_token` in a subsequent - * request to retrieve the next page of results. If this field is empty, there - * are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListControlsRequest.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListControlsRequest.php deleted file mode 100644 index c377232415e9..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListControlsRequest.php +++ /dev/null @@ -1,182 +0,0 @@ -google.cloud.auditmanager.v1.ListControlsRequest - */ -class ListControlsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Standard to list controls for, in one of the following formats: - * * `projects/{project}/locations/{location}/standards/{standard}` - * * `folders/{folder}/locations/{location}/standards/{standard}` - * * `organizations/{organization}/locations/{location}/standards/{standard}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Maximum number of items to return in a single page. The service - * might return fewer items than this value. If unspecified, the service picks - * an appropriate default. The maximum value is 100; values above 100 are - * reduced to 100. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A page token, received from a previous call, to retrieve the next - * page of results. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. Standard to list controls for, in one of the following formats: - * - * * `projects/{project}/locations/{location}/standards/{standard}` - * * `folders/{folder}/locations/{location}/standards/{standard}` - * * `organizations/{organization}/locations/{location}/standards/{standard}` - * Please see {@see AuditManagerClient::standardName()} for help formatting this field. - * - * @return \Google\Cloud\AuditManager\V1\ListControlsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Standard to list controls for, in one of the following formats: - * * `projects/{project}/locations/{location}/standards/{standard}` - * * `folders/{folder}/locations/{location}/standards/{standard}` - * * `organizations/{organization}/locations/{location}/standards/{standard}` - * @type int $page_size - * Optional. Maximum number of items to return in a single page. The service - * might return fewer items than this value. If unspecified, the service picks - * an appropriate default. The maximum value is 100; values above 100 are - * reduced to 100. - * @type string $page_token - * Optional. A page token, received from a previous call, to retrieve the next - * page of results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * Required. Standard to list controls for, in one of the following formats: - * * `projects/{project}/locations/{location}/standards/{standard}` - * * `folders/{folder}/locations/{location}/standards/{standard}` - * * `organizations/{organization}/locations/{location}/standards/{standard}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Standard to list controls for, in one of the following formats: - * * `projects/{project}/locations/{location}/standards/{standard}` - * * `folders/{folder}/locations/{location}/standards/{standard}` - * * `organizations/{organization}/locations/{location}/standards/{standard}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. Maximum number of items to return in a single page. The service - * might return fewer items than this value. If unspecified, the service picks - * an appropriate default. The maximum value is 100; values above 100 are - * reduced to 100. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Maximum number of items to return in a single page. The service - * might return fewer items than this value. If unspecified, the service picks - * an appropriate default. The maximum value is 100; values above 100 are - * reduced to 100. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. A page token, received from a previous call, to retrieve the next - * page of results. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A page token, received from a previous call, to retrieve the next - * page of results. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListControlsResponse.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListControlsResponse.php deleted file mode 100644 index df4f807cbd71..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListControlsResponse.php +++ /dev/null @@ -1,110 +0,0 @@ -google.cloud.auditmanager.v1.ListControlsResponse - */ -class ListControlsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Controls for a given regulatory standard. - * - * Generated from protobuf field repeated .google.cloud.auditmanager.v1.Control controls = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $controls; - /** - * Output only. A token that you can send as the `page_token` in a subsequent - * request to retrieve the next page of results. If this field is empty, there - * are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\AuditManager\V1\Control[] $controls - * Output only. Controls for a given regulatory standard. - * @type string $next_page_token - * Output only. A token that you can send as the `page_token` in a subsequent - * request to retrieve the next page of results. If this field is empty, there - * are no subsequent pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Controls for a given regulatory standard. - * - * Generated from protobuf field repeated .google.cloud.auditmanager.v1.Control controls = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return RepeatedField<\Google\Cloud\AuditManager\V1\Control> - */ - public function getControls() - { - return $this->controls; - } - - /** - * Output only. Controls for a given regulatory standard. - * - * Generated from protobuf field repeated .google.cloud.auditmanager.v1.Control controls = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\AuditManager\V1\Control[] $var - * @return $this - */ - public function setControls($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AuditManager\V1\Control::class); - $this->controls = $arr; - - return $this; - } - - /** - * Output only. A token that you can send as the `page_token` in a subsequent - * request to retrieve the next page of results. If this field is empty, there - * are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Output only. A token that you can send as the `page_token` in a subsequent - * request to retrieve the next page of results. If this field is empty, there - * are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListResourceEnrollmentStatusesRequest.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListResourceEnrollmentStatusesRequest.php deleted file mode 100644 index 6b11c3629db0..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListResourceEnrollmentStatusesRequest.php +++ /dev/null @@ -1,182 +0,0 @@ -google.cloud.auditmanager.v1.ListResourceEnrollmentStatusesRequest - */ -class ListResourceEnrollmentStatusesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent organization or folder to list enrollment statuses for, - * in one of the following formats: - * * `folders/{folder}/locations/{location}` - * * `organizations/{organization}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Maximum number of items to return in a single page. The service - * might return fewer items than this value. If unspecified, the service picks - * an appropriate default. The maximum value is 100; values above 100 are - * reduced to 100. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A page token, received from a previous call, to retrieve the next - * page of results. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. Parent organization or folder to list enrollment statuses for, - * in one of the following formats: - * - * * `folders/{folder}/locations/{location}` - * * `organizations/{organization}/locations/{location}` - * Please see {@see AuditManagerClient::enrollmentStatusScopeName()} for help formatting this field. - * - * @return \Google\Cloud\AuditManager\V1\ListResourceEnrollmentStatusesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Parent organization or folder to list enrollment statuses for, - * in one of the following formats: - * * `folders/{folder}/locations/{location}` - * * `organizations/{organization}/locations/{location}` - * @type int $page_size - * Optional. Maximum number of items to return in a single page. The service - * might return fewer items than this value. If unspecified, the service picks - * an appropriate default. The maximum value is 100; values above 100 are - * reduced to 100. - * @type string $page_token - * Optional. A page token, received from a previous call, to retrieve the next - * page of results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent organization or folder to list enrollment statuses for, - * in one of the following formats: - * * `folders/{folder}/locations/{location}` - * * `organizations/{organization}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Parent organization or folder to list enrollment statuses for, - * in one of the following formats: - * * `folders/{folder}/locations/{location}` - * * `organizations/{organization}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. Maximum number of items to return in a single page. The service - * might return fewer items than this value. If unspecified, the service picks - * an appropriate default. The maximum value is 100; values above 100 are - * reduced to 100. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Maximum number of items to return in a single page. The service - * might return fewer items than this value. If unspecified, the service picks - * an appropriate default. The maximum value is 100; values above 100 are - * reduced to 100. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. A page token, received from a previous call, to retrieve the next - * page of results. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A page token, received from a previous call, to retrieve the next - * page of results. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListResourceEnrollmentStatusesResponse.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListResourceEnrollmentStatusesResponse.php deleted file mode 100644 index 364a0db41947..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ListResourceEnrollmentStatusesResponse.php +++ /dev/null @@ -1,110 +0,0 @@ -google.cloud.auditmanager.v1.ListResourceEnrollmentStatusesResponse - */ -class ListResourceEnrollmentStatusesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Resources with their enrollment status. - * - * Generated from protobuf field repeated .google.cloud.auditmanager.v1.ResourceEnrollmentStatus resource_enrollment_statuses = 1; - */ - private $resource_enrollment_statuses; - /** - * Output only. A token that you can send as the `page_token` in a subsequent - * request to retrieve the next page of results. If this field is empty, there - * are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\AuditManager\V1\ResourceEnrollmentStatus[] $resource_enrollment_statuses - * Resources with their enrollment status. - * @type string $next_page_token - * Output only. A token that you can send as the `page_token` in a subsequent - * request to retrieve the next page of results. If this field is empty, there - * are no subsequent pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * Resources with their enrollment status. - * - * Generated from protobuf field repeated .google.cloud.auditmanager.v1.ResourceEnrollmentStatus resource_enrollment_statuses = 1; - * @return RepeatedField<\Google\Cloud\AuditManager\V1\ResourceEnrollmentStatus> - */ - public function getResourceEnrollmentStatuses() - { - return $this->resource_enrollment_statuses; - } - - /** - * Resources with their enrollment status. - * - * Generated from protobuf field repeated .google.cloud.auditmanager.v1.ResourceEnrollmentStatus resource_enrollment_statuses = 1; - * @param \Google\Cloud\AuditManager\V1\ResourceEnrollmentStatus[] $var - * @return $this - */ - public function setResourceEnrollmentStatuses($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AuditManager\V1\ResourceEnrollmentStatus::class); - $this->resource_enrollment_statuses = $arr; - - return $this; - } - - /** - * Output only. A token that you can send as the `page_token` in a subsequent - * request to retrieve the next page of results. If this field is empty, there - * are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Output only. A token that you can send as the `page_token` in a subsequent - * request to retrieve the next page of results. If this field is empty, there - * are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/OperationMetadata.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/OperationMetadata.php deleted file mode 100644 index 5a51a0fa651f..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/OperationMetadata.php +++ /dev/null @@ -1,315 +0,0 @@ -google.cloud.auditmanager.v1.OperationMetadata - */ -class OperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Time that the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Time that the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $end_time = null; - /** - * Output only. A server-defined resource path for the target of the - * operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $target = ''; - /** - * Output only. The name of the verb that was executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $verb = ''; - /** - * Output only. A human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $status_message = ''; - /** - * Output only. Whether you requested that the operation be cancelled. - * Operations that were cancelled successfully have an - * [Operation.error][google.longrunning.Operation.error] - * value with a status code - * [Code.CANCELLED][google.rpc.Status.code.CANCELLED]. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $requested_cancellation = false; - /** - * Output only. The API version used to start the operation. For example, - * `v1`. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $api_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Time that the operation was created. - * @type \Google\Protobuf\Timestamp $end_time - * Output only. Time that the operation finished running. - * @type string $target - * Output only. A server-defined resource path for the target of the - * operation. - * @type string $verb - * Output only. The name of the verb that was executed by the operation. - * @type string $status_message - * Output only. A human-readable status of the operation, if any. - * @type bool $requested_cancellation - * Output only. Whether you requested that the operation be cancelled. - * Operations that were cancelled successfully have an - * [Operation.error][google.longrunning.Operation.error] - * value with a status code - * [Code.CANCELLED][google.rpc.Status.code.CANCELLED]. - * @type string $api_version - * Output only. The API version used to start the operation. For example, - * `v1`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Time that the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. Time that the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. Time that the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * Output only. Time that the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * Output only. A server-defined resource path for the target of the - * operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getTarget() - { - return $this->target; - } - - /** - * Output only. A server-defined resource path for the target of the - * operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setTarget($var) - { - GPBUtil::checkString($var, True); - $this->target = $var; - - return $this; - } - - /** - * Output only. The name of the verb that was executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getVerb() - { - return $this->verb; - } - - /** - * Output only. The name of the verb that was executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setVerb($var) - { - GPBUtil::checkString($var, True); - $this->verb = $var; - - return $this; - } - - /** - * Output only. A human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getStatusMessage() - { - return $this->status_message; - } - - /** - * Output only. A human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setStatusMessage($var) - { - GPBUtil::checkString($var, True); - $this->status_message = $var; - - return $this; - } - - /** - * Output only. Whether you requested that the operation be cancelled. - * Operations that were cancelled successfully have an - * [Operation.error][google.longrunning.Operation.error] - * value with a status code - * [Code.CANCELLED][google.rpc.Status.code.CANCELLED]. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getRequestedCancellation() - { - return $this->requested_cancellation; - } - - /** - * Output only. Whether you requested that the operation be cancelled. - * Operations that were cancelled successfully have an - * [Operation.error][google.longrunning.Operation.error] - * value with a status code - * [Code.CANCELLED][google.rpc.Status.code.CANCELLED]. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setRequestedCancellation($var) - { - GPBUtil::checkBool($var); - $this->requested_cancellation = $var; - - return $this; - } - - /** - * Output only. The API version used to start the operation. For example, - * `v1`. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getApiVersion() - { - return $this->api_version; - } - - /** - * Output only. The API version used to start the operation. For example, - * `v1`. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setApiVersion($var) - { - GPBUtil::checkString($var, True); - $this->api_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/OperationState.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/OperationState.php deleted file mode 100644 index 43de9a89b31d..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/OperationState.php +++ /dev/null @@ -1,103 +0,0 @@ -google.cloud.auditmanager.v1.OperationState - */ -class OperationState -{ - /** - * Default value. This value is unused. - * - * Generated from protobuf enum OPERATION_STATE_UNSPECIFIED = 0; - */ - const OPERATION_STATE_UNSPECIFIED = 0; - /** - * Audit generation process hasn't started. - * - * Generated from protobuf enum OPERATION_STATE_NOT_STARTED = 10; - */ - const OPERATION_STATE_NOT_STARTED = 10; - /** - * Evaluation process is in progress. - * - * Generated from protobuf enum OPERATION_STATE_EVALUATION_IN_PROGRESS = 20; - */ - const OPERATION_STATE_EVALUATION_IN_PROGRESS = 20; - /** - * Evaluation process is completed. - * - * Generated from protobuf enum OPERATION_STATE_EVALUATION_DONE = 21; - */ - const OPERATION_STATE_EVALUATION_DONE = 21; - /** - * Report generation process is in progress. - * - * Generated from protobuf enum OPERATION_STATE_EVIDENCE_REPORT_GENERATION_IN_PROGRESS = 30; - */ - const OPERATION_STATE_EVIDENCE_REPORT_GENERATION_IN_PROGRESS = 30; - /** - * Report generation process is completed. - * - * Generated from protobuf enum OPERATION_STATE_EVIDENCE_REPORT_GENERATION_DONE = 31; - */ - const OPERATION_STATE_EVIDENCE_REPORT_GENERATION_DONE = 31; - /** - * The audit report and evidence are being uploaded to your bucket. - * - * Generated from protobuf enum OPERATION_STATE_EVIDENCE_UPLOAD_IN_PROGRESS = 40; - */ - const OPERATION_STATE_EVIDENCE_UPLOAD_IN_PROGRESS = 40; - /** - * The audit report and evidence are uploaded to your bucket. - * - * Generated from protobuf enum OPERATION_STATE_DONE = 50; - */ - const OPERATION_STATE_DONE = 50; - /** - * Audit report generation process failed. - * - * Generated from protobuf enum OPERATION_STATE_FAILED = 60; - */ - const OPERATION_STATE_FAILED = 60; - - private static $valueToName = [ - self::OPERATION_STATE_UNSPECIFIED => 'OPERATION_STATE_UNSPECIFIED', - self::OPERATION_STATE_NOT_STARTED => 'OPERATION_STATE_NOT_STARTED', - self::OPERATION_STATE_EVALUATION_IN_PROGRESS => 'OPERATION_STATE_EVALUATION_IN_PROGRESS', - self::OPERATION_STATE_EVALUATION_DONE => 'OPERATION_STATE_EVALUATION_DONE', - self::OPERATION_STATE_EVIDENCE_REPORT_GENERATION_IN_PROGRESS => 'OPERATION_STATE_EVIDENCE_REPORT_GENERATION_IN_PROGRESS', - self::OPERATION_STATE_EVIDENCE_REPORT_GENERATION_DONE => 'OPERATION_STATE_EVIDENCE_REPORT_GENERATION_DONE', - self::OPERATION_STATE_EVIDENCE_UPLOAD_IN_PROGRESS => 'OPERATION_STATE_EVIDENCE_UPLOAD_IN_PROGRESS', - self::OPERATION_STATE_DONE => 'OPERATION_STATE_DONE', - self::OPERATION_STATE_FAILED => 'OPERATION_STATE_FAILED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ReportGenerationProgress.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ReportGenerationProgress.php deleted file mode 100644 index 8fccf8867285..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ReportGenerationProgress.php +++ /dev/null @@ -1,299 +0,0 @@ -google.cloud.auditmanager.v1.ReportGenerationProgress - */ -class ReportGenerationProgress extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Current state of execution for report generation. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.OperationState state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. Reason for failure during the audit report generation process. - * This field is set only if the `OperationState` attribute is - * `OPERATION_STATE_FAILED`. - * - * Generated from protobuf field string failure_reason = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $failure_reason = ''; - /** - * Progress of the evaluation process. The progress is - * defined in terms of percentage complete. - * - * Generated from protobuf field double evaluation_percent_complete = 20; - */ - protected $evaluation_percent_complete = 0.0; - /** - * Report generation progress, defined in terms of percentage complete. - * Until evaluation is complete, this value is always `0`. - * - * Generated from protobuf field double report_generation_percent_complete = 30; - */ - protected $report_generation_percent_complete = 0.0; - /** - * Report uploading progress, defined in terms of percentage complete. - * Until evaluation and report generation are complete, this value is always - * `0`. - * - * Generated from protobuf field double report_uploading_percent_complete = 40; - */ - protected $report_uploading_percent_complete = 0.0; - /** - * Output only. Cloud Storage bucket where the audit report is uploaded to - * after the evaluation process is completed. - * - * Generated from protobuf field string destination_gcs_bucket = 50 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $destination_gcs_bucket = ''; - /** - * Output only. Name of the audit report. - * - * Generated from protobuf field string audit_report = 51 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $audit_report = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $state - * Output only. Current state of execution for report generation. - * @type string $failure_reason - * Output only. Reason for failure during the audit report generation process. - * This field is set only if the `OperationState` attribute is - * `OPERATION_STATE_FAILED`. - * @type float $evaluation_percent_complete - * Progress of the evaluation process. The progress is - * defined in terms of percentage complete. - * @type float $report_generation_percent_complete - * Report generation progress, defined in terms of percentage complete. - * Until evaluation is complete, this value is always `0`. - * @type float $report_uploading_percent_complete - * Report uploading progress, defined in terms of percentage complete. - * Until evaluation and report generation are complete, this value is always - * `0`. - * @type string $destination_gcs_bucket - * Output only. Cloud Storage bucket where the audit report is uploaded to - * after the evaluation process is completed. - * @type string $audit_report - * Output only. Name of the audit report. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Current state of execution for report generation. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.OperationState state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. Current state of execution for report generation. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.OperationState state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\AuditManager\V1\OperationState::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. Reason for failure during the audit report generation process. - * This field is set only if the `OperationState` attribute is - * `OPERATION_STATE_FAILED`. - * - * Generated from protobuf field string failure_reason = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getFailureReason() - { - return $this->failure_reason; - } - - /** - * Output only. Reason for failure during the audit report generation process. - * This field is set only if the `OperationState` attribute is - * `OPERATION_STATE_FAILED`. - * - * Generated from protobuf field string failure_reason = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setFailureReason($var) - { - GPBUtil::checkString($var, True); - $this->failure_reason = $var; - - return $this; - } - - /** - * Progress of the evaluation process. The progress is - * defined in terms of percentage complete. - * - * Generated from protobuf field double evaluation_percent_complete = 20; - * @return float - */ - public function getEvaluationPercentComplete() - { - return $this->evaluation_percent_complete; - } - - /** - * Progress of the evaluation process. The progress is - * defined in terms of percentage complete. - * - * Generated from protobuf field double evaluation_percent_complete = 20; - * @param float $var - * @return $this - */ - public function setEvaluationPercentComplete($var) - { - GPBUtil::checkDouble($var); - $this->evaluation_percent_complete = $var; - - return $this; - } - - /** - * Report generation progress, defined in terms of percentage complete. - * Until evaluation is complete, this value is always `0`. - * - * Generated from protobuf field double report_generation_percent_complete = 30; - * @return float - */ - public function getReportGenerationPercentComplete() - { - return $this->report_generation_percent_complete; - } - - /** - * Report generation progress, defined in terms of percentage complete. - * Until evaluation is complete, this value is always `0`. - * - * Generated from protobuf field double report_generation_percent_complete = 30; - * @param float $var - * @return $this - */ - public function setReportGenerationPercentComplete($var) - { - GPBUtil::checkDouble($var); - $this->report_generation_percent_complete = $var; - - return $this; - } - - /** - * Report uploading progress, defined in terms of percentage complete. - * Until evaluation and report generation are complete, this value is always - * `0`. - * - * Generated from protobuf field double report_uploading_percent_complete = 40; - * @return float - */ - public function getReportUploadingPercentComplete() - { - return $this->report_uploading_percent_complete; - } - - /** - * Report uploading progress, defined in terms of percentage complete. - * Until evaluation and report generation are complete, this value is always - * `0`. - * - * Generated from protobuf field double report_uploading_percent_complete = 40; - * @param float $var - * @return $this - */ - public function setReportUploadingPercentComplete($var) - { - GPBUtil::checkDouble($var); - $this->report_uploading_percent_complete = $var; - - return $this; - } - - /** - * Output only. Cloud Storage bucket where the audit report is uploaded to - * after the evaluation process is completed. - * - * Generated from protobuf field string destination_gcs_bucket = 50 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDestinationGcsBucket() - { - return $this->destination_gcs_bucket; - } - - /** - * Output only. Cloud Storage bucket where the audit report is uploaded to - * after the evaluation process is completed. - * - * Generated from protobuf field string destination_gcs_bucket = 50 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDestinationGcsBucket($var) - { - GPBUtil::checkString($var, True); - $this->destination_gcs_bucket = $var; - - return $this; - } - - /** - * Output only. Name of the audit report. - * - * Generated from protobuf field string audit_report = 51 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getAuditReport() - { - return $this->audit_report; - } - - /** - * Output only. Name of the audit report. - * - * Generated from protobuf field string audit_report = 51 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setAuditReport($var) - { - GPBUtil::checkString($var, True); - $this->audit_report = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ReportSummary.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ReportSummary.php deleted file mode 100644 index c7a70105fd15..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ReportSummary.php +++ /dev/null @@ -1,204 +0,0 @@ -google.cloud.auditmanager.v1.ReportSummary - */ -class ReportSummary extends \Google\Protobuf\Internal\Message -{ - /** - * Total number of evaluated checks. - * - * Generated from protobuf field int32 total_count = 1; - */ - protected $total_count = 0; - /** - * Number of compliant checks. - * - * Generated from protobuf field int32 compliant_count = 2; - */ - protected $compliant_count = 0; - /** - * Number of checks with violations. - * - * Generated from protobuf field int32 violation_count = 3; - */ - protected $violation_count = 0; - /** - * Number of checks that require a manual review. - * - * Generated from protobuf field int32 manual_review_needed_count = 4; - */ - protected $manual_review_needed_count = 0; - /** - * Number of checks that can't be performed due to errors. - * - * Generated from protobuf field int32 error_count = 5; - */ - protected $error_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $total_count - * Total number of evaluated checks. - * @type int $compliant_count - * Number of compliant checks. - * @type int $violation_count - * Number of checks with violations. - * @type int $manual_review_needed_count - * Number of checks that require a manual review. - * @type int $error_count - * Number of checks that can't be performed due to errors. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * Total number of evaluated checks. - * - * Generated from protobuf field int32 total_count = 1; - * @return int - */ - public function getTotalCount() - { - return $this->total_count; - } - - /** - * Total number of evaluated checks. - * - * Generated from protobuf field int32 total_count = 1; - * @param int $var - * @return $this - */ - public function setTotalCount($var) - { - GPBUtil::checkInt32($var); - $this->total_count = $var; - - return $this; - } - - /** - * Number of compliant checks. - * - * Generated from protobuf field int32 compliant_count = 2; - * @return int - */ - public function getCompliantCount() - { - return $this->compliant_count; - } - - /** - * Number of compliant checks. - * - * Generated from protobuf field int32 compliant_count = 2; - * @param int $var - * @return $this - */ - public function setCompliantCount($var) - { - GPBUtil::checkInt32($var); - $this->compliant_count = $var; - - return $this; - } - - /** - * Number of checks with violations. - * - * Generated from protobuf field int32 violation_count = 3; - * @return int - */ - public function getViolationCount() - { - return $this->violation_count; - } - - /** - * Number of checks with violations. - * - * Generated from protobuf field int32 violation_count = 3; - * @param int $var - * @return $this - */ - public function setViolationCount($var) - { - GPBUtil::checkInt32($var); - $this->violation_count = $var; - - return $this; - } - - /** - * Number of checks that require a manual review. - * - * Generated from protobuf field int32 manual_review_needed_count = 4; - * @return int - */ - public function getManualReviewNeededCount() - { - return $this->manual_review_needed_count; - } - - /** - * Number of checks that require a manual review. - * - * Generated from protobuf field int32 manual_review_needed_count = 4; - * @param int $var - * @return $this - */ - public function setManualReviewNeededCount($var) - { - GPBUtil::checkInt32($var); - $this->manual_review_needed_count = $var; - - return $this; - } - - /** - * Number of checks that can't be performed due to errors. - * - * Generated from protobuf field int32 error_count = 5; - * @return int - */ - public function getErrorCount() - { - return $this->error_count; - } - - /** - * Number of checks that can't be performed due to errors. - * - * Generated from protobuf field int32 error_count = 5; - * @param int $var - * @return $this - */ - public function setErrorCount($var) - { - GPBUtil::checkInt32($var); - $this->error_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ResourceEnrollmentStatus.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ResourceEnrollmentStatus.php deleted file mode 100644 index 471449da2710..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ResourceEnrollmentStatus.php +++ /dev/null @@ -1,244 +0,0 @@ -google.cloud.auditmanager.v1.ResourceEnrollmentStatus - */ -class ResourceEnrollmentStatus extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. Name of the resource enrollment status, in one of the following - * formats: - * * `folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` - * * `projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` - * * `organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Output only. Enrolled destination details for the organization, folder, or - * project. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.Enrollment enrollment = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $enrollment = null; - /** - * Output only. Deprecated. Whether the organization, folder, or project is - * enrolled. Use `enrollment_state` instead. - * - * Generated from protobuf field bool enrolled = 3 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @deprecated - */ - protected $enrolled = false; - /** - * Output only. Display name for the organization, folder, or project. - * - * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $display_name = ''; - /** - * Output only. Enrollment state of the organization, folder, or project. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.ResourceEnrollmentStatus.ResourceEnrollmentState enrollment_state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $enrollment_state = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. Name of the resource enrollment status, in one of the following - * formats: - * * `folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` - * * `projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` - * * `organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` - * @type \Google\Cloud\AuditManager\V1\Enrollment $enrollment - * Output only. Enrolled destination details for the organization, folder, or - * project. - * @type bool $enrolled - * Output only. Deprecated. Whether the organization, folder, or project is - * enrolled. Use `enrollment_state` instead. - * @type string $display_name - * Output only. Display name for the organization, folder, or project. - * @type int $enrollment_state - * Output only. Enrollment state of the organization, folder, or project. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Auditmanager\V1\Auditmanager::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. Name of the resource enrollment status, in one of the following - * formats: - * * `folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` - * * `projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` - * * `organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. Name of the resource enrollment status, in one of the following - * formats: - * * `folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` - * * `projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` - * * `organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. Enrolled destination details for the organization, folder, or - * project. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.Enrollment enrollment = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\AuditManager\V1\Enrollment|null - */ - public function getEnrollment() - { - return $this->enrollment; - } - - public function hasEnrollment() - { - return isset($this->enrollment); - } - - public function clearEnrollment() - { - unset($this->enrollment); - } - - /** - * Output only. Enrolled destination details for the organization, folder, or - * project. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.Enrollment enrollment = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\AuditManager\V1\Enrollment $var - * @return $this - */ - public function setEnrollment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\AuditManager\V1\Enrollment::class); - $this->enrollment = $var; - - return $this; - } - - /** - * Output only. Deprecated. Whether the organization, folder, or project is - * enrolled. Use `enrollment_state` instead. - * - * Generated from protobuf field bool enrolled = 3 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - * @deprecated - */ - public function getEnrolled() - { - if ($this->enrolled !== false) { - @trigger_error('enrolled is deprecated.', E_USER_DEPRECATED); - } - return $this->enrolled; - } - - /** - * Output only. Deprecated. Whether the organization, folder, or project is - * enrolled. Use `enrollment_state` instead. - * - * Generated from protobuf field bool enrolled = 3 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - * @deprecated - */ - public function setEnrolled($var) - { - @trigger_error('enrolled is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkBool($var); - $this->enrolled = $var; - - return $this; - } - - /** - * Output only. Display name for the organization, folder, or project. - * - * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Output only. Display name for the organization, folder, or project. - * - * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Output only. Enrollment state of the organization, folder, or project. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.ResourceEnrollmentStatus.ResourceEnrollmentState enrollment_state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getEnrollmentState() - { - return $this->enrollment_state; - } - - /** - * Output only. Enrollment state of the organization, folder, or project. - * - * Generated from protobuf field .google.cloud.auditmanager.v1.ResourceEnrollmentStatus.ResourceEnrollmentState enrollment_state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setEnrollmentState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\AuditManager\V1\ResourceEnrollmentStatus\ResourceEnrollmentState::class); - $this->enrollment_state = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ResourceEnrollmentStatus/ResourceEnrollmentState.php b/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ResourceEnrollmentStatus/ResourceEnrollmentState.php deleted file mode 100644 index 96ad488e33be..000000000000 --- a/owl-bot-staging/AuditManager/v1/proto/src/Google/Cloud/AuditManager/V1/ResourceEnrollmentStatus/ResourceEnrollmentState.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.auditmanager.v1.ResourceEnrollmentStatus.ResourceEnrollmentState - */ -class ResourceEnrollmentState -{ - /** - * Default value. This value is unused. - * - * Generated from protobuf enum RESOURCE_ENROLLMENT_STATE_UNSPECIFIED = 0; - */ - const RESOURCE_ENROLLMENT_STATE_UNSPECIFIED = 0; - /** - * The resource isn't enrolled. - * - * Generated from protobuf enum NOT_ENROLLED = 1; - */ - const NOT_ENROLLED = 1; - /** - * The resource isn't enrolled but the parent is enrolled. - * - * Generated from protobuf enum INHERITED = 2; - */ - const INHERITED = 2; - /** - * The resource is enrolled. - * - * Generated from protobuf enum ENROLLED = 3; - */ - const ENROLLED = 3; - - private static $valueToName = [ - self::RESOURCE_ENROLLMENT_STATE_UNSPECIFIED => 'RESOURCE_ENROLLMENT_STATE_UNSPECIFIED', - self::NOT_ENROLLED => 'NOT_ENROLLED', - self::INHERITED => 'INHERITED', - self::ENROLLED => 'ENROLLED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/enroll_resource.php b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/enroll_resource.php deleted file mode 100644 index 0a2da65a1396..000000000000 --- a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/enroll_resource.php +++ /dev/null @@ -1,82 +0,0 @@ -setScope($scope) - ->setDestinations($destinations); - - // Call the API and handle any network failures. - try { - /** @var Enrollment $response */ - $response = $auditManagerClient->enrollResource($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $scope = '[SCOPE]'; - - enroll_resource_sample($scope); -} -// [END auditmanager_v1_generated_AuditManager_EnrollResource_sync] diff --git a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/generate_audit_report.php b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/generate_audit_report.php deleted file mode 100644 index 07b4a254ac4f..000000000000 --- a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/generate_audit_report.php +++ /dev/null @@ -1,100 +0,0 @@ -setScope($scope) - ->setReportFormat($reportFormat) - ->setComplianceFramework($complianceFramework); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $auditManagerClient->generateAuditReport($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AuditReport $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $scope = '[SCOPE]'; - $reportFormat = AuditReportFormat::AUDIT_REPORT_FORMAT_UNSPECIFIED; - $complianceFramework = '[COMPLIANCE_FRAMEWORK]'; - - generate_audit_report_sample($scope, $reportFormat, $complianceFramework); -} -// [END auditmanager_v1_generated_AuditManager_GenerateAuditReport_sync] diff --git a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/generate_audit_scope_report.php b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/generate_audit_scope_report.php deleted file mode 100644 index 9b58aa25f9b7..000000000000 --- a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/generate_audit_scope_report.php +++ /dev/null @@ -1,93 +0,0 @@ -setScope($scope) - ->setReportFormat($reportFormat) - ->setComplianceFramework($complianceFramework); - - // Call the API and handle any network failures. - try { - /** @var AuditScopeReport $response */ - $response = $auditManagerClient->generateAuditScopeReport($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $scope = '[SCOPE]'; - $reportFormat = AuditScopeReportFormat::AUDIT_SCOPE_REPORT_FORMAT_UNSPECIFIED; - $complianceFramework = '[COMPLIANCE_FRAMEWORK]'; - - generate_audit_scope_report_sample($scope, $reportFormat, $complianceFramework); -} -// [END auditmanager_v1_generated_AuditManager_GenerateAuditScopeReport_sync] diff --git a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_audit_report.php b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_audit_report.php deleted file mode 100644 index a61f67c74e98..000000000000 --- a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_audit_report.php +++ /dev/null @@ -1,75 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var AuditReport $response */ - $response = $auditManagerClient->getAuditReport($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = AuditManagerClient::auditReportName('[PROJECT]', '[LOCATION]', '[AUDIT_REPORT]'); - - get_audit_report_sample($formattedName); -} -// [END auditmanager_v1_generated_AuditManager_GetAuditReport_sync] diff --git a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_location.php b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_location.php deleted file mode 100644 index 1dea4b7c3f71..000000000000 --- a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END auditmanager_v1_generated_AuditManager_GetLocation_sync] diff --git a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_resource_enrollment_status.php b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_resource_enrollment_status.php deleted file mode 100644 index e3a24459cc3e..000000000000 --- a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/get_resource_enrollment_status.php +++ /dev/null @@ -1,80 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var ResourceEnrollmentStatus $response */ - $response = $auditManagerClient->getResourceEnrollmentStatus($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = AuditManagerClient::resourceEnrollmentStatusName( - '[FOLDER]', - '[LOCATION]', - '[RESOURCE_ENROLLMENT_STATUS]' - ); - - get_resource_enrollment_status_sample($formattedName); -} -// [END auditmanager_v1_generated_AuditManager_GetResourceEnrollmentStatus_sync] diff --git a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_audit_reports.php b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_audit_reports.php deleted file mode 100644 index 608134c484ab..000000000000 --- a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_audit_reports.php +++ /dev/null @@ -1,82 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $auditManagerClient->listAuditReports($request); - - /** @var AuditReport $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = AuditManagerClient::folderLocationName('[FOLDER]', '[LOCATION]'); - - list_audit_reports_sample($formattedParent); -} -// [END auditmanager_v1_generated_AuditManager_ListAuditReports_sync] diff --git a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_controls.php b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_controls.php deleted file mode 100644 index 29e6f80c0fa5..000000000000 --- a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_controls.php +++ /dev/null @@ -1,81 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $auditManagerClient->listControls($request); - - /** @var Control $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = AuditManagerClient::standardName('[PROJECT]', '[LOCATION]', '[STANDARD]'); - - list_controls_sample($formattedParent); -} -// [END auditmanager_v1_generated_AuditManager_ListControls_sync] diff --git a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_locations.php b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_locations.php deleted file mode 100644 index e556a3584ba8..000000000000 --- a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_locations.php +++ /dev/null @@ -1,77 +0,0 @@ -listLocations($request); - - /** @var Location $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END auditmanager_v1_generated_AuditManager_ListLocations_sync] diff --git a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_resource_enrollment_statuses.php b/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_resource_enrollment_statuses.php deleted file mode 100644 index 64c6cf526f20..000000000000 --- a/owl-bot-staging/AuditManager/v1/samples/V1/AuditManagerClient/list_resource_enrollment_statuses.php +++ /dev/null @@ -1,81 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $auditManagerClient->listResourceEnrollmentStatuses($request); - - /** @var ResourceEnrollmentStatus $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = AuditManagerClient::enrollmentStatusScopeName('[FOLDER]', '[LOCATION]'); - - list_resource_enrollment_statuses_sample($formattedParent); -} -// [END auditmanager_v1_generated_AuditManager_ListResourceEnrollmentStatuses_sync] diff --git a/owl-bot-staging/AuditManager/v1/src/V1/Client/AuditManagerClient.php b/owl-bot-staging/AuditManager/v1/src/V1/Client/AuditManagerClient.php deleted file mode 100644 index 2d2902f7c0fb..000000000000 --- a/owl-bot-staging/AuditManager/v1/src/V1/Client/AuditManagerClient.php +++ /dev/null @@ -1,897 +0,0 @@ - enrollResourceAsync(EnrollResourceRequest $request, array $optionalArgs = []) - * @method PromiseInterface generateAuditReportAsync(GenerateAuditReportRequest $request, array $optionalArgs = []) - * @method PromiseInterface generateAuditScopeReportAsync(GenerateAuditScopeReportRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAuditReportAsync(GetAuditReportRequest $request, array $optionalArgs = []) - * @method PromiseInterface getResourceEnrollmentStatusAsync(GetResourceEnrollmentStatusRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAuditReportsAsync(ListAuditReportsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listControlsAsync(ListControlsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listResourceEnrollmentStatusesAsync(ListResourceEnrollmentStatusesRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - */ -final class AuditManagerClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.auditmanager.v1.AuditManager'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'auditmanager.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'auditmanager.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** - * The default scopes required by the service. - * - * @internal - */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-auditmanager', - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/audit_manager_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/audit_manager_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/audit_manager_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/audit_manager_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = $methodName && isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a audit_report - * resource. - * - * @param string $project - * @param string $location - * @param string $auditReport - * - * @return string The formatted audit_report resource. - */ - public static function auditReportName(string $project, string $location, string $auditReport): string - { - return self::getPathTemplate('auditReport')->render([ - 'project' => $project, - 'location' => $location, - 'audit_report' => $auditReport, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * enrollment_status_scope resource. - * - * @param string $folder - * @param string $location - * - * @return string The formatted enrollment_status_scope resource. - */ - public static function enrollmentStatusScopeName(string $folder, string $location): string - { - return self::getPathTemplate('enrollmentStatusScope')->render([ - 'folder' => $folder, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_location resource. - * - * @param string $folder - * @param string $location - * - * @return string The formatted folder_location resource. - */ - public static function folderLocationName(string $folder, string $location): string - { - return self::getPathTemplate('folderLocation')->render([ - 'folder' => $folder, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_location_audit_report resource. - * - * @param string $folder - * @param string $location - * @param string $auditReport - * - * @return string The formatted folder_location_audit_report resource. - */ - public static function folderLocationAuditReportName(string $folder, string $location, string $auditReport): string - { - return self::getPathTemplate('folderLocationAuditReport')->render([ - 'folder' => $folder, - 'location' => $location, - 'audit_report' => $auditReport, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_location_resource_enrollment_status resource. - * - * @param string $folder - * @param string $location - * @param string $resourceEnrollmentStatus - * - * @return string The formatted folder_location_resource_enrollment_status resource. - */ - public static function folderLocationResourceEnrollmentStatusName(string $folder, string $location, string $resourceEnrollmentStatus): string - { - return self::getPathTemplate('folderLocationResourceEnrollmentStatus')->render([ - 'folder' => $folder, - 'location' => $location, - 'resource_enrollment_status' => $resourceEnrollmentStatus, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_location_standard resource. - * - * @param string $folder - * @param string $location - * @param string $standard - * - * @return string The formatted folder_location_standard resource. - */ - public static function folderLocationStandardName(string $folder, string $location, string $standard): string - { - return self::getPathTemplate('folderLocationStandard')->render([ - 'folder' => $folder, - 'location' => $location, - 'standard' => $standard, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName(string $project, string $location): string - { - return self::getPathTemplate('location')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_location resource. - * - * @param string $organization - * @param string $location - * - * @return string The formatted organization_location resource. - */ - public static function organizationLocationName(string $organization, string $location): string - { - return self::getPathTemplate('organizationLocation')->render([ - 'organization' => $organization, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_location_audit_report resource. - * - * @param string $organization - * @param string $location - * @param string $auditReport - * - * @return string The formatted organization_location_audit_report resource. - */ - public static function organizationLocationAuditReportName(string $organization, string $location, string $auditReport): string - { - return self::getPathTemplate('organizationLocationAuditReport')->render([ - 'organization' => $organization, - 'location' => $location, - 'audit_report' => $auditReport, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_location_resource_enrollment_status resource. - * - * @param string $organization - * @param string $location - * @param string $resourceEnrollmentStatus - * - * @return string The formatted organization_location_resource_enrollment_status resource. - */ - public static function organizationLocationResourceEnrollmentStatusName(string $organization, string $location, string $resourceEnrollmentStatus): string - { - return self::getPathTemplate('organizationLocationResourceEnrollmentStatus')->render([ - 'organization' => $organization, - 'location' => $location, - 'resource_enrollment_status' => $resourceEnrollmentStatus, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_location_standard resource. - * - * @param string $organization - * @param string $location - * @param string $standard - * - * @return string The formatted organization_location_standard resource. - */ - public static function organizationLocationStandardName(string $organization, string $location, string $standard): string - { - return self::getPathTemplate('organizationLocationStandard')->render([ - 'organization' => $organization, - 'location' => $location, - 'standard' => $standard, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_audit_report resource. - * - * @param string $project - * @param string $location - * @param string $auditReport - * - * @return string The formatted project_location_audit_report resource. - */ - public static function projectLocationAuditReportName(string $project, string $location, string $auditReport): string - { - return self::getPathTemplate('projectLocationAuditReport')->render([ - 'project' => $project, - 'location' => $location, - 'audit_report' => $auditReport, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_resource_enrollment_status resource. - * - * @param string $project - * @param string $location - * @param string $resourceEnrollmentStatus - * - * @return string The formatted project_location_resource_enrollment_status resource. - */ - public static function projectLocationResourceEnrollmentStatusName(string $project, string $location, string $resourceEnrollmentStatus): string - { - return self::getPathTemplate('projectLocationResourceEnrollmentStatus')->render([ - 'project' => $project, - 'location' => $location, - 'resource_enrollment_status' => $resourceEnrollmentStatus, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_standard resource. - * - * @param string $project - * @param string $location - * @param string $standard - * - * @return string The formatted project_location_standard resource. - */ - public static function projectLocationStandardName(string $project, string $location, string $standard): string - { - return self::getPathTemplate('projectLocationStandard')->render([ - 'project' => $project, - 'location' => $location, - 'standard' => $standard, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * resource_enrollment_status resource. - * - * @param string $folder - * @param string $location - * @param string $resourceEnrollmentStatus - * - * @return string The formatted resource_enrollment_status resource. - */ - public static function resourceEnrollmentStatusName(string $folder, string $location, string $resourceEnrollmentStatus): string - { - return self::getPathTemplate('resourceEnrollmentStatus')->render([ - 'folder' => $folder, - 'location' => $location, - 'resource_enrollment_status' => $resourceEnrollmentStatus, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a standard - * resource. - * - * @param string $project - * @param string $location - * @param string $standard - * - * @return string The formatted standard resource. - */ - public static function standardName(string $project, string $location, string $standard): string - { - return self::getPathTemplate('standard')->render([ - 'project' => $project, - 'location' => $location, - 'standard' => $standard, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - auditReport: projects/{project}/locations/{location}/auditReports/{audit_report} - * - enrollmentStatusScope: folders/{folder}/locations/{location} - * - folderLocation: folders/{folder}/locations/{location} - * - folderLocationAuditReport: folders/{folder}/locations/{location}/auditReports/{audit_report} - * - folderLocationResourceEnrollmentStatus: folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status} - * - folderLocationStandard: folders/{folder}/locations/{location}/standards/{standard} - * - location: projects/{project}/locations/{location} - * - organizationLocation: organizations/{organization}/locations/{location} - * - organizationLocationAuditReport: organizations/{organization}/locations/{location}/auditReports/{audit_report} - * - organizationLocationResourceEnrollmentStatus: organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status} - * - organizationLocationStandard: organizations/{organization}/locations/{location}/standards/{standard} - * - projectLocationAuditReport: projects/{project}/locations/{location}/auditReports/{audit_report} - * - projectLocationResourceEnrollmentStatus: projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status} - * - projectLocationStandard: projects/{project}/locations/{location}/standards/{standard} - * - resourceEnrollmentStatus: folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status} - * - standard: projects/{project}/locations/{location}/standards/{standard} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array|ClientOptions $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'auditmanager.googleapis.com:443'. - * @type FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\AuditManager\V1\AuditManagerClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new AuditManagerClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Adds your project, folder, or organization to Audit - * Manager. This method creates the Audit Manager service agent in your - * workload and grants required permissions to the service agent. - * If you make this request on a workload that's already enrolled, - * then this method overrides the existing set of destinations. - * - * The async variant is {@see AuditManagerClient::enrollResourceAsync()} . - * - * @example samples/V1/AuditManagerClient/enroll_resource.php - * - * @param EnrollResourceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Enrollment - * - * @throws ApiException Thrown if the API call fails. - */ - public function enrollResource(EnrollResourceRequest $request, array $callOptions = []): Enrollment - { - return $this->startApiCall('EnrollResource', $request, $callOptions)->wait(); - } - - /** - * Registers audit report generation requests. This method returns the - * operation identifier that you can use to track the report generation - * progress. - * - * The async variant is {@see AuditManagerClient::generateAuditReportAsync()} . - * - * @example samples/V1/AuditManagerClient/generate_audit_report.php - * - * @param GenerateAuditReportRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function generateAuditReport(GenerateAuditReportRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('GenerateAuditReport', $request, $callOptions)->wait(); - } - - /** - * Generates an audit scope report for the given standard. - * - * The report includes the following: - * - * * The technical attributes and constraints that Audit Manager uses to - * verify your compliance with a framework. - * * A list of Google Cloud services and resources that are within the - * scope of the framework. - * - * The async variant is {@see AuditManagerClient::generateAuditScopeReportAsync()} - * . - * - * @example samples/V1/AuditManagerClient/generate_audit_scope_report.php - * - * @param GenerateAuditScopeReportRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return AuditScopeReport - * - * @throws ApiException Thrown if the API call fails. - */ - public function generateAuditScopeReport(GenerateAuditScopeReportRequest $request, array $callOptions = []): AuditScopeReport - { - return $this->startApiCall('GenerateAuditScopeReport', $request, $callOptions)->wait(); - } - - /** - * Gets the full metadata and findings for an audit report. - * - * The async variant is {@see AuditManagerClient::getAuditReportAsync()} . - * - * @example samples/V1/AuditManagerClient/get_audit_report.php - * - * @param GetAuditReportRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return AuditReport - * - * @throws ApiException Thrown if the API call fails. - */ - public function getAuditReport(GetAuditReportRequest $request, array $callOptions = []): AuditReport - { - return $this->startApiCall('GetAuditReport', $request, $callOptions)->wait(); - } - - /** - * Gets a resource and its enrollment status. - * - * The async variant is - * {@see AuditManagerClient::getResourceEnrollmentStatusAsync()} . - * - * @example samples/V1/AuditManagerClient/get_resource_enrollment_status.php - * - * @param GetResourceEnrollmentStatusRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ResourceEnrollmentStatus - * - * @throws ApiException Thrown if the API call fails. - */ - public function getResourceEnrollmentStatus(GetResourceEnrollmentStatusRequest $request, array $callOptions = []): ResourceEnrollmentStatus - { - return $this->startApiCall('GetResourceEnrollmentStatus', $request, $callOptions)->wait(); - } - - /** - * Lists the audit reports for the organization, folder, or project that you - * specify as the parent scope. - * - * The async variant is {@see AuditManagerClient::listAuditReportsAsync()} . - * - * @example samples/V1/AuditManagerClient/list_audit_reports.php - * - * @param ListAuditReportsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listAuditReports(ListAuditReportsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListAuditReports', $request, $callOptions); - } - - /** - * Lists the controls that you must implement to become compliant to a - * regulatory standard. - * - * The async variant is {@see AuditManagerClient::listControlsAsync()} . - * - * @example samples/V1/AuditManagerClient/list_controls.php - * - * @param ListControlsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listControls(ListControlsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListControls', $request, $callOptions); - } - - /** - * Lists all the folders and projects in an organization or folder, along with - * their enrollments. - * - * The async variant is - * {@see AuditManagerClient::listResourceEnrollmentStatusesAsync()} . - * - * @example samples/V1/AuditManagerClient/list_resource_enrollment_statuses.php - * - * @param ListResourceEnrollmentStatusesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listResourceEnrollmentStatuses(ListResourceEnrollmentStatusesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListResourceEnrollmentStatuses', $request, $callOptions); - } - - /** - * Gets information about a location. - * - * The async variant is {@see AuditManagerClient::getLocationAsync()} . - * - * @example samples/V1/AuditManagerClient/get_location.php - * - * @param GetLocationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * This method lists locations based on the resource scope provided in - * the [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field: * - * **Global locations**: If `name` is empty, the method lists the - * public locations available to all projects. * **Project-specific - * locations**: If `name` follows the format - * `projects/{project}`, the method lists locations visible to that - * specific project. This includes public, private, or other - * project-specific locations enabled for the project. - * - * For gRPC and client library implementations, the resource name is - * passed as the `name` field. For direct service calls, the resource - * name is - * incorporated into the request path based on the specific service - * implementation and version. - * - * The async variant is {@see AuditManagerClient::listLocationsAsync()} . - * - * @example samples/V1/AuditManagerClient/list_locations.php - * - * @param ListLocationsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } -} diff --git a/owl-bot-staging/AuditManager/v1/src/V1/gapic_metadata.json b/owl-bot-staging/AuditManager/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 30a70b3b0e35..000000000000 --- a/owl-bot-staging/AuditManager/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.auditmanager.v1", - "libraryPackage": "Google\\Cloud\\AuditManager\\V1", - "services": { - "AuditManager": { - "clients": { - "grpc": { - "libraryClient": "AuditManagerClient", - "rpcs": { - "EnrollResource": { - "methods": [ - "enrollResource" - ] - }, - "GenerateAuditReport": { - "methods": [ - "generateAuditReport" - ] - }, - "GenerateAuditScopeReport": { - "methods": [ - "generateAuditScopeReport" - ] - }, - "GetAuditReport": { - "methods": [ - "getAuditReport" - ] - }, - "GetResourceEnrollmentStatus": { - "methods": [ - "getResourceEnrollmentStatus" - ] - }, - "ListAuditReports": { - "methods": [ - "listAuditReports" - ] - }, - "ListControls": { - "methods": [ - "listControls" - ] - }, - "ListResourceEnrollmentStatuses": { - "methods": [ - "listResourceEnrollmentStatuses" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_client_config.json b/owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_client_config.json deleted file mode 100644 index 621862801f8f..000000000000 --- a/owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_client_config.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "interfaces": { - "google.cloud.auditmanager.v1.AuditManager": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ], - "no_retry_1_codes": [] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "EnrollResource": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GenerateAuditReport": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GenerateAuditScopeReport": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetAuditReport": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetResourceEnrollmentStatus": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListAuditReports": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListControls": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListResourceEnrollmentStatuses": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - } - } - } - } -} diff --git a/owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_descriptor_config.php b/owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_descriptor_config.php deleted file mode 100644 index 98c9d30f4504..000000000000 --- a/owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_descriptor_config.php +++ /dev/null @@ -1,207 +0,0 @@ - [ - 'google.cloud.auditmanager.v1.AuditManager' => [ - 'GenerateAuditReport' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\AuditManager\V1\AuditReport', - 'metadataReturnType' => '\Google\Cloud\AuditManager\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'scope', - 'fieldAccessors' => [ - 'getScope', - ], - ], - ], - ], - 'EnrollResource' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\AuditManager\V1\Enrollment', - 'headerParams' => [ - [ - 'keyName' => 'scope', - 'fieldAccessors' => [ - 'getScope', - ], - ], - ], - ], - 'GenerateAuditScopeReport' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\AuditManager\V1\AuditScopeReport', - 'headerParams' => [ - [ - 'keyName' => 'scope', - 'fieldAccessors' => [ - 'getScope', - ], - ], - ], - ], - 'GetAuditReport' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\AuditManager\V1\AuditReport', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetResourceEnrollmentStatus' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\AuditManager\V1\ResourceEnrollmentStatus', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListAuditReports' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getAuditReports', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\AuditManager\V1\ListAuditReportsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListControls' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getControls', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\AuditManager\V1\ListControlsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListResourceEnrollmentStatuses' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getResourceEnrollmentStatuses', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\AuditManager\V1\ListResourceEnrollmentStatusesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'templateMap' => [ - 'auditReport' => 'projects/{project}/locations/{location}/auditReports/{audit_report}', - 'enrollmentStatusScope' => 'folders/{folder}/locations/{location}', - 'folderLocation' => 'folders/{folder}/locations/{location}', - 'folderLocationAuditReport' => 'folders/{folder}/locations/{location}/auditReports/{audit_report}', - 'folderLocationResourceEnrollmentStatus' => 'folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}', - 'folderLocationStandard' => 'folders/{folder}/locations/{location}/standards/{standard}', - 'location' => 'projects/{project}/locations/{location}', - 'organizationLocation' => 'organizations/{organization}/locations/{location}', - 'organizationLocationAuditReport' => 'organizations/{organization}/locations/{location}/auditReports/{audit_report}', - 'organizationLocationResourceEnrollmentStatus' => 'organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}', - 'organizationLocationStandard' => 'organizations/{organization}/locations/{location}/standards/{standard}', - 'projectLocationAuditReport' => 'projects/{project}/locations/{location}/auditReports/{audit_report}', - 'projectLocationResourceEnrollmentStatus' => 'projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}', - 'projectLocationStandard' => 'projects/{project}/locations/{location}/standards/{standard}', - 'resourceEnrollmentStatus' => 'folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}', - 'standard' => 'projects/{project}/locations/{location}/standards/{standard}', - ], - ], - ], -]; diff --git a/owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_rest_client_config.php b/owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_rest_client_config.php deleted file mode 100644 index f7d758688248..000000000000 --- a/owl-bot-staging/AuditManager/v1/src/V1/resources/audit_manager_rest_client_config.php +++ /dev/null @@ -1,298 +0,0 @@ - [ - 'google.cloud.auditmanager.v1.AuditManager' => [ - 'EnrollResource' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{scope=folders/*/locations/*}:enrollResource', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{scope=projects/*/locations/*}:enrollResource', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{scope=organizations/*/locations/*}:enrollResource', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'scope' => [ - 'getters' => [ - 'getScope', - ], - ], - ], - ], - 'GenerateAuditReport' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{scope=folders/*/locations/*}/auditReports:generate', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{scope=projects/*/locations/*}/auditReports:generate', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{scope=organizations/*/locations/*}/auditReports:generate', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'scope' => [ - 'getters' => [ - 'getScope', - ], - ], - ], - ], - 'GenerateAuditScopeReport' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{scope=folders/*/locations/*}/auditScopeReports:generate', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{scope=projects/*/locations/*}/auditScopeReports:generate', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{scope=organizations/*/locations/*}/auditScopeReports:generate', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'scope' => [ - 'getters' => [ - 'getScope', - ], - ], - ], - ], - 'GetAuditReport' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=folders/*/locations/*/auditReports/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/auditReports/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=organizations/*/locations/*/auditReports/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetResourceEnrollmentStatus' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/resourceEnrollmentStatuses/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=folders/*/locations/*/resourceEnrollmentStatuses/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=organizations/*/locations/*/resourceEnrollmentStatuses/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListAuditReports' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=organizations/*/locations/*}/auditReports', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=folders/*/locations/*}/auditReports', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/auditReports', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListControls' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=organizations/*/locations/*/standards/*}/controls', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=folders/*/locations/*/standards/*}/controls', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/standards/*}/controls', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListResourceEnrollmentStatuses' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=organizations/*/locations/*}/resourceEnrollmentStatuses', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=folders/*/locations/*}/resourceEnrollmentStatuses', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - ], - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=organizations/*/locations/*/operations/*}:cancel', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=organizations/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=organizations/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=organizations/*/locations/*}/operations', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/AuditManager/v1/tests/Unit/V1/Client/AuditManagerClientTest.php b/owl-bot-staging/AuditManager/v1/tests/Unit/V1/Client/AuditManagerClientTest.php deleted file mode 100644 index 16438f5b044a..000000000000 --- a/owl-bot-staging/AuditManager/v1/tests/Unit/V1/Client/AuditManagerClientTest.php +++ /dev/null @@ -1,894 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return AuditManagerClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new AuditManagerClient($options); - } - - /** @test */ - public function enrollResourceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new Enrollment(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $scope = 'scope109264468'; - $destinations = []; - $request = (new EnrollResourceRequest()) - ->setScope($scope) - ->setDestinations($destinations); - $response = $gapicClient->enrollResource($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.auditmanager.v1.AuditManager/EnrollResource', $actualFuncCall); - $actualValue = $actualRequestObject->getScope(); - $this->assertProtobufEquals($scope, $actualValue); - $actualValue = $actualRequestObject->getDestinations(); - $this->assertProtobufEquals($destinations, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function enrollResourceExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $scope = 'scope109264468'; - $destinations = []; - $request = (new EnrollResourceRequest()) - ->setScope($scope) - ->setDestinations($destinations); - try { - $gapicClient->enrollResource($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateAuditReportTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/generateAuditReportTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $operationId = 'operationId-274116877'; - $complianceStandard2 = 'complianceStandard2-1079015980'; - $scope2 = 'scope21923941639'; - $complianceFramework2 = 'complianceFramework2-1333971955'; - $scopeId = 'scopeId-487349530'; - $expectedResponse = new AuditReport(); - $expectedResponse->setName($name); - $expectedResponse->setOperationId($operationId); - $expectedResponse->setComplianceStandard($complianceStandard2); - $expectedResponse->setScope($scope2); - $expectedResponse->setComplianceFramework($complianceFramework2); - $expectedResponse->setScopeId($scopeId); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/generateAuditReportTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $scope = 'scope109264468'; - $reportFormat = AuditReportFormat::AUDIT_REPORT_FORMAT_UNSPECIFIED; - $complianceFramework = 'complianceFramework1384085210'; - $request = (new GenerateAuditReportRequest()) - ->setScope($scope) - ->setReportFormat($reportFormat) - ->setComplianceFramework($complianceFramework); - $response = $gapicClient->generateAuditReport($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.auditmanager.v1.AuditManager/GenerateAuditReport', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getScope(); - $this->assertProtobufEquals($scope, $actualValue); - $actualValue = $actualApiRequestObject->getReportFormat(); - $this->assertProtobufEquals($reportFormat, $actualValue); - $actualValue = $actualApiRequestObject->getComplianceFramework(); - $this->assertProtobufEquals($complianceFramework, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/generateAuditReportTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function generateAuditReportExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/generateAuditReportTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $scope = 'scope109264468'; - $reportFormat = AuditReportFormat::AUDIT_REPORT_FORMAT_UNSPECIFIED; - $complianceFramework = 'complianceFramework1384085210'; - $request = (new GenerateAuditReportRequest()) - ->setScope($scope) - ->setReportFormat($reportFormat) - ->setComplianceFramework($complianceFramework); - $response = $gapicClient->generateAuditReport($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/generateAuditReportTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function generateAuditScopeReportTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $scopeReportContents = '-38'; - $name = 'name3373707'; - $expectedResponse = new AuditScopeReport(); - $expectedResponse->setScopeReportContents($scopeReportContents); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $scope = 'scope109264468'; - $reportFormat = AuditScopeReportFormat::AUDIT_SCOPE_REPORT_FORMAT_UNSPECIFIED; - $complianceFramework = 'complianceFramework1384085210'; - $request = (new GenerateAuditScopeReportRequest()) - ->setScope($scope) - ->setReportFormat($reportFormat) - ->setComplianceFramework($complianceFramework); - $response = $gapicClient->generateAuditScopeReport($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.auditmanager.v1.AuditManager/GenerateAuditScopeReport', $actualFuncCall); - $actualValue = $actualRequestObject->getScope(); - $this->assertProtobufEquals($scope, $actualValue); - $actualValue = $actualRequestObject->getReportFormat(); - $this->assertProtobufEquals($reportFormat, $actualValue); - $actualValue = $actualRequestObject->getComplianceFramework(); - $this->assertProtobufEquals($complianceFramework, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateAuditScopeReportExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $scope = 'scope109264468'; - $reportFormat = AuditScopeReportFormat::AUDIT_SCOPE_REPORT_FORMAT_UNSPECIFIED; - $complianceFramework = 'complianceFramework1384085210'; - $request = (new GenerateAuditScopeReportRequest()) - ->setScope($scope) - ->setReportFormat($reportFormat) - ->setComplianceFramework($complianceFramework); - try { - $gapicClient->generateAuditScopeReport($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAuditReportTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $operationId = 'operationId-274116877'; - $complianceStandard = 'complianceStandard1339657825'; - $scope = 'scope109264468'; - $complianceFramework = 'complianceFramework1384085210'; - $scopeId = 'scopeId-487349530'; - $expectedResponse = new AuditReport(); - $expectedResponse->setName($name2); - $expectedResponse->setOperationId($operationId); - $expectedResponse->setComplianceStandard($complianceStandard); - $expectedResponse->setScope($scope); - $expectedResponse->setComplianceFramework($complianceFramework); - $expectedResponse->setScopeId($scopeId); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->auditReportName('[PROJECT]', '[LOCATION]', '[AUDIT_REPORT]'); - $request = (new GetAuditReportRequest()) - ->setName($formattedName); - $response = $gapicClient->getAuditReport($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.auditmanager.v1.AuditManager/GetAuditReport', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAuditReportExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->auditReportName('[PROJECT]', '[LOCATION]', '[AUDIT_REPORT]'); - $request = (new GetAuditReportRequest()) - ->setName($formattedName); - try { - $gapicClient->getAuditReport($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getResourceEnrollmentStatusTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $enrolled = false; - $displayName = 'displayName1615086568'; - $expectedResponse = new ResourceEnrollmentStatus(); - $expectedResponse->setName($name2); - $expectedResponse->setEnrolled($enrolled); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->resourceEnrollmentStatusName('[FOLDER]', '[LOCATION]', '[RESOURCE_ENROLLMENT_STATUS]'); - $request = (new GetResourceEnrollmentStatusRequest()) - ->setName($formattedName); - $response = $gapicClient->getResourceEnrollmentStatus($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.auditmanager.v1.AuditManager/GetResourceEnrollmentStatus', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getResourceEnrollmentStatusExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->resourceEnrollmentStatusName('[FOLDER]', '[LOCATION]', '[RESOURCE_ENROLLMENT_STATUS]'); - $request = (new GetResourceEnrollmentStatusRequest()) - ->setName($formattedName); - try { - $gapicClient->getResourceEnrollmentStatus($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAuditReportsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $auditReportsElement = new AuditReport(); - $auditReports = [ - $auditReportsElement, - ]; - $expectedResponse = new ListAuditReportsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAuditReports($auditReports); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->folderLocationName('[FOLDER]', '[LOCATION]'); - $request = (new ListAuditReportsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listAuditReports($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAuditReports()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.auditmanager.v1.AuditManager/ListAuditReports', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAuditReportsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->folderLocationName('[FOLDER]', '[LOCATION]'); - $request = (new ListAuditReportsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listAuditReports($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listControlsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $controlsElement = new Control(); - $controls = [ - $controlsElement, - ]; - $expectedResponse = new ListControlsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setControls($controls); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->standardName('[PROJECT]', '[LOCATION]', '[STANDARD]'); - $request = (new ListControlsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listControls($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getControls()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.auditmanager.v1.AuditManager/ListControls', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listControlsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->standardName('[PROJECT]', '[LOCATION]', '[STANDARD]'); - $request = (new ListControlsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listControls($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listResourceEnrollmentStatusesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $resourceEnrollmentStatusesElement = new ResourceEnrollmentStatus(); - $resourceEnrollmentStatuses = [ - $resourceEnrollmentStatusesElement, - ]; - $expectedResponse = new ListResourceEnrollmentStatusesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setResourceEnrollmentStatuses($resourceEnrollmentStatuses); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->enrollmentStatusScopeName('[FOLDER]', '[LOCATION]'); - $request = (new ListResourceEnrollmentStatusesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listResourceEnrollmentStatuses($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getResourceEnrollmentStatuses()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.auditmanager.v1.AuditManager/ListResourceEnrollmentStatuses', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listResourceEnrollmentStatusesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->enrollmentStatusScopeName('[FOLDER]', '[LOCATION]'); - $request = (new ListResourceEnrollmentStatusesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listResourceEnrollmentStatuses($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function enrollResourceAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new Enrollment(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $scope = 'scope109264468'; - $destinations = []; - $request = (new EnrollResourceRequest()) - ->setScope($scope) - ->setDestinations($destinations); - $response = $gapicClient->enrollResourceAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.auditmanager.v1.AuditManager/EnrollResource', $actualFuncCall); - $actualValue = $actualRequestObject->getScope(); - $this->assertProtobufEquals($scope, $actualValue); - $actualValue = $actualRequestObject->getDestinations(); - $this->assertProtobufEquals($destinations, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -}