From 0d9d2961c08c1a251d2f3a56feecb6dfdce86b6e Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 12 Jan 2023 21:54:58 +0000 Subject: [PATCH 1/2] docs: Update documentation for Security Command Center *.assets.list "parent" parameter PiperOrigin-RevId: 501630229 Source-Link: https://github.com/googleapis/googleapis/commit/914dc31d2c3fa288bfe7574fbf987a1a4f082107 Source-Link: https://github.com/googleapis/googleapis-gen/commit/3bb94cca8628cd3c8ef094d851cd70b45a119319 Copy-Tag: eyJwIjoiU2VjdXJpdHlDZW50ZXIvLk93bEJvdC55YW1sIiwiaCI6IjNiYjk0Y2NhODYyOGNkM2M4ZWYwOTRkODUxY2Q3MGI0NWExMTkzMTkifQ== --- .../Google/Cloud/Securitycenter/V1/Access.php | 43 + .../Google/Cloud/Securitycenter/V1/Asset.php | 60 + .../Securitycenter/V1/BigqueryExport.php | 40 + .../Cloud/Securitycenter/V1/Compliance.php | 32 + .../Cloud/Securitycenter/V1/Connection.php | Bin 0 -> 1152 bytes .../Securitycenter/V1/ContactDetails.php | 31 + .../Cloud/Securitycenter/V1/Container.php | 33 + .../Cloud/Securitycenter/V1/Database.php | 33 + .../Cloud/Securitycenter/V1/Exfiltration.php | 34 + .../Securitycenter/V1/ExternalSystem.php | 36 + .../Google/Cloud/Securitycenter/V1/File.php | 34 + .../Cloud/Securitycenter/V1/Finding.php | Bin 0 -> 6050 bytes .../Google/Cloud/Securitycenter/V1/Folder.php | 30 + .../Cloud/Securitycenter/V1/IamBinding.php | Bin 0 -> 1061 bytes .../Cloud/Securitycenter/V1/Indicator.php | Bin 0 -> 1548 bytes .../Cloud/Securitycenter/V1/KernelRootkit.php | 37 + .../Cloud/Securitycenter/V1/Kubernetes.php | Bin 0 -> 2427 bytes .../Google/Cloud/Securitycenter/V1/Label.php | 31 + .../Cloud/Securitycenter/V1/MitreAttack.php | Bin 0 -> 2542 bytes .../Cloud/Securitycenter/V1/MuteConfig.php | 40 + .../Securitycenter/V1/NotificationConfig.php | Bin 0 -> 1676 bytes .../Securitycenter/V1/NotificationMessage.php | Bin 0 -> 1312 bytes .../V1/OrganizationSettings.php | Bin 0 -> 1506 bytes .../Cloud/Securitycenter/V1/Process.php | 44 + .../Cloud/Securitycenter/V1/Resource.php | 38 + .../V1/RunAssetDiscoveryResponse.php | Bin 0 -> 1219 bytes .../Cloud/Securitycenter/V1/SecurityMarks.php | 37 + .../V1/SecuritycenterService.php | Bin 0 -> 21732 bytes .../Google/Cloud/Securitycenter/V1/Source.php | 34 + .../Cloud/Securitycenter/V1/Vulnerability.php | Bin 0 -> 2516 bytes .../Google/Cloud/SecurityCenter/V1/Access.php | 491 ++ .../Google/Cloud/SecurityCenter/V1/Asset.php | 412 ++ .../SecurityCenter/V1/Asset/IamPolicy.php | 81 + .../V1/Asset/SecurityCenterProperties.php | 379 ++ .../SecurityCenter/V1/Asset_IamPolicy.php | 16 + .../V1/Asset_SecurityCenterProperties.php | 16 + .../SecurityCenter/V1/BigQueryExport.php | 449 ++ .../V1/BulkMuteFindingsRequest.php | 212 + .../V1/BulkMuteFindingsResponse.php | 33 + .../Cloud/SecurityCenter/V1/Compliance.php | 140 + .../Cloud/SecurityCenter/V1/Connection.php | 211 + .../SecurityCenter/V1/Connection/Protocol.php | 85 + .../SecurityCenter/V1/Connection_Protocol.php | 16 + .../Cloud/SecurityCenter/V1/Contact.php | 67 + .../SecurityCenter/V1/ContactDetails.php | 67 + .../Cloud/SecurityCenter/V1/Container.php | 181 + .../V1/CreateBigQueryExportRequest.php | 165 + .../V1/CreateFindingRequest.php | 161 + .../V1/CreateMuteConfigRequest.php | 165 + .../V1/CreateNotificationConfigRequest.php | 173 + .../SecurityCenter/V1/CreateSourceRequest.php | 119 + .../Google/Cloud/SecurityCenter/V1/Cve.php | 188 + .../Google/Cloud/SecurityCenter/V1/Cvssv3.php | 391 ++ .../V1/Cvssv3/AttackComplexity.php | 71 + .../SecurityCenter/V1/Cvssv3/AttackVector.php | 84 + .../Cloud/SecurityCenter/V1/Cvssv3/Impact.php | 73 + .../V1/Cvssv3/PrivilegesRequired.php | 79 + .../Cloud/SecurityCenter/V1/Cvssv3/Scope.php | 67 + .../V1/Cvssv3/UserInteraction.php | 67 + .../V1/Cvssv3_AttackComplexity.php | 16 + .../SecurityCenter/V1/Cvssv3_AttackVector.php | 16 + .../Cloud/SecurityCenter/V1/Cvssv3_Impact.php | 16 + .../V1/Cvssv3_PrivilegesRequired.php | 16 + .../Cloud/SecurityCenter/V1/Cvssv3_Scope.php | 16 + .../V1/Cvssv3_UserInteraction.php | 16 + .../Cloud/SecurityCenter/V1/Database.php | 221 + .../V1/DeleteBigQueryExportRequest.php | 79 + .../V1/DeleteMuteConfigRequest.php | 79 + .../V1/DeleteNotificationConfigRequest.php | 79 + .../SecurityCenter/V1/EnvironmentVariable.php | 102 + .../Cloud/SecurityCenter/V1/ExfilResource.php | 113 + .../Cloud/SecurityCenter/V1/Exfiltration.php | 116 + .../SecurityCenter/V1/ExternalSystem.php | 233 + .../Google/Cloud/SecurityCenter/V1/File.php | 258 ++ .../Cloud/SecurityCenter/V1/Finding.php | 1608 +++++++ .../V1/Finding/FindingClass.php | 87 + .../Cloud/SecurityCenter/V1/Finding/Mute.php | 71 + .../SecurityCenter/V1/Finding/Severity.php | 115 + .../Cloud/SecurityCenter/V1/Finding/State.php | 65 + .../V1/Finding_FindingClass.php | 16 + .../Cloud/SecurityCenter/V1/Finding_Mute.php | 16 + .../SecurityCenter/V1/Finding_Severity.php | 16 + .../Cloud/SecurityCenter/V1/Finding_State.php | 16 + .../Google/Cloud/SecurityCenter/V1/Folder.php | 106 + .../Cloud/SecurityCenter/V1/Geolocation.php | 67 + .../V1/GetBigQueryExportRequest.php | 79 + .../V1/GetMuteConfigRequest.php | 79 + .../V1/GetNotificationConfigRequest.php | 79 + .../V1/GetOrganizationSettingsRequest.php | 71 + .../SecurityCenter/V1/GetSourceRequest.php | 71 + .../SecurityCenter/V1/GroupAssetsRequest.php | 643 +++ .../SecurityCenter/V1/GroupAssetsResponse.php | 191 + .../V1/GroupFindingsRequest.php | 659 +++ .../V1/GroupFindingsResponse.php | 191 + .../Cloud/SecurityCenter/V1/GroupResult.php | 101 + .../Cloud/SecurityCenter/V1/IamBinding.php | 144 + .../SecurityCenter/V1/IamBinding/Action.php | 64 + .../SecurityCenter/V1/IamBinding_Action.php | 16 + .../Cloud/SecurityCenter/V1/Indicator.php | 176 + .../V1/Indicator/ProcessSignature.php | 111 + .../ProcessSignature/MemoryHashSignature.php | 108 + .../MemoryHashSignature/Detection.php | 112 + .../ProcessSignature/YaraRuleSignature.php | 70 + .../V1/Indicator_ProcessSignature.php | 16 + ...r_ProcessSignature_MemoryHashSignature.php | 16 + ...ignature_MemoryHashSignature_Detection.php | 16 + ...tor_ProcessSignature_YaraRuleSignature.php | 16 + .../Cloud/SecurityCenter/V1/KernelRootkit.php | 367 ++ .../Cloud/SecurityCenter/V1/Kubernetes.php | 257 ++ .../V1/Kubernetes/AccessReview.php | 287 ++ .../SecurityCenter/V1/Kubernetes/Binding.php | 186 + .../SecurityCenter/V1/Kubernetes/Node.php | 74 + .../SecurityCenter/V1/Kubernetes/NodePool.php | 104 + .../SecurityCenter/V1/Kubernetes/Pod.php | 176 + .../SecurityCenter/V1/Kubernetes/Role.php | 138 + .../V1/Kubernetes/Role/Kind.php | 64 + .../SecurityCenter/V1/Kubernetes/Subject.php | 138 + .../V1/Kubernetes/Subject/AuthType.php | 71 + .../V1/Kubernetes_AccessReview.php | 16 + .../SecurityCenter/V1/Kubernetes_Binding.php | 16 + .../SecurityCenter/V1/Kubernetes_Node.php | 16 + .../SecurityCenter/V1/Kubernetes_NodePool.php | 16 + .../SecurityCenter/V1/Kubernetes_Pod.php | 16 + .../SecurityCenter/V1/Kubernetes_Role.php | 16 + .../V1/Kubernetes_Role_Kind.php | 16 + .../SecurityCenter/V1/Kubernetes_Subject.php | 16 + .../V1/Kubernetes_Subject_AuthType.php | 16 + .../Google/Cloud/SecurityCenter/V1/Label.php | 102 + .../SecurityCenter/V1/ListAssetsRequest.php | 719 +++ .../SecurityCenter/V1/ListAssetsResponse.php | 183 + .../ListAssetsResponse/ListAssetsResult.php | 114 + .../ListAssetsResult/StateChange.php | 75 + .../ListAssetsResponse_ListAssetsResult.php | 16 + ...sResponse_ListAssetsResult_StateChange.php | 16 + .../V1/ListBigQueryExportsRequest.php | 168 + .../V1/ListBigQueryExportsResponse.php | 105 + .../SecurityCenter/V1/ListFindingsRequest.php | 735 +++ .../V1/ListFindingsResponse.php | 183 + .../ListFindingsResult.php | 158 + .../ListFindingsResult/Resource.php | 321 ++ .../ListFindingsResult/StateChange.php | 87 + ...istFindingsResponse_ListFindingsResult.php | 16 + ...gsResponse_ListFindingsResult_Resource.php | 16 + ...esponse_ListFindingsResult_StateChange.php | 16 + .../V1/ListMuteConfigsRequest.php | 168 + .../V1/ListMuteConfigsResponse.php | 105 + .../V1/ListNotificationConfigsRequest.php | 155 + .../V1/ListNotificationConfigsResponse.php | 105 + .../SecurityCenter/V1/ListSourcesRequest.php | 155 + .../SecurityCenter/V1/ListSourcesResponse.php | 105 + .../Cloud/SecurityCenter/V1/MitreAttack.php | 228 + .../SecurityCenter/V1/MitreAttack/Tactic.php | 149 + .../V1/MitreAttack/Technique.php | 296 ++ .../SecurityCenter/V1/MitreAttack_Tactic.php | 16 + .../V1/MitreAttack_Technique.php | 16 + .../Cloud/SecurityCenter/V1/MuteConfig.php | 401 ++ .../SecurityCenter/V1/NotificationConfig.php | 241 + .../V1/NotificationConfig/StreamingConfig.php | 131 + .../V1/NotificationConfig_StreamingConfig.php | 16 + .../SecurityCenter/V1/NotificationMessage.php | 156 + .../V1/OrganizationSettings.php | 170 + .../AssetDiscoveryConfig.php | 142 + .../AssetDiscoveryConfig/InclusionMode.php | 74 + ...anizationSettings_AssetDiscoveryConfig.php | 16 + ...ngs_AssetDiscoveryConfig_InclusionMode.php | 16 + .../Cloud/SecurityCenter/V1/Process.php | 409 ++ .../Cloud/SecurityCenter/V1/Reference.php | 105 + .../Cloud/SecurityCenter/V1/Resource.php | 317 ++ .../V1/RunAssetDiscoveryRequest.php | 71 + .../V1/RunAssetDiscoveryResponse.php | 111 + .../V1/RunAssetDiscoveryResponse/State.php | 72 + .../V1/RunAssetDiscoveryResponse_State.php | 16 + .../V1/SecurityCenterGrpcClient.php | 600 +++ .../Cloud/SecurityCenter/V1/SecurityMarks.php | 206 + .../V1/ServiceAccountDelegationInfo.php | 125 + .../V1/SetFindingStateRequest.php | 165 + .../SecurityCenter/V1/SetMuteRequest.php | 121 + .../Google/Cloud/SecurityCenter/V1/Source.php | 244 + .../V1/UpdateBigQueryExportRequest.php | 125 + .../V1/UpdateExternalSystemRequest.php | 125 + .../V1/UpdateFindingRequest.php | 157 + .../V1/UpdateMuteConfigRequest.php | 125 + .../V1/UpdateNotificationConfigRequest.php | 125 + .../V1/UpdateOrganizationSettingsRequest.php | 125 + .../V1/UpdateSecurityMarksRequest.php | 189 + .../SecurityCenter/V1/UpdateSourceRequest.php | 125 + .../Cloud/SecurityCenter/V1/Vulnerability.php | 81 + .../bulk_mute_findings.php | 81 + .../create_big_query_export.php | 80 + .../SecurityCenterClient/create_finding.php | 75 + .../create_mute_config.php | 101 + .../create_notification_config.php | 80 + .../V1/SecurityCenterClient/create_source.php | 70 + .../delete_big_query_export.php | 67 + .../delete_mute_config.php | 67 + .../delete_notification_config.php | 70 + .../get_big_query_export.php | 69 + .../SecurityCenterClient/get_iam_policy.php | 66 + .../SecurityCenterClient/get_mute_config.php | 69 + .../get_notification_config.php | 72 + .../get_organization_settings.php | 67 + .../V1/SecurityCenterClient/get_source.php | 67 + .../V1/SecurityCenterClient/group_assets.php | 93 + .../SecurityCenterClient/group_findings.php | 99 + .../V1/SecurityCenterClient/list_assets.php | 75 + .../list_big_query_exports.php | 77 + .../V1/SecurityCenterClient/list_findings.php | 80 + .../list_mute_configs.php | 73 + .../list_notification_configs.php | 73 + .../V1/SecurityCenterClient/list_sources.php | 73 + .../run_asset_discovery.php | 84 + .../set_finding_state.php | 78 + .../SecurityCenterClient/set_iam_policy.php | 69 + .../V1/SecurityCenterClient/set_mute.php | 74 + .../test_iam_permissions.php | 74 + .../update_big_query_export.php | 56 + .../update_external_system.php | 56 + .../SecurityCenterClient/update_finding.php | 57 + .../update_mute_config.php | 88 + .../update_notification_config.php | 58 + .../update_organization_settings.php | 56 + .../update_security_marks.php | 56 + .../V1/SecurityCenterClient/update_source.php | 56 + .../V1/Gapic/SecurityCenterGapicClient.php | 3937 +++++++++++++++++ .../v1/src/V1/SecurityCenterClient.php | 34 + .../v1/src/V1/gapic_metadata.json | 198 + .../security_center_client_config.json | 248 ++ .../security_center_descriptor_config.php | 108 + .../security_center_rest_client_config.php | 814 ++++ .../Unit/V1/SecurityCenterClientTest.php | 2674 +++++++++++ .../Cloud/Securitycenter/V1P1Beta1/Asset.php | 60 + .../Securitycenter/V1P1Beta1/Finding.php | Bin 0 -> 2389 bytes .../Cloud/Securitycenter/V1P1Beta1/Folder.php | 30 + .../V1P1Beta1/NotificationConfig.php | Bin 0 -> 1740 bytes .../V1P1Beta1/NotificationMessage.php | Bin 0 -> 1383 bytes .../V1P1Beta1/OrganizationSettings.php | Bin 0 -> 1583 bytes .../Securitycenter/V1P1Beta1/Resource.php | 36 + .../V1P1Beta1/RunAssetDiscoveryResponse.php | Bin 0 -> 1289 bytes .../V1P1Beta1/SecurityMarks.php | 37 + .../V1P1Beta1/SecuritycenterService.php | Bin 0 -> 15638 bytes .../Cloud/Securitycenter/V1P1Beta1/Source.php | 34 + .../Cloud/SecurityCenter/V1p1beta1/Asset.php | 412 ++ .../V1p1beta1/Asset/IamPolicy.php | 81 + .../Asset/SecurityCenterProperties.php | 379 ++ .../V1p1beta1/Asset_IamPolicy.php | 16 + .../Asset_SecurityCenterProperties.php | 16 + .../V1p1beta1/CreateFindingRequest.php | 153 + .../CreateNotificationConfigRequest.php | 161 + .../V1p1beta1/CreateSourceRequest.php | 119 + .../DeleteNotificationConfigRequest.php | 71 + .../SecurityCenter/V1p1beta1/Finding.php | 603 +++ .../V1p1beta1/Finding/Severity.php | 79 + .../V1p1beta1/Finding/State.php | 65 + .../V1p1beta1/Finding_Severity.php | 16 + .../V1p1beta1/Finding_State.php | 16 + .../Cloud/SecurityCenter/V1p1beta1/Folder.php | 106 + .../GetNotificationConfigRequest.php | 71 + .../GetOrganizationSettingsRequest.php | 71 + .../V1p1beta1/GetSourceRequest.php | 71 + .../V1p1beta1/GroupAssetsRequest.php | 643 +++ .../V1p1beta1/GroupAssetsResponse.php | 191 + .../V1p1beta1/GroupFindingsRequest.php | 627 +++ .../V1p1beta1/GroupFindingsResponse.php | 191 + .../SecurityCenter/V1p1beta1/GroupResult.php | 101 + .../V1p1beta1/ListAssetsRequest.php | 711 +++ .../V1p1beta1/ListAssetsResponse.php | 183 + .../ListAssetsResponse/ListAssetsResult.php | 114 + .../ListAssetsResult/StateChange.php | 75 + .../ListAssetsResponse_ListAssetsResult.php | 16 + ...sResponse_ListAssetsResult_StateChange.php | 16 + .../V1p1beta1/ListFindingsRequest.php | 695 +++ .../V1p1beta1/ListFindingsResponse.php | 183 + .../ListFindingsResult.php | 158 + .../ListFindingsResult/Resource.php | 253 ++ .../ListFindingsResult/StateChange.php | 87 + ...istFindingsResponse_ListFindingsResult.php | 16 + ...gsResponse_ListFindingsResult_Resource.php | 16 + ...esponse_ListFindingsResult_StateChange.php | 16 + .../ListNotificationConfigsRequest.php | 151 + .../ListNotificationConfigsResponse.php | 105 + .../V1p1beta1/ListSourcesRequest.php | 155 + .../V1p1beta1/ListSourcesResponse.php | 105 + .../V1p1beta1/NotificationConfig.php | 268 ++ .../NotificationConfig/EventType.php | 57 + .../NotificationConfig/StreamingConfig.php | 131 + .../NotificationConfig_EventType.php | 16 + .../NotificationConfig_StreamingConfig.php | 16 + .../V1p1beta1/NotificationMessage.php | 156 + .../V1p1beta1/OrganizationSettings.php | 170 + .../AssetDiscoveryConfig.php | 142 + .../AssetDiscoveryConfig/InclusionMode.php | 74 + ...anizationSettings_AssetDiscoveryConfig.php | 16 + ...ngs_AssetDiscoveryConfig_InclusionMode.php | 16 + .../SecurityCenter/V1p1beta1/Resource.php | 249 ++ .../V1p1beta1/RunAssetDiscoveryRequest.php | 71 + .../V1p1beta1/RunAssetDiscoveryResponse.php | 111 + .../RunAssetDiscoveryResponse/State.php | 72 + .../RunAssetDiscoveryResponse_State.php | 16 + .../V1p1beta1/SecurityCenterGrpcClient.php | 398 ++ .../V1p1beta1/SecurityMarks.php | 206 + .../V1p1beta1/SetFindingStateRequest.php | 157 + .../Cloud/SecurityCenter/V1p1beta1/Source.php | 243 + .../V1p1beta1/UpdateFindingRequest.php | 157 + .../UpdateNotificationConfigRequest.php | 125 + .../UpdateOrganizationSettingsRequest.php | 125 + .../V1p1beta1/UpdateSecurityMarksRequest.php | 185 + .../V1p1beta1/UpdateSourceRequest.php | 125 + .../SecurityCenterClient/create_finding.php | 73 + .../create_notification_config.php | 78 + .../SecurityCenterClient/create_source.php | 70 + .../delete_notification_config.php | 68 + .../SecurityCenterClient/get_iam_policy.php | 66 + .../get_notification_config.php | 70 + .../get_organization_settings.php | 67 + .../SecurityCenterClient/get_source.php | 67 + .../SecurityCenterClient/group_assets.php | 93 + .../SecurityCenterClient/group_findings.php | 99 + .../SecurityCenterClient/list_assets.php | 73 + .../SecurityCenterClient/list_findings.php | 80 + .../list_notification_configs.php | 72 + .../SecurityCenterClient/list_sources.php | 73 + .../run_asset_discovery.php | 84 + .../set_finding_state.php | 76 + .../SecurityCenterClient/set_iam_policy.php | 69 + .../test_iam_permissions.php | 74 + .../SecurityCenterClient/update_finding.php | 57 + .../update_notification_config.php | 57 + .../update_organization_settings.php | 56 + .../update_security_marks.php | 56 + .../SecurityCenterClient/update_source.php | 56 + .../Gapic/SecurityCenterGapicClient.php | 2798 ++++++++++++ .../src/V1p1beta1/SecurityCenterClient.php | 36 + .../src/V1p1beta1/gapic_metadata.json | 133 + .../security_center_client_config.json | 183 + .../security_center_descriptor_config.php | 78 + .../security_center_rest_client_config.php | 440 ++ .../V1p1beta1/SecurityCenterClientTest.php | 1692 +++++++ 337 files changed, 51976 insertions(+) create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Access.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Asset.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/BigqueryExport.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Compliance.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Connection.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/ContactDetails.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Container.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Database.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Exfiltration.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/ExternalSystem.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/File.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Finding.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Folder.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/IamBinding.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Indicator.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/KernelRootkit.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Kubernetes.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Label.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/MitreAttack.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/MuteConfig.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/NotificationConfig.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/NotificationMessage.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/OrganizationSettings.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Process.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Resource.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/RunAssetDiscoveryResponse.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/SecurityMarks.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/SecuritycenterService.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Source.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Vulnerability.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Access.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Asset.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Asset/IamPolicy.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Asset/SecurityCenterProperties.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Asset_IamPolicy.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Asset_SecurityCenterProperties.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/BigQueryExport.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/BulkMuteFindingsRequest.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/BulkMuteFindingsResponse.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Compliance.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Connection.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Connection/Protocol.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Connection_Protocol.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Contact.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ContactDetails.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Container.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/CreateBigQueryExportRequest.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/CreateFindingRequest.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/CreateMuteConfigRequest.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/CreateNotificationConfigRequest.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/CreateSourceRequest.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cve.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3/AttackComplexity.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3/AttackVector.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3/Impact.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3/PrivilegesRequired.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3/Scope.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3/UserInteraction.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3_AttackComplexity.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3_AttackVector.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3_Impact.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3_PrivilegesRequired.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3_Scope.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3_UserInteraction.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Database.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/DeleteBigQueryExportRequest.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/DeleteMuteConfigRequest.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/DeleteNotificationConfigRequest.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/EnvironmentVariable.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ExfilResource.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Exfiltration.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ExternalSystem.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/File.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Finding.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Finding/FindingClass.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Finding/Mute.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Finding/Severity.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Finding/State.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Finding_FindingClass.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Finding_Mute.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Finding_Severity.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Finding_State.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Folder.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Geolocation.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GetBigQueryExportRequest.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GetMuteConfigRequest.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GetNotificationConfigRequest.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GetOrganizationSettingsRequest.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GetSourceRequest.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GroupAssetsRequest.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GroupAssetsResponse.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GroupFindingsRequest.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GroupFindingsResponse.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GroupResult.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/IamBinding.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/IamBinding/Action.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/IamBinding_Action.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Indicator.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Indicator/ProcessSignature.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Indicator/ProcessSignature/MemoryHashSignature.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Indicator/ProcessSignature/MemoryHashSignature/Detection.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Indicator/ProcessSignature/YaraRuleSignature.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Indicator_ProcessSignature.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Indicator_ProcessSignature_MemoryHashSignature.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Indicator_ProcessSignature_MemoryHashSignature_Detection.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Indicator_ProcessSignature_YaraRuleSignature.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/KernelRootkit.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/AccessReview.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/Binding.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/Node.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/NodePool.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/Pod.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/Role.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/Role/Kind.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/Subject.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/Subject/AuthType.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes_AccessReview.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes_Binding.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes_Node.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes_NodePool.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes_Pod.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes_Role.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes_Role_Kind.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes_Subject.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes_Subject_AuthType.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Label.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListAssetsRequest.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListAssetsResponse.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListAssetsResponse/ListAssetsResult.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListAssetsResponse/ListAssetsResult/StateChange.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListAssetsResponse_ListAssetsResult.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListAssetsResponse_ListAssetsResult_StateChange.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListBigQueryExportsRequest.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListBigQueryExportsResponse.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListFindingsRequest.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListFindingsResponse.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListFindingsResponse/ListFindingsResult.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListFindingsResponse/ListFindingsResult/Resource.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListFindingsResponse/ListFindingsResult/StateChange.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListFindingsResponse_ListFindingsResult.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListFindingsResponse_ListFindingsResult_Resource.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListFindingsResponse_ListFindingsResult_StateChange.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListMuteConfigsRequest.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListMuteConfigsResponse.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListNotificationConfigsRequest.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListNotificationConfigsResponse.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListSourcesRequest.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListSourcesResponse.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/MitreAttack.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/MitreAttack/Tactic.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/MitreAttack/Technique.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/MitreAttack_Tactic.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/MitreAttack_Technique.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/MuteConfig.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/NotificationConfig.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/NotificationConfig/StreamingConfig.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/NotificationConfig_StreamingConfig.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/NotificationMessage.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/OrganizationSettings.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/OrganizationSettings/AssetDiscoveryConfig.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/OrganizationSettings/AssetDiscoveryConfig/InclusionMode.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/OrganizationSettings_AssetDiscoveryConfig.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/OrganizationSettings_AssetDiscoveryConfig_InclusionMode.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Process.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Reference.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Resource.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/RunAssetDiscoveryRequest.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/RunAssetDiscoveryResponse.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/RunAssetDiscoveryResponse/State.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/RunAssetDiscoveryResponse_State.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/SecurityCenterGrpcClient.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/SecurityMarks.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ServiceAccountDelegationInfo.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/SetFindingStateRequest.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/SetMuteRequest.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Source.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/UpdateBigQueryExportRequest.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/UpdateExternalSystemRequest.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/UpdateFindingRequest.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/UpdateMuteConfigRequest.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/UpdateNotificationConfigRequest.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/UpdateOrganizationSettingsRequest.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/UpdateSecurityMarksRequest.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/UpdateSourceRequest.php create mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Vulnerability.php create mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/bulk_mute_findings.php create mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/create_big_query_export.php create mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/create_finding.php create mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/create_mute_config.php create mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/create_notification_config.php create mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/create_source.php create mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/delete_big_query_export.php create mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/delete_mute_config.php create mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/delete_notification_config.php create mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/get_big_query_export.php create mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/get_iam_policy.php create mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/get_mute_config.php create mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/get_notification_config.php create mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/get_organization_settings.php create mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/get_source.php create mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/group_assets.php create mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/group_findings.php create mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/list_assets.php create mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/list_big_query_exports.php create mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/list_findings.php create mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/list_mute_configs.php create mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/list_notification_configs.php create mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/list_sources.php create mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/run_asset_discovery.php create mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/set_finding_state.php create mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/set_iam_policy.php create mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/set_mute.php create mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/test_iam_permissions.php create mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/update_big_query_export.php create mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/update_external_system.php create mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/update_finding.php create mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/update_mute_config.php create mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/update_notification_config.php create mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/update_organization_settings.php create mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/update_security_marks.php create mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/update_source.php create mode 100644 owl-bot-staging/SecurityCenter/v1/src/V1/Gapic/SecurityCenterGapicClient.php create mode 100644 owl-bot-staging/SecurityCenter/v1/src/V1/SecurityCenterClient.php create mode 100644 owl-bot-staging/SecurityCenter/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/SecurityCenter/v1/src/V1/resources/security_center_client_config.json create mode 100644 owl-bot-staging/SecurityCenter/v1/src/V1/resources/security_center_descriptor_config.php create mode 100644 owl-bot-staging/SecurityCenter/v1/src/V1/resources/security_center_rest_client_config.php create mode 100644 owl-bot-staging/SecurityCenter/v1/tests/Unit/V1/SecurityCenterClientTest.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/Asset.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/Finding.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/Folder.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/NotificationConfig.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/NotificationMessage.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/OrganizationSettings.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/Resource.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/RunAssetDiscoveryResponse.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/SecurityMarks.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/SecuritycenterService.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/Source.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Asset.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Asset/IamPolicy.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Asset/SecurityCenterProperties.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Asset_IamPolicy.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Asset_SecurityCenterProperties.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/CreateFindingRequest.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/CreateNotificationConfigRequest.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/CreateSourceRequest.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/DeleteNotificationConfigRequest.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Finding.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Finding/Severity.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Finding/State.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Finding_Severity.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Finding_State.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Folder.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/GetNotificationConfigRequest.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/GetOrganizationSettingsRequest.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/GetSourceRequest.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/GroupAssetsRequest.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/GroupAssetsResponse.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/GroupFindingsRequest.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/GroupFindingsResponse.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/GroupResult.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListAssetsRequest.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListAssetsResponse.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListAssetsResponse/ListAssetsResult.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListAssetsResponse/ListAssetsResult/StateChange.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListAssetsResponse_ListAssetsResult.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListAssetsResponse_ListAssetsResult_StateChange.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListFindingsRequest.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListFindingsResponse.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListFindingsResponse/ListFindingsResult.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListFindingsResponse/ListFindingsResult/Resource.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListFindingsResponse/ListFindingsResult/StateChange.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListFindingsResponse_ListFindingsResult.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListFindingsResponse_ListFindingsResult_Resource.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListFindingsResponse_ListFindingsResult_StateChange.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListNotificationConfigsRequest.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListNotificationConfigsResponse.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListSourcesRequest.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListSourcesResponse.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/NotificationConfig.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/NotificationConfig/EventType.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/NotificationConfig/StreamingConfig.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/NotificationConfig_EventType.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/NotificationConfig_StreamingConfig.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/NotificationMessage.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/OrganizationSettings.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/OrganizationSettings/AssetDiscoveryConfig.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/OrganizationSettings/AssetDiscoveryConfig/InclusionMode.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/OrganizationSettings_AssetDiscoveryConfig.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/OrganizationSettings_AssetDiscoveryConfig_InclusionMode.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Resource.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/RunAssetDiscoveryRequest.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/RunAssetDiscoveryResponse.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/RunAssetDiscoveryResponse/State.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/RunAssetDiscoveryResponse_State.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/SecurityCenterGrpcClient.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/SecurityMarks.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/SetFindingStateRequest.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Source.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/UpdateFindingRequest.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/UpdateNotificationConfigRequest.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/UpdateOrganizationSettingsRequest.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/UpdateSecurityMarksRequest.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/UpdateSourceRequest.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/create_finding.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/create_notification_config.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/create_source.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/delete_notification_config.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/get_iam_policy.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/get_notification_config.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/get_organization_settings.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/get_source.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/group_assets.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/group_findings.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/list_assets.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/list_findings.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/list_notification_configs.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/list_sources.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/run_asset_discovery.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/set_finding_state.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/set_iam_policy.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/test_iam_permissions.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/update_finding.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/update_notification_config.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/update_organization_settings.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/update_security_marks.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/update_source.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/src/V1p1beta1/Gapic/SecurityCenterGapicClient.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/src/V1p1beta1/SecurityCenterClient.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/src/V1p1beta1/gapic_metadata.json create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/src/V1p1beta1/resources/security_center_client_config.json create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/src/V1p1beta1/resources/security_center_descriptor_config.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/src/V1p1beta1/resources/security_center_rest_client_config.php create mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/tests/Unit/V1p1beta1/SecurityCenterClientTest.php diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Access.php b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Access.php new file mode 100644 index 000000000000..ddbb4a280787 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Access.php @@ -0,0 +1,43 @@ +internalAddGeneratedFile( + ' + ++google/cloud/securitycenter/v1/access.protogoogle.cloud.securitycenter.v1" +Access +principal_email (  + caller_ip ( B + caller_ip_geo ( 2+.google.cloud.securitycenter.v1.Geolocation +user_agent_family (  + service_name (  + method_name (  +principal_subject (  +service_account_key_name ( e +service_account_delegation_info ( 2<.google.cloud.securitycenter.v1.ServiceAccountDelegationInfo + user_name ( "R +ServiceAccountDelegationInfo +principal_email (  +principal_subject ( "" + Geolocation + region_code ( B +"com.google.cloud.securitycenter.v1B AccessProtoPZLgoogle.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenterGoogle.Cloud.SecurityCenter.V1Google\\Cloud\\SecurityCenter\\V1!Google::Cloud::SecurityCenter::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Asset.php b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Asset.php new file mode 100644 index 000000000000..7bf2e73ed036 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Asset.php @@ -0,0 +1,60 @@ +internalAddGeneratedFile( + ' + +*google/cloud/securitycenter/v1/asset.protogoogle.cloud.securitycenter.v1+google/cloud/securitycenter/v1/folder.proto3google/cloud/securitycenter/v1/security_marks.protogoogle/protobuf/struct.protogoogle/protobuf/timestamp.proto" +Asset +name ( b +security_center_properties ( 2>.google.cloud.securitycenter.v1.Asset.SecurityCenterPropertiesZ +resource_properties ( 2=.google.cloud.securitycenter.v1.Asset.ResourcePropertiesEntryE +security_marks ( 2-.google.cloud.securitycenter.v1.SecurityMarks/ + create_time ( 2.google.protobuf.Timestamp/ + update_time + ( 2.google.protobuf.TimestampC + +iam_policy ( 2/.google.cloud.securitycenter.v1.Asset.IamPolicy +canonical_name (  +SecurityCenterProperties + resource_name (  + resource_type (  +resource_parent (  +resource_project (  +resource_owners (  +resource_display_name ( $ +resource_parent_display_name ( % +resource_project_display_name ( 7 +folders + ( 2&.google.cloud.securitycenter.v1.Folder + IamPolicy + policy_blob ( Q +ResourcePropertiesEntry +key ( % +value ( 2.google.protobuf.Value:8:A +#securitycenter.googleapis.com/Asset+organizations/{organization}/assets/{asset}folders/{folder}/assets/{asset}!projects/{project}/assets/{asset}B +"com.google.cloud.securitycenter.v1PZLgoogle.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenterGoogle.Cloud.SecurityCenter.V1Google\\Cloud\\SecurityCenter\\V1!Google::Cloud::SecurityCenter::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/BigqueryExport.php b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/BigqueryExport.php new file mode 100644 index 000000000000..7951072d27ca --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/BigqueryExport.php @@ -0,0 +1,40 @@ +internalAddGeneratedFile( + ' + +4google/cloud/securitycenter/v1/bigquery_export.protogoogle.cloud.securitycenter.v1google/api/resource.protogoogle/protobuf/timestamp.proto" +BigQueryExport +name (  + description (  +filter (  +dataset ( 4 + create_time ( 2.google.protobuf.TimestampBA4 + update_time ( 2.google.protobuf.TimestampBA +most_recent_editor ( BA + principal ( BA:A +,securitycenter.googleapis.com/BigQueryExport5organizations/{organization}/bigQueryExports/{export})folders/{folder}/bigQueryExports/{export}+projects/{project}/bigQueryExports/{export}B +"com.google.cloud.securitycenter.v1BBigQueryExportProtoPZLgoogle.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenterGoogle.Cloud.SecurityCenter.V1Google\\Cloud\\SecurityCenter\\V1!Google::Cloud::SecurityCenter::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Compliance.php b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Compliance.php new file mode 100644 index 000000000000..42ec5d7e7c7f --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Compliance.php @@ -0,0 +1,32 @@ +internalAddGeneratedFile( + ' + +/google/cloud/securitycenter/v1/compliance.protogoogle.cloud.securitycenter.v1"< + +Compliance +standard (  +version (  +ids ( B +"com.google.cloud.securitycenter.v1BComplianceProtoPZLgoogle.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenterGoogle.Cloud.SecurityCenter.V1Google\\Cloud\\SecurityCenter\\V1!Google::Cloud::SecurityCenter::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Connection.php b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Connection.php new file mode 100644 index 0000000000000000000000000000000000000000..9f4b2e9a8880baffceb1f3b8bb62fa103ab76255 GIT binary patch literal 1152 zcmb7D(N5bi6kSVU;7KfW)6^$q7!pMqi3)FF-89lrRRS78;bDqYxsDqw1v_#aBsTG| z-`S^Zf3p3=Y^P0IAvUcqy}CK~_}J&3_aD=n6ugC9!iYeUL~wKu@HJb5UVB*4<^Ee?6PIw+U8Ns=r@*Wc=iE!>(4(5yz zEGcKU;Rb-ATau*+6W9%o&xk}3k|^vNn$XiU;pGBNc-=Yz04FHRpjXm?uK=oFnvW8S zVJ4AOe>*fAQbr|33H_pO)rMn~WJHZW#*TAlbU{7PXP7kiV8N-eJ1JMM(1ufCfqoeE zC}B_EjG-j#kPHi&N-hEgb={cA@;P;jh)6p?(78+gmk;pcbA}8~wLnw&M1v@gj zHNit!8D;w)=tRe-C@POVQC2lepdQ-=KWo7GPmk)G#ei*0wHHmb?^@g6ssPNKsJ{X0 z5y>QF$^*`ZG;LI1rMXsb0BgRVav>X4^<}xf0oIEB(cmQmeg$4kS_W4$I3KJ|H?py; zI_n3A_TRPHGhMdvOfB>F1z4TdO4RG%qCe<+{nO#q`DNgHy_25bv7XgeL9OSV1y-g0 z94rmIz*^D8RVT1EbkV)=Ek_srWndi~|E_>-m5zVNIet0QV|c#5_SPwz-I% zm@sqCiBl-0*;9!+TD0SPb+c=tW1HyM)9836f%bLl#}p7w!d0fLfP^Yuzp7gWiR&5` j*IlG>-Rst9#V9=7E%)nPv9@zt{^W)mWUinternalAddGeneratedFile( + ' + +4google/cloud/securitycenter/v1/contact_details.protogoogle.cloud.securitycenter.v1"K +ContactDetails9 +contacts ( 2\'.google.cloud.securitycenter.v1.Contact" +Contact +email ( B +"com.google.cloud.securitycenter.v1BContactDetailsProtoPZLgoogle.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenterGoogle.Cloud.SecurityCenter.V1Google\\Cloud\\SecurityCenter\\V1!Google::Cloud::SecurityCenter::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Container.php b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Container.php new file mode 100644 index 000000000000..31e94cdeba41 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Container.php @@ -0,0 +1,33 @@ +internalAddGeneratedFile( + ' + +.google/cloud/securitycenter/v1/container.protogoogle.cloud.securitycenter.v1"o + Container +name (  +uri (  +image_id ( 5 +labels ( 2%.google.cloud.securitycenter.v1.LabelB +"com.google.cloud.securitycenter.v1BContainerProtoPZLgoogle.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenterGoogle.Cloud.SecurityCenter.V1Google\\Cloud\\SecurityCenter\\V1!Google::Cloud::SecurityCenter::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Database.php b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Database.php new file mode 100644 index 000000000000..e6c9a943e7e9 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Database.php @@ -0,0 +1,33 @@ +internalAddGeneratedFile( + ' + +-google/cloud/securitycenter/v1/database.protogoogle.cloud.securitycenter.v1"b +Database +name (  + display_name (  + user_name (  +query (  +grantees ( B +"com.google.cloud.securitycenter.v1B DatabaseProtoPZLgoogle.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenterGoogle.Cloud.SecurityCenter.V1Google\\Cloud\\SecurityCenter\\V1!Google::Cloud::SecurityCenter::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Exfiltration.php b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Exfiltration.php new file mode 100644 index 000000000000..c0ed5cd54aac --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Exfiltration.php @@ -0,0 +1,34 @@ +internalAddGeneratedFile( + ' + +1google/cloud/securitycenter/v1/exfiltration.protogoogle.cloud.securitycenter.v1" + Exfiltration> +sources ( 2-.google.cloud.securitycenter.v1.ExfilResource> +targets ( 2-.google.cloud.securitycenter.v1.ExfilResource"1 + ExfilResource +name (  + +components ( B +"com.google.cloud.securitycenter.v1BExfiltrationProtoPZLgoogle.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenterGoogle.Cloud.SecurityCenter.V1Google\\Cloud\\SecurityCenter\\V1!Google::Cloud::SecurityCenter::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/ExternalSystem.php b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/ExternalSystem.php new file mode 100644 index 000000000000..bdc034c5945e --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/ExternalSystem.php @@ -0,0 +1,36 @@ +internalAddGeneratedFile( + ' + +4google/cloud/securitycenter/v1/external_system.protogoogle.cloud.securitycenter.v1google/protobuf/timestamp.proto" +ExternalSystem +name (  + assignees (  + external_uid (  +status ( ? +external_system_update_time ( 2.google.protobuf.Timestamp:A +,securitycenter.googleapis.com/ExternalSystemaorganizations/{organization}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}Ufolders/{folder}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}Wprojects/{project}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}B +"com.google.cloud.securitycenter.v1BExternalSystemProtoPZLgoogle.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenterGoogle.Cloud.SecurityCenter.V1Google\\Cloud\\SecurityCenter\\V1!Google::Cloud::SecurityCenter::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/File.php b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/File.php new file mode 100644 index 000000000000..9ce1ffa30d33 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/File.php @@ -0,0 +1,34 @@ +internalAddGeneratedFile( + ' + +)google/cloud/securitycenter/v1/file.protogoogle.cloud.securitycenter.v1"s +File +path (  +size ( +sha256 (  + hashed_size ( +partially_hashed ( +contents ( B +"com.google.cloud.securitycenter.v1B FileProtoPZLgoogle.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenterGoogle.Cloud.SecurityCenter.V1Google\\Cloud\\SecurityCenter\\V1!Google::Cloud::SecurityCenter::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Finding.php b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Finding.php new file mode 100644 index 0000000000000000000000000000000000000000..369d305a698c97ef38acc2839a7a67c530a37b7c GIT binary patch literal 6050 zcmb_gTT|Oc6t2PC)<7HuG76Itg_2+rA_tOYQU{XwB8VEWscqbwXEd_BCMvR|kz^($ z!%KfkANy1K2RhTf^f|ww4?TO4u@k7A!MtEed%itq_nhxsHea}JT=bQ+gKg~T0d7i- z6DfFuCD(HT$8apE(P_1?CmBxLH7)GPl2j;3#ZpyL3TpK>i26>)GjK*abeuyArwz;L zG}AsdI-VJv7}yT5mp)!kw@kZf+J`a)M#$FN*mrdUOFR3yJsjvwJ<#hr6r-Le81+gY zM!mNF3?akPeP7yUSm-^H;Lq(eEYpzuKo8*GvgvE4Z3d=pneV`!EvcnjJ_gxO*S0#g z5txoG5rL9z;MA(bFv;3w*8%&tq)@AUawKpZb(Pp;>sGyheZw=|!14BBX(n@sgYH3+ zH>p*=ErByzQi|!A$$X;ZmK1m$+`GFZc{u2J_A{zC0XXgcs-JUaS=X#@o7igR@EiTu zbi7RF%&Iexi$u$q-{Zhi7hF<3YZ%z~2jBf7oIH4(W$JJ%!@#m_Os{$7C|3RX=>iGkjB&)<}$qX*ATo_w;+W;fT6ct~}# z1IZOD=-)-O_Bkn8SY)eZn!x4$1TG)1FWlg0x@)FAo-J55U$`H!kxo+rU!0CuOezh= z`vVJvhLB2ls7GIko!j4)cXHsK&Hv=L$ZaWBzunVVb&wx_jb+NW&7zux-zYYrFI9YE&%7;c<530l)8y zNI~YC$rU0bB+(>XK0b836LE~<&7tY8mqJ4zj?=e4psTFf)WA*`dx434aY7nRB{sGO z-jTK)K%QJ)u>}LWfQXq#Web|BYN#ZoDp51sju=QL{xQ=EG-F9q7A{5X} zUzmt<6d}?t`;xfu4N8*3&^j)VGQXaA3iLns$(-P4lH`m0}` zIw}LtqUm005^qqQ?neRllwraXG|sZCxIl&PMhUa_On3p#>V$dI7jIFM?nMdbyCTH# z=$W!!8!BJ%CMZB0Z;Ep##PlMCt*=DkLKu@;P}l_macFY(#oJW&>nPFiltDF;)O(MY z+87oSzPL1~jiHDjp=*pZwWjI2mVUw_Y?&C!ZtxmPH2Dw!IwkQAJ%St|y|eyFyi0E; zG6s8lF5xAb?#aHsSYH`T`?ID-5MaszzNCqAi z;Wb9yBl3#!ij%V{#wWcIvP?1ckMgBCh^c|Y4gjq~Pa}}kgl-25wAIXDE9$u^Y>@FZo zqWCLy=T&lq;O@Z$@?bAHDomi!-O~5T_);FlX#$%=$-RS5RGC6!%)?`A8Nk2C~Ls;|mQwhFjc(M;`Nx2Tk} zIdvC|0Y!-}Y9(JPZmT;7vtu06H*VhBhh9)f8Sj-l1-r@94P3PrvVdJWaDw3tqDyr{O3T-n3Y8e=0m~ zIaU)W0bbD`gGoIB&;AAGY9Pjc4J4QQD~6Up{|JBHkNvdE3SL-f=`cG6yV8f)rt!p^ z1acM^&77b0pWg2yi#v3_EYp#r9F}}}sPUkytF8YLE~xVfbaw>JmegSe{bA%b1Ic74 rN+#0}lgZT98{<^NM=RZye2tBFd#1sp$~KL2Cc$(io7bMAQ-uBlBqa0T literal 0 HcmV?d00001 diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Folder.php b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Folder.php new file mode 100644 index 000000000000..4fab2c7121a3 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Folder.php @@ -0,0 +1,30 @@ +internalAddGeneratedFile( + ' + ++google/cloud/securitycenter/v1/folder.protogoogle.cloud.securitycenter.v1"G +Folder +resource_folder ( $ +resource_folder_display_name ( B +"com.google.cloud.securitycenter.v1B FolderProtoPZLgoogle.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenterGoogle.Cloud.SecurityCenter.V1Google\\Cloud\\SecurityCenter\\V1!Google::Cloud::SecurityCenter::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/IamBinding.php b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/IamBinding.php new file mode 100644 index 0000000000000000000000000000000000000000..0f0557ac30d771423d48add52ed02714533353ea GIT binary patch literal 1061 zcmb7D-HOvd7&Wa_9AquIkX|jbbz!@piCOU`wMyG`OTcZ5TYDjaGMP-X14$-KCJU?d zZM^bPd=$O#6`V}kbjz}exyj!-=R5O#=X?7;y-LAzI3@|a2*S;4%cLk? z`ZNh>5*kVzfCR-POA#h;JR4jPfdV9uH&!~{u+Z@?_jJ64)dc`YD9fOW;z20~z5*z( zH1{KlVJ47}w_}5&a^M)q^V(Wkk~NVpn;B1!V~=2-5_U&M7Q43+!>qWE*;L zYiw3@Ms~$>i=!nd@*I+3PE*17OhRotB%b@im2y?jSEKKemWl|7fU>Qumjb^?Ca!K?orl73h+3^i6`f2_u})&8ad zup5Qm2Mwfp+0vlaIXJV7zw?b9*XS#v{scVaEF!I%6nLy3fJRJWpYT?_cyGS}jScP@ z(EG!=JDn^)O)h7np?mI*oaO`l5vcbar>W@xG(L_lri)RtHu$B1wv6yU+zg)X?5Hu% zw9g+l2MAe&WONx1&5$H2!Djgjr8K)Q_TBxCeXkvkRlE%qZ(|$pp;{ATVg1+wyv+hs w8&E<#xdK0HN2Q2uD;3+`m$B`IuM807o?B>il=ex{#`8w{#@B}poBLXWDpmrarEj>xbv-`l#fI@QI5;&cldQ{D>z(MG`*|RP}wr6cLrn zYK5|Z`dD${7-|59dql?AC#cb^9TSBEtgzQGEZ%;~;+>7Lco)@O06)S~qQfB@dckEFs%e{E9PqKqnvBl<53E68I-Z2w(#wY4rRyV%Q zLLr}n{RkFm+`>U1h?GPYEi_#&*biVn;5|&4EKZphCjgR$4C}HqXj;Ep*l`EWZc}n{ z6-W2q*ZgNg3VRV|^rFe)Ov+yRJq-^hARJbEq{l_S)y1;g%H@l5$kOU3|F7;G8{Pv= zn>#wVXMcv3J{Gtol8B7R%^SI+JIH<1tnW4Hh*;^T1uHk$uvg)Jn=-7c?%*Dc`g$Oi z9!LZb5Jk+&XI)#^`EUnIH%L46p+L!nLjGVc!CdA@uR?0&F|5W!M+Z}_7>7i*dRX~g z66me4%2w$qEKk&HFGC@3ZE-fGsVzVuA8GB{f(;#2e<`T8ly8)|&`s;p(O}s_9$^+b zT!fX7usFT$mFzDZQ+Zpu?T+7$?^A0HlVgs_F=v=#`z8&Yi|UUdz#Al89(5VS(^+>t qwVsiTAaT?dXsJ7>f!xvlmZGV=9$Vlegnl}cSMavaj0sH}69tUFp literal 0 HcmV?d00001 diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/KernelRootkit.php b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/KernelRootkit.php new file mode 100644 index 000000000000..34333fe677f6 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/KernelRootkit.php @@ -0,0 +1,37 @@ +internalAddGeneratedFile( + ' + +3google/cloud/securitycenter/v1/kernel_rootkit.protogoogle.cloud.securitycenter.v1" + KernelRootkit +name ( $ +unexpected_code_modification (. +&unexpected_read_only_data_modification (! +unexpected_ftrace_handler (! +unexpected_kprobe_handler ($ +unexpected_kernel_code_pages (& +unexpected_system_call_handler ($ +unexpected_interrupt_handler (( + unexpected_processes_in_runqueue (B +"com.google.cloud.securitycenter.v1BKernelRootkitProtoPZLgoogle.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenterGoogle.Cloud.SecurityCenter.V1Google\\Cloud\\SecurityCenter\\V1!Google::Cloud::SecurityCenter::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Kubernetes.php b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Kubernetes.php new file mode 100644 index 0000000000000000000000000000000000000000..c2e6618f21c6e459353890a77f1bda1b7c9eb6db GIT binary patch literal 2427 zcmbtW+iu%N5Up;uGI1P%O#xL8!NyGyxo9cKY0-j?Qs@>{uqz3=7)?Mxps1D1hT#&s zOBZh8&**EPi$3=`AJ9)}f11R0%~IeEeTn=xMI5`m{%CK z1M2Wg8+#nn%0;#EI+$VVVUC%uumL>l4Q9S&W7HWmzQ^2}Tih}`3dU?o7<04%W1dxy z0c_V|44uSq@CzXE^Mje|*obk9i^pS!O&!nSj^#Q(i&NFm!g3iF?l)~0foF4vct|?* zJsXz~QHUvRANxeGP(x8*14)b^#q7$Hd6sLoFte%Sb3zBg)G(Hq$8^e-^5JS*3FjXT?l?K97lbA;eRTLzf460)O6vN#1(;L69+OBep(CiGsl}d-jWq_3gRe17>&?X>%+cf+nBK_#TO3#i4}Jg z*4GKJ>Iz_}{7b*4AR~DONP99zsq!6d53=$S5tPfXuV6=IH)8M8ZCfcNYc+ADMAZ?I zcDT(ouBXxi$g2EBv8c#OKR{lts)TI(^M7?x`Yi=nm8S+|UkkDo75hhDZj1PuT&25y zB79e5hV(^YW+a&h-#}JbJb=PUx7V6ZdZR(R*?rM%w+bI|)rQcJq8>!&-WYr)mRVsv@62+FJS|X9MVD=-nd6cpwA{~XUrMDu~)w|Z+pz}BZ zoht;r9`N(=rH|jkY7g?U)yMEreKP)TI(|85-=udkY7Ygy8tjXgvu?9pZ#Mgr-nfv~ z?m(_H>`w-TOz8^tt`~`R4{}RN0)JH>A^q=2uSi>-;;?gzdqP&vhj3Rg8ZYM5qR_+z zrZZ8y(&RquiZ3QwWpP(7H2z7!ffx+7aMifK)}HE~gVd|j)#bV*uH`LtLYI{#_S9go zY6+I_u-k@-internalAddGeneratedFile( + ' + +*google/cloud/securitycenter/v1/label.protogoogle.cloud.securitycenter.v1"$ +Label +name (  +value ( B +"com.google.cloud.securitycenter.v1B +LabelProtoPZLgoogle.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenterGoogle.Cloud.SecurityCenter.V1Google\\Cloud\\SecurityCenter\\V1!Google::Cloud::SecurityCenter::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/MitreAttack.php b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/MitreAttack.php new file mode 100644 index 0000000000000000000000000000000000000000..03f31d5e520b14d501b2b2e3a8756e39170af3d8 GIT binary patch literal 2542 zcmbtWVQOSxgz-sgSJ_kR8D_|+Kg>8)rKr9mF`^^-Sx z{wmVPX_6;lGSp8dr>9Y>hsoJE9!63 z+>~Kfxllm<7m6O*TEv^}lT|MMAC{Zw^6MzgfMn$osJFWN^DvSYFN@RO(KML z313C4*3j;7zpV5LZy)5rwv*&>WX`s6|>t5@8yaQG{N>*U@H!Gzk;1-Z6yA zzl^ugHPa;x*l%H%Rkcfl3X^w;+tm=hfi!?2E)cO{t)RDtHxM$pWf7LXeeyT) zpa7+5he#-kG0Iw?9wmmHTLcePcu8##t-24a?LNVUfHEsx4JcczPL3aim&h7BfCm{!^HbyXRd3M`-) zziXb*t}5(~VNuZEG`Y__p>3!&(4@3bxwfg+OpE&qaT>mdZZqP&;O-H)kSRCtrWC~O zQ1I0?d>`EfquF3vXtr#*+;@b0=Mk)$Tw<2bwCi{W-CJzCRBna7 zu{ial8h!s!FGLimy6v<)b;HPt_@F7@h(0m-y;b-NW1HPJ`P9 zWzyk**DVX00dFhssG~$($SY2_(C#lbbK1g%Ug_#_`9guSaYWd8VRuwXM%`EM2@Bp7 z>U7Tzv$WxCLKlRs?G}7V(*WbX^V?qi&n2`AqsYI!`Rm%kRZ`s6&eBV3dixBLVK5q0 zlXP$}h(^UEa!@`B#&Pzc`Q^#^d+(>^?N%|SREsgCIvZ2WV&18C4u72m^rnN%e3B_c zdN9iTvAk1))M^Dvt#%%!R_h#|tP~8td^o?#KQAYQg@NLO!$c8T&JAzTTZH}sNyp~l literal 0 HcmV?d00001 diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/MuteConfig.php b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/MuteConfig.php new file mode 100644 index 000000000000..7dfffabaf04f --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/MuteConfig.php @@ -0,0 +1,40 @@ +internalAddGeneratedFile( + ' + +0google/cloud/securitycenter/v1/mute_config.protogoogle.cloud.securitycenter.v1google/api/resource.protogoogle/protobuf/timestamp.proto" + +MuteConfig +name (  + display_name ( B + description (  +filter ( BA4 + create_time ( 2.google.protobuf.TimestampBA4 + update_time ( 2.google.protobuf.TimestampBA +most_recent_editor ( BA:A +(securitycenter.googleapis.com/MuteConfig6organizations/{organization}/muteConfigs/{mute_config}*folders/{folder}/muteConfigs/{mute_config},projects/{project}/muteConfigs/{mute_config}B +"com.google.cloud.securitycenter.v1BMuteConfigProtoPZLgoogle.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenterGoogle.Cloud.SecurityCenter.V1Google\\Cloud\\SecurityCenter\\V1!Google::Cloud::SecurityCenter::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/NotificationConfig.php b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/NotificationConfig.php new file mode 100644 index 0000000000000000000000000000000000000000..4d6cac7b0d4e42b5f35a4411d8a8e1a5dfa57d29 GIT binary patch literal 1676 zcmbVMK~EDw6t)F14k%_lSW(FoO(==(T1|`@Ky5)Pi9#cUgW1?jXJ?l&%gknWwh55_ z6Mum}z#rk=yJyZGj3;Mjx22_2gS~Wj_Py_Y@0<6&m6y?e1n$EI>Tsc$&j?mb@D>r=XMt^s0KoA9jU!AbY&7fdsKOpr*lid*cP+(pcZTrXz3MUm zB*bwHw+3+63@kVXQ2(N&9WnxArArd{fWzkfbmh!SG9P?o% zYo6Edb3+eHrOzzoxd^^r0nh(;O04-T(>C*E56_p~sm|Tbk#WQvnX}FY zY~k}HutvwkngNsPMRWKJ%;+(SlXgpqh>_AndRm9SYxlsN z?1P<^)m39#?})RT##wj4Y)oZ`5!%9ph=i-sq)DClQJb(nf*Y}t6dy1i>Llic88WcqoYIkz=r1Sb}i(K(4$g+&K@q3yP|#L6D3L~=T8^NuFryNhS6cp zrT(=D7WCEqL;CuyQ8mo!Hwz!$=Cc`y5c9y+nm7UFnwt{Nsifnqae4R>z7*#h#`MwMi~UW1m^s#f!HqRH6Pa017jyym1M~z$NdN!< literal 0 HcmV?d00001 diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/NotificationMessage.php b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/NotificationMessage.php new file mode 100644 index 0000000000000000000000000000000000000000..212c8852228cf5f937a839692e5b34f628abb349 GIT binary patch literal 1312 zcmbVM%Wl&^6eZzN7+b2Gw1l_>*PE^Phh|VQ$(`>rk9}486-+-No5Sv zEDV_fDlZZqGvxyGhj2PPgSY+TvmMi#%1lv)A(AqRnMY%p1zyT%rntVOOlYROS=$p* z^N>@bxfGKNmZl_PuAPFAAm$(;l)+%sJ7JmxL=%5t0sX@q(Eqps=#SeSglJ6C6i%0b zPYPW01%Y{zY#MV4sWw9??D2HM1=pO!{IglK3n7V9W^k_8hMAx_QOFyHf-+|x3e3EA zFOf!=E-V<1a;=O`{&BvnAhF+PDOEhtQjJV0#u3w%!ug4_UyjY;cnD6x5#wtlyP#FZ zmZt+KrZXivmUj*?uipH>*UvxVBH$vz_-e;1$bSL)z)B0OMY3WYyyB%aZ-Ssw;>Z}v zskrBxw9xlE=*53Ksj*$Oy4Hm5stMg$`|-gBXjQIK7<2bq4Lw?8uLhvzik+zxA&(}x zjhi*7IS(2bZH0xt&AK^w_{?v)f9B?v_wnwQX}-T8(!6cEolVV)JLqkpyKH7c*ZWmN zyC$?78hgz(`&mDaYMvj5={?Kvd8=~P(;`Dlk-IT&wz7!9 I9L*8>4atwc5dZ)H literal 0 HcmV?d00001 diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/OrganizationSettings.php b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/OrganizationSettings.php new file mode 100644 index 0000000000000000000000000000000000000000..339e4411a1bc7e7f79c96a13ea8c553b77ba5611 GIT binary patch literal 1506 zcmb_c-A>yu6kZErn_;NR5JFs3h9Oa;Em7HB7@JC4sz}gQE3h#|ic-f7M!}A32MJK6 zJ;@$mkFrPDWGsxZg(8*&mcS_CL|!3GCFa&; z*NEgQ{{oBHM;JERdxu#1fiHcxp%L9`is*JG5Z#mV4ge_f zg@COw6x(UHRHs}gEtmR{Tf+iz5=+M0%GI_*EJr;~|CF`{X;V1TgQbk4 zZ9gEn3nfqRcyrmW;(uJqg}f@MtoZiGFx z1z36k5r|!4ezlTU_GbnG%l8Z(VzfuXl^JE9-*(JD^Dw7zFe_=U+AvjB1Fn9}gQaN( z<0Y6^D}IiV^hh8S@fk&&fki@5l!){cE?9sy;l=Gw|BaC84Dk;YykP*)V^M&)CNYze zSZ{(ClTJmj>NKkd#~r8D^bT9Kx_8{{wCh!8->KIMPmBUs&~{~LH4jb;Ib$9?t$$V# zwR$0MpWjwOuzhcsS%dwU2vZ4&HLamWnT_4Aux`db`xCM;Jnp@pIk2wq{?e{??#sbo z!Xb-%8k!2)3Nh89W8HCkOtW?-tNETUHnbv{T9M45B2~4@@!I literal 0 HcmV?d00001 diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Process.php b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Process.php new file mode 100644 index 000000000000..9909a447e174 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Process.php @@ -0,0 +1,44 @@ +internalAddGeneratedFile( + ' + +,google/cloud/securitycenter/v1/process.protogoogle.cloud.securitycenter.v1" +Process +name ( 4 +binary ( 2$.google.cloud.securitycenter.v1.File7 + libraries ( 2$.google.cloud.securitycenter.v1.File4 +script ( 2$.google.cloud.securitycenter.v1.File +args (  +arguments_truncated (J + env_variables ( 23.google.cloud.securitycenter.v1.EnvironmentVariable +env_variables_truncated ( +pid + ( + +parent_pid ("0 +EnvironmentVariable +name (  +val ( B +"com.google.cloud.securitycenter.v1B ProcessProtoPZLgoogle.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenterGoogle.Cloud.SecurityCenter.V1Google\\Cloud\\SecurityCenter\\V1!Google::Cloud::SecurityCenter::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Resource.php b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Resource.php new file mode 100644 index 000000000000..c5861850e85d --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Resource.php @@ -0,0 +1,38 @@ +internalAddGeneratedFile( + ' + +-google/cloud/securitycenter/v1/resource.protogoogle.cloud.securitycenter.v1+google/cloud/securitycenter/v1/folder.proto" +Resource +name (  + display_name (  +type (  +project (  +project_display_name (  +parent (  +parent_display_name ( < +folders ( 2&.google.cloud.securitycenter.v1.FolderBAB +"com.google.cloud.securitycenter.v1B ResourceProtoPZLgoogle.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenterGoogle.Cloud.SecurityCenter.V1Google\\Cloud\\SecurityCenter\\V1!Google::Cloud::SecurityCenter::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/RunAssetDiscoveryResponse.php b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/RunAssetDiscoveryResponse.php new file mode 100644 index 0000000000000000000000000000000000000000..74eae81f50d4e9ff1df52316774f045a9a60f7cc GIT binary patch literal 1219 zcmbu8(Q4Z;6o!{<9h=5V7Z|iRMePbr*`|>0PFYvd*bRXuF-h8sVF-$?xB^!)vRvp! zUuc(mj6K3$V6dl{B*$(;m)*=aw&bJlob&7aACHsE1iXP=%BduZhH!QR)g^_A6iNgl zhO=xwrxFI@Dq%5|2tsEF2g3<;o!(?eA5BFj1BziJL=@9T5Q{8qq%_DRQ#S$Sips`y zvmrA+C2304G-PQYuBp74N}48urxe+20B~}pcSt~C*E{J`MM9#8-?d=BW5E7+3G81q zTL1*H2E$Rt+lKEH_|bw6z5=M9B%8%7fTjyArn%KQWXqk>+QKx5=)2jJB(>f=y@6a@mEKx#wIuzrGs#0&WQ$JXw zH8?hh^}I%m9~5~6mCWe<><~(-GRa%EZUeY2zx=NS%zqXwtkR2hkJVNNYx%;aEwpQM9Z2;DcZgjH(EA{om zWAtwtT1i4j*&%%X9n^lc`aky0=?YQbIMumvGeXy3FdJSHUC+&$lJs*rcx6?cA zxz5I;+Dq`fGwge3?nEyuwRHf-=bk$nyN+I0&3fXF`n`cZ>1;ec`B?$G+Hpm`6@qw` z&u5D!BM}oGAt9qiM7gc6k^dqIOIMk)wXE^C>UP(94Oy?D!fPFCVsz2`Q3Uu4H3h7JxsQz?XFZ literal 0 HcmV?d00001 diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/SecurityMarks.php b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/SecurityMarks.php new file mode 100644 index 000000000000..86d57e07c844 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/SecurityMarks.php @@ -0,0 +1,37 @@ +internalAddGeneratedFile( + ' + +3google/cloud/securitycenter/v1/security_marks.protogoogle.cloud.securitycenter.v1" + SecurityMarks +name ( G +marks ( 28.google.cloud.securitycenter.v1.SecurityMarks.MarksEntry +canonical_name ( , + +MarksEntry +key (  +value ( :8:A ++securitycenter.googleapis.com/SecurityMarks9organizations/{organization}/assets/{asset}/securityMarksNorganizations/{organization}/sources/{source}/findings/{finding}/securityMarks-folders/{folder}/assets/{asset}/securityMarks/projects/{project}/assets/{asset}/securityMarksBfolders/{folder}/sources/{source}/findings/{finding}/securityMarksDprojects/{project}/sources/{source}/findings/{finding}/securityMarksB +"com.google.cloud.securitycenter.v1PZLgoogle.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenterGoogle.Cloud.SecurityCenter.V1Google\\Cloud\\SecurityCenter\\V1!Google::Cloud::SecurityCenter::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/SecuritycenterService.php b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/SecuritycenterService.php new file mode 100644 index 0000000000000000000000000000000000000000..e84a55478e324a889220e58dabd4d054946af188 GIT binary patch literal 21732 zcmds9U2GiJb6N!M^nCEs+Q4tWY&!wABT`;ZPT#YwYrgAT$x=m?Alt*u2mMf z$jTfOSy}antlXQLCZyh|SytBjWECZoPmwJA*Y4hLnDwk>*KGLXv}sk%rfHkChWQpu zb|$-CYgh(I3ev83n|0f4HM5Lixmh>H&t*|2qdnbj0XQ>RspAU63$Uu(U=wcE8kKp& zs&~w`-Ri6WX|cFr*bd6o#r&xn+e!< z{#HqjVC8nVS+Xp{o;R&}>ygpfx(%z)YFb9I=+4?5BusRvZB|OnW{Uv~oaq?n8YUP> zI-cvM(O8=`9@HM0txh^tm>n8x;@L%*UWKEUeDEkSv*yOnb^-Qnmr_+zC7&U7oeIS9_QY&ToYjZU}O z1oSG)Z5Ei)xfaJ6&v%hGxyBAFc+rK;ww+?K4lDOiOEv4^4u)L?S6@%z37kRim=Hnj z+Gaa^P#&)?Tr)*HVBuwZhQ{M&mPnf?$Fot{AET%E=4oHrfFJ(?PO zP6)5H&3w%bAD9n}9aEmxd5jPbPAU)9Ss$I#vvj=O4b&z+FV5bn8ZasMp1CS%50M<*<(&&N@7Pb-Ko#t?6UJFV8aKNTET zV>lqtJ5JNfS&ZRqDXtOHKlF`a)JrkE(tfI&%mXGw0%N@(7WSAoYnyDX;g4#YJ2UZo zOlTmUd!D@@o;6&zly5n1$u~e-B!c-h;d{jM<3fn@++f~CJe0|^^AK%&6MTrEko(1< zu(+cTPvy37p4!qIAc0;Z$7Z{Yhb(-Gm~P!RAoZ|p`YhSou5};{8`ZMf_|WXoKbA88 zRT?1L1U*RhuA2==DMmBw5j{>0af@*`?C1dJ$&70H7#R%?f!U<~ZH*k6>lkpr5Tnb% zU-k_?$p?RtoR%w&2Z$Vk2hPIE!AT^)$|D#(Mu^xPRdWq>oE-oObcXB`54eKEh00kW zBFZ7|o^!K8-Q$R2jk6&p<$4oPe{x=Bu==pZz5i0hsq#FCQKORB#~Mi&hm&L?lU=My=` ztY?hN+-!1WvcK7QMd|m*5s<(85UrEvK<<;r=M&@vjH6nOO!p;9uX#`^a+EHULVuLP z1nRfQ2#n=5_M%66Dz~Y>ogs9w)9SYQDb@)DVD+9raGtAthQ82WWiBKTDvpx<8*GT` z{Vl~W(Mx26RgxgyRAqb|-2)+HxbUppV={*2Wb#fgkRga2YgHE1Mh7|dSb*Bee<>xT z4O_fww;meJ(S1B}JxzxAZx)n&M)$){gZl4)8}Xokv5GE`5vh30k1G|TzD}t7@ zgdZ-P`on$18hVxk7q8#U!j>EtvConxT*Kef$Wb2<|94gq3~*Srm}Rir4$CWT(~u@N zox5*rzGSvrtTbgeS-6qEZDu~5@l^jq~BZ*~-3=1;L zz;@&*u>N_CoM6KSBaDNrXPz0bMu4x2082*T1@^5*@yX@oNvN}E_#mN$&jbnNKY_=j*$JW z4irtD2!Gq@`c+u>42ibt-1gxFz5N{35VgapJ-$xFyLh}$Y;Zy>Tuyq+$1<6)F1~~ z`v;0K4{FT~bioG;%W=$}(Rt%0fIx1Q$(`e3^%*j({1Z0S-n+N%t}e`ve1r~>!P5LZ z{8gjFWZ&(DrR96@j|`(J&E2_iZ((FW|855N*ON^<{$CmXxA&4GY?WNdgz2x7qYY;I z>sa0M8~)lUsy>gMfHW6q5EKUm%vc>0^K0{Wlca- zBvy877&rp(0u?I=42=CyBm3nq^niM9qesYrHPdQ0YFkxa7(o9CH1<~87~RXgDbPR$ z_6ehIBMqhj&ygeYSC0fdG#nwt+NFRWnR~5tYmqyZr^wLVTk@Y7*WC=L?q-kv7m!)PNm^JGcUJO1J*`4Fdx4)$ zD`&}>{>M`xiI&J9_pm&>Jy^I9x7LCWO$IA&mk0q79UBj#4C%1g=p00`9P}$1IS3PC zm5$w+$SY(IOK!zHCX>#CDS#TSkag_e3LrQ?*&YloWrD%6@$6ShRy zh?dIuD#fT!igU~kRr)#{C{U%~F-NKvQQJiocW|EAp{l>7kyEH@Sm{hE`!RB~71n+d zCU-f`kiYNW6ZE9F$%aTW$iV zSg*ONO52%k6pkQi+^qgL;AyZQ;H@#s$;|uenxbG$Qx&Y~5*dM}ZYzL(Y$!Sv_h_6b1$;j8=StdlcR#sDS7fMK=ijY zazO1k(n}JjsM3T=Ex}Fb(e-%_a!x<3&Od;$C}ADJuV)~IR1^oq;MK%8@o?eLx^caP>oYO0v z3jR2$5CFvVTLWYifePk(^p#|`9^{lz?;sh}znI~+^p~1`QH3D@xmwef(1+bQD3|mJ zRgkg-iABun=T#Bvk|dSUE1edr;oO&)RC%368xv$959yDg?C8H?5Wf-p9CCGnZ65CP z^iQMFKb}CZ&B_ygN1skV?`Fto)SZWT z(~RPboBUUB^6zL9XnvuySJy_^9z$Vr0xivlLIm}N2{bA{8sX#;mCr-_0j>miGYxt* zZl?xVBn~N)An1be?fJGwC;65L#RoDj;g(3d6fQ7Kd?n}lK~ zF~!-`bO)Q7rrOkWC!6{MC{h zVyR&4Il#k%hYbC*(s_DMI4Y9-n8VwMR&j$}^kE06ac@fKxX*38xvo&2^PU}C?-?Ma z-^+k+Qm+yv@J%YYMB=5`#r1LtEdCI&_)SemPm5_!A3y7!Egf7gdk-8AE}=&ahwCM8 zX6a(om#tSiBr-ED2zvAMM;all_8`n?Dh>#jR$>=xc`AzluE|aQfpEs*u*uafpQO+8 zI3~y(gdBn_J)sh~U`Pu3PKF#{YKX(66@LU)spU*#-H?|_%=KL~lFwl(GcOL5e3FS1z+OpddK?`AA>|8dBN@j1mwG#ewD9T z|HR3Oyl{{!T9DPTdqpfSxuO?bcE==KpBc$`RlnpihI!j4&R*##({++J^x6MKPo91) zL-qkI%)`>yGp!&@kDEwZzN6_^T>X7^6g_>W9E0tn`jpF^05-|zfjbFmg0WW`;-GCZ zaG<$#0Os$USOaHe^`S&4;;ej|yO5&D;F6q`EoEfBw+>0JNqq5+{+UMT9e6v9DQI*y zP0M0$0Ml_9U&V<&NFsGTmw-~Zz@O&&zp793<&c{6$w7;DKr=pzBa(L#E^#|L|6oAg zH1J+rps{zmu|ezQlJkqTZZDhuJ{DBJmMOf!r)l_JMNPc-^O6(4F~CkLMgL8X@|%U% zqetm)>xtx73pb=+)dadP{wkre4xx>nyM=50 zg}dvLM(n-9EB(bP>y<)ouM{?kUg@MNLtx`sUFeI53p~qV^}>=2e^J#{T;DKWxx%q$ z^)P1r=XfxEv#`L?Qj;S0o&V51rjkPP!M~icT@1gr1^J&!?nvg1dYl;^q~fa-Dz%(> z(y}8q>R&2gu@{dwF&=r_?bnOOJ^kvSb0JKZigg$QaA1ho>FnMt>hA~7?<-@7Q5QO#Pg~dq83J^OG-7EQ)kp4ToZi?3fd=1Cg z3^t5Q?y}en);pN~6O7uwtLfNtjH*@m8id8bwY_pt$1Y^B0v69Zt&6^7NQEbsyH`4o zY?DChxk?!LfnCe^AGo889qd_8D>eS)5XL2Ok81ckJ>7|vJ>7}KJ>7}aJ>B=5!&6!a z(6M{DBm`+q?+ci?{EJqY;hWCCdf^@tsC@nJ5L9ivZXt=Z zUg~LP7`OTuO*_2W96{Lj2}; zs+?nQykB}=#+T5q+5A;0_rSK>RxzJ{{P?km`p&0rYF+yQepK@UyeDL@w>q1%J&ow_ z8HJbxVMQz76!#f7S`B!uFb5$mzhN}N5bRdo{QyeTH#?`jYJW3xVv&E4GdIUS>b2^* ziJH4N^}Zyih);Gp-|WQ8sulQ(+>bM-P)M=Jr4)-^F~#D&sg;l1-^+Epbk_MS*(81g ZQ~6{jEB=}Fkk4guO8jW$HrXcRe*x*!^`rm* literal 0 HcmV?d00001 diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Source.php b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Source.php new file mode 100644 index 000000000000..b87fb0221a87 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Source.php @@ -0,0 +1,34 @@ +internalAddGeneratedFile( + ' + ++google/cloud/securitycenter/v1/source.protogoogle.cloud.securitycenter.v1" +Source +name (  + display_name (  + description (  +canonical_name ( :A +$securitycenter.googleapis.com/Source-organizations/{organization}/sources/{source}!folders/{folder}/sources/{source}#projects/{project}/sources/{source}B +"com.google.cloud.securitycenter.v1PZLgoogle.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenterGoogle.Cloud.SecurityCenter.V1Google\\Cloud\\SecurityCenter\\V1!Google::Cloud::SecurityCenter::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Vulnerability.php b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Vulnerability.php new file mode 100644 index 0000000000000000000000000000000000000000..f1da8e1c96b7814c7945b83f158a2b2c8cf13d26 GIT binary patch literal 2516 zcmbW3-EP}96vrpK@tTt+aTGLFw>D#(Vs(I4UJ{_glx2e>D~?jf(qzY72LpmE)2=W@ z()3|88}bsn>l+Na+iUDmcClv|Maiy}kHxKTWRU0oUOsG08HBm0@Rr%!f$}c&x?AtWuhQ7Lh^ZH1-j)}p=H?CuVilfXkgd@CWNc8gUB&M z%XLsJP#hDNw@|{2W1n~~S&Mx%_NK04gt`YH((gdq+miyF6- zx6)x_oHan@#G@cwF}aUIKf=?aBjn>S@|`{EI|f`#{!wSozq3*w)qa06>>=5(@+2^p zJ%xA6u=C+N#jYnBp6)K6-CcgPU8=%jW;@ugAa9N^#~`M>u(Qekznm9Gxbz1DdGcie za#o)T=h=M#ACvUMWIqBfhw=orbsJ0@E7%uMFh@Z!+U4@p$CtNBMHA8p^uF- zePF%Sjgev5M$g9F9m2U=D#QHyL6)G99D&sH0^~{R6SGWtzVsJBA%&8O^^5@Pf$93m z!Z7SHEE-{Gm_O?yY?9RB=7?%(XLmNAe3fcDRLW|wlCt8nYU8)$oN)!p`}%`;;zZ7N zVAb=j5y_(=4s;*?5?Ma(bDvV`H#1Vz2|-H%tO~^_z&<&g(OQzEBl zFHy65Fh>^F!`wW@Jev{IiZ$#BteLJeu=?b-itmc>T({21wG?tdY0qb*$yCJFp%_nW z7+-*6(89-nj$t)TJ$h@7S@%AIReHz3y-dD5hKJR5yDGlaJCfK|H2t*MQYBG7l%-nn z6ZRq8&vrMZ_A5nuS!CGHU@hBKtsPfIso5^(*axth?Q1AvwNcDp6{$zBTXNiYr({Dh zu{M=@8}K*=HoQkgUu50BSvd@Gk=;a)sS;<__4*gF_!=mHDZW zzBEJEHk={v`oqc)JG9)WBwdDQ1vgbGd)b%m&)j;Q)*?KuMfhtO1R;wNgwA%aKppNroxIl1k|JQLX1K9lppi*wZ~+$p{{dFk B6vY4l literal 0 HcmV?d00001 diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Access.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Access.php new file mode 100644 index 000000000000..ee88a6669389 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Access.php @@ -0,0 +1,491 @@ +google.cloud.securitycenter.v1.Access + */ +class Access extends \Google\Protobuf\Internal\Message +{ + /** + * Associated email, such as "foo@google.com". + * The email address of the authenticated user (or service account on behalf + * of third party principal) making the request. For third party identity + * callers, the `principal_subject` field is populated instead of this field. + * For privacy reasons, the principal email address is sometimes redacted. + * For more information, see [Caller identities in audit + * logs](https://cloud.google.com/logging/docs/audit#user-id). + * + * Generated from protobuf field string principal_email = 1; + */ + protected $principal_email = ''; + /** + * Caller's IP address, such as "1.1.1.1". + * + * Generated from protobuf field string caller_ip = 2; + */ + protected $caller_ip = ''; + /** + * The caller IP's geolocation, which identifies where the call came from. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Geolocation caller_ip_geo = 3; + */ + protected $caller_ip_geo = null; + /** + * What kind of user agent is associated, for example operating system shells, + * embedded or stand-alone applications, etc. + * + * Generated from protobuf field string user_agent_family = 4; + */ + protected $user_agent_family = ''; + /** + * This is the API service that the service account made a call to, e.g. + * "iam.googleapis.com" + * + * Generated from protobuf field string service_name = 5; + */ + protected $service_name = ''; + /** + * The method that the service account called, e.g. "SetIamPolicy". + * + * Generated from protobuf field string method_name = 6; + */ + protected $method_name = ''; + /** + * A string representing the principal_subject associated with the identity. + * As compared to `principal_email`, supports principals that aren't + * associated with email addresses, such as third party principals. For most + * identities, the format will be `principal://iam.googleapis.com/{identity + * pool name}/subjects/{subject}` except for some GKE identities + * (GKE_WORKLOAD, FREEFORM, GKE_HUB_WORKLOAD) that are still in the legacy + * format `serviceAccount:{identity pool name}[{subject}]` + * + * Generated from protobuf field string principal_subject = 7; + */ + protected $principal_subject = ''; + /** + * The name of the service account key used to create or exchange + * credentials for authenticating the service account making the request. + * This is a scheme-less URI full resource name. For example: + * "//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}" + * + * Generated from protobuf field string service_account_key_name = 8; + */ + protected $service_account_key_name = ''; + /** + * Identity delegation history of an authenticated service account that makes + * the request. It contains information on the real authorities that try to + * access GCP resources by delegating on a service account. When multiple + * authorities are present, they are guaranteed to be sorted based on the + * original ordering of the identity delegation events. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.ServiceAccountDelegationInfo service_account_delegation_info = 9; + */ + private $service_account_delegation_info; + /** + * A string that represents the username of a user, user account, or other + * entity involved in the access event. What the entity is and what its role + * in the access event is depends on the finding that this field appears in. + * The entity is likely not an IAM principal, but could be a user that is + * logged into an operating system, if the finding is VM-related, or a user + * that is logged into some type of application that is involved in the + * access event. + * + * Generated from protobuf field string user_name = 11; + */ + protected $user_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $principal_email + * Associated email, such as "foo@google.com". + * The email address of the authenticated user (or service account on behalf + * of third party principal) making the request. For third party identity + * callers, the `principal_subject` field is populated instead of this field. + * For privacy reasons, the principal email address is sometimes redacted. + * For more information, see [Caller identities in audit + * logs](https://cloud.google.com/logging/docs/audit#user-id). + * @type string $caller_ip + * Caller's IP address, such as "1.1.1.1". + * @type \Google\Cloud\SecurityCenter\V1\Geolocation $caller_ip_geo + * The caller IP's geolocation, which identifies where the call came from. + * @type string $user_agent_family + * What kind of user agent is associated, for example operating system shells, + * embedded or stand-alone applications, etc. + * @type string $service_name + * This is the API service that the service account made a call to, e.g. + * "iam.googleapis.com" + * @type string $method_name + * The method that the service account called, e.g. "SetIamPolicy". + * @type string $principal_subject + * A string representing the principal_subject associated with the identity. + * As compared to `principal_email`, supports principals that aren't + * associated with email addresses, such as third party principals. For most + * identities, the format will be `principal://iam.googleapis.com/{identity + * pool name}/subjects/{subject}` except for some GKE identities + * (GKE_WORKLOAD, FREEFORM, GKE_HUB_WORKLOAD) that are still in the legacy + * format `serviceAccount:{identity pool name}[{subject}]` + * @type string $service_account_key_name + * The name of the service account key used to create or exchange + * credentials for authenticating the service account making the request. + * This is a scheme-less URI full resource name. For example: + * "//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}" + * @type array<\Google\Cloud\SecurityCenter\V1\ServiceAccountDelegationInfo>|\Google\Protobuf\Internal\RepeatedField $service_account_delegation_info + * Identity delegation history of an authenticated service account that makes + * the request. It contains information on the real authorities that try to + * access GCP resources by delegating on a service account. When multiple + * authorities are present, they are guaranteed to be sorted based on the + * original ordering of the identity delegation events. + * @type string $user_name + * A string that represents the username of a user, user account, or other + * entity involved in the access event. What the entity is and what its role + * in the access event is depends on the finding that this field appears in. + * The entity is likely not an IAM principal, but could be a user that is + * logged into an operating system, if the finding is VM-related, or a user + * that is logged into some type of application that is involved in the + * access event. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\Access::initOnce(); + parent::__construct($data); + } + + /** + * Associated email, such as "foo@google.com". + * The email address of the authenticated user (or service account on behalf + * of third party principal) making the request. For third party identity + * callers, the `principal_subject` field is populated instead of this field. + * For privacy reasons, the principal email address is sometimes redacted. + * For more information, see [Caller identities in audit + * logs](https://cloud.google.com/logging/docs/audit#user-id). + * + * Generated from protobuf field string principal_email = 1; + * @return string + */ + public function getPrincipalEmail() + { + return $this->principal_email; + } + + /** + * Associated email, such as "foo@google.com". + * The email address of the authenticated user (or service account on behalf + * of third party principal) making the request. For third party identity + * callers, the `principal_subject` field is populated instead of this field. + * For privacy reasons, the principal email address is sometimes redacted. + * For more information, see [Caller identities in audit + * logs](https://cloud.google.com/logging/docs/audit#user-id). + * + * Generated from protobuf field string principal_email = 1; + * @param string $var + * @return $this + */ + public function setPrincipalEmail($var) + { + GPBUtil::checkString($var, True); + $this->principal_email = $var; + + return $this; + } + + /** + * Caller's IP address, such as "1.1.1.1". + * + * Generated from protobuf field string caller_ip = 2; + * @return string + */ + public function getCallerIp() + { + return $this->caller_ip; + } + + /** + * Caller's IP address, such as "1.1.1.1". + * + * Generated from protobuf field string caller_ip = 2; + * @param string $var + * @return $this + */ + public function setCallerIp($var) + { + GPBUtil::checkString($var, True); + $this->caller_ip = $var; + + return $this; + } + + /** + * The caller IP's geolocation, which identifies where the call came from. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Geolocation caller_ip_geo = 3; + * @return \Google\Cloud\SecurityCenter\V1\Geolocation|null + */ + public function getCallerIpGeo() + { + return $this->caller_ip_geo; + } + + public function hasCallerIpGeo() + { + return isset($this->caller_ip_geo); + } + + public function clearCallerIpGeo() + { + unset($this->caller_ip_geo); + } + + /** + * The caller IP's geolocation, which identifies where the call came from. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Geolocation caller_ip_geo = 3; + * @param \Google\Cloud\SecurityCenter\V1\Geolocation $var + * @return $this + */ + public function setCallerIpGeo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\Geolocation::class); + $this->caller_ip_geo = $var; + + return $this; + } + + /** + * What kind of user agent is associated, for example operating system shells, + * embedded or stand-alone applications, etc. + * + * Generated from protobuf field string user_agent_family = 4; + * @return string + */ + public function getUserAgentFamily() + { + return $this->user_agent_family; + } + + /** + * What kind of user agent is associated, for example operating system shells, + * embedded or stand-alone applications, etc. + * + * Generated from protobuf field string user_agent_family = 4; + * @param string $var + * @return $this + */ + public function setUserAgentFamily($var) + { + GPBUtil::checkString($var, True); + $this->user_agent_family = $var; + + return $this; + } + + /** + * This is the API service that the service account made a call to, e.g. + * "iam.googleapis.com" + * + * Generated from protobuf field string service_name = 5; + * @return string + */ + public function getServiceName() + { + return $this->service_name; + } + + /** + * This is the API service that the service account made a call to, e.g. + * "iam.googleapis.com" + * + * Generated from protobuf field string service_name = 5; + * @param string $var + * @return $this + */ + public function setServiceName($var) + { + GPBUtil::checkString($var, True); + $this->service_name = $var; + + return $this; + } + + /** + * The method that the service account called, e.g. "SetIamPolicy". + * + * Generated from protobuf field string method_name = 6; + * @return string + */ + public function getMethodName() + { + return $this->method_name; + } + + /** + * The method that the service account called, e.g. "SetIamPolicy". + * + * Generated from protobuf field string method_name = 6; + * @param string $var + * @return $this + */ + public function setMethodName($var) + { + GPBUtil::checkString($var, True); + $this->method_name = $var; + + return $this; + } + + /** + * A string representing the principal_subject associated with the identity. + * As compared to `principal_email`, supports principals that aren't + * associated with email addresses, such as third party principals. For most + * identities, the format will be `principal://iam.googleapis.com/{identity + * pool name}/subjects/{subject}` except for some GKE identities + * (GKE_WORKLOAD, FREEFORM, GKE_HUB_WORKLOAD) that are still in the legacy + * format `serviceAccount:{identity pool name}[{subject}]` + * + * Generated from protobuf field string principal_subject = 7; + * @return string + */ + public function getPrincipalSubject() + { + return $this->principal_subject; + } + + /** + * A string representing the principal_subject associated with the identity. + * As compared to `principal_email`, supports principals that aren't + * associated with email addresses, such as third party principals. For most + * identities, the format will be `principal://iam.googleapis.com/{identity + * pool name}/subjects/{subject}` except for some GKE identities + * (GKE_WORKLOAD, FREEFORM, GKE_HUB_WORKLOAD) that are still in the legacy + * format `serviceAccount:{identity pool name}[{subject}]` + * + * Generated from protobuf field string principal_subject = 7; + * @param string $var + * @return $this + */ + public function setPrincipalSubject($var) + { + GPBUtil::checkString($var, True); + $this->principal_subject = $var; + + return $this; + } + + /** + * The name of the service account key used to create or exchange + * credentials for authenticating the service account making the request. + * This is a scheme-less URI full resource name. For example: + * "//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}" + * + * Generated from protobuf field string service_account_key_name = 8; + * @return string + */ + public function getServiceAccountKeyName() + { + return $this->service_account_key_name; + } + + /** + * The name of the service account key used to create or exchange + * credentials for authenticating the service account making the request. + * This is a scheme-less URI full resource name. For example: + * "//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}" + * + * Generated from protobuf field string service_account_key_name = 8; + * @param string $var + * @return $this + */ + public function setServiceAccountKeyName($var) + { + GPBUtil::checkString($var, True); + $this->service_account_key_name = $var; + + return $this; + } + + /** + * Identity delegation history of an authenticated service account that makes + * the request. It contains information on the real authorities that try to + * access GCP resources by delegating on a service account. When multiple + * authorities are present, they are guaranteed to be sorted based on the + * original ordering of the identity delegation events. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.ServiceAccountDelegationInfo service_account_delegation_info = 9; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getServiceAccountDelegationInfo() + { + return $this->service_account_delegation_info; + } + + /** + * Identity delegation history of an authenticated service account that makes + * the request. It contains information on the real authorities that try to + * access GCP resources by delegating on a service account. When multiple + * authorities are present, they are guaranteed to be sorted based on the + * original ordering of the identity delegation events. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.ServiceAccountDelegationInfo service_account_delegation_info = 9; + * @param array<\Google\Cloud\SecurityCenter\V1\ServiceAccountDelegationInfo>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setServiceAccountDelegationInfo($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\ServiceAccountDelegationInfo::class); + $this->service_account_delegation_info = $arr; + + return $this; + } + + /** + * A string that represents the username of a user, user account, or other + * entity involved in the access event. What the entity is and what its role + * in the access event is depends on the finding that this field appears in. + * The entity is likely not an IAM principal, but could be a user that is + * logged into an operating system, if the finding is VM-related, or a user + * that is logged into some type of application that is involved in the + * access event. + * + * Generated from protobuf field string user_name = 11; + * @return string + */ + public function getUserName() + { + return $this->user_name; + } + + /** + * A string that represents the username of a user, user account, or other + * entity involved in the access event. What the entity is and what its role + * in the access event is depends on the finding that this field appears in. + * The entity is likely not an IAM principal, but could be a user that is + * logged into an operating system, if the finding is VM-related, or a user + * that is logged into some type of application that is involved in the + * access event. + * + * Generated from protobuf field string user_name = 11; + * @param string $var + * @return $this + */ + public function setUserName($var) + { + GPBUtil::checkString($var, True); + $this->user_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Asset.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Asset.php new file mode 100644 index 000000000000..9a5c7fa0c831 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Asset.php @@ -0,0 +1,412 @@ +google.cloud.securitycenter.v1.Asset + */ +class Asset extends \Google\Protobuf\Internal\Message +{ + /** + * The relative resource name of this asset. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Example: + * "organizations/{organization_id}/assets/{asset_id}". + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Security Command Center managed properties. These properties are managed by + * Security Command Center and cannot be modified by the user. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Asset.SecurityCenterProperties security_center_properties = 2; + */ + protected $security_center_properties = null; + /** + * Resource managed properties. These properties are managed and defined by + * the Google Cloud resource and cannot be modified by the user. + * + * Generated from protobuf field map resource_properties = 7; + */ + private $resource_properties; + /** + * User specified security marks. These marks are entirely managed by the user + * and come from the SecurityMarks resource that belongs to the asset. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.SecurityMarks security_marks = 8; + */ + protected $security_marks = null; + /** + * The time at which the asset was created in Security Command Center. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 9; + */ + protected $create_time = null; + /** + * The time at which the asset was last updated or added in Cloud SCC. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 10; + */ + protected $update_time = null; + /** + * Cloud IAM Policy information associated with the Google Cloud resource + * described by the Security Command Center asset. This information is managed + * and defined by the Google Cloud resource and cannot be modified by the + * user. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Asset.IamPolicy iam_policy = 11; + */ + protected $iam_policy = null; + /** + * The canonical name of the resource. It's either + * "organizations/{organization_id}/assets/{asset_id}", + * "folders/{folder_id}/assets/{asset_id}" or + * "projects/{project_number}/assets/{asset_id}", depending on the closest CRM + * ancestor of the resource. + * + * Generated from protobuf field string canonical_name = 13; + */ + protected $canonical_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The relative resource name of this asset. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Example: + * "organizations/{organization_id}/assets/{asset_id}". + * @type \Google\Cloud\SecurityCenter\V1\Asset\SecurityCenterProperties $security_center_properties + * Security Command Center managed properties. These properties are managed by + * Security Command Center and cannot be modified by the user. + * @type array|\Google\Protobuf\Internal\MapField $resource_properties + * Resource managed properties. These properties are managed and defined by + * the Google Cloud resource and cannot be modified by the user. + * @type \Google\Cloud\SecurityCenter\V1\SecurityMarks $security_marks + * User specified security marks. These marks are entirely managed by the user + * and come from the SecurityMarks resource that belongs to the asset. + * @type \Google\Protobuf\Timestamp $create_time + * The time at which the asset was created in Security Command Center. + * @type \Google\Protobuf\Timestamp $update_time + * The time at which the asset was last updated or added in Cloud SCC. + * @type \Google\Cloud\SecurityCenter\V1\Asset\IamPolicy $iam_policy + * Cloud IAM Policy information associated with the Google Cloud resource + * described by the Security Command Center asset. This information is managed + * and defined by the Google Cloud resource and cannot be modified by the + * user. + * @type string $canonical_name + * The canonical name of the resource. It's either + * "organizations/{organization_id}/assets/{asset_id}", + * "folders/{folder_id}/assets/{asset_id}" or + * "projects/{project_number}/assets/{asset_id}", depending on the closest CRM + * ancestor of the resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\Asset::initOnce(); + parent::__construct($data); + } + + /** + * The relative resource name of this asset. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Example: + * "organizations/{organization_id}/assets/{asset_id}". + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The relative resource name of this asset. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Example: + * "organizations/{organization_id}/assets/{asset_id}". + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Security Command Center managed properties. These properties are managed by + * Security Command Center and cannot be modified by the user. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Asset.SecurityCenterProperties security_center_properties = 2; + * @return \Google\Cloud\SecurityCenter\V1\Asset\SecurityCenterProperties|null + */ + public function getSecurityCenterProperties() + { + return $this->security_center_properties; + } + + public function hasSecurityCenterProperties() + { + return isset($this->security_center_properties); + } + + public function clearSecurityCenterProperties() + { + unset($this->security_center_properties); + } + + /** + * Security Command Center managed properties. These properties are managed by + * Security Command Center and cannot be modified by the user. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Asset.SecurityCenterProperties security_center_properties = 2; + * @param \Google\Cloud\SecurityCenter\V1\Asset\SecurityCenterProperties $var + * @return $this + */ + public function setSecurityCenterProperties($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\Asset\SecurityCenterProperties::class); + $this->security_center_properties = $var; + + return $this; + } + + /** + * Resource managed properties. These properties are managed and defined by + * the Google Cloud resource and cannot be modified by the user. + * + * Generated from protobuf field map resource_properties = 7; + * @return \Google\Protobuf\Internal\MapField + */ + public function getResourceProperties() + { + return $this->resource_properties; + } + + /** + * Resource managed properties. These properties are managed and defined by + * the Google Cloud resource and cannot be modified by the user. + * + * Generated from protobuf field map resource_properties = 7; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setResourceProperties($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Value::class); + $this->resource_properties = $arr; + + return $this; + } + + /** + * User specified security marks. These marks are entirely managed by the user + * and come from the SecurityMarks resource that belongs to the asset. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.SecurityMarks security_marks = 8; + * @return \Google\Cloud\SecurityCenter\V1\SecurityMarks|null + */ + public function getSecurityMarks() + { + return $this->security_marks; + } + + public function hasSecurityMarks() + { + return isset($this->security_marks); + } + + public function clearSecurityMarks() + { + unset($this->security_marks); + } + + /** + * User specified security marks. These marks are entirely managed by the user + * and come from the SecurityMarks resource that belongs to the asset. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.SecurityMarks security_marks = 8; + * @param \Google\Cloud\SecurityCenter\V1\SecurityMarks $var + * @return $this + */ + public function setSecurityMarks($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\SecurityMarks::class); + $this->security_marks = $var; + + return $this; + } + + /** + * The time at which the asset was created in Security Command Center. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 9; + * @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); + } + + /** + * The time at which the asset was created in Security Command Center. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 9; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * The time at which the asset was last updated or added in Cloud SCC. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 10; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * The time at which the asset was last updated or added in Cloud SCC. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 10; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Cloud IAM Policy information associated with the Google Cloud resource + * described by the Security Command Center asset. This information is managed + * and defined by the Google Cloud resource and cannot be modified by the + * user. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Asset.IamPolicy iam_policy = 11; + * @return \Google\Cloud\SecurityCenter\V1\Asset\IamPolicy|null + */ + public function getIamPolicy() + { + return $this->iam_policy; + } + + public function hasIamPolicy() + { + return isset($this->iam_policy); + } + + public function clearIamPolicy() + { + unset($this->iam_policy); + } + + /** + * Cloud IAM Policy information associated with the Google Cloud resource + * described by the Security Command Center asset. This information is managed + * and defined by the Google Cloud resource and cannot be modified by the + * user. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Asset.IamPolicy iam_policy = 11; + * @param \Google\Cloud\SecurityCenter\V1\Asset\IamPolicy $var + * @return $this + */ + public function setIamPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\Asset\IamPolicy::class); + $this->iam_policy = $var; + + return $this; + } + + /** + * The canonical name of the resource. It's either + * "organizations/{organization_id}/assets/{asset_id}", + * "folders/{folder_id}/assets/{asset_id}" or + * "projects/{project_number}/assets/{asset_id}", depending on the closest CRM + * ancestor of the resource. + * + * Generated from protobuf field string canonical_name = 13; + * @return string + */ + public function getCanonicalName() + { + return $this->canonical_name; + } + + /** + * The canonical name of the resource. It's either + * "organizations/{organization_id}/assets/{asset_id}", + * "folders/{folder_id}/assets/{asset_id}" or + * "projects/{project_number}/assets/{asset_id}", depending on the closest CRM + * ancestor of the resource. + * + * Generated from protobuf field string canonical_name = 13; + * @param string $var + * @return $this + */ + public function setCanonicalName($var) + { + GPBUtil::checkString($var, True); + $this->canonical_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Asset/IamPolicy.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Asset/IamPolicy.php new file mode 100644 index 000000000000..6df487a6cfce --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Asset/IamPolicy.php @@ -0,0 +1,81 @@ +google.cloud.securitycenter.v1.Asset.IamPolicy + */ +class IamPolicy extends \Google\Protobuf\Internal\Message +{ + /** + * The JSON representation of the Policy associated with the asset. + * See https://cloud.google.com/iam/reference/rest/v1/Policy for format + * details. + * + * Generated from protobuf field string policy_blob = 1; + */ + protected $policy_blob = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $policy_blob + * The JSON representation of the Policy associated with the asset. + * See https://cloud.google.com/iam/reference/rest/v1/Policy for format + * details. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\Asset::initOnce(); + parent::__construct($data); + } + + /** + * The JSON representation of the Policy associated with the asset. + * See https://cloud.google.com/iam/reference/rest/v1/Policy for format + * details. + * + * Generated from protobuf field string policy_blob = 1; + * @return string + */ + public function getPolicyBlob() + { + return $this->policy_blob; + } + + /** + * The JSON representation of the Policy associated with the asset. + * See https://cloud.google.com/iam/reference/rest/v1/Policy for format + * details. + * + * Generated from protobuf field string policy_blob = 1; + * @param string $var + * @return $this + */ + public function setPolicyBlob($var) + { + GPBUtil::checkString($var, True); + $this->policy_blob = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(IamPolicy::class, \Google\Cloud\SecurityCenter\V1\Asset_IamPolicy::class); + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Asset/SecurityCenterProperties.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Asset/SecurityCenterProperties.php new file mode 100644 index 000000000000..e52bfc4be7db --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Asset/SecurityCenterProperties.php @@ -0,0 +1,379 @@ +google.cloud.securitycenter.v1.Asset.SecurityCenterProperties + */ +class SecurityCenterProperties extends \Google\Protobuf\Internal\Message +{ + /** + * The full resource name of the Google Cloud resource this asset + * represents. This field is immutable after create time. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + * + * Generated from protobuf field string resource_name = 1; + */ + protected $resource_name = ''; + /** + * The type of the Google Cloud resource. Examples include: APPLICATION, + * PROJECT, and ORGANIZATION. This is a case insensitive field defined by + * Security Command Center and/or the producer of the resource and is + * immutable after create time. + * + * Generated from protobuf field string resource_type = 2; + */ + protected $resource_type = ''; + /** + * The full resource name of the immediate parent of the resource. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + * + * Generated from protobuf field string resource_parent = 3; + */ + protected $resource_parent = ''; + /** + * The full resource name of the project the resource belongs to. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + * + * Generated from protobuf field string resource_project = 4; + */ + protected $resource_project = ''; + /** + * Owners of the Google Cloud resource. + * + * Generated from protobuf field repeated string resource_owners = 5; + */ + private $resource_owners; + /** + * The user defined display name for this resource. + * + * Generated from protobuf field string resource_display_name = 6; + */ + protected $resource_display_name = ''; + /** + * The user defined display name for the parent of this resource. + * + * Generated from protobuf field string resource_parent_display_name = 7; + */ + protected $resource_parent_display_name = ''; + /** + * The user defined display name for the project of this resource. + * + * Generated from protobuf field string resource_project_display_name = 8; + */ + protected $resource_project_display_name = ''; + /** + * Contains a Folder message for each folder in the assets ancestry. + * The first folder is the deepest nested folder, and the last folder is the + * folder directly under the Organization. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Folder folders = 10; + */ + private $folders; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $resource_name + * The full resource name of the Google Cloud resource this asset + * represents. This field is immutable after create time. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + * @type string $resource_type + * The type of the Google Cloud resource. Examples include: APPLICATION, + * PROJECT, and ORGANIZATION. This is a case insensitive field defined by + * Security Command Center and/or the producer of the resource and is + * immutable after create time. + * @type string $resource_parent + * The full resource name of the immediate parent of the resource. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + * @type string $resource_project + * The full resource name of the project the resource belongs to. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + * @type array|\Google\Protobuf\Internal\RepeatedField $resource_owners + * Owners of the Google Cloud resource. + * @type string $resource_display_name + * The user defined display name for this resource. + * @type string $resource_parent_display_name + * The user defined display name for the parent of this resource. + * @type string $resource_project_display_name + * The user defined display name for the project of this resource. + * @type array<\Google\Cloud\SecurityCenter\V1\Folder>|\Google\Protobuf\Internal\RepeatedField $folders + * Contains a Folder message for each folder in the assets ancestry. + * The first folder is the deepest nested folder, and the last folder is the + * folder directly under the Organization. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\Asset::initOnce(); + parent::__construct($data); + } + + /** + * The full resource name of the Google Cloud resource this asset + * represents. This field is immutable after create time. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + * + * Generated from protobuf field string resource_name = 1; + * @return string + */ + public function getResourceName() + { + return $this->resource_name; + } + + /** + * The full resource name of the Google Cloud resource this asset + * represents. This field is immutable after create time. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + * + * Generated from protobuf field string resource_name = 1; + * @param string $var + * @return $this + */ + public function setResourceName($var) + { + GPBUtil::checkString($var, True); + $this->resource_name = $var; + + return $this; + } + + /** + * The type of the Google Cloud resource. Examples include: APPLICATION, + * PROJECT, and ORGANIZATION. This is a case insensitive field defined by + * Security Command Center and/or the producer of the resource and is + * immutable after create time. + * + * Generated from protobuf field string resource_type = 2; + * @return string + */ + public function getResourceType() + { + return $this->resource_type; + } + + /** + * The type of the Google Cloud resource. Examples include: APPLICATION, + * PROJECT, and ORGANIZATION. This is a case insensitive field defined by + * Security Command Center and/or the producer of the resource and is + * immutable after create time. + * + * Generated from protobuf field string resource_type = 2; + * @param string $var + * @return $this + */ + public function setResourceType($var) + { + GPBUtil::checkString($var, True); + $this->resource_type = $var; + + return $this; + } + + /** + * The full resource name of the immediate parent of the resource. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + * + * Generated from protobuf field string resource_parent = 3; + * @return string + */ + public function getResourceParent() + { + return $this->resource_parent; + } + + /** + * The full resource name of the immediate parent of the resource. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + * + * Generated from protobuf field string resource_parent = 3; + * @param string $var + * @return $this + */ + public function setResourceParent($var) + { + GPBUtil::checkString($var, True); + $this->resource_parent = $var; + + return $this; + } + + /** + * The full resource name of the project the resource belongs to. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + * + * Generated from protobuf field string resource_project = 4; + * @return string + */ + public function getResourceProject() + { + return $this->resource_project; + } + + /** + * The full resource name of the project the resource belongs to. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + * + * Generated from protobuf field string resource_project = 4; + * @param string $var + * @return $this + */ + public function setResourceProject($var) + { + GPBUtil::checkString($var, True); + $this->resource_project = $var; + + return $this; + } + + /** + * Owners of the Google Cloud resource. + * + * Generated from protobuf field repeated string resource_owners = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getResourceOwners() + { + return $this->resource_owners; + } + + /** + * Owners of the Google Cloud resource. + * + * Generated from protobuf field repeated string resource_owners = 5; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setResourceOwners($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->resource_owners = $arr; + + return $this; + } + + /** + * The user defined display name for this resource. + * + * Generated from protobuf field string resource_display_name = 6; + * @return string + */ + public function getResourceDisplayName() + { + return $this->resource_display_name; + } + + /** + * The user defined display name for this resource. + * + * Generated from protobuf field string resource_display_name = 6; + * @param string $var + * @return $this + */ + public function setResourceDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->resource_display_name = $var; + + return $this; + } + + /** + * The user defined display name for the parent of this resource. + * + * Generated from protobuf field string resource_parent_display_name = 7; + * @return string + */ + public function getResourceParentDisplayName() + { + return $this->resource_parent_display_name; + } + + /** + * The user defined display name for the parent of this resource. + * + * Generated from protobuf field string resource_parent_display_name = 7; + * @param string $var + * @return $this + */ + public function setResourceParentDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->resource_parent_display_name = $var; + + return $this; + } + + /** + * The user defined display name for the project of this resource. + * + * Generated from protobuf field string resource_project_display_name = 8; + * @return string + */ + public function getResourceProjectDisplayName() + { + return $this->resource_project_display_name; + } + + /** + * The user defined display name for the project of this resource. + * + * Generated from protobuf field string resource_project_display_name = 8; + * @param string $var + * @return $this + */ + public function setResourceProjectDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->resource_project_display_name = $var; + + return $this; + } + + /** + * Contains a Folder message for each folder in the assets ancestry. + * The first folder is the deepest nested folder, and the last folder is the + * folder directly under the Organization. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Folder folders = 10; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFolders() + { + return $this->folders; + } + + /** + * Contains a Folder message for each folder in the assets ancestry. + * The first folder is the deepest nested folder, and the last folder is the + * folder directly under the Organization. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Folder folders = 10; + * @param array<\Google\Cloud\SecurityCenter\V1\Folder>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFolders($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\Folder::class); + $this->folders = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SecurityCenterProperties::class, \Google\Cloud\SecurityCenter\V1\Asset_SecurityCenterProperties::class); + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Asset_IamPolicy.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Asset_IamPolicy.php new file mode 100644 index 000000000000..d830dc97c3a4 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Asset_IamPolicy.php @@ -0,0 +1,16 @@ +google.cloud.securitycenter.v1.BigQueryExport + */ +class BigQueryExport extends \Google\Protobuf\Internal\Message +{ + /** + * The relative resource name of this export. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name. + * Example format: + * "organizations/{organization_id}/bigQueryExports/{export_id}" Example + * format: "folders/{folder_id}/bigQueryExports/{export_id}" Example format: + * "projects/{project_id}/bigQueryExports/{export_id}" + * This field is provided in responses, and is ignored when provided in create + * requests. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The description of the export (max of 1024 characters). + * + * Generated from protobuf field string description = 2; + */ + protected $description = ''; + /** + * Expression that defines the filter to apply across create/update events + * of findings. The expression is a list of zero or more restrictions combined + * via logical operators `AND` and `OR`. Parentheses are supported, and `OR` + * has higher precedence than `AND`. + * Restrictions have the form ` ` and may have a + * `-` character in front of them to indicate negation. The fields map to + * those defined in the corresponding resource. + * The supported operators are: + * * `=` for all value types. + * * `>`, `<`, `>=`, `<=` for integer values. + * * `:`, meaning substring matching, for strings. + * The supported value types are: + * * string literals in quotes. + * * integer literals without quotes. + * * boolean literals `true` and `false` without quotes. + * + * Generated from protobuf field string filter = 3; + */ + protected $filter = ''; + /** + * The dataset to write findings' updates to. Its format is + * "projects/[project_id]/datasets/[bigquery_dataset_id]". + * BigQuery Dataset unique ID must contain only letters (a-z, A-Z), numbers + * (0-9), or underscores (_). + * + * Generated from protobuf field string dataset = 4; + */ + protected $dataset = ''; + /** + * Output only. The time at which the big query export was created. + * This field is set by the server and will be ignored if provided on export + * on creation. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The most recent time at which the big export was updated. + * This field is set by the server and will be ignored if provided on export + * creation or update. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. Email address of the user who last edited the big query export. + * This field is set by the server and will be ignored if provided on export + * creation or update. + * + * Generated from protobuf field string most_recent_editor = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $most_recent_editor = ''; + /** + * Output only. The service account that needs permission to create table, upload data to + * the big query dataset. + * + * Generated from protobuf field string principal = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $principal = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The relative resource name of this export. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name. + * Example format: + * "organizations/{organization_id}/bigQueryExports/{export_id}" Example + * format: "folders/{folder_id}/bigQueryExports/{export_id}" Example format: + * "projects/{project_id}/bigQueryExports/{export_id}" + * This field is provided in responses, and is ignored when provided in create + * requests. + * @type string $description + * The description of the export (max of 1024 characters). + * @type string $filter + * Expression that defines the filter to apply across create/update events + * of findings. The expression is a list of zero or more restrictions combined + * via logical operators `AND` and `OR`. Parentheses are supported, and `OR` + * has higher precedence than `AND`. + * Restrictions have the form ` ` and may have a + * `-` character in front of them to indicate negation. The fields map to + * those defined in the corresponding resource. + * The supported operators are: + * * `=` for all value types. + * * `>`, `<`, `>=`, `<=` for integer values. + * * `:`, meaning substring matching, for strings. + * The supported value types are: + * * string literals in quotes. + * * integer literals without quotes. + * * boolean literals `true` and `false` without quotes. + * @type string $dataset + * The dataset to write findings' updates to. Its format is + * "projects/[project_id]/datasets/[bigquery_dataset_id]". + * BigQuery Dataset unique ID must contain only letters (a-z, A-Z), numbers + * (0-9), or underscores (_). + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time at which the big query export was created. + * This field is set by the server and will be ignored if provided on export + * on creation. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The most recent time at which the big export was updated. + * This field is set by the server and will be ignored if provided on export + * creation or update. + * @type string $most_recent_editor + * Output only. Email address of the user who last edited the big query export. + * This field is set by the server and will be ignored if provided on export + * creation or update. + * @type string $principal + * Output only. The service account that needs permission to create table, upload data to + * the big query dataset. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\BigqueryExport::initOnce(); + parent::__construct($data); + } + + /** + * The relative resource name of this export. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name. + * Example format: + * "organizations/{organization_id}/bigQueryExports/{export_id}" Example + * format: "folders/{folder_id}/bigQueryExports/{export_id}" Example format: + * "projects/{project_id}/bigQueryExports/{export_id}" + * This field is provided in responses, and is ignored when provided in create + * requests. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The relative resource name of this export. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name. + * Example format: + * "organizations/{organization_id}/bigQueryExports/{export_id}" Example + * format: "folders/{folder_id}/bigQueryExports/{export_id}" Example format: + * "projects/{project_id}/bigQueryExports/{export_id}" + * This field is provided in responses, and is ignored when provided in create + * requests. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The description of the export (max of 1024 characters). + * + * Generated from protobuf field string description = 2; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * The description of the export (max of 1024 characters). + * + * Generated from protobuf field string description = 2; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Expression that defines the filter to apply across create/update events + * of findings. The expression is a list of zero or more restrictions combined + * via logical operators `AND` and `OR`. Parentheses are supported, and `OR` + * has higher precedence than `AND`. + * Restrictions have the form ` ` and may have a + * `-` character in front of them to indicate negation. The fields map to + * those defined in the corresponding resource. + * The supported operators are: + * * `=` for all value types. + * * `>`, `<`, `>=`, `<=` for integer values. + * * `:`, meaning substring matching, for strings. + * The supported value types are: + * * string literals in quotes. + * * integer literals without quotes. + * * boolean literals `true` and `false` without quotes. + * + * Generated from protobuf field string filter = 3; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Expression that defines the filter to apply across create/update events + * of findings. The expression is a list of zero or more restrictions combined + * via logical operators `AND` and `OR`. Parentheses are supported, and `OR` + * has higher precedence than `AND`. + * Restrictions have the form ` ` and may have a + * `-` character in front of them to indicate negation. The fields map to + * those defined in the corresponding resource. + * The supported operators are: + * * `=` for all value types. + * * `>`, `<`, `>=`, `<=` for integer values. + * * `:`, meaning substring matching, for strings. + * The supported value types are: + * * string literals in quotes. + * * integer literals without quotes. + * * boolean literals `true` and `false` without quotes. + * + * Generated from protobuf field string filter = 3; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * The dataset to write findings' updates to. Its format is + * "projects/[project_id]/datasets/[bigquery_dataset_id]". + * BigQuery Dataset unique ID must contain only letters (a-z, A-Z), numbers + * (0-9), or underscores (_). + * + * Generated from protobuf field string dataset = 4; + * @return string + */ + public function getDataset() + { + return $this->dataset; + } + + /** + * The dataset to write findings' updates to. Its format is + * "projects/[project_id]/datasets/[bigquery_dataset_id]". + * BigQuery Dataset unique ID must contain only letters (a-z, A-Z), numbers + * (0-9), or underscores (_). + * + * Generated from protobuf field string dataset = 4; + * @param string $var + * @return $this + */ + public function setDataset($var) + { + GPBUtil::checkString($var, True); + $this->dataset = $var; + + return $this; + } + + /** + * Output only. The time at which the big query export was created. + * This field is set by the server and will be ignored if provided on export + * on creation. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.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. The time at which the big query export was created. + * This field is set by the server and will be ignored if provided on export + * on creation. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.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. The most recent time at which the big export was updated. + * This field is set by the server and will be ignored if provided on export + * creation or update. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The most recent time at which the big export was updated. + * This field is set by the server and will be ignored if provided on export + * creation or update. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. Email address of the user who last edited the big query export. + * This field is set by the server and will be ignored if provided on export + * creation or update. + * + * Generated from protobuf field string most_recent_editor = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getMostRecentEditor() + { + return $this->most_recent_editor; + } + + /** + * Output only. Email address of the user who last edited the big query export. + * This field is set by the server and will be ignored if provided on export + * creation or update. + * + * Generated from protobuf field string most_recent_editor = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setMostRecentEditor($var) + { + GPBUtil::checkString($var, True); + $this->most_recent_editor = $var; + + return $this; + } + + /** + * Output only. The service account that needs permission to create table, upload data to + * the big query dataset. + * + * Generated from protobuf field string principal = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getPrincipal() + { + return $this->principal; + } + + /** + * Output only. The service account that needs permission to create table, upload data to + * the big query dataset. + * + * Generated from protobuf field string principal = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setPrincipal($var) + { + GPBUtil::checkString($var, True); + $this->principal = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/BulkMuteFindingsRequest.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/BulkMuteFindingsRequest.php new file mode 100644 index 000000000000..52ed9a0a8383 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/BulkMuteFindingsRequest.php @@ -0,0 +1,212 @@ +google.cloud.securitycenter.v1.BulkMuteFindingsRequest + */ +class BulkMuteFindingsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, at which bulk action needs to be applied. Its format + * is "organizations/[organization_id]", "folders/[folder_id]", + * "projects/[project_id]". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Expression that identifies findings that should be updated. + * The expression is a list of zero or more restrictions combined + * via logical operators `AND` and `OR`. Parentheses are supported, and `OR` + * has higher precedence than `AND`. + * Restrictions have the form ` ` and may have a + * `-` character in front of them to indicate negation. The fields map to + * those defined in the corresponding resource. + * The supported operators are: + * * `=` for all value types. + * * `>`, `<`, `>=`, `<=` for integer values. + * * `:`, meaning substring matching, for strings. + * The supported value types are: + * * string literals in quotes. + * * integer literals without quotes. + * * boolean literals `true` and `false` without quotes. + * + * Generated from protobuf field string filter = 2; + */ + protected $filter = ''; + /** + * This can be a mute configuration name or any identifier for mute/unmute + * of findings based on the filter. + * + * Generated from protobuf field string mute_annotation = 3 [deprecated = true]; + * @deprecated + */ + protected $mute_annotation = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent, at which bulk action needs to be applied. Its format + * is "organizations/[organization_id]", "folders/[folder_id]", + * "projects/[project_id]". + * @type string $filter + * Expression that identifies findings that should be updated. + * The expression is a list of zero or more restrictions combined + * via logical operators `AND` and `OR`. Parentheses are supported, and `OR` + * has higher precedence than `AND`. + * Restrictions have the form ` ` and may have a + * `-` character in front of them to indicate negation. The fields map to + * those defined in the corresponding resource. + * The supported operators are: + * * `=` for all value types. + * * `>`, `<`, `>=`, `<=` for integer values. + * * `:`, meaning substring matching, for strings. + * The supported value types are: + * * string literals in quotes. + * * integer literals without quotes. + * * boolean literals `true` and `false` without quotes. + * @type string $mute_annotation + * This can be a mute configuration name or any identifier for mute/unmute + * of findings based on the filter. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, at which bulk action needs to be applied. Its format + * is "organizations/[organization_id]", "folders/[folder_id]", + * "projects/[project_id]". + * + * 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. The parent, at which bulk action needs to be applied. Its format + * is "organizations/[organization_id]", "folders/[folder_id]", + * "projects/[project_id]". + * + * 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; + } + + /** + * Expression that identifies findings that should be updated. + * The expression is a list of zero or more restrictions combined + * via logical operators `AND` and `OR`. Parentheses are supported, and `OR` + * has higher precedence than `AND`. + * Restrictions have the form ` ` and may have a + * `-` character in front of them to indicate negation. The fields map to + * those defined in the corresponding resource. + * The supported operators are: + * * `=` for all value types. + * * `>`, `<`, `>=`, `<=` for integer values. + * * `:`, meaning substring matching, for strings. + * The supported value types are: + * * string literals in quotes. + * * integer literals without quotes. + * * boolean literals `true` and `false` without quotes. + * + * Generated from protobuf field string filter = 2; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Expression that identifies findings that should be updated. + * The expression is a list of zero or more restrictions combined + * via logical operators `AND` and `OR`. Parentheses are supported, and `OR` + * has higher precedence than `AND`. + * Restrictions have the form ` ` and may have a + * `-` character in front of them to indicate negation. The fields map to + * those defined in the corresponding resource. + * The supported operators are: + * * `=` for all value types. + * * `>`, `<`, `>=`, `<=` for integer values. + * * `:`, meaning substring matching, for strings. + * The supported value types are: + * * string literals in quotes. + * * integer literals without quotes. + * * boolean literals `true` and `false` without quotes. + * + * Generated from protobuf field string filter = 2; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * This can be a mute configuration name or any identifier for mute/unmute + * of findings based on the filter. + * + * Generated from protobuf field string mute_annotation = 3 [deprecated = true]; + * @return string + * @deprecated + */ + public function getMuteAnnotation() + { + @trigger_error('mute_annotation is deprecated.', E_USER_DEPRECATED); + return $this->mute_annotation; + } + + /** + * This can be a mute configuration name or any identifier for mute/unmute + * of findings based on the filter. + * + * Generated from protobuf field string mute_annotation = 3 [deprecated = true]; + * @param string $var + * @return $this + * @deprecated + */ + public function setMuteAnnotation($var) + { + @trigger_error('mute_annotation is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkString($var, True); + $this->mute_annotation = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/BulkMuteFindingsResponse.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/BulkMuteFindingsResponse.php new file mode 100644 index 000000000000..68edc47a055a --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/BulkMuteFindingsResponse.php @@ -0,0 +1,33 @@ +google.cloud.securitycenter.v1.BulkMuteFindingsResponse + */ +class BulkMuteFindingsResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Compliance.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Compliance.php new file mode 100644 index 000000000000..c7bf14ba3827 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Compliance.php @@ -0,0 +1,140 @@ +google.cloud.securitycenter.v1.Compliance + */ +class Compliance extends \Google\Protobuf\Internal\Message +{ + /** + * Refers to industry wide standards or benchmarks e.g. "cis", "pci", "owasp", + * etc. + * + * Generated from protobuf field string standard = 1; + */ + protected $standard = ''; + /** + * Version of the standard/benchmark e.g. 1.1 + * + * Generated from protobuf field string version = 2; + */ + protected $version = ''; + /** + * Policies within the standard/benchmark e.g. A.12.4.1 + * + * Generated from protobuf field repeated string ids = 3; + */ + private $ids; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $standard + * Refers to industry wide standards or benchmarks e.g. "cis", "pci", "owasp", + * etc. + * @type string $version + * Version of the standard/benchmark e.g. 1.1 + * @type array|\Google\Protobuf\Internal\RepeatedField $ids + * Policies within the standard/benchmark e.g. A.12.4.1 + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\Compliance::initOnce(); + parent::__construct($data); + } + + /** + * Refers to industry wide standards or benchmarks e.g. "cis", "pci", "owasp", + * etc. + * + * Generated from protobuf field string standard = 1; + * @return string + */ + public function getStandard() + { + return $this->standard; + } + + /** + * Refers to industry wide standards or benchmarks e.g. "cis", "pci", "owasp", + * etc. + * + * Generated from protobuf field string standard = 1; + * @param string $var + * @return $this + */ + public function setStandard($var) + { + GPBUtil::checkString($var, True); + $this->standard = $var; + + return $this; + } + + /** + * Version of the standard/benchmark e.g. 1.1 + * + * Generated from protobuf field string version = 2; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Version of the standard/benchmark e.g. 1.1 + * + * Generated from protobuf field string version = 2; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + + /** + * Policies within the standard/benchmark e.g. A.12.4.1 + * + * Generated from protobuf field repeated string ids = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIds() + { + return $this->ids; + } + + /** + * Policies within the standard/benchmark e.g. A.12.4.1 + * + * Generated from protobuf field repeated string ids = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->ids = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Connection.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Connection.php new file mode 100644 index 000000000000..ddaeaf3950ae --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Connection.php @@ -0,0 +1,211 @@ +google.cloud.securitycenter.v1.Connection + */ +class Connection extends \Google\Protobuf\Internal\Message +{ + /** + * Destination IP address. Not present for sockets that are listening and not + * connected. + * + * Generated from protobuf field string destination_ip = 1; + */ + protected $destination_ip = ''; + /** + * Destination port. Not present for sockets that are listening and not + * connected. + * + * Generated from protobuf field int32 destination_port = 2; + */ + protected $destination_port = 0; + /** + * Source IP address. + * + * Generated from protobuf field string source_ip = 3; + */ + protected $source_ip = ''; + /** + * Source port. + * + * Generated from protobuf field int32 source_port = 4; + */ + protected $source_port = 0; + /** + * IANA Internet Protocol Number such as TCP(6) and UDP(17). + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Connection.Protocol protocol = 5; + */ + protected $protocol = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $destination_ip + * Destination IP address. Not present for sockets that are listening and not + * connected. + * @type int $destination_port + * Destination port. Not present for sockets that are listening and not + * connected. + * @type string $source_ip + * Source IP address. + * @type int $source_port + * Source port. + * @type int $protocol + * IANA Internet Protocol Number such as TCP(6) and UDP(17). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\Connection::initOnce(); + parent::__construct($data); + } + + /** + * Destination IP address. Not present for sockets that are listening and not + * connected. + * + * Generated from protobuf field string destination_ip = 1; + * @return string + */ + public function getDestinationIp() + { + return $this->destination_ip; + } + + /** + * Destination IP address. Not present for sockets that are listening and not + * connected. + * + * Generated from protobuf field string destination_ip = 1; + * @param string $var + * @return $this + */ + public function setDestinationIp($var) + { + GPBUtil::checkString($var, True); + $this->destination_ip = $var; + + return $this; + } + + /** + * Destination port. Not present for sockets that are listening and not + * connected. + * + * Generated from protobuf field int32 destination_port = 2; + * @return int + */ + public function getDestinationPort() + { + return $this->destination_port; + } + + /** + * Destination port. Not present for sockets that are listening and not + * connected. + * + * Generated from protobuf field int32 destination_port = 2; + * @param int $var + * @return $this + */ + public function setDestinationPort($var) + { + GPBUtil::checkInt32($var); + $this->destination_port = $var; + + return $this; + } + + /** + * Source IP address. + * + * Generated from protobuf field string source_ip = 3; + * @return string + */ + public function getSourceIp() + { + return $this->source_ip; + } + + /** + * Source IP address. + * + * Generated from protobuf field string source_ip = 3; + * @param string $var + * @return $this + */ + public function setSourceIp($var) + { + GPBUtil::checkString($var, True); + $this->source_ip = $var; + + return $this; + } + + /** + * Source port. + * + * Generated from protobuf field int32 source_port = 4; + * @return int + */ + public function getSourcePort() + { + return $this->source_port; + } + + /** + * Source port. + * + * Generated from protobuf field int32 source_port = 4; + * @param int $var + * @return $this + */ + public function setSourcePort($var) + { + GPBUtil::checkInt32($var); + $this->source_port = $var; + + return $this; + } + + /** + * IANA Internet Protocol Number such as TCP(6) and UDP(17). + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Connection.Protocol protocol = 5; + * @return int + */ + public function getProtocol() + { + return $this->protocol; + } + + /** + * IANA Internet Protocol Number such as TCP(6) and UDP(17). + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Connection.Protocol protocol = 5; + * @param int $var + * @return $this + */ + public function setProtocol($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1\Connection\Protocol::class); + $this->protocol = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Connection/Protocol.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Connection/Protocol.php new file mode 100644 index 000000000000..8c4837dac97d --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Connection/Protocol.php @@ -0,0 +1,85 @@ +google.cloud.securitycenter.v1.Connection.Protocol + */ +class Protocol +{ + /** + * Unspecified protocol (not HOPOPT). + * + * Generated from protobuf enum PROTOCOL_UNSPECIFIED = 0; + */ + const PROTOCOL_UNSPECIFIED = 0; + /** + * Internet Control Message Protocol. + * + * Generated from protobuf enum ICMP = 1; + */ + const ICMP = 1; + /** + * Transmission Control Protocol. + * + * Generated from protobuf enum TCP = 6; + */ + const TCP = 6; + /** + * User Datagram Protocol. + * + * Generated from protobuf enum UDP = 17; + */ + const UDP = 17; + /** + * Generic Routing Encapsulation. + * + * Generated from protobuf enum GRE = 47; + */ + const GRE = 47; + /** + * Encap Security Payload. + * + * Generated from protobuf enum ESP = 50; + */ + const ESP = 50; + + private static $valueToName = [ + self::PROTOCOL_UNSPECIFIED => 'PROTOCOL_UNSPECIFIED', + self::ICMP => 'ICMP', + self::TCP => 'TCP', + self::UDP => 'UDP', + self::GRE => 'GRE', + self::ESP => 'ESP', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Protocol::class, \Google\Cloud\SecurityCenter\V1\Connection_Protocol::class); + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Connection_Protocol.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Connection_Protocol.php new file mode 100644 index 000000000000..75c99f25cd3d --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Connection_Protocol.php @@ -0,0 +1,16 @@ +google.cloud.securitycenter.v1.Contact + */ +class Contact extends \Google\Protobuf\Internal\Message +{ + /** + * An email address e.g. "person123@company.com" + * + * Generated from protobuf field string email = 1; + */ + protected $email = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $email + * An email address e.g. "person123@company.com" + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\ContactDetails::initOnce(); + parent::__construct($data); + } + + /** + * An email address e.g. "person123@company.com" + * + * Generated from protobuf field string email = 1; + * @return string + */ + public function getEmail() + { + return $this->email; + } + + /** + * An email address e.g. "person123@company.com" + * + * Generated from protobuf field string email = 1; + * @param string $var + * @return $this + */ + public function setEmail($var) + { + GPBUtil::checkString($var, True); + $this->email = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ContactDetails.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ContactDetails.php new file mode 100644 index 000000000000..b721cd702216 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ContactDetails.php @@ -0,0 +1,67 @@ +google.cloud.securitycenter.v1.ContactDetails + */ +class ContactDetails extends \Google\Protobuf\Internal\Message +{ + /** + * A list of contacts + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Contact contacts = 1; + */ + private $contacts; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\SecurityCenter\V1\Contact>|\Google\Protobuf\Internal\RepeatedField $contacts + * A list of contacts + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\ContactDetails::initOnce(); + parent::__construct($data); + } + + /** + * A list of contacts + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Contact contacts = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getContacts() + { + return $this->contacts; + } + + /** + * A list of contacts + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Contact contacts = 1; + * @param array<\Google\Cloud\SecurityCenter\V1\Contact>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setContacts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\Contact::class); + $this->contacts = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Container.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Container.php new file mode 100644 index 000000000000..d118287d30e1 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Container.php @@ -0,0 +1,181 @@ +google.cloud.securitycenter.v1.Container + */ +class Container extends \Google\Protobuf\Internal\Message +{ + /** + * Container name. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Container image URI provided when configuring a pod/container. + * May identify a container image version using mutable tags. + * + * Generated from protobuf field string uri = 2; + */ + protected $uri = ''; + /** + * Optional container image id, when provided by the container runtime. + * Uniquely identifies the container image launched using a container image + * digest. + * + * Generated from protobuf field string image_id = 3; + */ + protected $image_id = ''; + /** + * Container labels, as provided by the container runtime. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Label labels = 4; + */ + private $labels; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Container name. + * @type string $uri + * Container image URI provided when configuring a pod/container. + * May identify a container image version using mutable tags. + * @type string $image_id + * Optional container image id, when provided by the container runtime. + * Uniquely identifies the container image launched using a container image + * digest. + * @type array<\Google\Cloud\SecurityCenter\V1\Label>|\Google\Protobuf\Internal\RepeatedField $labels + * Container labels, as provided by the container runtime. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\Container::initOnce(); + parent::__construct($data); + } + + /** + * Container name. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Container name. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Container image URI provided when configuring a pod/container. + * May identify a container image version using mutable tags. + * + * Generated from protobuf field string uri = 2; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * Container image URI provided when configuring a pod/container. + * May identify a container image version using mutable tags. + * + * Generated from protobuf field string uri = 2; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + + /** + * Optional container image id, when provided by the container runtime. + * Uniquely identifies the container image launched using a container image + * digest. + * + * Generated from protobuf field string image_id = 3; + * @return string + */ + public function getImageId() + { + return $this->image_id; + } + + /** + * Optional container image id, when provided by the container runtime. + * Uniquely identifies the container image launched using a container image + * digest. + * + * Generated from protobuf field string image_id = 3; + * @param string $var + * @return $this + */ + public function setImageId($var) + { + GPBUtil::checkString($var, True); + $this->image_id = $var; + + return $this; + } + + /** + * Container labels, as provided by the container runtime. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Label labels = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Container labels, as provided by the container runtime. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Label labels = 4; + * @param array<\Google\Cloud\SecurityCenter\V1\Label>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\Label::class); + $this->labels = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/CreateBigQueryExportRequest.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/CreateBigQueryExportRequest.php new file mode 100644 index 000000000000..b349b87a17ab --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/CreateBigQueryExportRequest.php @@ -0,0 +1,165 @@ +google.cloud.securitycenter.v1.CreateBigQueryExportRequest + */ +class CreateBigQueryExportRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the parent resource of the new BigQuery export. Its + * format is "organizations/[organization_id]", "folders/[folder_id]", or + * "projects/[project_id]". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The BigQuery export being created. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.BigQueryExport big_query_export = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $big_query_export = null; + /** + * Required. Unique identifier provided by the client within the parent scope. + * It must consist of lower case letters, numbers, and hyphen, with the first + * character a letter, the last a letter or a number, and a 63 character + * maximum. + * + * Generated from protobuf field string big_query_export_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $big_query_export_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of the parent resource of the new BigQuery export. Its + * format is "organizations/[organization_id]", "folders/[folder_id]", or + * "projects/[project_id]". + * @type \Google\Cloud\SecurityCenter\V1\BigQueryExport $big_query_export + * Required. The BigQuery export being created. + * @type string $big_query_export_id + * Required. Unique identifier provided by the client within the parent scope. + * It must consist of lower case letters, numbers, and hyphen, with the first + * character a letter, the last a letter or a number, and a 63 character + * maximum. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the parent resource of the new BigQuery export. Its + * format is "organizations/[organization_id]", "folders/[folder_id]", or + * "projects/[project_id]". + * + * 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. The name of the parent resource of the new BigQuery export. Its + * format is "organizations/[organization_id]", "folders/[folder_id]", or + * "projects/[project_id]". + * + * 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; + } + + /** + * Required. The BigQuery export being created. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.BigQueryExport big_query_export = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\SecurityCenter\V1\BigQueryExport|null + */ + public function getBigQueryExport() + { + return $this->big_query_export; + } + + public function hasBigQueryExport() + { + return isset($this->big_query_export); + } + + public function clearBigQueryExport() + { + unset($this->big_query_export); + } + + /** + * Required. The BigQuery export being created. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.BigQueryExport big_query_export = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\SecurityCenter\V1\BigQueryExport $var + * @return $this + */ + public function setBigQueryExport($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\BigQueryExport::class); + $this->big_query_export = $var; + + return $this; + } + + /** + * Required. Unique identifier provided by the client within the parent scope. + * It must consist of lower case letters, numbers, and hyphen, with the first + * character a letter, the last a letter or a number, and a 63 character + * maximum. + * + * Generated from protobuf field string big_query_export_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getBigQueryExportId() + { + return $this->big_query_export_id; + } + + /** + * Required. Unique identifier provided by the client within the parent scope. + * It must consist of lower case letters, numbers, and hyphen, with the first + * character a letter, the last a letter or a number, and a 63 character + * maximum. + * + * Generated from protobuf field string big_query_export_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setBigQueryExportId($var) + { + GPBUtil::checkString($var, True); + $this->big_query_export_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/CreateFindingRequest.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/CreateFindingRequest.php new file mode 100644 index 000000000000..0b0c76b5e158 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/CreateFindingRequest.php @@ -0,0 +1,161 @@ +google.cloud.securitycenter.v1.CreateFindingRequest + */ +class CreateFindingRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the new finding's parent. Its format should be + * "organizations/[organization_id]/sources/[source_id]". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Unique identifier provided by the client within the parent scope. + * It must be alphanumeric and less than or equal to 32 characters and + * greater than 0 characters in length. + * + * Generated from protobuf field string finding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $finding_id = ''; + /** + * Required. The Finding being created. The name and security_marks will be + * ignored as they are both output only fields on this resource. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Finding finding = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $finding = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Resource name of the new finding's parent. Its format should be + * "organizations/[organization_id]/sources/[source_id]". + * @type string $finding_id + * Required. Unique identifier provided by the client within the parent scope. + * It must be alphanumeric and less than or equal to 32 characters and + * greater than 0 characters in length. + * @type \Google\Cloud\SecurityCenter\V1\Finding $finding + * Required. The Finding being created. The name and security_marks will be + * ignored as they are both output only fields on this resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the new finding's parent. Its format should be + * "organizations/[organization_id]/sources/[source_id]". + * + * 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. Resource name of the new finding's parent. Its format should be + * "organizations/[organization_id]/sources/[source_id]". + * + * 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; + } + + /** + * Required. Unique identifier provided by the client within the parent scope. + * It must be alphanumeric and less than or equal to 32 characters and + * greater than 0 characters in length. + * + * Generated from protobuf field string finding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getFindingId() + { + return $this->finding_id; + } + + /** + * Required. Unique identifier provided by the client within the parent scope. + * It must be alphanumeric and less than or equal to 32 characters and + * greater than 0 characters in length. + * + * Generated from protobuf field string finding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setFindingId($var) + { + GPBUtil::checkString($var, True); + $this->finding_id = $var; + + return $this; + } + + /** + * Required. The Finding being created. The name and security_marks will be + * ignored as they are both output only fields on this resource. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Finding finding = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\SecurityCenter\V1\Finding|null + */ + public function getFinding() + { + return $this->finding; + } + + public function hasFinding() + { + return isset($this->finding); + } + + public function clearFinding() + { + unset($this->finding); + } + + /** + * Required. The Finding being created. The name and security_marks will be + * ignored as they are both output only fields on this resource. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Finding finding = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\SecurityCenter\V1\Finding $var + * @return $this + */ + public function setFinding($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\Finding::class); + $this->finding = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/CreateMuteConfigRequest.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/CreateMuteConfigRequest.php new file mode 100644 index 000000000000..6e76b0fc7165 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/CreateMuteConfigRequest.php @@ -0,0 +1,165 @@ +google.cloud.securitycenter.v1.CreateMuteConfigRequest + */ +class CreateMuteConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the new mute configs's parent. Its format is + * "organizations/[organization_id]", "folders/[folder_id]", or + * "projects/[project_id]". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The mute config being created. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.MuteConfig mute_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $mute_config = null; + /** + * Required. Unique identifier provided by the client within the parent scope. + * It must consist of lower case letters, numbers, and hyphen, with the first + * character a letter, the last a letter or a number, and a 63 character + * maximum. + * + * Generated from protobuf field string mute_config_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $mute_config_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Resource name of the new mute configs's parent. Its format is + * "organizations/[organization_id]", "folders/[folder_id]", or + * "projects/[project_id]". + * @type \Google\Cloud\SecurityCenter\V1\MuteConfig $mute_config + * Required. The mute config being created. + * @type string $mute_config_id + * Required. Unique identifier provided by the client within the parent scope. + * It must consist of lower case letters, numbers, and hyphen, with the first + * character a letter, the last a letter or a number, and a 63 character + * maximum. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the new mute configs's parent. Its format is + * "organizations/[organization_id]", "folders/[folder_id]", or + * "projects/[project_id]". + * + * 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. Resource name of the new mute configs's parent. Its format is + * "organizations/[organization_id]", "folders/[folder_id]", or + * "projects/[project_id]". + * + * 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; + } + + /** + * Required. The mute config being created. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.MuteConfig mute_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\SecurityCenter\V1\MuteConfig|null + */ + public function getMuteConfig() + { + return $this->mute_config; + } + + public function hasMuteConfig() + { + return isset($this->mute_config); + } + + public function clearMuteConfig() + { + unset($this->mute_config); + } + + /** + * Required. The mute config being created. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.MuteConfig mute_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\SecurityCenter\V1\MuteConfig $var + * @return $this + */ + public function setMuteConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\MuteConfig::class); + $this->mute_config = $var; + + return $this; + } + + /** + * Required. Unique identifier provided by the client within the parent scope. + * It must consist of lower case letters, numbers, and hyphen, with the first + * character a letter, the last a letter or a number, and a 63 character + * maximum. + * + * Generated from protobuf field string mute_config_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getMuteConfigId() + { + return $this->mute_config_id; + } + + /** + * Required. Unique identifier provided by the client within the parent scope. + * It must consist of lower case letters, numbers, and hyphen, with the first + * character a letter, the last a letter or a number, and a 63 character + * maximum. + * + * Generated from protobuf field string mute_config_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setMuteConfigId($var) + { + GPBUtil::checkString($var, True); + $this->mute_config_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/CreateNotificationConfigRequest.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/CreateNotificationConfigRequest.php new file mode 100644 index 000000000000..6c3131adbf85 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/CreateNotificationConfigRequest.php @@ -0,0 +1,173 @@ +google.cloud.securitycenter.v1.CreateNotificationConfigRequest + */ +class CreateNotificationConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the new notification config's parent. Its format + * is "organizations/[organization_id]", "folders/[folder_id]", or + * "projects/[project_id]". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. + * Unique identifier provided by the client within the parent scope. + * It must be between 1 and 128 characters and contain alphanumeric + * characters, underscores, or hyphens only. + * + * Generated from protobuf field string config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $config_id = ''; + /** + * Required. The notification config being created. The name and the service + * account will be ignored as they are both output only fields on this + * resource. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.NotificationConfig notification_config = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $notification_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Resource name of the new notification config's parent. Its format + * is "organizations/[organization_id]", "folders/[folder_id]", or + * "projects/[project_id]". + * @type string $config_id + * Required. + * Unique identifier provided by the client within the parent scope. + * It must be between 1 and 128 characters and contain alphanumeric + * characters, underscores, or hyphens only. + * @type \Google\Cloud\SecurityCenter\V1\NotificationConfig $notification_config + * Required. The notification config being created. The name and the service + * account will be ignored as they are both output only fields on this + * resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the new notification config's parent. Its format + * is "organizations/[organization_id]", "folders/[folder_id]", or + * "projects/[project_id]". + * + * 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. Resource name of the new notification config's parent. Its format + * is "organizations/[organization_id]", "folders/[folder_id]", or + * "projects/[project_id]". + * + * 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; + } + + /** + * Required. + * Unique identifier provided by the client within the parent scope. + * It must be between 1 and 128 characters and contain alphanumeric + * characters, underscores, or hyphens only. + * + * Generated from protobuf field string config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getConfigId() + { + return $this->config_id; + } + + /** + * Required. + * Unique identifier provided by the client within the parent scope. + * It must be between 1 and 128 characters and contain alphanumeric + * characters, underscores, or hyphens only. + * + * Generated from protobuf field string config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setConfigId($var) + { + GPBUtil::checkString($var, True); + $this->config_id = $var; + + return $this; + } + + /** + * Required. The notification config being created. The name and the service + * account will be ignored as they are both output only fields on this + * resource. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.NotificationConfig notification_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\SecurityCenter\V1\NotificationConfig|null + */ + public function getNotificationConfig() + { + return $this->notification_config; + } + + public function hasNotificationConfig() + { + return isset($this->notification_config); + } + + public function clearNotificationConfig() + { + unset($this->notification_config); + } + + /** + * Required. The notification config being created. The name and the service + * account will be ignored as they are both output only fields on this + * resource. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.NotificationConfig notification_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\SecurityCenter\V1\NotificationConfig $var + * @return $this + */ + public function setNotificationConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\NotificationConfig::class); + $this->notification_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/CreateSourceRequest.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/CreateSourceRequest.php new file mode 100644 index 000000000000..8c3f7cd7beee --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/CreateSourceRequest.php @@ -0,0 +1,119 @@ +google.cloud.securitycenter.v1.CreateSourceRequest + */ +class CreateSourceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the new source's parent. Its format should be + * "organizations/[organization_id]". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The Source being created, only the display_name and description + * will be used. All other fields will be ignored. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $source = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Resource name of the new source's parent. Its format should be + * "organizations/[organization_id]". + * @type \Google\Cloud\SecurityCenter\V1\Source $source + * Required. The Source being created, only the display_name and description + * will be used. All other fields will be ignored. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the new source's parent. Its format should be + * "organizations/[organization_id]". + * + * 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. Resource name of the new source's parent. Its format should be + * "organizations/[organization_id]". + * + * 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; + } + + /** + * Required. The Source being created, only the display_name and description + * will be used. All other fields will be ignored. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\SecurityCenter\V1\Source|null + */ + public function getSource() + { + return $this->source; + } + + public function hasSource() + { + return isset($this->source); + } + + public function clearSource() + { + unset($this->source); + } + + /** + * Required. The Source being created, only the display_name and description + * will be used. All other fields will be ignored. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\SecurityCenter\V1\Source $var + * @return $this + */ + public function setSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\Source::class); + $this->source = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cve.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cve.php new file mode 100644 index 000000000000..24899e7a49c6 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cve.php @@ -0,0 +1,188 @@ +google.cloud.securitycenter.v1.Cve + */ +class Cve extends \Google\Protobuf\Internal\Message +{ + /** + * The unique identifier for the vulnerability. e.g. CVE-2021-34527 + * + * Generated from protobuf field string id = 1; + */ + protected $id = ''; + /** + * Additional information about the CVE. + * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527 + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Reference references = 2; + */ + private $references; + /** + * Describe Common Vulnerability Scoring System specified at + * https://www.first.org/cvss/v3.1/specification-document + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Cvssv3 cvssv3 = 3; + */ + protected $cvssv3 = null; + /** + * Whether upstream fix is available for the CVE. + * + * Generated from protobuf field bool upstream_fix_available = 4; + */ + protected $upstream_fix_available = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * The unique identifier for the vulnerability. e.g. CVE-2021-34527 + * @type array<\Google\Cloud\SecurityCenter\V1\Reference>|\Google\Protobuf\Internal\RepeatedField $references + * Additional information about the CVE. + * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527 + * @type \Google\Cloud\SecurityCenter\V1\Cvssv3 $cvssv3 + * Describe Common Vulnerability Scoring System specified at + * https://www.first.org/cvss/v3.1/specification-document + * @type bool $upstream_fix_available + * Whether upstream fix is available for the CVE. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\Vulnerability::initOnce(); + parent::__construct($data); + } + + /** + * The unique identifier for the vulnerability. e.g. CVE-2021-34527 + * + * Generated from protobuf field string id = 1; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * The unique identifier for the vulnerability. e.g. CVE-2021-34527 + * + * Generated from protobuf field string id = 1; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * Additional information about the CVE. + * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527 + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Reference references = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getReferences() + { + return $this->references; + } + + /** + * Additional information about the CVE. + * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527 + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Reference references = 2; + * @param array<\Google\Cloud\SecurityCenter\V1\Reference>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setReferences($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\Reference::class); + $this->references = $arr; + + return $this; + } + + /** + * Describe Common Vulnerability Scoring System specified at + * https://www.first.org/cvss/v3.1/specification-document + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Cvssv3 cvssv3 = 3; + * @return \Google\Cloud\SecurityCenter\V1\Cvssv3|null + */ + public function getCvssv3() + { + return $this->cvssv3; + } + + public function hasCvssv3() + { + return isset($this->cvssv3); + } + + public function clearCvssv3() + { + unset($this->cvssv3); + } + + /** + * Describe Common Vulnerability Scoring System specified at + * https://www.first.org/cvss/v3.1/specification-document + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Cvssv3 cvssv3 = 3; + * @param \Google\Cloud\SecurityCenter\V1\Cvssv3 $var + * @return $this + */ + public function setCvssv3($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\Cvssv3::class); + $this->cvssv3 = $var; + + return $this; + } + + /** + * Whether upstream fix is available for the CVE. + * + * Generated from protobuf field bool upstream_fix_available = 4; + * @return bool + */ + public function getUpstreamFixAvailable() + { + return $this->upstream_fix_available; + } + + /** + * Whether upstream fix is available for the CVE. + * + * Generated from protobuf field bool upstream_fix_available = 4; + * @param bool $var + * @return $this + */ + public function setUpstreamFixAvailable($var) + { + GPBUtil::checkBool($var); + $this->upstream_fix_available = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3.php new file mode 100644 index 000000000000..d7eb6ed7aaa5 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3.php @@ -0,0 +1,391 @@ +google.cloud.securitycenter.v1.Cvssv3 + */ +class Cvssv3 extends \Google\Protobuf\Internal\Message +{ + /** + * The base score is a function of the base metric scores. + * + * Generated from protobuf field double base_score = 1; + */ + protected $base_score = 0.0; + /** + * Base Metrics + * Represents the intrinsic characteristics of a vulnerability that are + * constant over time and across user environments. + * This metric reflects the context by which vulnerability exploitation is + * possible. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Cvssv3.AttackVector attack_vector = 5; + */ + protected $attack_vector = 0; + /** + * This metric describes the conditions beyond the attacker's control that + * must exist in order to exploit the vulnerability. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Cvssv3.AttackComplexity attack_complexity = 6; + */ + protected $attack_complexity = 0; + /** + * This metric describes the level of privileges an attacker must possess + * before successfully exploiting the vulnerability. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Cvssv3.PrivilegesRequired privileges_required = 7; + */ + protected $privileges_required = 0; + /** + * This metric captures the requirement for a human user, other than the + * attacker, to participate in the successful compromise of the vulnerable + * component. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Cvssv3.UserInteraction user_interaction = 8; + */ + protected $user_interaction = 0; + /** + * The Scope metric captures whether a vulnerability in one vulnerable + * component impacts resources in components beyond its security scope. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Cvssv3.Scope scope = 9; + */ + protected $scope = 0; + /** + * This metric measures the impact to the confidentiality of the information + * resources managed by a software component due to a successfully exploited + * vulnerability. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Cvssv3.Impact confidentiality_impact = 10; + */ + protected $confidentiality_impact = 0; + /** + * This metric measures the impact to integrity of a successfully exploited + * vulnerability. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Cvssv3.Impact integrity_impact = 11; + */ + protected $integrity_impact = 0; + /** + * This metric measures the impact to the availability of the impacted + * component resulting from a successfully exploited vulnerability. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Cvssv3.Impact availability_impact = 12; + */ + protected $availability_impact = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $base_score + * The base score is a function of the base metric scores. + * @type int $attack_vector + * Base Metrics + * Represents the intrinsic characteristics of a vulnerability that are + * constant over time and across user environments. + * This metric reflects the context by which vulnerability exploitation is + * possible. + * @type int $attack_complexity + * This metric describes the conditions beyond the attacker's control that + * must exist in order to exploit the vulnerability. + * @type int $privileges_required + * This metric describes the level of privileges an attacker must possess + * before successfully exploiting the vulnerability. + * @type int $user_interaction + * This metric captures the requirement for a human user, other than the + * attacker, to participate in the successful compromise of the vulnerable + * component. + * @type int $scope + * The Scope metric captures whether a vulnerability in one vulnerable + * component impacts resources in components beyond its security scope. + * @type int $confidentiality_impact + * This metric measures the impact to the confidentiality of the information + * resources managed by a software component due to a successfully exploited + * vulnerability. + * @type int $integrity_impact + * This metric measures the impact to integrity of a successfully exploited + * vulnerability. + * @type int $availability_impact + * This metric measures the impact to the availability of the impacted + * component resulting from a successfully exploited vulnerability. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\Vulnerability::initOnce(); + parent::__construct($data); + } + + /** + * The base score is a function of the base metric scores. + * + * Generated from protobuf field double base_score = 1; + * @return float + */ + public function getBaseScore() + { + return $this->base_score; + } + + /** + * The base score is a function of the base metric scores. + * + * Generated from protobuf field double base_score = 1; + * @param float $var + * @return $this + */ + public function setBaseScore($var) + { + GPBUtil::checkDouble($var); + $this->base_score = $var; + + return $this; + } + + /** + * Base Metrics + * Represents the intrinsic characteristics of a vulnerability that are + * constant over time and across user environments. + * This metric reflects the context by which vulnerability exploitation is + * possible. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Cvssv3.AttackVector attack_vector = 5; + * @return int + */ + public function getAttackVector() + { + return $this->attack_vector; + } + + /** + * Base Metrics + * Represents the intrinsic characteristics of a vulnerability that are + * constant over time and across user environments. + * This metric reflects the context by which vulnerability exploitation is + * possible. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Cvssv3.AttackVector attack_vector = 5; + * @param int $var + * @return $this + */ + public function setAttackVector($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1\Cvssv3\AttackVector::class); + $this->attack_vector = $var; + + return $this; + } + + /** + * This metric describes the conditions beyond the attacker's control that + * must exist in order to exploit the vulnerability. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Cvssv3.AttackComplexity attack_complexity = 6; + * @return int + */ + public function getAttackComplexity() + { + return $this->attack_complexity; + } + + /** + * This metric describes the conditions beyond the attacker's control that + * must exist in order to exploit the vulnerability. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Cvssv3.AttackComplexity attack_complexity = 6; + * @param int $var + * @return $this + */ + public function setAttackComplexity($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1\Cvssv3\AttackComplexity::class); + $this->attack_complexity = $var; + + return $this; + } + + /** + * This metric describes the level of privileges an attacker must possess + * before successfully exploiting the vulnerability. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Cvssv3.PrivilegesRequired privileges_required = 7; + * @return int + */ + public function getPrivilegesRequired() + { + return $this->privileges_required; + } + + /** + * This metric describes the level of privileges an attacker must possess + * before successfully exploiting the vulnerability. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Cvssv3.PrivilegesRequired privileges_required = 7; + * @param int $var + * @return $this + */ + public function setPrivilegesRequired($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1\Cvssv3\PrivilegesRequired::class); + $this->privileges_required = $var; + + return $this; + } + + /** + * This metric captures the requirement for a human user, other than the + * attacker, to participate in the successful compromise of the vulnerable + * component. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Cvssv3.UserInteraction user_interaction = 8; + * @return int + */ + public function getUserInteraction() + { + return $this->user_interaction; + } + + /** + * This metric captures the requirement for a human user, other than the + * attacker, to participate in the successful compromise of the vulnerable + * component. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Cvssv3.UserInteraction user_interaction = 8; + * @param int $var + * @return $this + */ + public function setUserInteraction($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1\Cvssv3\UserInteraction::class); + $this->user_interaction = $var; + + return $this; + } + + /** + * The Scope metric captures whether a vulnerability in one vulnerable + * component impacts resources in components beyond its security scope. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Cvssv3.Scope scope = 9; + * @return int + */ + public function getScope() + { + return $this->scope; + } + + /** + * The Scope metric captures whether a vulnerability in one vulnerable + * component impacts resources in components beyond its security scope. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Cvssv3.Scope scope = 9; + * @param int $var + * @return $this + */ + public function setScope($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1\Cvssv3\Scope::class); + $this->scope = $var; + + return $this; + } + + /** + * This metric measures the impact to the confidentiality of the information + * resources managed by a software component due to a successfully exploited + * vulnerability. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Cvssv3.Impact confidentiality_impact = 10; + * @return int + */ + public function getConfidentialityImpact() + { + return $this->confidentiality_impact; + } + + /** + * This metric measures the impact to the confidentiality of the information + * resources managed by a software component due to a successfully exploited + * vulnerability. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Cvssv3.Impact confidentiality_impact = 10; + * @param int $var + * @return $this + */ + public function setConfidentialityImpact($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1\Cvssv3\Impact::class); + $this->confidentiality_impact = $var; + + return $this; + } + + /** + * This metric measures the impact to integrity of a successfully exploited + * vulnerability. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Cvssv3.Impact integrity_impact = 11; + * @return int + */ + public function getIntegrityImpact() + { + return $this->integrity_impact; + } + + /** + * This metric measures the impact to integrity of a successfully exploited + * vulnerability. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Cvssv3.Impact integrity_impact = 11; + * @param int $var + * @return $this + */ + public function setIntegrityImpact($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1\Cvssv3\Impact::class); + $this->integrity_impact = $var; + + return $this; + } + + /** + * This metric measures the impact to the availability of the impacted + * component resulting from a successfully exploited vulnerability. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Cvssv3.Impact availability_impact = 12; + * @return int + */ + public function getAvailabilityImpact() + { + return $this->availability_impact; + } + + /** + * This metric measures the impact to the availability of the impacted + * component resulting from a successfully exploited vulnerability. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Cvssv3.Impact availability_impact = 12; + * @param int $var + * @return $this + */ + public function setAvailabilityImpact($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1\Cvssv3\Impact::class); + $this->availability_impact = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3/AttackComplexity.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3/AttackComplexity.php new file mode 100644 index 000000000000..179eeffa8a5e --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3/AttackComplexity.php @@ -0,0 +1,71 @@ +google.cloud.securitycenter.v1.Cvssv3.AttackComplexity + */ +class AttackComplexity +{ + /** + * Invalid value. + * + * Generated from protobuf enum ATTACK_COMPLEXITY_UNSPECIFIED = 0; + */ + const ATTACK_COMPLEXITY_UNSPECIFIED = 0; + /** + * Specialized access conditions or extenuating circumstances do not exist. + * An attacker can expect repeatable success when attacking the vulnerable + * component. + * + * Generated from protobuf enum ATTACK_COMPLEXITY_LOW = 1; + */ + const ATTACK_COMPLEXITY_LOW = 1; + /** + * A successful attack depends on conditions beyond the attacker's control. + * That is, a successful attack cannot be accomplished at will, but requires + * the attacker to invest in some measurable amount of effort in preparation + * or execution against the vulnerable component before a successful attack + * can be expected. + * + * Generated from protobuf enum ATTACK_COMPLEXITY_HIGH = 2; + */ + const ATTACK_COMPLEXITY_HIGH = 2; + + private static $valueToName = [ + self::ATTACK_COMPLEXITY_UNSPECIFIED => 'ATTACK_COMPLEXITY_UNSPECIFIED', + self::ATTACK_COMPLEXITY_LOW => 'ATTACK_COMPLEXITY_LOW', + self::ATTACK_COMPLEXITY_HIGH => 'ATTACK_COMPLEXITY_HIGH', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AttackComplexity::class, \Google\Cloud\SecurityCenter\V1\Cvssv3_AttackComplexity::class); + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3/AttackVector.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3/AttackVector.php new file mode 100644 index 000000000000..fa6acfc9dc84 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3/AttackVector.php @@ -0,0 +1,84 @@ +google.cloud.securitycenter.v1.Cvssv3.AttackVector + */ +class AttackVector +{ + /** + * Invalid value. + * + * Generated from protobuf enum ATTACK_VECTOR_UNSPECIFIED = 0; + */ + const ATTACK_VECTOR_UNSPECIFIED = 0; + /** + * The vulnerable component is bound to the network stack and the set of + * possible attackers extends beyond the other options listed below, up to + * and including the entire Internet. + * + * Generated from protobuf enum ATTACK_VECTOR_NETWORK = 1; + */ + const ATTACK_VECTOR_NETWORK = 1; + /** + * The vulnerable component is bound to the network stack, but the attack is + * limited at the protocol level to a logically adjacent topology. + * + * Generated from protobuf enum ATTACK_VECTOR_ADJACENT = 2; + */ + const ATTACK_VECTOR_ADJACENT = 2; + /** + * The vulnerable component is not bound to the network stack and the + * attacker's path is via read/write/execute capabilities. + * + * Generated from protobuf enum ATTACK_VECTOR_LOCAL = 3; + */ + const ATTACK_VECTOR_LOCAL = 3; + /** + * The attack requires the attacker to physically touch or manipulate the + * vulnerable component. + * + * Generated from protobuf enum ATTACK_VECTOR_PHYSICAL = 4; + */ + const ATTACK_VECTOR_PHYSICAL = 4; + + private static $valueToName = [ + self::ATTACK_VECTOR_UNSPECIFIED => 'ATTACK_VECTOR_UNSPECIFIED', + self::ATTACK_VECTOR_NETWORK => 'ATTACK_VECTOR_NETWORK', + self::ATTACK_VECTOR_ADJACENT => 'ATTACK_VECTOR_ADJACENT', + self::ATTACK_VECTOR_LOCAL => 'ATTACK_VECTOR_LOCAL', + self::ATTACK_VECTOR_PHYSICAL => 'ATTACK_VECTOR_PHYSICAL', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AttackVector::class, \Google\Cloud\SecurityCenter\V1\Cvssv3_AttackVector::class); + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3/Impact.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3/Impact.php new file mode 100644 index 000000000000..027aced5e553 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3/Impact.php @@ -0,0 +1,73 @@ +google.cloud.securitycenter.v1.Cvssv3.Impact + */ +class Impact +{ + /** + * Invalid value. + * + * Generated from protobuf enum IMPACT_UNSPECIFIED = 0; + */ + const IMPACT_UNSPECIFIED = 0; + /** + * High impact. + * + * Generated from protobuf enum IMPACT_HIGH = 1; + */ + const IMPACT_HIGH = 1; + /** + * Low impact. + * + * Generated from protobuf enum IMPACT_LOW = 2; + */ + const IMPACT_LOW = 2; + /** + * No impact. + * + * Generated from protobuf enum IMPACT_NONE = 3; + */ + const IMPACT_NONE = 3; + + private static $valueToName = [ + self::IMPACT_UNSPECIFIED => 'IMPACT_UNSPECIFIED', + self::IMPACT_HIGH => 'IMPACT_HIGH', + self::IMPACT_LOW => 'IMPACT_LOW', + self::IMPACT_NONE => 'IMPACT_NONE', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Impact::class, \Google\Cloud\SecurityCenter\V1\Cvssv3_Impact::class); + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3/PrivilegesRequired.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3/PrivilegesRequired.php new file mode 100644 index 000000000000..29fef4718691 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3/PrivilegesRequired.php @@ -0,0 +1,79 @@ +google.cloud.securitycenter.v1.Cvssv3.PrivilegesRequired + */ +class PrivilegesRequired +{ + /** + * Invalid value. + * + * Generated from protobuf enum PRIVILEGES_REQUIRED_UNSPECIFIED = 0; + */ + const PRIVILEGES_REQUIRED_UNSPECIFIED = 0; + /** + * The attacker is unauthorized prior to attack, and therefore does not + * require any access to settings or files of the vulnerable system to + * carry out an attack. + * + * Generated from protobuf enum PRIVILEGES_REQUIRED_NONE = 1; + */ + const PRIVILEGES_REQUIRED_NONE = 1; + /** + * The attacker requires privileges that provide basic user capabilities + * that could normally affect only settings and files owned by a user. + * Alternatively, an attacker with Low privileges has the ability to access + * only non-sensitive resources. + * + * Generated from protobuf enum PRIVILEGES_REQUIRED_LOW = 2; + */ + const PRIVILEGES_REQUIRED_LOW = 2; + /** + * The attacker requires privileges that provide significant (e.g., + * administrative) control over the vulnerable component allowing access to + * component-wide settings and files. + * + * Generated from protobuf enum PRIVILEGES_REQUIRED_HIGH = 3; + */ + const PRIVILEGES_REQUIRED_HIGH = 3; + + private static $valueToName = [ + self::PRIVILEGES_REQUIRED_UNSPECIFIED => 'PRIVILEGES_REQUIRED_UNSPECIFIED', + self::PRIVILEGES_REQUIRED_NONE => 'PRIVILEGES_REQUIRED_NONE', + self::PRIVILEGES_REQUIRED_LOW => 'PRIVILEGES_REQUIRED_LOW', + self::PRIVILEGES_REQUIRED_HIGH => 'PRIVILEGES_REQUIRED_HIGH', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PrivilegesRequired::class, \Google\Cloud\SecurityCenter\V1\Cvssv3_PrivilegesRequired::class); + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3/Scope.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3/Scope.php new file mode 100644 index 000000000000..cb0e08038f76 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3/Scope.php @@ -0,0 +1,67 @@ +google.cloud.securitycenter.v1.Cvssv3.Scope + */ +class Scope +{ + /** + * Invalid value. + * + * Generated from protobuf enum SCOPE_UNSPECIFIED = 0; + */ + const SCOPE_UNSPECIFIED = 0; + /** + * An exploited vulnerability can only affect resources managed by the same + * security authority. + * + * Generated from protobuf enum SCOPE_UNCHANGED = 1; + */ + const SCOPE_UNCHANGED = 1; + /** + * An exploited vulnerability can affect resources beyond the security scope + * managed by the security authority of the vulnerable component. + * + * Generated from protobuf enum SCOPE_CHANGED = 2; + */ + const SCOPE_CHANGED = 2; + + private static $valueToName = [ + self::SCOPE_UNSPECIFIED => 'SCOPE_UNSPECIFIED', + self::SCOPE_UNCHANGED => 'SCOPE_UNCHANGED', + self::SCOPE_CHANGED => 'SCOPE_CHANGED', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Scope::class, \Google\Cloud\SecurityCenter\V1\Cvssv3_Scope::class); + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3/UserInteraction.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3/UserInteraction.php new file mode 100644 index 000000000000..305d85c574e2 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3/UserInteraction.php @@ -0,0 +1,67 @@ +google.cloud.securitycenter.v1.Cvssv3.UserInteraction + */ +class UserInteraction +{ + /** + * Invalid value. + * + * Generated from protobuf enum USER_INTERACTION_UNSPECIFIED = 0; + */ + const USER_INTERACTION_UNSPECIFIED = 0; + /** + * The vulnerable system can be exploited without interaction from any user. + * + * Generated from protobuf enum USER_INTERACTION_NONE = 1; + */ + const USER_INTERACTION_NONE = 1; + /** + * Successful exploitation of this vulnerability requires a user to take + * some action before the vulnerability can be exploited. + * + * Generated from protobuf enum USER_INTERACTION_REQUIRED = 2; + */ + const USER_INTERACTION_REQUIRED = 2; + + private static $valueToName = [ + self::USER_INTERACTION_UNSPECIFIED => 'USER_INTERACTION_UNSPECIFIED', + self::USER_INTERACTION_NONE => 'USER_INTERACTION_NONE', + self::USER_INTERACTION_REQUIRED => 'USER_INTERACTION_REQUIRED', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(UserInteraction::class, \Google\Cloud\SecurityCenter\V1\Cvssv3_UserInteraction::class); + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3_AttackComplexity.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3_AttackComplexity.php new file mode 100644 index 000000000000..32b2fb731a06 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3_AttackComplexity.php @@ -0,0 +1,16 @@ +google.cloud.securitycenter.v1.Database + */ +class Database extends \Google\Protobuf\Internal\Message +{ + /** + * The full resource name of the database the user connected to, if it is + * supported by CAI. (https://google.aip.dev/122#full-resource-names) + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The human readable name of the database the user connected to. + * + * Generated from protobuf field string display_name = 2; + */ + protected $display_name = ''; + /** + * The username used to connect to the DB. This may not necessarily be an IAM + * principal, and has no required format. + * + * Generated from protobuf field string user_name = 3; + */ + protected $user_name = ''; + /** + * The SQL statement associated with the relevant access. + * + * Generated from protobuf field string query = 4; + */ + protected $query = ''; + /** + * The target usernames/roles/groups of a SQL privilege grant (not an IAM + * policy change). + * + * Generated from protobuf field repeated string grantees = 5; + */ + private $grantees; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The full resource name of the database the user connected to, if it is + * supported by CAI. (https://google.aip.dev/122#full-resource-names) + * @type string $display_name + * The human readable name of the database the user connected to. + * @type string $user_name + * The username used to connect to the DB. This may not necessarily be an IAM + * principal, and has no required format. + * @type string $query + * The SQL statement associated with the relevant access. + * @type array|\Google\Protobuf\Internal\RepeatedField $grantees + * The target usernames/roles/groups of a SQL privilege grant (not an IAM + * policy change). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\Database::initOnce(); + parent::__construct($data); + } + + /** + * The full resource name of the database the user connected to, if it is + * supported by CAI. (https://google.aip.dev/122#full-resource-names) + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The full resource name of the database the user connected to, if it is + * supported by CAI. (https://google.aip.dev/122#full-resource-names) + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The human readable name of the database the user connected to. + * + * Generated from protobuf field string display_name = 2; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The human readable name of the database the user connected to. + * + * 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; + } + + /** + * The username used to connect to the DB. This may not necessarily be an IAM + * principal, and has no required format. + * + * Generated from protobuf field string user_name = 3; + * @return string + */ + public function getUserName() + { + return $this->user_name; + } + + /** + * The username used to connect to the DB. This may not necessarily be an IAM + * principal, and has no required format. + * + * Generated from protobuf field string user_name = 3; + * @param string $var + * @return $this + */ + public function setUserName($var) + { + GPBUtil::checkString($var, True); + $this->user_name = $var; + + return $this; + } + + /** + * The SQL statement associated with the relevant access. + * + * Generated from protobuf field string query = 4; + * @return string + */ + public function getQuery() + { + return $this->query; + } + + /** + * The SQL statement associated with the relevant access. + * + * Generated from protobuf field string query = 4; + * @param string $var + * @return $this + */ + public function setQuery($var) + { + GPBUtil::checkString($var, True); + $this->query = $var; + + return $this; + } + + /** + * The target usernames/roles/groups of a SQL privilege grant (not an IAM + * policy change). + * + * Generated from protobuf field repeated string grantees = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getGrantees() + { + return $this->grantees; + } + + /** + * The target usernames/roles/groups of a SQL privilege grant (not an IAM + * policy change). + * + * Generated from protobuf field repeated string grantees = 5; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setGrantees($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->grantees = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/DeleteBigQueryExportRequest.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/DeleteBigQueryExportRequest.php new file mode 100644 index 000000000000..9df6b9fb5fd0 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/DeleteBigQueryExportRequest.php @@ -0,0 +1,79 @@ +google.cloud.securitycenter.v1.DeleteBigQueryExportRequest + */ +class DeleteBigQueryExportRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the BigQuery export to delete. Its format is + * organizations/{organization}/bigQueryExports/{export_id}, + * folders/{folder}/bigQueryExports/{export_id}, or + * projects/{project}/bigQueryExports/{export_id} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the BigQuery export to delete. Its format is + * organizations/{organization}/bigQueryExports/{export_id}, + * folders/{folder}/bigQueryExports/{export_id}, or + * projects/{project}/bigQueryExports/{export_id} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the BigQuery export to delete. Its format is + * organizations/{organization}/bigQueryExports/{export_id}, + * folders/{folder}/bigQueryExports/{export_id}, or + * projects/{project}/bigQueryExports/{export_id} + * + * 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. The name of the BigQuery export to delete. Its format is + * organizations/{organization}/bigQueryExports/{export_id}, + * folders/{folder}/bigQueryExports/{export_id}, or + * projects/{project}/bigQueryExports/{export_id} + * + * 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/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/DeleteMuteConfigRequest.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/DeleteMuteConfigRequest.php new file mode 100644 index 000000000000..cd06fb629409 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/DeleteMuteConfigRequest.php @@ -0,0 +1,79 @@ +google.cloud.securitycenter.v1.DeleteMuteConfigRequest + */ +class DeleteMuteConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the mute config to delete. Its format is + * organizations/{organization}/muteConfigs/{config_id}, + * folders/{folder}/muteConfigs/{config_id}, or + * projects/{project}/muteConfigs/{config_id} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the mute config to delete. Its format is + * organizations/{organization}/muteConfigs/{config_id}, + * folders/{folder}/muteConfigs/{config_id}, or + * projects/{project}/muteConfigs/{config_id} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the mute config to delete. Its format is + * organizations/{organization}/muteConfigs/{config_id}, + * folders/{folder}/muteConfigs/{config_id}, or + * projects/{project}/muteConfigs/{config_id} + * + * 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 mute config to delete. Its format is + * organizations/{organization}/muteConfigs/{config_id}, + * folders/{folder}/muteConfigs/{config_id}, or + * projects/{project}/muteConfigs/{config_id} + * + * 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/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/DeleteNotificationConfigRequest.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/DeleteNotificationConfigRequest.php new file mode 100644 index 000000000000..b679ff1f54f5 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/DeleteNotificationConfigRequest.php @@ -0,0 +1,79 @@ +google.cloud.securitycenter.v1.DeleteNotificationConfigRequest + */ +class DeleteNotificationConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the notification config to delete. Its format is + * "organizations/[organization_id]/notificationConfigs/[config_id]", + * "folders/[folder_id]/notificationConfigs/[config_id]", + * or "projects/[project_id]/notificationConfigs/[config_id]". + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the notification config to delete. Its format is + * "organizations/[organization_id]/notificationConfigs/[config_id]", + * "folders/[folder_id]/notificationConfigs/[config_id]", + * or "projects/[project_id]/notificationConfigs/[config_id]". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the notification config to delete. Its format is + * "organizations/[organization_id]/notificationConfigs/[config_id]", + * "folders/[folder_id]/notificationConfigs/[config_id]", + * or "projects/[project_id]/notificationConfigs/[config_id]". + * + * 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 notification config to delete. Its format is + * "organizations/[organization_id]/notificationConfigs/[config_id]", + * "folders/[folder_id]/notificationConfigs/[config_id]", + * or "projects/[project_id]/notificationConfigs/[config_id]". + * + * 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/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/EnvironmentVariable.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/EnvironmentVariable.php new file mode 100644 index 000000000000..09288144cbc0 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/EnvironmentVariable.php @@ -0,0 +1,102 @@ +google.cloud.securitycenter.v1.EnvironmentVariable + */ +class EnvironmentVariable extends \Google\Protobuf\Internal\Message +{ + /** + * Environment variable name as a JSON encoded string. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Environment variable value as a JSON encoded string. + * + * Generated from protobuf field string val = 2; + */ + protected $val = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Environment variable name as a JSON encoded string. + * @type string $val + * Environment variable value as a JSON encoded string. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\Process::initOnce(); + parent::__construct($data); + } + + /** + * Environment variable name as a JSON encoded string. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Environment variable name as a JSON encoded string. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Environment variable value as a JSON encoded string. + * + * Generated from protobuf field string val = 2; + * @return string + */ + public function getVal() + { + return $this->val; + } + + /** + * Environment variable value as a JSON encoded string. + * + * Generated from protobuf field string val = 2; + * @param string $var + * @return $this + */ + public function setVal($var) + { + GPBUtil::checkString($var, True); + $this->val = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ExfilResource.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ExfilResource.php new file mode 100644 index 000000000000..f5d1d7cf4c2d --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ExfilResource.php @@ -0,0 +1,113 @@ +google.cloud.securitycenter.v1.ExfilResource + */ +class ExfilResource extends \Google\Protobuf\Internal\Message +{ + /** + * Resource's URI (https://google.aip.dev/122#full-resource-names) + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Subcomponents of the asset that is exfiltrated - these could be + * URIs used during exfiltration, table names, databases, filenames, etc. + * For example, multiple tables may be exfiltrated from the same CloudSQL + * instance, or multiple files from the same Cloud Storage bucket. + * + * Generated from protobuf field repeated string components = 2; + */ + private $components; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Resource's URI (https://google.aip.dev/122#full-resource-names) + * @type array|\Google\Protobuf\Internal\RepeatedField $components + * Subcomponents of the asset that is exfiltrated - these could be + * URIs used during exfiltration, table names, databases, filenames, etc. + * For example, multiple tables may be exfiltrated from the same CloudSQL + * instance, or multiple files from the same Cloud Storage bucket. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\Exfiltration::initOnce(); + parent::__construct($data); + } + + /** + * Resource's URI (https://google.aip.dev/122#full-resource-names) + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Resource's URI (https://google.aip.dev/122#full-resource-names) + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Subcomponents of the asset that is exfiltrated - these could be + * URIs used during exfiltration, table names, databases, filenames, etc. + * For example, multiple tables may be exfiltrated from the same CloudSQL + * instance, or multiple files from the same Cloud Storage bucket. + * + * Generated from protobuf field repeated string components = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getComponents() + { + return $this->components; + } + + /** + * Subcomponents of the asset that is exfiltrated - these could be + * URIs used during exfiltration, table names, databases, filenames, etc. + * For example, multiple tables may be exfiltrated from the same CloudSQL + * instance, or multiple files from the same Cloud Storage bucket. + * + * Generated from protobuf field repeated string components = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setComponents($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->components = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Exfiltration.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Exfiltration.php new file mode 100644 index 000000000000..5d0e98e891a2 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Exfiltration.php @@ -0,0 +1,116 @@ +google.cloud.securitycenter.v1.Exfiltration + */ +class Exfiltration extends \Google\Protobuf\Internal\Message +{ + /** + * If there are multiple sources, then the data is considered "joined" between + * them. For instance, BigQuery can join multiple tables, and each + * table would be considered a source. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.ExfilResource sources = 1; + */ + private $sources; + /** + * If there are multiple targets, each target would get a complete copy of the + * "joined" source data. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.ExfilResource targets = 2; + */ + private $targets; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\SecurityCenter\V1\ExfilResource>|\Google\Protobuf\Internal\RepeatedField $sources + * If there are multiple sources, then the data is considered "joined" between + * them. For instance, BigQuery can join multiple tables, and each + * table would be considered a source. + * @type array<\Google\Cloud\SecurityCenter\V1\ExfilResource>|\Google\Protobuf\Internal\RepeatedField $targets + * If there are multiple targets, each target would get a complete copy of the + * "joined" source data. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\Exfiltration::initOnce(); + parent::__construct($data); + } + + /** + * If there are multiple sources, then the data is considered "joined" between + * them. For instance, BigQuery can join multiple tables, and each + * table would be considered a source. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.ExfilResource sources = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSources() + { + return $this->sources; + } + + /** + * If there are multiple sources, then the data is considered "joined" between + * them. For instance, BigQuery can join multiple tables, and each + * table would be considered a source. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.ExfilResource sources = 1; + * @param array<\Google\Cloud\SecurityCenter\V1\ExfilResource>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSources($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\ExfilResource::class); + $this->sources = $arr; + + return $this; + } + + /** + * If there are multiple targets, each target would get a complete copy of the + * "joined" source data. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.ExfilResource targets = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTargets() + { + return $this->targets; + } + + /** + * If there are multiple targets, each target would get a complete copy of the + * "joined" source data. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.ExfilResource targets = 2; + * @param array<\Google\Cloud\SecurityCenter\V1\ExfilResource>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTargets($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\ExfilResource::class); + $this->targets = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ExternalSystem.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ExternalSystem.php new file mode 100644 index 000000000000..11100d7739ce --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ExternalSystem.php @@ -0,0 +1,233 @@ +google.cloud.securitycenter.v1.ExternalSystem + */ +class ExternalSystem extends \Google\Protobuf\Internal\Message +{ + /** + * Full resource name of the external system, for example: + * "organizations/1234/sources/5678/findings/123456/externalSystems/jira", + * "folders/1234/sources/5678/findings/123456/externalSystems/jira", + * "projects/1234/sources/5678/findings/123456/externalSystems/jira" + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * References primary/secondary etc assignees in the external system. + * + * Generated from protobuf field repeated string assignees = 2; + */ + private $assignees; + /** + * Identifier that's used to track the given finding in the external system. + * + * Generated from protobuf field string external_uid = 3; + */ + protected $external_uid = ''; + /** + * Most recent status of the corresponding finding's ticket/tracker in the + * external system. + * + * Generated from protobuf field string status = 4; + */ + protected $status = ''; + /** + * The most recent time when the corresponding finding's ticket/tracker was + * updated in the external system. + * + * Generated from protobuf field .google.protobuf.Timestamp external_system_update_time = 5; + */ + protected $external_system_update_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Full resource name of the external system, for example: + * "organizations/1234/sources/5678/findings/123456/externalSystems/jira", + * "folders/1234/sources/5678/findings/123456/externalSystems/jira", + * "projects/1234/sources/5678/findings/123456/externalSystems/jira" + * @type array|\Google\Protobuf\Internal\RepeatedField $assignees + * References primary/secondary etc assignees in the external system. + * @type string $external_uid + * Identifier that's used to track the given finding in the external system. + * @type string $status + * Most recent status of the corresponding finding's ticket/tracker in the + * external system. + * @type \Google\Protobuf\Timestamp $external_system_update_time + * The most recent time when the corresponding finding's ticket/tracker was + * updated in the external system. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\ExternalSystem::initOnce(); + parent::__construct($data); + } + + /** + * Full resource name of the external system, for example: + * "organizations/1234/sources/5678/findings/123456/externalSystems/jira", + * "folders/1234/sources/5678/findings/123456/externalSystems/jira", + * "projects/1234/sources/5678/findings/123456/externalSystems/jira" + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Full resource name of the external system, for example: + * "organizations/1234/sources/5678/findings/123456/externalSystems/jira", + * "folders/1234/sources/5678/findings/123456/externalSystems/jira", + * "projects/1234/sources/5678/findings/123456/externalSystems/jira" + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * References primary/secondary etc assignees in the external system. + * + * Generated from protobuf field repeated string assignees = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAssignees() + { + return $this->assignees; + } + + /** + * References primary/secondary etc assignees in the external system. + * + * Generated from protobuf field repeated string assignees = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAssignees($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->assignees = $arr; + + return $this; + } + + /** + * Identifier that's used to track the given finding in the external system. + * + * Generated from protobuf field string external_uid = 3; + * @return string + */ + public function getExternalUid() + { + return $this->external_uid; + } + + /** + * Identifier that's used to track the given finding in the external system. + * + * Generated from protobuf field string external_uid = 3; + * @param string $var + * @return $this + */ + public function setExternalUid($var) + { + GPBUtil::checkString($var, True); + $this->external_uid = $var; + + return $this; + } + + /** + * Most recent status of the corresponding finding's ticket/tracker in the + * external system. + * + * Generated from protobuf field string status = 4; + * @return string + */ + public function getStatus() + { + return $this->status; + } + + /** + * Most recent status of the corresponding finding's ticket/tracker in the + * external system. + * + * Generated from protobuf field string status = 4; + * @param string $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkString($var, True); + $this->status = $var; + + return $this; + } + + /** + * The most recent time when the corresponding finding's ticket/tracker was + * updated in the external system. + * + * Generated from protobuf field .google.protobuf.Timestamp external_system_update_time = 5; + * @return \Google\Protobuf\Timestamp|null + */ + public function getExternalSystemUpdateTime() + { + return $this->external_system_update_time; + } + + public function hasExternalSystemUpdateTime() + { + return isset($this->external_system_update_time); + } + + public function clearExternalSystemUpdateTime() + { + unset($this->external_system_update_time); + } + + /** + * The most recent time when the corresponding finding's ticket/tracker was + * updated in the external system. + * + * Generated from protobuf field .google.protobuf.Timestamp external_system_update_time = 5; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setExternalSystemUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->external_system_update_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/File.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/File.php new file mode 100644 index 000000000000..e1f6109f00a7 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/File.php @@ -0,0 +1,258 @@ +google.cloud.securitycenter.v1.File + */ +class File extends \Google\Protobuf\Internal\Message +{ + /** + * Absolute path of the file as a JSON encoded string. + * + * Generated from protobuf field string path = 1; + */ + protected $path = ''; + /** + * Size of the file in bytes. + * + * Generated from protobuf field int64 size = 2; + */ + protected $size = 0; + /** + * SHA256 hash of the first hashed_size bytes of the file encoded as a + * hex string. If hashed_size == size, sha256 represents the SHA256 hash + * of the entire file. + * + * Generated from protobuf field string sha256 = 3; + */ + protected $sha256 = ''; + /** + * The length in bytes of the file prefix that was hashed. If + * hashed_size == size, any hashes reported represent the entire + * file. + * + * Generated from protobuf field int64 hashed_size = 4; + */ + protected $hashed_size = 0; + /** + * True when the hash covers only a prefix of the file. + * + * Generated from protobuf field bool partially_hashed = 5; + */ + protected $partially_hashed = false; + /** + * Prefix of the file contents as a JSON encoded string. + * (Currently only populated for Malicious Script Executed findings.) + * + * Generated from protobuf field string contents = 6; + */ + protected $contents = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $path + * Absolute path of the file as a JSON encoded string. + * @type int|string $size + * Size of the file in bytes. + * @type string $sha256 + * SHA256 hash of the first hashed_size bytes of the file encoded as a + * hex string. If hashed_size == size, sha256 represents the SHA256 hash + * of the entire file. + * @type int|string $hashed_size + * The length in bytes of the file prefix that was hashed. If + * hashed_size == size, any hashes reported represent the entire + * file. + * @type bool $partially_hashed + * True when the hash covers only a prefix of the file. + * @type string $contents + * Prefix of the file contents as a JSON encoded string. + * (Currently only populated for Malicious Script Executed findings.) + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\File::initOnce(); + parent::__construct($data); + } + + /** + * Absolute path of the file as a JSON encoded string. + * + * Generated from protobuf field string path = 1; + * @return string + */ + public function getPath() + { + return $this->path; + } + + /** + * Absolute path of the file as a JSON encoded string. + * + * Generated from protobuf field string path = 1; + * @param string $var + * @return $this + */ + public function setPath($var) + { + GPBUtil::checkString($var, True); + $this->path = $var; + + return $this; + } + + /** + * Size of the file in bytes. + * + * Generated from protobuf field int64 size = 2; + * @return int|string + */ + public function getSize() + { + return $this->size; + } + + /** + * Size of the file in bytes. + * + * Generated from protobuf field int64 size = 2; + * @param int|string $var + * @return $this + */ + public function setSize($var) + { + GPBUtil::checkInt64($var); + $this->size = $var; + + return $this; + } + + /** + * SHA256 hash of the first hashed_size bytes of the file encoded as a + * hex string. If hashed_size == size, sha256 represents the SHA256 hash + * of the entire file. + * + * Generated from protobuf field string sha256 = 3; + * @return string + */ + public function getSha256() + { + return $this->sha256; + } + + /** + * SHA256 hash of the first hashed_size bytes of the file encoded as a + * hex string. If hashed_size == size, sha256 represents the SHA256 hash + * of the entire file. + * + * Generated from protobuf field string sha256 = 3; + * @param string $var + * @return $this + */ + public function setSha256($var) + { + GPBUtil::checkString($var, True); + $this->sha256 = $var; + + return $this; + } + + /** + * The length in bytes of the file prefix that was hashed. If + * hashed_size == size, any hashes reported represent the entire + * file. + * + * Generated from protobuf field int64 hashed_size = 4; + * @return int|string + */ + public function getHashedSize() + { + return $this->hashed_size; + } + + /** + * The length in bytes of the file prefix that was hashed. If + * hashed_size == size, any hashes reported represent the entire + * file. + * + * Generated from protobuf field int64 hashed_size = 4; + * @param int|string $var + * @return $this + */ + public function setHashedSize($var) + { + GPBUtil::checkInt64($var); + $this->hashed_size = $var; + + return $this; + } + + /** + * True when the hash covers only a prefix of the file. + * + * Generated from protobuf field bool partially_hashed = 5; + * @return bool + */ + public function getPartiallyHashed() + { + return $this->partially_hashed; + } + + /** + * True when the hash covers only a prefix of the file. + * + * Generated from protobuf field bool partially_hashed = 5; + * @param bool $var + * @return $this + */ + public function setPartiallyHashed($var) + { + GPBUtil::checkBool($var); + $this->partially_hashed = $var; + + return $this; + } + + /** + * Prefix of the file contents as a JSON encoded string. + * (Currently only populated for Malicious Script Executed findings.) + * + * Generated from protobuf field string contents = 6; + * @return string + */ + public function getContents() + { + return $this->contents; + } + + /** + * Prefix of the file contents as a JSON encoded string. + * (Currently only populated for Malicious Script Executed findings.) + * + * Generated from protobuf field string contents = 6; + * @param string $var + * @return $this + */ + public function setContents($var) + { + GPBUtil::checkString($var, True); + $this->contents = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Finding.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Finding.php new file mode 100644 index 000000000000..25fedd9136c0 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Finding.php @@ -0,0 +1,1608 @@ +google.cloud.securitycenter.v1.Finding + */ +class Finding extends \Google\Protobuf\Internal\Message +{ + /** + * The relative resource name of this finding. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Example: + * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}" + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The relative resource name of the source the finding belongs to. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * This field is immutable after creation time. + * For example: + * "organizations/{organization_id}/sources/{source_id}" + * + * Generated from protobuf field string parent = 2; + */ + protected $parent = ''; + /** + * For findings on Google Cloud resources, the full resource + * name of the Google Cloud resource this finding is for. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + * When the finding is for a non-Google Cloud resource, the resourceName can + * be a customer or partner defined string. This field is immutable after + * creation time. + * + * Generated from protobuf field string resource_name = 3; + */ + protected $resource_name = ''; + /** + * The state of the finding. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Finding.State state = 4; + */ + protected $state = 0; + /** + * The additional taxonomy group within findings from a given source. + * This field is immutable after creation time. + * Example: "XSS_FLASH_INJECTION" + * + * Generated from protobuf field string category = 5; + */ + protected $category = ''; + /** + * The URI that, if available, points to a web page outside of Security + * Command Center where additional information about the finding can be found. + * This field is guaranteed to be either empty or a well formed URL. + * + * Generated from protobuf field string external_uri = 6; + */ + protected $external_uri = ''; + /** + * Source specific properties. These properties are managed by the source + * that writes the finding. The key names in the source_properties map must be + * between 1 and 255 characters, and must start with a letter and contain + * alphanumeric characters or underscores only. + * + * Generated from protobuf field map source_properties = 7; + */ + private $source_properties; + /** + * Output only. User specified security marks. These marks are entirely + * managed by the user and come from the SecurityMarks resource that belongs + * to the finding. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.SecurityMarks security_marks = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $security_marks = null; + /** + * The time the finding was first detected. If an existing finding is updated, + * then this is the time the update occurred. + * For example, if the finding represents an open firewall, this property + * captures the time the detector believes the firewall became open. The + * accuracy is determined by the detector. If the finding is later resolved, + * then this time reflects when the finding was resolved. This must not + * be set to a value greater than the current timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp event_time = 9; + */ + protected $event_time = null; + /** + * The time at which the finding was created in Security Command Center. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 10; + */ + protected $create_time = null; + /** + * The severity of the finding. This field is managed by the source that + * writes the finding. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Finding.Severity severity = 12; + */ + protected $severity = 0; + /** + * The canonical name of the finding. It's either + * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", + * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}" or + * "projects/{project_number}/sources/{source_id}/findings/{finding_id}", + * depending on the closest CRM ancestor of the resource associated with the + * finding. + * + * Generated from protobuf field string canonical_name = 14; + */ + protected $canonical_name = ''; + /** + * Indicates the mute state of a finding (either muted, unmuted + * or undefined). Unlike other attributes of a finding, a finding provider + * shouldn't set the value of mute. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Finding.Mute mute = 15; + */ + protected $mute = 0; + /** + * The class of the finding. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Finding.FindingClass finding_class = 17; + */ + protected $finding_class = 0; + /** + * Represents what's commonly known as an Indicator of compromise (IoC) in + * computer forensics. This is an artifact observed on a network or in an + * operating system that, with high confidence, indicates a computer + * intrusion. + * Reference: https://en.wikipedia.org/wiki/Indicator_of_compromise + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Indicator indicator = 18; + */ + protected $indicator = null; + /** + * Represents vulnerability-specific fields like CVE and CVS scores. + * CVE stands for Common Vulnerabilities and Exposures + * (https://cve.mitre.org/about/) + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Vulnerability vulnerability = 20; + */ + protected $vulnerability = null; + /** + * Output only. The most recent time this finding was muted or unmuted. + * + * Generated from protobuf field .google.protobuf.Timestamp mute_update_time = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $mute_update_time = null; + /** + * Output only. Third party SIEM/SOAR fields within SCC, contains external system + * information and external system finding fields. + * + * Generated from protobuf field map external_systems = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $external_systems; + /** + * MITRE ATT&CK tactics and techniques related to this finding. + * See: https://attack.mitre.org + * + * Generated from protobuf field .google.cloud.securitycenter.v1.MitreAttack mitre_attack = 25; + */ + protected $mitre_attack = null; + /** + * Access details associated to the Finding, such as more information on the + * caller, which method was accessed, from where, etc. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Access access = 26; + */ + protected $access = null; + /** + * Contains information about the IP connection associated with the finding. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Connection connections = 31; + */ + private $connections; + /** + * First known as mute_annotation. Records additional information about the + * mute operation e.g. mute config that muted the finding, user who muted the + * finding, etc. Unlike other attributes of a finding, a finding provider + * shouldn't set the value of mute. + * + * Generated from protobuf field string mute_initiator = 28; + */ + protected $mute_initiator = ''; + /** + * Represents operating system processes associated with the Finding. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Process processes = 30; + */ + private $processes; + /** + * Output only. Map containing the points of contact for the given finding. The key + * represents the type of contact, while the value contains a list of all the + * contacts that pertain. Please refer to: + * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories + * { + * "security": { + * "contacts": [ + * { + * "email": "person1@company.com" + * }, + * { + * "email": "person2@company.com" + * } + * ] + * } + * } + * + * Generated from protobuf field map contacts = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $contacts; + /** + * Contains compliance information for security standards associated to the + * finding. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Compliance compliances = 34; + */ + private $compliances; + /** + * Output only. The human readable display name of the finding source such as + * "Event Threat Detection" or "Security Health Analytics". + * + * Generated from protobuf field string parent_display_name = 36 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $parent_display_name = ''; + /** + * Contains more detail about the finding. + * + * Generated from protobuf field string description = 37; + */ + protected $description = ''; + /** + * Represents exfiltration associated with the Finding. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Exfiltration exfiltration = 38; + */ + protected $exfiltration = null; + /** + * Represents IAM bindings associated with the Finding. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.IamBinding iam_bindings = 39; + */ + private $iam_bindings; + /** + * Next steps associate to the finding. + * + * Generated from protobuf field string next_steps = 40; + */ + protected $next_steps = ''; + /** + * Containers associated with the finding. containers provides information + * for both Kubernetes and non-Kubernetes containers. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Container containers = 42; + */ + private $containers; + /** + * Kubernetes resources associated with the finding. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Kubernetes kubernetes = 43; + */ + protected $kubernetes = null; + /** + * Database associated with the finding. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Database database = 44; + */ + protected $database = null; + /** + * File associated with the finding. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.File files = 46; + */ + private $files; + /** + * Kernel Rootkit signature. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.KernelRootkit kernel_rootkit = 50; + */ + protected $kernel_rootkit = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The relative resource name of this finding. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Example: + * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}" + * @type string $parent + * The relative resource name of the source the finding belongs to. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * This field is immutable after creation time. + * For example: + * "organizations/{organization_id}/sources/{source_id}" + * @type string $resource_name + * For findings on Google Cloud resources, the full resource + * name of the Google Cloud resource this finding is for. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + * When the finding is for a non-Google Cloud resource, the resourceName can + * be a customer or partner defined string. This field is immutable after + * creation time. + * @type int $state + * The state of the finding. + * @type string $category + * The additional taxonomy group within findings from a given source. + * This field is immutable after creation time. + * Example: "XSS_FLASH_INJECTION" + * @type string $external_uri + * The URI that, if available, points to a web page outside of Security + * Command Center where additional information about the finding can be found. + * This field is guaranteed to be either empty or a well formed URL. + * @type array|\Google\Protobuf\Internal\MapField $source_properties + * Source specific properties. These properties are managed by the source + * that writes the finding. The key names in the source_properties map must be + * between 1 and 255 characters, and must start with a letter and contain + * alphanumeric characters or underscores only. + * @type \Google\Cloud\SecurityCenter\V1\SecurityMarks $security_marks + * Output only. User specified security marks. These marks are entirely + * managed by the user and come from the SecurityMarks resource that belongs + * to the finding. + * @type \Google\Protobuf\Timestamp $event_time + * The time the finding was first detected. If an existing finding is updated, + * then this is the time the update occurred. + * For example, if the finding represents an open firewall, this property + * captures the time the detector believes the firewall became open. The + * accuracy is determined by the detector. If the finding is later resolved, + * then this time reflects when the finding was resolved. This must not + * be set to a value greater than the current timestamp. + * @type \Google\Protobuf\Timestamp $create_time + * The time at which the finding was created in Security Command Center. + * @type int $severity + * The severity of the finding. This field is managed by the source that + * writes the finding. + * @type string $canonical_name + * The canonical name of the finding. It's either + * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", + * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}" or + * "projects/{project_number}/sources/{source_id}/findings/{finding_id}", + * depending on the closest CRM ancestor of the resource associated with the + * finding. + * @type int $mute + * Indicates the mute state of a finding (either muted, unmuted + * or undefined). Unlike other attributes of a finding, a finding provider + * shouldn't set the value of mute. + * @type int $finding_class + * The class of the finding. + * @type \Google\Cloud\SecurityCenter\V1\Indicator $indicator + * Represents what's commonly known as an Indicator of compromise (IoC) in + * computer forensics. This is an artifact observed on a network or in an + * operating system that, with high confidence, indicates a computer + * intrusion. + * Reference: https://en.wikipedia.org/wiki/Indicator_of_compromise + * @type \Google\Cloud\SecurityCenter\V1\Vulnerability $vulnerability + * Represents vulnerability-specific fields like CVE and CVS scores. + * CVE stands for Common Vulnerabilities and Exposures + * (https://cve.mitre.org/about/) + * @type \Google\Protobuf\Timestamp $mute_update_time + * Output only. The most recent time this finding was muted or unmuted. + * @type array|\Google\Protobuf\Internal\MapField $external_systems + * Output only. Third party SIEM/SOAR fields within SCC, contains external system + * information and external system finding fields. + * @type \Google\Cloud\SecurityCenter\V1\MitreAttack $mitre_attack + * MITRE ATT&CK tactics and techniques related to this finding. + * See: https://attack.mitre.org + * @type \Google\Cloud\SecurityCenter\V1\Access $access + * Access details associated to the Finding, such as more information on the + * caller, which method was accessed, from where, etc. + * @type array<\Google\Cloud\SecurityCenter\V1\Connection>|\Google\Protobuf\Internal\RepeatedField $connections + * Contains information about the IP connection associated with the finding. + * @type string $mute_initiator + * First known as mute_annotation. Records additional information about the + * mute operation e.g. mute config that muted the finding, user who muted the + * finding, etc. Unlike other attributes of a finding, a finding provider + * shouldn't set the value of mute. + * @type array<\Google\Cloud\SecurityCenter\V1\Process>|\Google\Protobuf\Internal\RepeatedField $processes + * Represents operating system processes associated with the Finding. + * @type array|\Google\Protobuf\Internal\MapField $contacts + * Output only. Map containing the points of contact for the given finding. The key + * represents the type of contact, while the value contains a list of all the + * contacts that pertain. Please refer to: + * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories + * { + * "security": { + * "contacts": [ + * { + * "email": "person1@company.com" + * }, + * { + * "email": "person2@company.com" + * } + * ] + * } + * } + * @type array<\Google\Cloud\SecurityCenter\V1\Compliance>|\Google\Protobuf\Internal\RepeatedField $compliances + * Contains compliance information for security standards associated to the + * finding. + * @type string $parent_display_name + * Output only. The human readable display name of the finding source such as + * "Event Threat Detection" or "Security Health Analytics". + * @type string $description + * Contains more detail about the finding. + * @type \Google\Cloud\SecurityCenter\V1\Exfiltration $exfiltration + * Represents exfiltration associated with the Finding. + * @type array<\Google\Cloud\SecurityCenter\V1\IamBinding>|\Google\Protobuf\Internal\RepeatedField $iam_bindings + * Represents IAM bindings associated with the Finding. + * @type string $next_steps + * Next steps associate to the finding. + * @type array<\Google\Cloud\SecurityCenter\V1\Container>|\Google\Protobuf\Internal\RepeatedField $containers + * Containers associated with the finding. containers provides information + * for both Kubernetes and non-Kubernetes containers. + * @type \Google\Cloud\SecurityCenter\V1\Kubernetes $kubernetes + * Kubernetes resources associated with the finding. + * @type \Google\Cloud\SecurityCenter\V1\Database $database + * Database associated with the finding. + * @type array<\Google\Cloud\SecurityCenter\V1\File>|\Google\Protobuf\Internal\RepeatedField $files + * File associated with the finding. + * @type \Google\Cloud\SecurityCenter\V1\KernelRootkit $kernel_rootkit + * Kernel Rootkit signature. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\Finding::initOnce(); + parent::__construct($data); + } + + /** + * The relative resource name of this finding. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Example: + * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}" + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The relative resource name of this finding. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Example: + * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}" + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The relative resource name of the source the finding belongs to. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * This field is immutable after creation time. + * For example: + * "organizations/{organization_id}/sources/{source_id}" + * + * Generated from protobuf field string parent = 2; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * The relative resource name of the source the finding belongs to. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * This field is immutable after creation time. + * For example: + * "organizations/{organization_id}/sources/{source_id}" + * + * Generated from protobuf field string parent = 2; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * For findings on Google Cloud resources, the full resource + * name of the Google Cloud resource this finding is for. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + * When the finding is for a non-Google Cloud resource, the resourceName can + * be a customer or partner defined string. This field is immutable after + * creation time. + * + * Generated from protobuf field string resource_name = 3; + * @return string + */ + public function getResourceName() + { + return $this->resource_name; + } + + /** + * For findings on Google Cloud resources, the full resource + * name of the Google Cloud resource this finding is for. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + * When the finding is for a non-Google Cloud resource, the resourceName can + * be a customer or partner defined string. This field is immutable after + * creation time. + * + * Generated from protobuf field string resource_name = 3; + * @param string $var + * @return $this + */ + public function setResourceName($var) + { + GPBUtil::checkString($var, True); + $this->resource_name = $var; + + return $this; + } + + /** + * The state of the finding. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Finding.State state = 4; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * The state of the finding. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Finding.State state = 4; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1\Finding\State::class); + $this->state = $var; + + return $this; + } + + /** + * The additional taxonomy group within findings from a given source. + * This field is immutable after creation time. + * Example: "XSS_FLASH_INJECTION" + * + * Generated from protobuf field string category = 5; + * @return string + */ + public function getCategory() + { + return $this->category; + } + + /** + * The additional taxonomy group within findings from a given source. + * This field is immutable after creation time. + * Example: "XSS_FLASH_INJECTION" + * + * Generated from protobuf field string category = 5; + * @param string $var + * @return $this + */ + public function setCategory($var) + { + GPBUtil::checkString($var, True); + $this->category = $var; + + return $this; + } + + /** + * The URI that, if available, points to a web page outside of Security + * Command Center where additional information about the finding can be found. + * This field is guaranteed to be either empty or a well formed URL. + * + * Generated from protobuf field string external_uri = 6; + * @return string + */ + public function getExternalUri() + { + return $this->external_uri; + } + + /** + * The URI that, if available, points to a web page outside of Security + * Command Center where additional information about the finding can be found. + * This field is guaranteed to be either empty or a well formed URL. + * + * Generated from protobuf field string external_uri = 6; + * @param string $var + * @return $this + */ + public function setExternalUri($var) + { + GPBUtil::checkString($var, True); + $this->external_uri = $var; + + return $this; + } + + /** + * Source specific properties. These properties are managed by the source + * that writes the finding. The key names in the source_properties map must be + * between 1 and 255 characters, and must start with a letter and contain + * alphanumeric characters or underscores only. + * + * Generated from protobuf field map source_properties = 7; + * @return \Google\Protobuf\Internal\MapField + */ + public function getSourceProperties() + { + return $this->source_properties; + } + + /** + * Source specific properties. These properties are managed by the source + * that writes the finding. The key names in the source_properties map must be + * between 1 and 255 characters, and must start with a letter and contain + * alphanumeric characters or underscores only. + * + * Generated from protobuf field map source_properties = 7; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setSourceProperties($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Value::class); + $this->source_properties = $arr; + + return $this; + } + + /** + * Output only. User specified security marks. These marks are entirely + * managed by the user and come from the SecurityMarks resource that belongs + * to the finding. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.SecurityMarks security_marks = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\SecurityCenter\V1\SecurityMarks|null + */ + public function getSecurityMarks() + { + return $this->security_marks; + } + + public function hasSecurityMarks() + { + return isset($this->security_marks); + } + + public function clearSecurityMarks() + { + unset($this->security_marks); + } + + /** + * Output only. User specified security marks. These marks are entirely + * managed by the user and come from the SecurityMarks resource that belongs + * to the finding. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.SecurityMarks security_marks = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\SecurityCenter\V1\SecurityMarks $var + * @return $this + */ + public function setSecurityMarks($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\SecurityMarks::class); + $this->security_marks = $var; + + return $this; + } + + /** + * The time the finding was first detected. If an existing finding is updated, + * then this is the time the update occurred. + * For example, if the finding represents an open firewall, this property + * captures the time the detector believes the firewall became open. The + * accuracy is determined by the detector. If the finding is later resolved, + * then this time reflects when the finding was resolved. This must not + * be set to a value greater than the current timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp event_time = 9; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEventTime() + { + return $this->event_time; + } + + public function hasEventTime() + { + return isset($this->event_time); + } + + public function clearEventTime() + { + unset($this->event_time); + } + + /** + * The time the finding was first detected. If an existing finding is updated, + * then this is the time the update occurred. + * For example, if the finding represents an open firewall, this property + * captures the time the detector believes the firewall became open. The + * accuracy is determined by the detector. If the finding is later resolved, + * then this time reflects when the finding was resolved. This must not + * be set to a value greater than the current timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp event_time = 9; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEventTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->event_time = $var; + + return $this; + } + + /** + * The time at which the finding was created in Security Command Center. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 10; + * @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); + } + + /** + * The time at which the finding was created in Security Command Center. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 10; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * The severity of the finding. This field is managed by the source that + * writes the finding. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Finding.Severity severity = 12; + * @return int + */ + public function getSeverity() + { + return $this->severity; + } + + /** + * The severity of the finding. This field is managed by the source that + * writes the finding. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Finding.Severity severity = 12; + * @param int $var + * @return $this + */ + public function setSeverity($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1\Finding\Severity::class); + $this->severity = $var; + + return $this; + } + + /** + * The canonical name of the finding. It's either + * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", + * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}" or + * "projects/{project_number}/sources/{source_id}/findings/{finding_id}", + * depending on the closest CRM ancestor of the resource associated with the + * finding. + * + * Generated from protobuf field string canonical_name = 14; + * @return string + */ + public function getCanonicalName() + { + return $this->canonical_name; + } + + /** + * The canonical name of the finding. It's either + * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", + * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}" or + * "projects/{project_number}/sources/{source_id}/findings/{finding_id}", + * depending on the closest CRM ancestor of the resource associated with the + * finding. + * + * Generated from protobuf field string canonical_name = 14; + * @param string $var + * @return $this + */ + public function setCanonicalName($var) + { + GPBUtil::checkString($var, True); + $this->canonical_name = $var; + + return $this; + } + + /** + * Indicates the mute state of a finding (either muted, unmuted + * or undefined). Unlike other attributes of a finding, a finding provider + * shouldn't set the value of mute. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Finding.Mute mute = 15; + * @return int + */ + public function getMute() + { + return $this->mute; + } + + /** + * Indicates the mute state of a finding (either muted, unmuted + * or undefined). Unlike other attributes of a finding, a finding provider + * shouldn't set the value of mute. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Finding.Mute mute = 15; + * @param int $var + * @return $this + */ + public function setMute($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1\Finding\Mute::class); + $this->mute = $var; + + return $this; + } + + /** + * The class of the finding. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Finding.FindingClass finding_class = 17; + * @return int + */ + public function getFindingClass() + { + return $this->finding_class; + } + + /** + * The class of the finding. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Finding.FindingClass finding_class = 17; + * @param int $var + * @return $this + */ + public function setFindingClass($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1\Finding\FindingClass::class); + $this->finding_class = $var; + + return $this; + } + + /** + * Represents what's commonly known as an Indicator of compromise (IoC) in + * computer forensics. This is an artifact observed on a network or in an + * operating system that, with high confidence, indicates a computer + * intrusion. + * Reference: https://en.wikipedia.org/wiki/Indicator_of_compromise + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Indicator indicator = 18; + * @return \Google\Cloud\SecurityCenter\V1\Indicator|null + */ + public function getIndicator() + { + return $this->indicator; + } + + public function hasIndicator() + { + return isset($this->indicator); + } + + public function clearIndicator() + { + unset($this->indicator); + } + + /** + * Represents what's commonly known as an Indicator of compromise (IoC) in + * computer forensics. This is an artifact observed on a network or in an + * operating system that, with high confidence, indicates a computer + * intrusion. + * Reference: https://en.wikipedia.org/wiki/Indicator_of_compromise + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Indicator indicator = 18; + * @param \Google\Cloud\SecurityCenter\V1\Indicator $var + * @return $this + */ + public function setIndicator($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\Indicator::class); + $this->indicator = $var; + + return $this; + } + + /** + * Represents vulnerability-specific fields like CVE and CVS scores. + * CVE stands for Common Vulnerabilities and Exposures + * (https://cve.mitre.org/about/) + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Vulnerability vulnerability = 20; + * @return \Google\Cloud\SecurityCenter\V1\Vulnerability|null + */ + public function getVulnerability() + { + return $this->vulnerability; + } + + public function hasVulnerability() + { + return isset($this->vulnerability); + } + + public function clearVulnerability() + { + unset($this->vulnerability); + } + + /** + * Represents vulnerability-specific fields like CVE and CVS scores. + * CVE stands for Common Vulnerabilities and Exposures + * (https://cve.mitre.org/about/) + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Vulnerability vulnerability = 20; + * @param \Google\Cloud\SecurityCenter\V1\Vulnerability $var + * @return $this + */ + public function setVulnerability($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\Vulnerability::class); + $this->vulnerability = $var; + + return $this; + } + + /** + * Output only. The most recent time this finding was muted or unmuted. + * + * Generated from protobuf field .google.protobuf.Timestamp mute_update_time = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getMuteUpdateTime() + { + return $this->mute_update_time; + } + + public function hasMuteUpdateTime() + { + return isset($this->mute_update_time); + } + + public function clearMuteUpdateTime() + { + unset($this->mute_update_time); + } + + /** + * Output only. The most recent time this finding was muted or unmuted. + * + * Generated from protobuf field .google.protobuf.Timestamp mute_update_time = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setMuteUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->mute_update_time = $var; + + return $this; + } + + /** + * Output only. Third party SIEM/SOAR fields within SCC, contains external system + * information and external system finding fields. + * + * Generated from protobuf field map external_systems = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getExternalSystems() + { + return $this->external_systems; + } + + /** + * Output only. Third party SIEM/SOAR fields within SCC, contains external system + * information and external system finding fields. + * + * Generated from protobuf field map external_systems = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setExternalSystems($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\ExternalSystem::class); + $this->external_systems = $arr; + + return $this; + } + + /** + * MITRE ATT&CK tactics and techniques related to this finding. + * See: https://attack.mitre.org + * + * Generated from protobuf field .google.cloud.securitycenter.v1.MitreAttack mitre_attack = 25; + * @return \Google\Cloud\SecurityCenter\V1\MitreAttack|null + */ + public function getMitreAttack() + { + return $this->mitre_attack; + } + + public function hasMitreAttack() + { + return isset($this->mitre_attack); + } + + public function clearMitreAttack() + { + unset($this->mitre_attack); + } + + /** + * MITRE ATT&CK tactics and techniques related to this finding. + * See: https://attack.mitre.org + * + * Generated from protobuf field .google.cloud.securitycenter.v1.MitreAttack mitre_attack = 25; + * @param \Google\Cloud\SecurityCenter\V1\MitreAttack $var + * @return $this + */ + public function setMitreAttack($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\MitreAttack::class); + $this->mitre_attack = $var; + + return $this; + } + + /** + * Access details associated to the Finding, such as more information on the + * caller, which method was accessed, from where, etc. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Access access = 26; + * @return \Google\Cloud\SecurityCenter\V1\Access|null + */ + public function getAccess() + { + return $this->access; + } + + public function hasAccess() + { + return isset($this->access); + } + + public function clearAccess() + { + unset($this->access); + } + + /** + * Access details associated to the Finding, such as more information on the + * caller, which method was accessed, from where, etc. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Access access = 26; + * @param \Google\Cloud\SecurityCenter\V1\Access $var + * @return $this + */ + public function setAccess($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\Access::class); + $this->access = $var; + + return $this; + } + + /** + * Contains information about the IP connection associated with the finding. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Connection connections = 31; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getConnections() + { + return $this->connections; + } + + /** + * Contains information about the IP connection associated with the finding. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Connection connections = 31; + * @param array<\Google\Cloud\SecurityCenter\V1\Connection>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setConnections($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\Connection::class); + $this->connections = $arr; + + return $this; + } + + /** + * First known as mute_annotation. Records additional information about the + * mute operation e.g. mute config that muted the finding, user who muted the + * finding, etc. Unlike other attributes of a finding, a finding provider + * shouldn't set the value of mute. + * + * Generated from protobuf field string mute_initiator = 28; + * @return string + */ + public function getMuteInitiator() + { + return $this->mute_initiator; + } + + /** + * First known as mute_annotation. Records additional information about the + * mute operation e.g. mute config that muted the finding, user who muted the + * finding, etc. Unlike other attributes of a finding, a finding provider + * shouldn't set the value of mute. + * + * Generated from protobuf field string mute_initiator = 28; + * @param string $var + * @return $this + */ + public function setMuteInitiator($var) + { + GPBUtil::checkString($var, True); + $this->mute_initiator = $var; + + return $this; + } + + /** + * Represents operating system processes associated with the Finding. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Process processes = 30; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getProcesses() + { + return $this->processes; + } + + /** + * Represents operating system processes associated with the Finding. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Process processes = 30; + * @param array<\Google\Cloud\SecurityCenter\V1\Process>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setProcesses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\Process::class); + $this->processes = $arr; + + return $this; + } + + /** + * Output only. Map containing the points of contact for the given finding. The key + * represents the type of contact, while the value contains a list of all the + * contacts that pertain. Please refer to: + * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories + * { + * "security": { + * "contacts": [ + * { + * "email": "person1@company.com" + * }, + * { + * "email": "person2@company.com" + * } + * ] + * } + * } + * + * Generated from protobuf field map contacts = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getContacts() + { + return $this->contacts; + } + + /** + * Output only. Map containing the points of contact for the given finding. The key + * represents the type of contact, while the value contains a list of all the + * contacts that pertain. Please refer to: + * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories + * { + * "security": { + * "contacts": [ + * { + * "email": "person1@company.com" + * }, + * { + * "email": "person2@company.com" + * } + * ] + * } + * } + * + * Generated from protobuf field map contacts = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setContacts($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\ContactDetails::class); + $this->contacts = $arr; + + return $this; + } + + /** + * Contains compliance information for security standards associated to the + * finding. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Compliance compliances = 34; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCompliances() + { + return $this->compliances; + } + + /** + * Contains compliance information for security standards associated to the + * finding. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Compliance compliances = 34; + * @param array<\Google\Cloud\SecurityCenter\V1\Compliance>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCompliances($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\Compliance::class); + $this->compliances = $arr; + + return $this; + } + + /** + * Output only. The human readable display name of the finding source such as + * "Event Threat Detection" or "Security Health Analytics". + * + * Generated from protobuf field string parent_display_name = 36 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getParentDisplayName() + { + return $this->parent_display_name; + } + + /** + * Output only. The human readable display name of the finding source such as + * "Event Threat Detection" or "Security Health Analytics". + * + * Generated from protobuf field string parent_display_name = 36 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setParentDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->parent_display_name = $var; + + return $this; + } + + /** + * Contains more detail about the finding. + * + * Generated from protobuf field string description = 37; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Contains more detail about the finding. + * + * Generated from protobuf field string description = 37; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Represents exfiltration associated with the Finding. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Exfiltration exfiltration = 38; + * @return \Google\Cloud\SecurityCenter\V1\Exfiltration|null + */ + public function getExfiltration() + { + return $this->exfiltration; + } + + public function hasExfiltration() + { + return isset($this->exfiltration); + } + + public function clearExfiltration() + { + unset($this->exfiltration); + } + + /** + * Represents exfiltration associated with the Finding. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Exfiltration exfiltration = 38; + * @param \Google\Cloud\SecurityCenter\V1\Exfiltration $var + * @return $this + */ + public function setExfiltration($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\Exfiltration::class); + $this->exfiltration = $var; + + return $this; + } + + /** + * Represents IAM bindings associated with the Finding. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.IamBinding iam_bindings = 39; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIamBindings() + { + return $this->iam_bindings; + } + + /** + * Represents IAM bindings associated with the Finding. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.IamBinding iam_bindings = 39; + * @param array<\Google\Cloud\SecurityCenter\V1\IamBinding>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIamBindings($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\IamBinding::class); + $this->iam_bindings = $arr; + + return $this; + } + + /** + * Next steps associate to the finding. + * + * Generated from protobuf field string next_steps = 40; + * @return string + */ + public function getNextSteps() + { + return $this->next_steps; + } + + /** + * Next steps associate to the finding. + * + * Generated from protobuf field string next_steps = 40; + * @param string $var + * @return $this + */ + public function setNextSteps($var) + { + GPBUtil::checkString($var, True); + $this->next_steps = $var; + + return $this; + } + + /** + * Containers associated with the finding. containers provides information + * for both Kubernetes and non-Kubernetes containers. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Container containers = 42; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getContainers() + { + return $this->containers; + } + + /** + * Containers associated with the finding. containers provides information + * for both Kubernetes and non-Kubernetes containers. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Container containers = 42; + * @param array<\Google\Cloud\SecurityCenter\V1\Container>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setContainers($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\Container::class); + $this->containers = $arr; + + return $this; + } + + /** + * Kubernetes resources associated with the finding. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Kubernetes kubernetes = 43; + * @return \Google\Cloud\SecurityCenter\V1\Kubernetes|null + */ + public function getKubernetes() + { + return $this->kubernetes; + } + + public function hasKubernetes() + { + return isset($this->kubernetes); + } + + public function clearKubernetes() + { + unset($this->kubernetes); + } + + /** + * Kubernetes resources associated with the finding. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Kubernetes kubernetes = 43; + * @param \Google\Cloud\SecurityCenter\V1\Kubernetes $var + * @return $this + */ + public function setKubernetes($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\Kubernetes::class); + $this->kubernetes = $var; + + return $this; + } + + /** + * Database associated with the finding. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Database database = 44; + * @return \Google\Cloud\SecurityCenter\V1\Database|null + */ + public function getDatabase() + { + return $this->database; + } + + public function hasDatabase() + { + return isset($this->database); + } + + public function clearDatabase() + { + unset($this->database); + } + + /** + * Database associated with the finding. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Database database = 44; + * @param \Google\Cloud\SecurityCenter\V1\Database $var + * @return $this + */ + public function setDatabase($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\Database::class); + $this->database = $var; + + return $this; + } + + /** + * File associated with the finding. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.File files = 46; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFiles() + { + return $this->files; + } + + /** + * File associated with the finding. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.File files = 46; + * @param array<\Google\Cloud\SecurityCenter\V1\File>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFiles($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\File::class); + $this->files = $arr; + + return $this; + } + + /** + * Kernel Rootkit signature. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.KernelRootkit kernel_rootkit = 50; + * @return \Google\Cloud\SecurityCenter\V1\KernelRootkit|null + */ + public function getKernelRootkit() + { + return $this->kernel_rootkit; + } + + public function hasKernelRootkit() + { + return isset($this->kernel_rootkit); + } + + public function clearKernelRootkit() + { + unset($this->kernel_rootkit); + } + + /** + * Kernel Rootkit signature. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.KernelRootkit kernel_rootkit = 50; + * @param \Google\Cloud\SecurityCenter\V1\KernelRootkit $var + * @return $this + */ + public function setKernelRootkit($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\KernelRootkit::class); + $this->kernel_rootkit = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Finding/FindingClass.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Finding/FindingClass.php new file mode 100644 index 000000000000..c931f5f2d966 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Finding/FindingClass.php @@ -0,0 +1,87 @@ +google.cloud.securitycenter.v1.Finding.FindingClass + */ +class FindingClass +{ + /** + * Unspecified finding class. + * + * Generated from protobuf enum FINDING_CLASS_UNSPECIFIED = 0; + */ + const FINDING_CLASS_UNSPECIFIED = 0; + /** + * Describes unwanted or malicious activity. + * + * Generated from protobuf enum THREAT = 1; + */ + const THREAT = 1; + /** + * Describes a potential weakness in software that increases risk to + * Confidentiality & Integrity & Availability. + * + * Generated from protobuf enum VULNERABILITY = 2; + */ + const VULNERABILITY = 2; + /** + * Describes a potential weakness in cloud resource/asset configuration that + * increases risk. + * + * Generated from protobuf enum MISCONFIGURATION = 3; + */ + const MISCONFIGURATION = 3; + /** + * Describes a security observation that is for informational purposes. + * + * Generated from protobuf enum OBSERVATION = 4; + */ + const OBSERVATION = 4; + /** + * Describes an error that prevents some SCC functionality. + * + * Generated from protobuf enum SCC_ERROR = 5; + */ + const SCC_ERROR = 5; + + private static $valueToName = [ + self::FINDING_CLASS_UNSPECIFIED => 'FINDING_CLASS_UNSPECIFIED', + self::THREAT => 'THREAT', + self::VULNERABILITY => 'VULNERABILITY', + self::MISCONFIGURATION => 'MISCONFIGURATION', + self::OBSERVATION => 'OBSERVATION', + self::SCC_ERROR => 'SCC_ERROR', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(FindingClass::class, \Google\Cloud\SecurityCenter\V1\Finding_FindingClass::class); + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Finding/Mute.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Finding/Mute.php new file mode 100644 index 000000000000..8e7576dc4a0e --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Finding/Mute.php @@ -0,0 +1,71 @@ +google.cloud.securitycenter.v1.Finding.Mute + */ +class Mute +{ + /** + * Unspecified. + * + * Generated from protobuf enum MUTE_UNSPECIFIED = 0; + */ + const MUTE_UNSPECIFIED = 0; + /** + * Finding has been muted. + * + * Generated from protobuf enum MUTED = 1; + */ + const MUTED = 1; + /** + * Finding has been unmuted. + * + * Generated from protobuf enum UNMUTED = 2; + */ + const UNMUTED = 2; + /** + * Finding has never been muted/unmuted. + * + * Generated from protobuf enum UNDEFINED = 4; + */ + const UNDEFINED = 4; + + private static $valueToName = [ + self::MUTE_UNSPECIFIED => 'MUTE_UNSPECIFIED', + self::MUTED => 'MUTED', + self::UNMUTED => 'UNMUTED', + self::UNDEFINED => 'UNDEFINED', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Mute::class, \Google\Cloud\SecurityCenter\V1\Finding_Mute::class); + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Finding/Severity.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Finding/Severity.php new file mode 100644 index 000000000000..846f6d355b7c --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Finding/Severity.php @@ -0,0 +1,115 @@ +google.cloud.securitycenter.v1.Finding.Severity + */ +class Severity +{ + /** + * This value is used for findings when a source doesn't write a severity + * value. + * + * Generated from protobuf enum SEVERITY_UNSPECIFIED = 0; + */ + const SEVERITY_UNSPECIFIED = 0; + /** + * Vulnerability: + * A critical vulnerability is easily discoverable by an external actor, + * exploitable, and results in the direct ability to execute arbitrary code, + * exfiltrate data, and otherwise gain additional access and privileges to + * cloud resources and workloads. Examples include publicly accessible + * unprotected user data, public SSH access with weak or no passwords, etc. + * Threat: + * Indicates a threat that is able to access, modify, or delete data or + * execute unauthorized code within existing resources. + * + * Generated from protobuf enum CRITICAL = 1; + */ + const CRITICAL = 1; + /** + * Vulnerability: + * A high risk vulnerability can be easily discovered and exploited in + * combination with other vulnerabilities in order to gain direct access and + * the ability to execute arbitrary code, exfiltrate data, and otherwise + * gain additional access and privileges to cloud resources and workloads. + * An example is a database with weak or no passwords that is only + * accessible internally. This database could easily be compromised by an + * actor that had access to the internal network. + * Threat: + * Indicates a threat that is able to create new computational resources in + * an environment but not able to access data or execute code in existing + * resources. + * + * Generated from protobuf enum HIGH = 2; + */ + const HIGH = 2; + /** + * Vulnerability: + * A medium risk vulnerability could be used by an actor to gain access to + * resources or privileges that enable them to eventually (through multiple + * steps or a complex exploit) gain access and the ability to execute + * arbitrary code or exfiltrate data. An example is a service account with + * access to more projects than it should have. If an actor gains access to + * the service account, they could potentially use that access to manipulate + * a project the service account was not intended to. + * Threat: + * Indicates a threat that is able to cause operational impact but may not + * access data or execute unauthorized code. + * + * Generated from protobuf enum MEDIUM = 3; + */ + const MEDIUM = 3; + /** + * Vulnerability: + * A low risk vulnerability hampers a security organization's ability to + * detect vulnerabilities or active threats in their deployment, or prevents + * the root cause investigation of security issues. An example is monitoring + * and logs being disabled for resource configurations and access. + * Threat: + * Indicates a threat that has obtained minimal access to an environment but + * is not able to access data, execute code, or create resources. + * + * Generated from protobuf enum LOW = 4; + */ + const LOW = 4; + + private static $valueToName = [ + self::SEVERITY_UNSPECIFIED => 'SEVERITY_UNSPECIFIED', + self::CRITICAL => 'CRITICAL', + self::HIGH => 'HIGH', + self::MEDIUM => 'MEDIUM', + self::LOW => 'LOW', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Severity::class, \Google\Cloud\SecurityCenter\V1\Finding_Severity::class); + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Finding/State.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Finding/State.php new file mode 100644 index 000000000000..c1d5b5aa3bf5 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Finding/State.php @@ -0,0 +1,65 @@ +google.cloud.securitycenter.v1.Finding.State + */ +class State +{ + /** + * Unspecified state. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The finding requires attention and has not been addressed yet. + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + /** + * The finding has been fixed, triaged as a non-issue or otherwise addressed + * and is no longer active. + * + * Generated from protobuf enum INACTIVE = 2; + */ + const INACTIVE = 2; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + self::INACTIVE => 'INACTIVE', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\SecurityCenter\V1\Finding_State::class); + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Finding_FindingClass.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Finding_FindingClass.php new file mode 100644 index 000000000000..2f7744ca0180 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Finding_FindingClass.php @@ -0,0 +1,16 @@ +google.cloud.securitycenter.v1.Folder + */ +class Folder extends \Google\Protobuf\Internal\Message +{ + /** + * Full resource name of this folder. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + * + * Generated from protobuf field string resource_folder = 1; + */ + protected $resource_folder = ''; + /** + * The user defined display name for this folder. + * + * Generated from protobuf field string resource_folder_display_name = 2; + */ + protected $resource_folder_display_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $resource_folder + * Full resource name of this folder. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + * @type string $resource_folder_display_name + * The user defined display name for this folder. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\Folder::initOnce(); + parent::__construct($data); + } + + /** + * Full resource name of this folder. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + * + * Generated from protobuf field string resource_folder = 1; + * @return string + */ + public function getResourceFolder() + { + return $this->resource_folder; + } + + /** + * Full resource name of this folder. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + * + * Generated from protobuf field string resource_folder = 1; + * @param string $var + * @return $this + */ + public function setResourceFolder($var) + { + GPBUtil::checkString($var, True); + $this->resource_folder = $var; + + return $this; + } + + /** + * The user defined display name for this folder. + * + * Generated from protobuf field string resource_folder_display_name = 2; + * @return string + */ + public function getResourceFolderDisplayName() + { + return $this->resource_folder_display_name; + } + + /** + * The user defined display name for this folder. + * + * Generated from protobuf field string resource_folder_display_name = 2; + * @param string $var + * @return $this + */ + public function setResourceFolderDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->resource_folder_display_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Geolocation.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Geolocation.php new file mode 100644 index 000000000000..840ddadf3caf --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Geolocation.php @@ -0,0 +1,67 @@ +google.cloud.securitycenter.v1.Geolocation + */ +class Geolocation extends \Google\Protobuf\Internal\Message +{ + /** + * A CLDR. + * + * Generated from protobuf field string region_code = 1; + */ + protected $region_code = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $region_code + * A CLDR. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\Access::initOnce(); + parent::__construct($data); + } + + /** + * A CLDR. + * + * Generated from protobuf field string region_code = 1; + * @return string + */ + public function getRegionCode() + { + return $this->region_code; + } + + /** + * A CLDR. + * + * Generated from protobuf field string region_code = 1; + * @param string $var + * @return $this + */ + public function setRegionCode($var) + { + GPBUtil::checkString($var, True); + $this->region_code = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GetBigQueryExportRequest.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GetBigQueryExportRequest.php new file mode 100644 index 000000000000..4bf3cf9b4bc3 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GetBigQueryExportRequest.php @@ -0,0 +1,79 @@ +google.cloud.securitycenter.v1.GetBigQueryExportRequest + */ +class GetBigQueryExportRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the BigQuery export to retrieve. Its format is + * organizations/{organization}/bigQueryExports/{export_id}, + * folders/{folder}/bigQueryExports/{export_id}, or + * projects/{project}/bigQueryExports/{export_id} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the BigQuery export to retrieve. Its format is + * organizations/{organization}/bigQueryExports/{export_id}, + * folders/{folder}/bigQueryExports/{export_id}, or + * projects/{project}/bigQueryExports/{export_id} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the BigQuery export to retrieve. Its format is + * organizations/{organization}/bigQueryExports/{export_id}, + * folders/{folder}/bigQueryExports/{export_id}, or + * projects/{project}/bigQueryExports/{export_id} + * + * 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 BigQuery export to retrieve. Its format is + * organizations/{organization}/bigQueryExports/{export_id}, + * folders/{folder}/bigQueryExports/{export_id}, or + * projects/{project}/bigQueryExports/{export_id} + * + * 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/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GetMuteConfigRequest.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GetMuteConfigRequest.php new file mode 100644 index 000000000000..464494de039c --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GetMuteConfigRequest.php @@ -0,0 +1,79 @@ +google.cloud.securitycenter.v1.GetMuteConfigRequest + */ +class GetMuteConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the mute config to retrieve. Its format is + * organizations/{organization}/muteConfigs/{config_id}, + * folders/{folder}/muteConfigs/{config_id}, or + * projects/{project}/muteConfigs/{config_id} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the mute config to retrieve. Its format is + * organizations/{organization}/muteConfigs/{config_id}, + * folders/{folder}/muteConfigs/{config_id}, or + * projects/{project}/muteConfigs/{config_id} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the mute config to retrieve. Its format is + * organizations/{organization}/muteConfigs/{config_id}, + * folders/{folder}/muteConfigs/{config_id}, or + * projects/{project}/muteConfigs/{config_id} + * + * 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 mute config to retrieve. Its format is + * organizations/{organization}/muteConfigs/{config_id}, + * folders/{folder}/muteConfigs/{config_id}, or + * projects/{project}/muteConfigs/{config_id} + * + * 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/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GetNotificationConfigRequest.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GetNotificationConfigRequest.php new file mode 100644 index 000000000000..0d54bcbc5b50 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GetNotificationConfigRequest.php @@ -0,0 +1,79 @@ +google.cloud.securitycenter.v1.GetNotificationConfigRequest + */ +class GetNotificationConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the notification config to get. Its format is + * "organizations/[organization_id]/notificationConfigs/[config_id]", + * "folders/[folder_id]/notificationConfigs/[config_id]", + * or "projects/[project_id]/notificationConfigs/[config_id]". + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the notification config to get. Its format is + * "organizations/[organization_id]/notificationConfigs/[config_id]", + * "folders/[folder_id]/notificationConfigs/[config_id]", + * or "projects/[project_id]/notificationConfigs/[config_id]". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the notification config to get. Its format is + * "organizations/[organization_id]/notificationConfigs/[config_id]", + * "folders/[folder_id]/notificationConfigs/[config_id]", + * or "projects/[project_id]/notificationConfigs/[config_id]". + * + * 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 notification config to get. Its format is + * "organizations/[organization_id]/notificationConfigs/[config_id]", + * "folders/[folder_id]/notificationConfigs/[config_id]", + * or "projects/[project_id]/notificationConfigs/[config_id]". + * + * 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/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GetOrganizationSettingsRequest.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GetOrganizationSettingsRequest.php new file mode 100644 index 000000000000..fcb7295481f8 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GetOrganizationSettingsRequest.php @@ -0,0 +1,71 @@ +google.cloud.securitycenter.v1.GetOrganizationSettingsRequest + */ +class GetOrganizationSettingsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the organization to get organization settings for. Its + * format is "organizations/[organization_id]/organizationSettings". + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the organization to get organization settings for. Its + * format is "organizations/[organization_id]/organizationSettings". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the organization to get organization settings for. Its + * format is "organizations/[organization_id]/organizationSettings". + * + * 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 organization to get organization settings for. Its + * format is "organizations/[organization_id]/organizationSettings". + * + * 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/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GetSourceRequest.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GetSourceRequest.php new file mode 100644 index 000000000000..258db6b19e5f --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GetSourceRequest.php @@ -0,0 +1,71 @@ +google.cloud.securitycenter.v1.GetSourceRequest + */ +class GetSourceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Relative resource name of the source. Its format is + * "organizations/[organization_id]/source/[source_id]". + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Relative resource name of the source. Its format is + * "organizations/[organization_id]/source/[source_id]". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Relative resource name of the source. Its format is + * "organizations/[organization_id]/source/[source_id]". + * + * 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. Relative resource name of the source. Its format is + * "organizations/[organization_id]/source/[source_id]". + * + * 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/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GroupAssetsRequest.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GroupAssetsRequest.php new file mode 100644 index 000000000000..5414cdfb275b --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GroupAssetsRequest.php @@ -0,0 +1,643 @@ +google.cloud.securitycenter.v1.GroupAssetsRequest + */ +class GroupAssetsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the parent to group the assets by. Its format is + * "organizations/[organization_id]", "folders/[folder_id]", or + * "projects/[project_id]". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Expression that defines the filter to apply across assets. + * The expression is a list of zero or more restrictions combined via logical + * operators `AND` and `OR`. + * Parentheses are supported, and `OR` has higher precedence than `AND`. + * Restrictions have the form ` ` and may have a `-` + * character in front of them to indicate negation. The fields map to those + * defined in the Asset resource. Examples include: + * * name + * * security_center_properties.resource_name + * * resource_properties.a_property + * * security_marks.marks.marka + * The supported operators are: + * * `=` for all value types. + * * `>`, `<`, `>=`, `<=` for integer values. + * * `:`, meaning substring matching, for strings. + * The supported value types are: + * * string literals in quotes. + * * integer literals without quotes. + * * boolean literals `true` and `false` without quotes. + * The following field and operator combinations are supported: + * * name: `=` + * * update_time: `=`, `>`, `<`, `>=`, `<=` + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `update_time = "2019-06-10T16:07:18-07:00"` + * `update_time = 1560208038000` + * * create_time: `=`, `>`, `<`, `>=`, `<=` + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `create_time = "2019-06-10T16:07:18-07:00"` + * `create_time = 1560208038000` + * * iam_policy.policy_blob: `=`, `:` + * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + * * security_marks.marks: `=`, `:` + * * security_center_properties.resource_name: `=`, `:` + * * security_center_properties.resource_display_name: `=`, `:` + * * security_center_properties.resource_type: `=`, `:` + * * security_center_properties.resource_parent: `=`, `:` + * * security_center_properties.resource_parent_display_name: `=`, `:` + * * security_center_properties.resource_project: `=`, `:` + * * security_center_properties.resource_project_display_name: `=`, `:` + * * security_center_properties.resource_owners: `=`, `:` + * For example, `resource_properties.size = 100` is a valid filter string. + * Use a partial match on the empty string to filter based on a property + * existing: `resource_properties.my_property : ""` + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-resource_properties.my_property : ""` + * + * Generated from protobuf field string filter = 2; + */ + protected $filter = ''; + /** + * Required. Expression that defines what assets fields to use for grouping. + * The string value should follow SQL syntax: comma separated list of fields. + * For example: + * "security_center_properties.resource_project,security_center_properties.project". + * The following fields are supported when compare_duration is not set: + * * security_center_properties.resource_project + * * security_center_properties.resource_project_display_name + * * security_center_properties.resource_type + * * security_center_properties.resource_parent + * * security_center_properties.resource_parent_display_name + * The following fields are supported when compare_duration is set: + * * security_center_properties.resource_type + * * security_center_properties.resource_project_display_name + * * security_center_properties.resource_parent_display_name + * + * Generated from protobuf field string group_by = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $group_by = ''; + /** + * When compare_duration is set, the GroupResult's "state_change" property is + * updated to indicate whether the asset was added, removed, or remained + * present during the compare_duration period of time that precedes the + * read_time. This is the time between (read_time - compare_duration) and + * read_time. + * The state change value is derived based on the presence of the asset at the + * two points in time. Intermediate state changes between the two times don't + * affect the result. For example, the results aren't affected if the asset is + * removed and re-created again. + * Possible "state_change" values when compare_duration is specified: + * * "ADDED": indicates that the asset was not present at the start of + * compare_duration, but present at reference_time. + * * "REMOVED": indicates that the asset was present at the start of + * compare_duration, but not present at reference_time. + * * "ACTIVE": indicates that the asset was present at both the + * start and the end of the time period defined by + * compare_duration and reference_time. + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all assets present at + * read_time. + * If this field is set then `state_change` must be a specified field in + * `group_by`. + * + * Generated from protobuf field .google.protobuf.Duration compare_duration = 4; + */ + protected $compare_duration = null; + /** + * Time used as a reference point when filtering assets. The filter is limited + * to assets existing at the supplied time and their values are those at that + * specific time. Absence of this field will default to the API's version of + * NOW. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 5; + */ + protected $read_time = null; + /** + * The value returned by the last `GroupAssetsResponse`; indicates + * that this is a continuation of a prior `GroupAssets` call, and that the + * system should return the next page of data. + * + * Generated from protobuf field string page_token = 7; + */ + protected $page_token = ''; + /** + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. + * + * Generated from protobuf field int32 page_size = 8; + */ + protected $page_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of the parent to group the assets by. Its format is + * "organizations/[organization_id]", "folders/[folder_id]", or + * "projects/[project_id]". + * @type string $filter + * Expression that defines the filter to apply across assets. + * The expression is a list of zero or more restrictions combined via logical + * operators `AND` and `OR`. + * Parentheses are supported, and `OR` has higher precedence than `AND`. + * Restrictions have the form ` ` and may have a `-` + * character in front of them to indicate negation. The fields map to those + * defined in the Asset resource. Examples include: + * * name + * * security_center_properties.resource_name + * * resource_properties.a_property + * * security_marks.marks.marka + * The supported operators are: + * * `=` for all value types. + * * `>`, `<`, `>=`, `<=` for integer values. + * * `:`, meaning substring matching, for strings. + * The supported value types are: + * * string literals in quotes. + * * integer literals without quotes. + * * boolean literals `true` and `false` without quotes. + * The following field and operator combinations are supported: + * * name: `=` + * * update_time: `=`, `>`, `<`, `>=`, `<=` + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `update_time = "2019-06-10T16:07:18-07:00"` + * `update_time = 1560208038000` + * * create_time: `=`, `>`, `<`, `>=`, `<=` + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `create_time = "2019-06-10T16:07:18-07:00"` + * `create_time = 1560208038000` + * * iam_policy.policy_blob: `=`, `:` + * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + * * security_marks.marks: `=`, `:` + * * security_center_properties.resource_name: `=`, `:` + * * security_center_properties.resource_display_name: `=`, `:` + * * security_center_properties.resource_type: `=`, `:` + * * security_center_properties.resource_parent: `=`, `:` + * * security_center_properties.resource_parent_display_name: `=`, `:` + * * security_center_properties.resource_project: `=`, `:` + * * security_center_properties.resource_project_display_name: `=`, `:` + * * security_center_properties.resource_owners: `=`, `:` + * For example, `resource_properties.size = 100` is a valid filter string. + * Use a partial match on the empty string to filter based on a property + * existing: `resource_properties.my_property : ""` + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-resource_properties.my_property : ""` + * @type string $group_by + * Required. Expression that defines what assets fields to use for grouping. + * The string value should follow SQL syntax: comma separated list of fields. + * For example: + * "security_center_properties.resource_project,security_center_properties.project". + * The following fields are supported when compare_duration is not set: + * * security_center_properties.resource_project + * * security_center_properties.resource_project_display_name + * * security_center_properties.resource_type + * * security_center_properties.resource_parent + * * security_center_properties.resource_parent_display_name + * The following fields are supported when compare_duration is set: + * * security_center_properties.resource_type + * * security_center_properties.resource_project_display_name + * * security_center_properties.resource_parent_display_name + * @type \Google\Protobuf\Duration $compare_duration + * When compare_duration is set, the GroupResult's "state_change" property is + * updated to indicate whether the asset was added, removed, or remained + * present during the compare_duration period of time that precedes the + * read_time. This is the time between (read_time - compare_duration) and + * read_time. + * The state change value is derived based on the presence of the asset at the + * two points in time. Intermediate state changes between the two times don't + * affect the result. For example, the results aren't affected if the asset is + * removed and re-created again. + * Possible "state_change" values when compare_duration is specified: + * * "ADDED": indicates that the asset was not present at the start of + * compare_duration, but present at reference_time. + * * "REMOVED": indicates that the asset was present at the start of + * compare_duration, but not present at reference_time. + * * "ACTIVE": indicates that the asset was present at both the + * start and the end of the time period defined by + * compare_duration and reference_time. + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all assets present at + * read_time. + * If this field is set then `state_change` must be a specified field in + * `group_by`. + * @type \Google\Protobuf\Timestamp $read_time + * Time used as a reference point when filtering assets. The filter is limited + * to assets existing at the supplied time and their values are those at that + * specific time. Absence of this field will default to the API's version of + * NOW. + * @type string $page_token + * The value returned by the last `GroupAssetsResponse`; indicates + * that this is a continuation of a prior `GroupAssets` call, and that the + * system should return the next page of data. + * @type int $page_size + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the parent to group the assets by. Its format is + * "organizations/[organization_id]", "folders/[folder_id]", or + * "projects/[project_id]". + * + * 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. The name of the parent to group the assets by. Its format is + * "organizations/[organization_id]", "folders/[folder_id]", or + * "projects/[project_id]". + * + * 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; + } + + /** + * Expression that defines the filter to apply across assets. + * The expression is a list of zero or more restrictions combined via logical + * operators `AND` and `OR`. + * Parentheses are supported, and `OR` has higher precedence than `AND`. + * Restrictions have the form ` ` and may have a `-` + * character in front of them to indicate negation. The fields map to those + * defined in the Asset resource. Examples include: + * * name + * * security_center_properties.resource_name + * * resource_properties.a_property + * * security_marks.marks.marka + * The supported operators are: + * * `=` for all value types. + * * `>`, `<`, `>=`, `<=` for integer values. + * * `:`, meaning substring matching, for strings. + * The supported value types are: + * * string literals in quotes. + * * integer literals without quotes. + * * boolean literals `true` and `false` without quotes. + * The following field and operator combinations are supported: + * * name: `=` + * * update_time: `=`, `>`, `<`, `>=`, `<=` + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `update_time = "2019-06-10T16:07:18-07:00"` + * `update_time = 1560208038000` + * * create_time: `=`, `>`, `<`, `>=`, `<=` + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `create_time = "2019-06-10T16:07:18-07:00"` + * `create_time = 1560208038000` + * * iam_policy.policy_blob: `=`, `:` + * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + * * security_marks.marks: `=`, `:` + * * security_center_properties.resource_name: `=`, `:` + * * security_center_properties.resource_display_name: `=`, `:` + * * security_center_properties.resource_type: `=`, `:` + * * security_center_properties.resource_parent: `=`, `:` + * * security_center_properties.resource_parent_display_name: `=`, `:` + * * security_center_properties.resource_project: `=`, `:` + * * security_center_properties.resource_project_display_name: `=`, `:` + * * security_center_properties.resource_owners: `=`, `:` + * For example, `resource_properties.size = 100` is a valid filter string. + * Use a partial match on the empty string to filter based on a property + * existing: `resource_properties.my_property : ""` + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-resource_properties.my_property : ""` + * + * Generated from protobuf field string filter = 2; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Expression that defines the filter to apply across assets. + * The expression is a list of zero or more restrictions combined via logical + * operators `AND` and `OR`. + * Parentheses are supported, and `OR` has higher precedence than `AND`. + * Restrictions have the form ` ` and may have a `-` + * character in front of them to indicate negation. The fields map to those + * defined in the Asset resource. Examples include: + * * name + * * security_center_properties.resource_name + * * resource_properties.a_property + * * security_marks.marks.marka + * The supported operators are: + * * `=` for all value types. + * * `>`, `<`, `>=`, `<=` for integer values. + * * `:`, meaning substring matching, for strings. + * The supported value types are: + * * string literals in quotes. + * * integer literals without quotes. + * * boolean literals `true` and `false` without quotes. + * The following field and operator combinations are supported: + * * name: `=` + * * update_time: `=`, `>`, `<`, `>=`, `<=` + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `update_time = "2019-06-10T16:07:18-07:00"` + * `update_time = 1560208038000` + * * create_time: `=`, `>`, `<`, `>=`, `<=` + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `create_time = "2019-06-10T16:07:18-07:00"` + * `create_time = 1560208038000` + * * iam_policy.policy_blob: `=`, `:` + * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + * * security_marks.marks: `=`, `:` + * * security_center_properties.resource_name: `=`, `:` + * * security_center_properties.resource_display_name: `=`, `:` + * * security_center_properties.resource_type: `=`, `:` + * * security_center_properties.resource_parent: `=`, `:` + * * security_center_properties.resource_parent_display_name: `=`, `:` + * * security_center_properties.resource_project: `=`, `:` + * * security_center_properties.resource_project_display_name: `=`, `:` + * * security_center_properties.resource_owners: `=`, `:` + * For example, `resource_properties.size = 100` is a valid filter string. + * Use a partial match on the empty string to filter based on a property + * existing: `resource_properties.my_property : ""` + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-resource_properties.my_property : ""` + * + * Generated from protobuf field string filter = 2; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Required. Expression that defines what assets fields to use for grouping. + * The string value should follow SQL syntax: comma separated list of fields. + * For example: + * "security_center_properties.resource_project,security_center_properties.project". + * The following fields are supported when compare_duration is not set: + * * security_center_properties.resource_project + * * security_center_properties.resource_project_display_name + * * security_center_properties.resource_type + * * security_center_properties.resource_parent + * * security_center_properties.resource_parent_display_name + * The following fields are supported when compare_duration is set: + * * security_center_properties.resource_type + * * security_center_properties.resource_project_display_name + * * security_center_properties.resource_parent_display_name + * + * Generated from protobuf field string group_by = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getGroupBy() + { + return $this->group_by; + } + + /** + * Required. Expression that defines what assets fields to use for grouping. + * The string value should follow SQL syntax: comma separated list of fields. + * For example: + * "security_center_properties.resource_project,security_center_properties.project". + * The following fields are supported when compare_duration is not set: + * * security_center_properties.resource_project + * * security_center_properties.resource_project_display_name + * * security_center_properties.resource_type + * * security_center_properties.resource_parent + * * security_center_properties.resource_parent_display_name + * The following fields are supported when compare_duration is set: + * * security_center_properties.resource_type + * * security_center_properties.resource_project_display_name + * * security_center_properties.resource_parent_display_name + * + * Generated from protobuf field string group_by = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setGroupBy($var) + { + GPBUtil::checkString($var, True); + $this->group_by = $var; + + return $this; + } + + /** + * When compare_duration is set, the GroupResult's "state_change" property is + * updated to indicate whether the asset was added, removed, or remained + * present during the compare_duration period of time that precedes the + * read_time. This is the time between (read_time - compare_duration) and + * read_time. + * The state change value is derived based on the presence of the asset at the + * two points in time. Intermediate state changes between the two times don't + * affect the result. For example, the results aren't affected if the asset is + * removed and re-created again. + * Possible "state_change" values when compare_duration is specified: + * * "ADDED": indicates that the asset was not present at the start of + * compare_duration, but present at reference_time. + * * "REMOVED": indicates that the asset was present at the start of + * compare_duration, but not present at reference_time. + * * "ACTIVE": indicates that the asset was present at both the + * start and the end of the time period defined by + * compare_duration and reference_time. + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all assets present at + * read_time. + * If this field is set then `state_change` must be a specified field in + * `group_by`. + * + * Generated from protobuf field .google.protobuf.Duration compare_duration = 4; + * @return \Google\Protobuf\Duration|null + */ + public function getCompareDuration() + { + return $this->compare_duration; + } + + public function hasCompareDuration() + { + return isset($this->compare_duration); + } + + public function clearCompareDuration() + { + unset($this->compare_duration); + } + + /** + * When compare_duration is set, the GroupResult's "state_change" property is + * updated to indicate whether the asset was added, removed, or remained + * present during the compare_duration period of time that precedes the + * read_time. This is the time between (read_time - compare_duration) and + * read_time. + * The state change value is derived based on the presence of the asset at the + * two points in time. Intermediate state changes between the two times don't + * affect the result. For example, the results aren't affected if the asset is + * removed and re-created again. + * Possible "state_change" values when compare_duration is specified: + * * "ADDED": indicates that the asset was not present at the start of + * compare_duration, but present at reference_time. + * * "REMOVED": indicates that the asset was present at the start of + * compare_duration, but not present at reference_time. + * * "ACTIVE": indicates that the asset was present at both the + * start and the end of the time period defined by + * compare_duration and reference_time. + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all assets present at + * read_time. + * If this field is set then `state_change` must be a specified field in + * `group_by`. + * + * Generated from protobuf field .google.protobuf.Duration compare_duration = 4; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setCompareDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->compare_duration = $var; + + return $this; + } + + /** + * Time used as a reference point when filtering assets. The filter is limited + * to assets existing at the supplied time and their values are those at that + * specific time. Absence of this field will default to the API's version of + * NOW. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 5; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->read_time; + } + + public function hasReadTime() + { + return isset($this->read_time); + } + + public function clearReadTime() + { + unset($this->read_time); + } + + /** + * Time used as a reference point when filtering assets. The filter is limited + * to assets existing at the supplied time and their values are those at that + * specific time. Absence of this field will default to the API's version of + * NOW. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 5; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->read_time = $var; + + return $this; + } + + /** + * The value returned by the last `GroupAssetsResponse`; indicates + * that this is a continuation of a prior `GroupAssets` call, and that the + * system should return the next page of data. + * + * Generated from protobuf field string page_token = 7; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The value returned by the last `GroupAssetsResponse`; indicates + * that this is a continuation of a prior `GroupAssets` call, and that the + * system should return the next page of data. + * + * Generated from protobuf field string page_token = 7; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. + * + * Generated from protobuf field int32 page_size = 8; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. + * + * Generated from protobuf field int32 page_size = 8; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GroupAssetsResponse.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GroupAssetsResponse.php new file mode 100644 index 000000000000..22c92dbe38ec --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GroupAssetsResponse.php @@ -0,0 +1,191 @@ +google.cloud.securitycenter.v1.GroupAssetsResponse + */ +class GroupAssetsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Group results. There exists an element for each existing unique + * combination of property/values. The element contains a count for the number + * of times those specific property/values appear. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; + */ + private $group_by_results; + /** + * Time used for executing the groupBy request. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 2; + */ + protected $read_time = null; + /** + * Token to retrieve the next page of results, or empty if there are no more + * results. + * + * Generated from protobuf field string next_page_token = 3; + */ + protected $next_page_token = ''; + /** + * The total number of results matching the query. + * + * Generated from protobuf field int32 total_size = 4; + */ + protected $total_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\SecurityCenter\V1\GroupResult>|\Google\Protobuf\Internal\RepeatedField $group_by_results + * Group results. There exists an element for each existing unique + * combination of property/values. The element contains a count for the number + * of times those specific property/values appear. + * @type \Google\Protobuf\Timestamp $read_time + * Time used for executing the groupBy request. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no more + * results. + * @type int $total_size + * The total number of results matching the query. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Group results. There exists an element for each existing unique + * combination of property/values. The element contains a count for the number + * of times those specific property/values appear. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getGroupByResults() + { + return $this->group_by_results; + } + + /** + * Group results. There exists an element for each existing unique + * combination of property/values. The element contains a count for the number + * of times those specific property/values appear. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; + * @param array<\Google\Cloud\SecurityCenter\V1\GroupResult>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setGroupByResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\GroupResult::class); + $this->group_by_results = $arr; + + return $this; + } + + /** + * Time used for executing the groupBy request. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->read_time; + } + + public function hasReadTime() + { + return isset($this->read_time); + } + + public function clearReadTime() + { + unset($this->read_time); + } + + /** + * Time used for executing the groupBy request. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->read_time = $var; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results. + * + * Generated from protobuf field string next_page_token = 3; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results. + * + * Generated from protobuf field string next_page_token = 3; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * The total number of results matching the query. + * + * Generated from protobuf field int32 total_size = 4; + * @return int + */ + public function getTotalSize() + { + return $this->total_size; + } + + /** + * The total number of results matching the query. + * + * Generated from protobuf field int32 total_size = 4; + * @param int $var + * @return $this + */ + public function setTotalSize($var) + { + GPBUtil::checkInt32($var); + $this->total_size = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GroupFindingsRequest.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GroupFindingsRequest.php new file mode 100644 index 000000000000..7dd52b451ba4 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GroupFindingsRequest.php @@ -0,0 +1,659 @@ +google.cloud.securitycenter.v1.GroupFindingsRequest + */ +class GroupFindingsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the source to groupBy. Its format is + * "organizations/[organization_id]/sources/[source_id]", + * folders/[folder_id]/sources/[source_id], or + * projects/[project_id]/sources/[source_id]. To groupBy across all sources + * provide a source_id of `-`. For example: + * organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-, + * or projects/{project_id}/sources/- + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Expression that defines the filter to apply across findings. + * The expression is a list of one or more restrictions combined via logical + * operators `AND` and `OR`. + * Parentheses are supported, and `OR` has higher precedence than `AND`. + * Restrictions have the form ` ` and may have a `-` + * character in front of them to indicate negation. Examples include: + * * name + * * source_properties.a_property + * * security_marks.marks.marka + * The supported operators are: + * * `=` for all value types. + * * `>`, `<`, `>=`, `<=` for integer values. + * * `:`, meaning substring matching, for strings. + * The supported value types are: + * * string literals in quotes. + * * integer literals without quotes. + * * boolean literals `true` and `false` without quotes. + * The following field and operator combinations are supported: + * * name: `=` + * * parent: `=`, `:` + * * resource_name: `=`, `:` + * * state: `=`, `:` + * * category: `=`, `:` + * * external_uri: `=`, `:` + * * event_time: `=`, `>`, `<`, `>=`, `<=` + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `event_time = "2019-06-10T16:07:18-07:00"` + * `event_time = 1560208038000` + * * severity: `=`, `:` + * * workflow_state: `=`, `:` + * * security_marks.marks: `=`, `:` + * * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + * For example, `source_properties.size = 100` is a valid filter string. + * Use a partial match on the empty string to filter based on a property + * existing: `source_properties.my_property : ""` + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-source_properties.my_property : ""` + * * resource: + * * resource.name: `=`, `:` + * * resource.parent_name: `=`, `:` + * * resource.parent_display_name: `=`, `:` + * * resource.project_name: `=`, `:` + * * resource.project_display_name: `=`, `:` + * * resource.type: `=`, `:` + * + * Generated from protobuf field string filter = 2; + */ + protected $filter = ''; + /** + * Required. Expression that defines what assets fields to use for grouping + * (including `state_change`). The string value should follow SQL syntax: + * comma separated list of fields. For example: "parent,resource_name". + * The following fields are supported: + * * resource_name + * * category + * * state + * * parent + * * severity + * The following fields are supported when compare_duration is set: + * * state_change + * + * Generated from protobuf field string group_by = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $group_by = ''; + /** + * Time used as a reference point when filtering findings. The filter is + * limited to findings existing at the supplied time and their values are + * those at that specific time. Absence of this field will default to the + * API's version of NOW. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; + */ + protected $read_time = null; + /** + * When compare_duration is set, the GroupResult's "state_change" attribute is + * updated to indicate whether the finding had its state changed, the + * finding's state remained unchanged, or if the finding was added during the + * compare_duration period of time that precedes the read_time. This is the + * time between (read_time - compare_duration) and read_time. + * The state_change value is derived based on the presence and state of the + * finding at the two points in time. Intermediate state changes between the + * two times don't affect the result. For example, the results aren't affected + * if the finding is made inactive and then active again. + * Possible "state_change" values when compare_duration is specified: + * * "CHANGED": indicates that the finding was present and matched the given + * filter at the start of compare_duration, but changed its + * state at read_time. + * * "UNCHANGED": indicates that the finding was present and matched the given + * filter at the start of compare_duration and did not change + * state at read_time. + * * "ADDED": indicates that the finding did not match the given filter or + * was not present at the start of compare_duration, but was + * present at read_time. + * * "REMOVED": indicates that the finding was present and matched the + * filter at the start of compare_duration, but did not match + * the filter at read_time. + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all findings present + * at read_time. + * If this field is set then `state_change` must be a specified field in + * `group_by`. + * + * Generated from protobuf field .google.protobuf.Duration compare_duration = 5; + */ + protected $compare_duration = null; + /** + * The value returned by the last `GroupFindingsResponse`; indicates + * that this is a continuation of a prior `GroupFindings` call, and + * that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 7; + */ + protected $page_token = ''; + /** + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. + * + * Generated from protobuf field int32 page_size = 8; + */ + protected $page_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Name of the source to groupBy. Its format is + * "organizations/[organization_id]/sources/[source_id]", + * folders/[folder_id]/sources/[source_id], or + * projects/[project_id]/sources/[source_id]. To groupBy across all sources + * provide a source_id of `-`. For example: + * organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-, + * or projects/{project_id}/sources/- + * @type string $filter + * Expression that defines the filter to apply across findings. + * The expression is a list of one or more restrictions combined via logical + * operators `AND` and `OR`. + * Parentheses are supported, and `OR` has higher precedence than `AND`. + * Restrictions have the form ` ` and may have a `-` + * character in front of them to indicate negation. Examples include: + * * name + * * source_properties.a_property + * * security_marks.marks.marka + * The supported operators are: + * * `=` for all value types. + * * `>`, `<`, `>=`, `<=` for integer values. + * * `:`, meaning substring matching, for strings. + * The supported value types are: + * * string literals in quotes. + * * integer literals without quotes. + * * boolean literals `true` and `false` without quotes. + * The following field and operator combinations are supported: + * * name: `=` + * * parent: `=`, `:` + * * resource_name: `=`, `:` + * * state: `=`, `:` + * * category: `=`, `:` + * * external_uri: `=`, `:` + * * event_time: `=`, `>`, `<`, `>=`, `<=` + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `event_time = "2019-06-10T16:07:18-07:00"` + * `event_time = 1560208038000` + * * severity: `=`, `:` + * * workflow_state: `=`, `:` + * * security_marks.marks: `=`, `:` + * * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + * For example, `source_properties.size = 100` is a valid filter string. + * Use a partial match on the empty string to filter based on a property + * existing: `source_properties.my_property : ""` + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-source_properties.my_property : ""` + * * resource: + * * resource.name: `=`, `:` + * * resource.parent_name: `=`, `:` + * * resource.parent_display_name: `=`, `:` + * * resource.project_name: `=`, `:` + * * resource.project_display_name: `=`, `:` + * * resource.type: `=`, `:` + * @type string $group_by + * Required. Expression that defines what assets fields to use for grouping + * (including `state_change`). The string value should follow SQL syntax: + * comma separated list of fields. For example: "parent,resource_name". + * The following fields are supported: + * * resource_name + * * category + * * state + * * parent + * * severity + * The following fields are supported when compare_duration is set: + * * state_change + * @type \Google\Protobuf\Timestamp $read_time + * Time used as a reference point when filtering findings. The filter is + * limited to findings existing at the supplied time and their values are + * those at that specific time. Absence of this field will default to the + * API's version of NOW. + * @type \Google\Protobuf\Duration $compare_duration + * When compare_duration is set, the GroupResult's "state_change" attribute is + * updated to indicate whether the finding had its state changed, the + * finding's state remained unchanged, or if the finding was added during the + * compare_duration period of time that precedes the read_time. This is the + * time between (read_time - compare_duration) and read_time. + * The state_change value is derived based on the presence and state of the + * finding at the two points in time. Intermediate state changes between the + * two times don't affect the result. For example, the results aren't affected + * if the finding is made inactive and then active again. + * Possible "state_change" values when compare_duration is specified: + * * "CHANGED": indicates that the finding was present and matched the given + * filter at the start of compare_duration, but changed its + * state at read_time. + * * "UNCHANGED": indicates that the finding was present and matched the given + * filter at the start of compare_duration and did not change + * state at read_time. + * * "ADDED": indicates that the finding did not match the given filter or + * was not present at the start of compare_duration, but was + * present at read_time. + * * "REMOVED": indicates that the finding was present and matched the + * filter at the start of compare_duration, but did not match + * the filter at read_time. + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all findings present + * at read_time. + * If this field is set then `state_change` must be a specified field in + * `group_by`. + * @type string $page_token + * The value returned by the last `GroupFindingsResponse`; indicates + * that this is a continuation of a prior `GroupFindings` call, and + * that the system should return the next page of data. + * @type int $page_size + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the source to groupBy. Its format is + * "organizations/[organization_id]/sources/[source_id]", + * folders/[folder_id]/sources/[source_id], or + * projects/[project_id]/sources/[source_id]. To groupBy across all sources + * provide a source_id of `-`. For example: + * organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-, + * or projects/{project_id}/sources/- + * + * 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. Name of the source to groupBy. Its format is + * "organizations/[organization_id]/sources/[source_id]", + * folders/[folder_id]/sources/[source_id], or + * projects/[project_id]/sources/[source_id]. To groupBy across all sources + * provide a source_id of `-`. For example: + * organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-, + * or projects/{project_id}/sources/- + * + * 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; + } + + /** + * Expression that defines the filter to apply across findings. + * The expression is a list of one or more restrictions combined via logical + * operators `AND` and `OR`. + * Parentheses are supported, and `OR` has higher precedence than `AND`. + * Restrictions have the form ` ` and may have a `-` + * character in front of them to indicate negation. Examples include: + * * name + * * source_properties.a_property + * * security_marks.marks.marka + * The supported operators are: + * * `=` for all value types. + * * `>`, `<`, `>=`, `<=` for integer values. + * * `:`, meaning substring matching, for strings. + * The supported value types are: + * * string literals in quotes. + * * integer literals without quotes. + * * boolean literals `true` and `false` without quotes. + * The following field and operator combinations are supported: + * * name: `=` + * * parent: `=`, `:` + * * resource_name: `=`, `:` + * * state: `=`, `:` + * * category: `=`, `:` + * * external_uri: `=`, `:` + * * event_time: `=`, `>`, `<`, `>=`, `<=` + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `event_time = "2019-06-10T16:07:18-07:00"` + * `event_time = 1560208038000` + * * severity: `=`, `:` + * * workflow_state: `=`, `:` + * * security_marks.marks: `=`, `:` + * * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + * For example, `source_properties.size = 100` is a valid filter string. + * Use a partial match on the empty string to filter based on a property + * existing: `source_properties.my_property : ""` + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-source_properties.my_property : ""` + * * resource: + * * resource.name: `=`, `:` + * * resource.parent_name: `=`, `:` + * * resource.parent_display_name: `=`, `:` + * * resource.project_name: `=`, `:` + * * resource.project_display_name: `=`, `:` + * * resource.type: `=`, `:` + * + * Generated from protobuf field string filter = 2; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Expression that defines the filter to apply across findings. + * The expression is a list of one or more restrictions combined via logical + * operators `AND` and `OR`. + * Parentheses are supported, and `OR` has higher precedence than `AND`. + * Restrictions have the form ` ` and may have a `-` + * character in front of them to indicate negation. Examples include: + * * name + * * source_properties.a_property + * * security_marks.marks.marka + * The supported operators are: + * * `=` for all value types. + * * `>`, `<`, `>=`, `<=` for integer values. + * * `:`, meaning substring matching, for strings. + * The supported value types are: + * * string literals in quotes. + * * integer literals without quotes. + * * boolean literals `true` and `false` without quotes. + * The following field and operator combinations are supported: + * * name: `=` + * * parent: `=`, `:` + * * resource_name: `=`, `:` + * * state: `=`, `:` + * * category: `=`, `:` + * * external_uri: `=`, `:` + * * event_time: `=`, `>`, `<`, `>=`, `<=` + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `event_time = "2019-06-10T16:07:18-07:00"` + * `event_time = 1560208038000` + * * severity: `=`, `:` + * * workflow_state: `=`, `:` + * * security_marks.marks: `=`, `:` + * * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + * For example, `source_properties.size = 100` is a valid filter string. + * Use a partial match on the empty string to filter based on a property + * existing: `source_properties.my_property : ""` + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-source_properties.my_property : ""` + * * resource: + * * resource.name: `=`, `:` + * * resource.parent_name: `=`, `:` + * * resource.parent_display_name: `=`, `:` + * * resource.project_name: `=`, `:` + * * resource.project_display_name: `=`, `:` + * * resource.type: `=`, `:` + * + * Generated from protobuf field string filter = 2; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Required. Expression that defines what assets fields to use for grouping + * (including `state_change`). The string value should follow SQL syntax: + * comma separated list of fields. For example: "parent,resource_name". + * The following fields are supported: + * * resource_name + * * category + * * state + * * parent + * * severity + * The following fields are supported when compare_duration is set: + * * state_change + * + * Generated from protobuf field string group_by = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getGroupBy() + { + return $this->group_by; + } + + /** + * Required. Expression that defines what assets fields to use for grouping + * (including `state_change`). The string value should follow SQL syntax: + * comma separated list of fields. For example: "parent,resource_name". + * The following fields are supported: + * * resource_name + * * category + * * state + * * parent + * * severity + * The following fields are supported when compare_duration is set: + * * state_change + * + * Generated from protobuf field string group_by = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setGroupBy($var) + { + GPBUtil::checkString($var, True); + $this->group_by = $var; + + return $this; + } + + /** + * Time used as a reference point when filtering findings. The filter is + * limited to findings existing at the supplied time and their values are + * those at that specific time. Absence of this field will default to the + * API's version of NOW. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->read_time; + } + + public function hasReadTime() + { + return isset($this->read_time); + } + + public function clearReadTime() + { + unset($this->read_time); + } + + /** + * Time used as a reference point when filtering findings. The filter is + * limited to findings existing at the supplied time and their values are + * those at that specific time. Absence of this field will default to the + * API's version of NOW. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->read_time = $var; + + return $this; + } + + /** + * When compare_duration is set, the GroupResult's "state_change" attribute is + * updated to indicate whether the finding had its state changed, the + * finding's state remained unchanged, or if the finding was added during the + * compare_duration period of time that precedes the read_time. This is the + * time between (read_time - compare_duration) and read_time. + * The state_change value is derived based on the presence and state of the + * finding at the two points in time. Intermediate state changes between the + * two times don't affect the result. For example, the results aren't affected + * if the finding is made inactive and then active again. + * Possible "state_change" values when compare_duration is specified: + * * "CHANGED": indicates that the finding was present and matched the given + * filter at the start of compare_duration, but changed its + * state at read_time. + * * "UNCHANGED": indicates that the finding was present and matched the given + * filter at the start of compare_duration and did not change + * state at read_time. + * * "ADDED": indicates that the finding did not match the given filter or + * was not present at the start of compare_duration, but was + * present at read_time. + * * "REMOVED": indicates that the finding was present and matched the + * filter at the start of compare_duration, but did not match + * the filter at read_time. + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all findings present + * at read_time. + * If this field is set then `state_change` must be a specified field in + * `group_by`. + * + * Generated from protobuf field .google.protobuf.Duration compare_duration = 5; + * @return \Google\Protobuf\Duration|null + */ + public function getCompareDuration() + { + return $this->compare_duration; + } + + public function hasCompareDuration() + { + return isset($this->compare_duration); + } + + public function clearCompareDuration() + { + unset($this->compare_duration); + } + + /** + * When compare_duration is set, the GroupResult's "state_change" attribute is + * updated to indicate whether the finding had its state changed, the + * finding's state remained unchanged, or if the finding was added during the + * compare_duration period of time that precedes the read_time. This is the + * time between (read_time - compare_duration) and read_time. + * The state_change value is derived based on the presence and state of the + * finding at the two points in time. Intermediate state changes between the + * two times don't affect the result. For example, the results aren't affected + * if the finding is made inactive and then active again. + * Possible "state_change" values when compare_duration is specified: + * * "CHANGED": indicates that the finding was present and matched the given + * filter at the start of compare_duration, but changed its + * state at read_time. + * * "UNCHANGED": indicates that the finding was present and matched the given + * filter at the start of compare_duration and did not change + * state at read_time. + * * "ADDED": indicates that the finding did not match the given filter or + * was not present at the start of compare_duration, but was + * present at read_time. + * * "REMOVED": indicates that the finding was present and matched the + * filter at the start of compare_duration, but did not match + * the filter at read_time. + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all findings present + * at read_time. + * If this field is set then `state_change` must be a specified field in + * `group_by`. + * + * Generated from protobuf field .google.protobuf.Duration compare_duration = 5; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setCompareDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->compare_duration = $var; + + return $this; + } + + /** + * The value returned by the last `GroupFindingsResponse`; indicates + * that this is a continuation of a prior `GroupFindings` call, and + * that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 7; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The value returned by the last `GroupFindingsResponse`; indicates + * that this is a continuation of a prior `GroupFindings` call, and + * that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 7; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. + * + * Generated from protobuf field int32 page_size = 8; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. + * + * Generated from protobuf field int32 page_size = 8; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GroupFindingsResponse.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GroupFindingsResponse.php new file mode 100644 index 000000000000..fdda76699257 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GroupFindingsResponse.php @@ -0,0 +1,191 @@ +google.cloud.securitycenter.v1.GroupFindingsResponse + */ +class GroupFindingsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Group results. There exists an element for each existing unique + * combination of property/values. The element contains a count for the number + * of times those specific property/values appear. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; + */ + private $group_by_results; + /** + * Time used for executing the groupBy request. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 2; + */ + protected $read_time = null; + /** + * Token to retrieve the next page of results, or empty if there are no more + * results. + * + * Generated from protobuf field string next_page_token = 3; + */ + protected $next_page_token = ''; + /** + * The total number of results matching the query. + * + * Generated from protobuf field int32 total_size = 4; + */ + protected $total_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\SecurityCenter\V1\GroupResult>|\Google\Protobuf\Internal\RepeatedField $group_by_results + * Group results. There exists an element for each existing unique + * combination of property/values. The element contains a count for the number + * of times those specific property/values appear. + * @type \Google\Protobuf\Timestamp $read_time + * Time used for executing the groupBy request. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no more + * results. + * @type int $total_size + * The total number of results matching the query. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Group results. There exists an element for each existing unique + * combination of property/values. The element contains a count for the number + * of times those specific property/values appear. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getGroupByResults() + { + return $this->group_by_results; + } + + /** + * Group results. There exists an element for each existing unique + * combination of property/values. The element contains a count for the number + * of times those specific property/values appear. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; + * @param array<\Google\Cloud\SecurityCenter\V1\GroupResult>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setGroupByResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\GroupResult::class); + $this->group_by_results = $arr; + + return $this; + } + + /** + * Time used for executing the groupBy request. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->read_time; + } + + public function hasReadTime() + { + return isset($this->read_time); + } + + public function clearReadTime() + { + unset($this->read_time); + } + + /** + * Time used for executing the groupBy request. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->read_time = $var; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results. + * + * Generated from protobuf field string next_page_token = 3; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results. + * + * Generated from protobuf field string next_page_token = 3; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * The total number of results matching the query. + * + * Generated from protobuf field int32 total_size = 4; + * @return int + */ + public function getTotalSize() + { + return $this->total_size; + } + + /** + * The total number of results matching the query. + * + * Generated from protobuf field int32 total_size = 4; + * @param int $var + * @return $this + */ + public function setTotalSize($var) + { + GPBUtil::checkInt32($var); + $this->total_size = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GroupResult.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GroupResult.php new file mode 100644 index 000000000000..a4e254e07323 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GroupResult.php @@ -0,0 +1,101 @@ +google.cloud.securitycenter.v1.GroupResult + */ +class GroupResult extends \Google\Protobuf\Internal\Message +{ + /** + * Properties matching the groupBy fields in the request. + * + * Generated from protobuf field map properties = 1; + */ + private $properties; + /** + * Total count of resources for the given properties. + * + * Generated from protobuf field int64 count = 2; + */ + protected $count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\MapField $properties + * Properties matching the groupBy fields in the request. + * @type int|string $count + * Total count of resources for the given properties. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Properties matching the groupBy fields in the request. + * + * Generated from protobuf field map properties = 1; + * @return \Google\Protobuf\Internal\MapField + */ + public function getProperties() + { + return $this->properties; + } + + /** + * Properties matching the groupBy fields in the request. + * + * Generated from protobuf field map properties = 1; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setProperties($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Value::class); + $this->properties = $arr; + + return $this; + } + + /** + * Total count of resources for the given properties. + * + * Generated from protobuf field int64 count = 2; + * @return int|string + */ + public function getCount() + { + return $this->count; + } + + /** + * Total count of resources for the given properties. + * + * Generated from protobuf field int64 count = 2; + * @param int|string $var + * @return $this + */ + public function setCount($var) + { + GPBUtil::checkInt64($var); + $this->count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/IamBinding.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/IamBinding.php new file mode 100644 index 000000000000..46549c7e00f2 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/IamBinding.php @@ -0,0 +1,144 @@ +google.cloud.securitycenter.v1.IamBinding + */ +class IamBinding extends \Google\Protobuf\Internal\Message +{ + /** + * The action that was performed on a Binding. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.IamBinding.Action action = 1; + */ + protected $action = 0; + /** + * Role that is assigned to "members". + * For example, "roles/viewer", "roles/editor", or "roles/owner". + * + * Generated from protobuf field string role = 2; + */ + protected $role = ''; + /** + * A single identity requesting access for a Cloud Platform resource, + * e.g. "foo@google.com". + * + * Generated from protobuf field string member = 3; + */ + protected $member = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $action + * The action that was performed on a Binding. + * @type string $role + * Role that is assigned to "members". + * For example, "roles/viewer", "roles/editor", or "roles/owner". + * @type string $member + * A single identity requesting access for a Cloud Platform resource, + * e.g. "foo@google.com". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\IamBinding::initOnce(); + parent::__construct($data); + } + + /** + * The action that was performed on a Binding. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.IamBinding.Action action = 1; + * @return int + */ + public function getAction() + { + return $this->action; + } + + /** + * The action that was performed on a Binding. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.IamBinding.Action action = 1; + * @param int $var + * @return $this + */ + public function setAction($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1\IamBinding\Action::class); + $this->action = $var; + + return $this; + } + + /** + * Role that is assigned to "members". + * For example, "roles/viewer", "roles/editor", or "roles/owner". + * + * Generated from protobuf field string role = 2; + * @return string + */ + public function getRole() + { + return $this->role; + } + + /** + * Role that is assigned to "members". + * For example, "roles/viewer", "roles/editor", or "roles/owner". + * + * Generated from protobuf field string role = 2; + * @param string $var + * @return $this + */ + public function setRole($var) + { + GPBUtil::checkString($var, True); + $this->role = $var; + + return $this; + } + + /** + * A single identity requesting access for a Cloud Platform resource, + * e.g. "foo@google.com". + * + * Generated from protobuf field string member = 3; + * @return string + */ + public function getMember() + { + return $this->member; + } + + /** + * A single identity requesting access for a Cloud Platform resource, + * e.g. "foo@google.com". + * + * Generated from protobuf field string member = 3; + * @param string $var + * @return $this + */ + public function setMember($var) + { + GPBUtil::checkString($var, True); + $this->member = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/IamBinding/Action.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/IamBinding/Action.php new file mode 100644 index 000000000000..f846cd97254a --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/IamBinding/Action.php @@ -0,0 +1,64 @@ +google.cloud.securitycenter.v1.IamBinding.Action + */ +class Action +{ + /** + * Unspecified. + * + * Generated from protobuf enum ACTION_UNSPECIFIED = 0; + */ + const ACTION_UNSPECIFIED = 0; + /** + * Addition of a Binding. + * + * Generated from protobuf enum ADD = 1; + */ + const ADD = 1; + /** + * Removal of a Binding. + * + * Generated from protobuf enum REMOVE = 2; + */ + const REMOVE = 2; + + private static $valueToName = [ + self::ACTION_UNSPECIFIED => 'ACTION_UNSPECIFIED', + self::ADD => 'ADD', + self::REMOVE => 'REMOVE', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Action::class, \Google\Cloud\SecurityCenter\V1\IamBinding_Action::class); + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/IamBinding_Action.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/IamBinding_Action.php new file mode 100644 index 000000000000..711cccfaebb3 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/IamBinding_Action.php @@ -0,0 +1,16 @@ +google.cloud.securitycenter.v1.Indicator + */ +class Indicator extends \Google\Protobuf\Internal\Message +{ + /** + * List of ip addresses associated to the Finding. + * + * Generated from protobuf field repeated string ip_addresses = 1; + */ + private $ip_addresses; + /** + * List of domains associated to the Finding. + * + * Generated from protobuf field repeated string domains = 2; + */ + private $domains; + /** + * The list of matched signatures indicating that the given + * process is present in the environment. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature signatures = 3; + */ + private $signatures; + /** + * The list of URIs associated to the Findings. + * + * Generated from protobuf field repeated string uris = 4; + */ + private $uris; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $ip_addresses + * List of ip addresses associated to the Finding. + * @type array|\Google\Protobuf\Internal\RepeatedField $domains + * List of domains associated to the Finding. + * @type array<\Google\Cloud\SecurityCenter\V1\Indicator\ProcessSignature>|\Google\Protobuf\Internal\RepeatedField $signatures + * The list of matched signatures indicating that the given + * process is present in the environment. + * @type array|\Google\Protobuf\Internal\RepeatedField $uris + * The list of URIs associated to the Findings. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\Indicator::initOnce(); + parent::__construct($data); + } + + /** + * List of ip addresses associated to the Finding. + * + * Generated from protobuf field repeated string ip_addresses = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIpAddresses() + { + return $this->ip_addresses; + } + + /** + * List of ip addresses associated to the Finding. + * + * Generated from protobuf field repeated string ip_addresses = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIpAddresses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->ip_addresses = $arr; + + return $this; + } + + /** + * List of domains associated to the Finding. + * + * Generated from protobuf field repeated string domains = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDomains() + { + return $this->domains; + } + + /** + * List of domains associated to the Finding. + * + * Generated from protobuf field repeated string domains = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDomains($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->domains = $arr; + + return $this; + } + + /** + * The list of matched signatures indicating that the given + * process is present in the environment. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature signatures = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSignatures() + { + return $this->signatures; + } + + /** + * The list of matched signatures indicating that the given + * process is present in the environment. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature signatures = 3; + * @param array<\Google\Cloud\SecurityCenter\V1\Indicator\ProcessSignature>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSignatures($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\Indicator\ProcessSignature::class); + $this->signatures = $arr; + + return $this; + } + + /** + * The list of URIs associated to the Findings. + * + * Generated from protobuf field repeated string uris = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUris() + { + return $this->uris; + } + + /** + * The list of URIs associated to the Findings. + * + * Generated from protobuf field repeated string uris = 4; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUris($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->uris = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Indicator/ProcessSignature.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Indicator/ProcessSignature.php new file mode 100644 index 000000000000..ebf591a8cffa --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Indicator/ProcessSignature.php @@ -0,0 +1,111 @@ +google.cloud.securitycenter.v1.Indicator.ProcessSignature + */ +class ProcessSignature extends \Google\Protobuf\Internal\Message +{ + protected $signature; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\SecurityCenter\V1\Indicator\ProcessSignature\MemoryHashSignature $memory_hash_signature + * Signature indicating that a binary family was matched. + * @type \Google\Cloud\SecurityCenter\V1\Indicator\ProcessSignature\YaraRuleSignature $yara_rule_signature + * Signature indicating that a YARA rule was matched. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\Indicator::initOnce(); + parent::__construct($data); + } + + /** + * Signature indicating that a binary family was matched. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature memory_hash_signature = 6; + * @return \Google\Cloud\SecurityCenter\V1\Indicator\ProcessSignature\MemoryHashSignature|null + */ + public function getMemoryHashSignature() + { + return $this->readOneof(6); + } + + public function hasMemoryHashSignature() + { + return $this->hasOneof(6); + } + + /** + * Signature indicating that a binary family was matched. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature memory_hash_signature = 6; + * @param \Google\Cloud\SecurityCenter\V1\Indicator\ProcessSignature\MemoryHashSignature $var + * @return $this + */ + public function setMemoryHashSignature($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\Indicator\ProcessSignature\MemoryHashSignature::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Signature indicating that a YARA rule was matched. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature yara_rule_signature = 7; + * @return \Google\Cloud\SecurityCenter\V1\Indicator\ProcessSignature\YaraRuleSignature|null + */ + public function getYaraRuleSignature() + { + return $this->readOneof(7); + } + + public function hasYaraRuleSignature() + { + return $this->hasOneof(7); + } + + /** + * Signature indicating that a YARA rule was matched. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature yara_rule_signature = 7; + * @param \Google\Cloud\SecurityCenter\V1\Indicator\ProcessSignature\YaraRuleSignature $var + * @return $this + */ + public function setYaraRuleSignature($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\Indicator\ProcessSignature\YaraRuleSignature::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * @return string + */ + public function getSignature() + { + return $this->whichOneof("signature"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ProcessSignature::class, \Google\Cloud\SecurityCenter\V1\Indicator_ProcessSignature::class); + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Indicator/ProcessSignature/MemoryHashSignature.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Indicator/ProcessSignature/MemoryHashSignature.php new file mode 100644 index 000000000000..11476d5b7ad9 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Indicator/ProcessSignature/MemoryHashSignature.php @@ -0,0 +1,108 @@ +google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + */ +class MemoryHashSignature extends \Google\Protobuf\Internal\Message +{ + /** + * The binary family. + * + * Generated from protobuf field string binary_family = 1; + */ + protected $binary_family = ''; + /** + * The list of memory hash detections contributing to the binary family + * match. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; + */ + private $detections; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $binary_family + * The binary family. + * @type array<\Google\Cloud\SecurityCenter\V1\Indicator\ProcessSignature\MemoryHashSignature\Detection>|\Google\Protobuf\Internal\RepeatedField $detections + * The list of memory hash detections contributing to the binary family + * match. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\Indicator::initOnce(); + parent::__construct($data); + } + + /** + * The binary family. + * + * Generated from protobuf field string binary_family = 1; + * @return string + */ + public function getBinaryFamily() + { + return $this->binary_family; + } + + /** + * The binary family. + * + * Generated from protobuf field string binary_family = 1; + * @param string $var + * @return $this + */ + public function setBinaryFamily($var) + { + GPBUtil::checkString($var, True); + $this->binary_family = $var; + + return $this; + } + + /** + * The list of memory hash detections contributing to the binary family + * match. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDetections() + { + return $this->detections; + } + + /** + * The list of memory hash detections contributing to the binary family + * match. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; + * @param array<\Google\Cloud\SecurityCenter\V1\Indicator\ProcessSignature\MemoryHashSignature\Detection>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDetections($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\Indicator\ProcessSignature\MemoryHashSignature\Detection::class); + $this->detections = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(MemoryHashSignature::class, \Google\Cloud\SecurityCenter\V1\Indicator_ProcessSignature_MemoryHashSignature::class); + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Indicator/ProcessSignature/MemoryHashSignature/Detection.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Indicator/ProcessSignature/MemoryHashSignature/Detection.php new file mode 100644 index 000000000000..5ffcc1036014 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Indicator/ProcessSignature/MemoryHashSignature/Detection.php @@ -0,0 +1,112 @@ +google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection + */ +class Detection extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the binary associated with the memory hash + * signature detection. + * + * Generated from protobuf field string binary = 2; + */ + protected $binary = ''; + /** + * The percentage of memory page hashes in the signature + * that were matched. + * + * Generated from protobuf field double percent_pages_matched = 3; + */ + protected $percent_pages_matched = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $binary + * The name of the binary associated with the memory hash + * signature detection. + * @type float $percent_pages_matched + * The percentage of memory page hashes in the signature + * that were matched. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\Indicator::initOnce(); + parent::__construct($data); + } + + /** + * The name of the binary associated with the memory hash + * signature detection. + * + * Generated from protobuf field string binary = 2; + * @return string + */ + public function getBinary() + { + return $this->binary; + } + + /** + * The name of the binary associated with the memory hash + * signature detection. + * + * Generated from protobuf field string binary = 2; + * @param string $var + * @return $this + */ + public function setBinary($var) + { + GPBUtil::checkString($var, True); + $this->binary = $var; + + return $this; + } + + /** + * The percentage of memory page hashes in the signature + * that were matched. + * + * Generated from protobuf field double percent_pages_matched = 3; + * @return float + */ + public function getPercentPagesMatched() + { + return $this->percent_pages_matched; + } + + /** + * The percentage of memory page hashes in the signature + * that were matched. + * + * Generated from protobuf field double percent_pages_matched = 3; + * @param float $var + * @return $this + */ + public function setPercentPagesMatched($var) + { + GPBUtil::checkDouble($var); + $this->percent_pages_matched = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Detection::class, \Google\Cloud\SecurityCenter\V1\Indicator_ProcessSignature_MemoryHashSignature_Detection::class); + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Indicator/ProcessSignature/YaraRuleSignature.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Indicator/ProcessSignature/YaraRuleSignature.php new file mode 100644 index 000000000000..2b26a610f499 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Indicator/ProcessSignature/YaraRuleSignature.php @@ -0,0 +1,70 @@ +google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature + */ +class YaraRuleSignature extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the YARA rule. + * + * Generated from protobuf field string yara_rule = 5; + */ + protected $yara_rule = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $yara_rule + * The name of the YARA rule. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\Indicator::initOnce(); + parent::__construct($data); + } + + /** + * The name of the YARA rule. + * + * Generated from protobuf field string yara_rule = 5; + * @return string + */ + public function getYaraRule() + { + return $this->yara_rule; + } + + /** + * The name of the YARA rule. + * + * Generated from protobuf field string yara_rule = 5; + * @param string $var + * @return $this + */ + public function setYaraRule($var) + { + GPBUtil::checkString($var, True); + $this->yara_rule = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(YaraRuleSignature::class, \Google\Cloud\SecurityCenter\V1\Indicator_ProcessSignature_YaraRuleSignature::class); + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Indicator_ProcessSignature.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Indicator_ProcessSignature.php new file mode 100644 index 000000000000..1eaac4fd6698 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Indicator_ProcessSignature.php @@ -0,0 +1,16 @@ +google.cloud.securitycenter.v1.KernelRootkit + */ +class KernelRootkit extends \Google\Protobuf\Internal\Message +{ + /** + * Rootkit name when available. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * True if unexpected modifications of kernel code memory are present. + * + * Generated from protobuf field bool unexpected_code_modification = 2; + */ + protected $unexpected_code_modification = false; + /** + * True if unexpected modifications of kernel read-only data memory are + * present. + * + * Generated from protobuf field bool unexpected_read_only_data_modification = 3; + */ + protected $unexpected_read_only_data_modification = false; + /** + * True if `ftrace` points are present with callbacks pointing to regions + * that are not in the expected kernel or module code range. + * + * Generated from protobuf field bool unexpected_ftrace_handler = 4; + */ + protected $unexpected_ftrace_handler = false; + /** + * True if `kprobe` points are present with callbacks pointing to regions + * that are not in the expected kernel or module code range. + * + * Generated from protobuf field bool unexpected_kprobe_handler = 5; + */ + protected $unexpected_kprobe_handler = false; + /** + * True if kernel code pages that are not in the expected kernel or module + * code regions are present. + * + * Generated from protobuf field bool unexpected_kernel_code_pages = 6; + */ + protected $unexpected_kernel_code_pages = false; + /** + * True if system call handlers that are are not in the expected kernel or + * module code regions are present. + * + * Generated from protobuf field bool unexpected_system_call_handler = 7; + */ + protected $unexpected_system_call_handler = false; + /** + * True if interrupt handlers that are are not in the expected kernel or + * module code regions are present. + * + * Generated from protobuf field bool unexpected_interrupt_handler = 8; + */ + protected $unexpected_interrupt_handler = false; + /** + * True if unexpected processes in the scheduler run queue are present. Such + * processes are in the run queue, but not in the process task list. + * + * Generated from protobuf field bool unexpected_processes_in_runqueue = 9; + */ + protected $unexpected_processes_in_runqueue = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Rootkit name when available. + * @type bool $unexpected_code_modification + * True if unexpected modifications of kernel code memory are present. + * @type bool $unexpected_read_only_data_modification + * True if unexpected modifications of kernel read-only data memory are + * present. + * @type bool $unexpected_ftrace_handler + * True if `ftrace` points are present with callbacks pointing to regions + * that are not in the expected kernel or module code range. + * @type bool $unexpected_kprobe_handler + * True if `kprobe` points are present with callbacks pointing to regions + * that are not in the expected kernel or module code range. + * @type bool $unexpected_kernel_code_pages + * True if kernel code pages that are not in the expected kernel or module + * code regions are present. + * @type bool $unexpected_system_call_handler + * True if system call handlers that are are not in the expected kernel or + * module code regions are present. + * @type bool $unexpected_interrupt_handler + * True if interrupt handlers that are are not in the expected kernel or + * module code regions are present. + * @type bool $unexpected_processes_in_runqueue + * True if unexpected processes in the scheduler run queue are present. Such + * processes are in the run queue, but not in the process task list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\KernelRootkit::initOnce(); + parent::__construct($data); + } + + /** + * Rootkit name when available. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Rootkit name when available. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * True if unexpected modifications of kernel code memory are present. + * + * Generated from protobuf field bool unexpected_code_modification = 2; + * @return bool + */ + public function getUnexpectedCodeModification() + { + return $this->unexpected_code_modification; + } + + /** + * True if unexpected modifications of kernel code memory are present. + * + * Generated from protobuf field bool unexpected_code_modification = 2; + * @param bool $var + * @return $this + */ + public function setUnexpectedCodeModification($var) + { + GPBUtil::checkBool($var); + $this->unexpected_code_modification = $var; + + return $this; + } + + /** + * True if unexpected modifications of kernel read-only data memory are + * present. + * + * Generated from protobuf field bool unexpected_read_only_data_modification = 3; + * @return bool + */ + public function getUnexpectedReadOnlyDataModification() + { + return $this->unexpected_read_only_data_modification; + } + + /** + * True if unexpected modifications of kernel read-only data memory are + * present. + * + * Generated from protobuf field bool unexpected_read_only_data_modification = 3; + * @param bool $var + * @return $this + */ + public function setUnexpectedReadOnlyDataModification($var) + { + GPBUtil::checkBool($var); + $this->unexpected_read_only_data_modification = $var; + + return $this; + } + + /** + * True if `ftrace` points are present with callbacks pointing to regions + * that are not in the expected kernel or module code range. + * + * Generated from protobuf field bool unexpected_ftrace_handler = 4; + * @return bool + */ + public function getUnexpectedFtraceHandler() + { + return $this->unexpected_ftrace_handler; + } + + /** + * True if `ftrace` points are present with callbacks pointing to regions + * that are not in the expected kernel or module code range. + * + * Generated from protobuf field bool unexpected_ftrace_handler = 4; + * @param bool $var + * @return $this + */ + public function setUnexpectedFtraceHandler($var) + { + GPBUtil::checkBool($var); + $this->unexpected_ftrace_handler = $var; + + return $this; + } + + /** + * True if `kprobe` points are present with callbacks pointing to regions + * that are not in the expected kernel or module code range. + * + * Generated from protobuf field bool unexpected_kprobe_handler = 5; + * @return bool + */ + public function getUnexpectedKprobeHandler() + { + return $this->unexpected_kprobe_handler; + } + + /** + * True if `kprobe` points are present with callbacks pointing to regions + * that are not in the expected kernel or module code range. + * + * Generated from protobuf field bool unexpected_kprobe_handler = 5; + * @param bool $var + * @return $this + */ + public function setUnexpectedKprobeHandler($var) + { + GPBUtil::checkBool($var); + $this->unexpected_kprobe_handler = $var; + + return $this; + } + + /** + * True if kernel code pages that are not in the expected kernel or module + * code regions are present. + * + * Generated from protobuf field bool unexpected_kernel_code_pages = 6; + * @return bool + */ + public function getUnexpectedKernelCodePages() + { + return $this->unexpected_kernel_code_pages; + } + + /** + * True if kernel code pages that are not in the expected kernel or module + * code regions are present. + * + * Generated from protobuf field bool unexpected_kernel_code_pages = 6; + * @param bool $var + * @return $this + */ + public function setUnexpectedKernelCodePages($var) + { + GPBUtil::checkBool($var); + $this->unexpected_kernel_code_pages = $var; + + return $this; + } + + /** + * True if system call handlers that are are not in the expected kernel or + * module code regions are present. + * + * Generated from protobuf field bool unexpected_system_call_handler = 7; + * @return bool + */ + public function getUnexpectedSystemCallHandler() + { + return $this->unexpected_system_call_handler; + } + + /** + * True if system call handlers that are are not in the expected kernel or + * module code regions are present. + * + * Generated from protobuf field bool unexpected_system_call_handler = 7; + * @param bool $var + * @return $this + */ + public function setUnexpectedSystemCallHandler($var) + { + GPBUtil::checkBool($var); + $this->unexpected_system_call_handler = $var; + + return $this; + } + + /** + * True if interrupt handlers that are are not in the expected kernel or + * module code regions are present. + * + * Generated from protobuf field bool unexpected_interrupt_handler = 8; + * @return bool + */ + public function getUnexpectedInterruptHandler() + { + return $this->unexpected_interrupt_handler; + } + + /** + * True if interrupt handlers that are are not in the expected kernel or + * module code regions are present. + * + * Generated from protobuf field bool unexpected_interrupt_handler = 8; + * @param bool $var + * @return $this + */ + public function setUnexpectedInterruptHandler($var) + { + GPBUtil::checkBool($var); + $this->unexpected_interrupt_handler = $var; + + return $this; + } + + /** + * True if unexpected processes in the scheduler run queue are present. Such + * processes are in the run queue, but not in the process task list. + * + * Generated from protobuf field bool unexpected_processes_in_runqueue = 9; + * @return bool + */ + public function getUnexpectedProcessesInRunqueue() + { + return $this->unexpected_processes_in_runqueue; + } + + /** + * True if unexpected processes in the scheduler run queue are present. Such + * processes are in the run queue, but not in the process task list. + * + * Generated from protobuf field bool unexpected_processes_in_runqueue = 9; + * @param bool $var + * @return $this + */ + public function setUnexpectedProcessesInRunqueue($var) + { + GPBUtil::checkBool($var); + $this->unexpected_processes_in_runqueue = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes.php new file mode 100644 index 000000000000..e431f2818c65 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes.php @@ -0,0 +1,257 @@ +google.cloud.securitycenter.v1.Kubernetes + */ +class Kubernetes extends \Google\Protobuf\Internal\Message +{ + /** + * Kubernetes Pods associated with the finding. This field will contain Pod + * records for each container that is owned by a Pod. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Kubernetes.Pod pods = 1; + */ + private $pods; + /** + * Provides Kubernetes Node information. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; + */ + private $nodes; + /** + * GKE Node Pools associated with the finding. This field will + * contain NodePool information for each Node, when it is available. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Kubernetes.NodePool node_pools = 3; + */ + private $node_pools; + /** + * Provides Kubernetes role information for findings that involve + * Roles or ClusterRoles. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Kubernetes.Role roles = 4; + */ + private $roles; + /** + * Provides Kubernetes role binding information for findings that involve + * RoleBindings or ClusterRoleBindings. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Kubernetes.Binding bindings = 5; + */ + private $bindings; + /** + * Provides information on any Kubernetes access reviews (i.e. privilege + * checks) relevant to the finding. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Kubernetes.AccessReview access_reviews = 6; + */ + private $access_reviews; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\SecurityCenter\V1\Kubernetes\Pod>|\Google\Protobuf\Internal\RepeatedField $pods + * Kubernetes Pods associated with the finding. This field will contain Pod + * records for each container that is owned by a Pod. + * @type array<\Google\Cloud\SecurityCenter\V1\Kubernetes\Node>|\Google\Protobuf\Internal\RepeatedField $nodes + * Provides Kubernetes Node information. + * @type array<\Google\Cloud\SecurityCenter\V1\Kubernetes\NodePool>|\Google\Protobuf\Internal\RepeatedField $node_pools + * GKE Node Pools associated with the finding. This field will + * contain NodePool information for each Node, when it is available. + * @type array<\Google\Cloud\SecurityCenter\V1\Kubernetes\Role>|\Google\Protobuf\Internal\RepeatedField $roles + * Provides Kubernetes role information for findings that involve + * Roles or ClusterRoles. + * @type array<\Google\Cloud\SecurityCenter\V1\Kubernetes\Binding>|\Google\Protobuf\Internal\RepeatedField $bindings + * Provides Kubernetes role binding information for findings that involve + * RoleBindings or ClusterRoleBindings. + * @type array<\Google\Cloud\SecurityCenter\V1\Kubernetes\AccessReview>|\Google\Protobuf\Internal\RepeatedField $access_reviews + * Provides information on any Kubernetes access reviews (i.e. privilege + * checks) relevant to the finding. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\Kubernetes::initOnce(); + parent::__construct($data); + } + + /** + * Kubernetes Pods associated with the finding. This field will contain Pod + * records for each container that is owned by a Pod. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Kubernetes.Pod pods = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPods() + { + return $this->pods; + } + + /** + * Kubernetes Pods associated with the finding. This field will contain Pod + * records for each container that is owned by a Pod. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Kubernetes.Pod pods = 1; + * @param array<\Google\Cloud\SecurityCenter\V1\Kubernetes\Pod>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPods($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\Kubernetes\Pod::class); + $this->pods = $arr; + + return $this; + } + + /** + * Provides Kubernetes Node information. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNodes() + { + return $this->nodes; + } + + /** + * Provides Kubernetes Node information. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; + * @param array<\Google\Cloud\SecurityCenter\V1\Kubernetes\Node>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNodes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\Kubernetes\Node::class); + $this->nodes = $arr; + + return $this; + } + + /** + * GKE Node Pools associated with the finding. This field will + * contain NodePool information for each Node, when it is available. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Kubernetes.NodePool node_pools = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNodePools() + { + return $this->node_pools; + } + + /** + * GKE Node Pools associated with the finding. This field will + * contain NodePool information for each Node, when it is available. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Kubernetes.NodePool node_pools = 3; + * @param array<\Google\Cloud\SecurityCenter\V1\Kubernetes\NodePool>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNodePools($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\Kubernetes\NodePool::class); + $this->node_pools = $arr; + + return $this; + } + + /** + * Provides Kubernetes role information for findings that involve + * Roles or ClusterRoles. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Kubernetes.Role roles = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRoles() + { + return $this->roles; + } + + /** + * Provides Kubernetes role information for findings that involve + * Roles or ClusterRoles. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Kubernetes.Role roles = 4; + * @param array<\Google\Cloud\SecurityCenter\V1\Kubernetes\Role>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRoles($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\Kubernetes\Role::class); + $this->roles = $arr; + + return $this; + } + + /** + * Provides Kubernetes role binding information for findings that involve + * RoleBindings or ClusterRoleBindings. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Kubernetes.Binding bindings = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getBindings() + { + return $this->bindings; + } + + /** + * Provides Kubernetes role binding information for findings that involve + * RoleBindings or ClusterRoleBindings. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Kubernetes.Binding bindings = 5; + * @param array<\Google\Cloud\SecurityCenter\V1\Kubernetes\Binding>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setBindings($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\Kubernetes\Binding::class); + $this->bindings = $arr; + + return $this; + } + + /** + * Provides information on any Kubernetes access reviews (i.e. privilege + * checks) relevant to the finding. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Kubernetes.AccessReview access_reviews = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAccessReviews() + { + return $this->access_reviews; + } + + /** + * Provides information on any Kubernetes access reviews (i.e. privilege + * checks) relevant to the finding. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Kubernetes.AccessReview access_reviews = 6; + * @param array<\Google\Cloud\SecurityCenter\V1\Kubernetes\AccessReview>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAccessReviews($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\Kubernetes\AccessReview::class); + $this->access_reviews = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/AccessReview.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/AccessReview.php new file mode 100644 index 000000000000..cee5c614be6b --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/AccessReview.php @@ -0,0 +1,287 @@ +google.cloud.securitycenter.v1.Kubernetes.AccessReview + */ +class AccessReview extends \Google\Protobuf\Internal\Message +{ + /** + * Group is the API Group of the Resource. "*" means all. + * + * Generated from protobuf field string group = 1; + */ + protected $group = ''; + /** + * Namespace of the action being requested. Currently, there is no + * distinction between no namespace and all namespaces. Both + * are represented by "" (empty). + * + * Generated from protobuf field string ns = 2; + */ + protected $ns = ''; + /** + * Name is the name of the resource being requested. Empty means all. + * + * Generated from protobuf field string name = 3; + */ + protected $name = ''; + /** + * Resource is the optional resource type requested. "*" means all. + * + * Generated from protobuf field string resource = 4; + */ + protected $resource = ''; + /** + * Subresource is the optional subresource type. + * + * Generated from protobuf field string subresource = 5; + */ + protected $subresource = ''; + /** + * Verb is a Kubernetes resource API verb, like: get, list, watch, create, + * update, delete, proxy. "*" means all. + * + * Generated from protobuf field string verb = 6; + */ + protected $verb = ''; + /** + * Version is the API Version of the Resource. "*" means all. + * + * Generated from protobuf field string version = 7; + */ + protected $version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $group + * Group is the API Group of the Resource. "*" means all. + * @type string $ns + * Namespace of the action being requested. Currently, there is no + * distinction between no namespace and all namespaces. Both + * are represented by "" (empty). + * @type string $name + * Name is the name of the resource being requested. Empty means all. + * @type string $resource + * Resource is the optional resource type requested. "*" means all. + * @type string $subresource + * Subresource is the optional subresource type. + * @type string $verb + * Verb is a Kubernetes resource API verb, like: get, list, watch, create, + * update, delete, proxy. "*" means all. + * @type string $version + * Version is the API Version of the Resource. "*" means all. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\Kubernetes::initOnce(); + parent::__construct($data); + } + + /** + * Group is the API Group of the Resource. "*" means all. + * + * Generated from protobuf field string group = 1; + * @return string + */ + public function getGroup() + { + return $this->group; + } + + /** + * Group is the API Group of the Resource. "*" means all. + * + * Generated from protobuf field string group = 1; + * @param string $var + * @return $this + */ + public function setGroup($var) + { + GPBUtil::checkString($var, True); + $this->group = $var; + + return $this; + } + + /** + * Namespace of the action being requested. Currently, there is no + * distinction between no namespace and all namespaces. Both + * are represented by "" (empty). + * + * Generated from protobuf field string ns = 2; + * @return string + */ + public function getNs() + { + return $this->ns; + } + + /** + * Namespace of the action being requested. Currently, there is no + * distinction between no namespace and all namespaces. Both + * are represented by "" (empty). + * + * Generated from protobuf field string ns = 2; + * @param string $var + * @return $this + */ + public function setNs($var) + { + GPBUtil::checkString($var, True); + $this->ns = $var; + + return $this; + } + + /** + * Name is the name of the resource being requested. Empty means all. + * + * Generated from protobuf field string name = 3; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Name is the name of the resource being requested. Empty means all. + * + * Generated from protobuf field string name = 3; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Resource is the optional resource type requested. "*" means all. + * + * Generated from protobuf field string resource = 4; + * @return string + */ + public function getResource() + { + return $this->resource; + } + + /** + * Resource is the optional resource type requested. "*" means all. + * + * Generated from protobuf field string resource = 4; + * @param string $var + * @return $this + */ + public function setResource($var) + { + GPBUtil::checkString($var, True); + $this->resource = $var; + + return $this; + } + + /** + * Subresource is the optional subresource type. + * + * Generated from protobuf field string subresource = 5; + * @return string + */ + public function getSubresource() + { + return $this->subresource; + } + + /** + * Subresource is the optional subresource type. + * + * Generated from protobuf field string subresource = 5; + * @param string $var + * @return $this + */ + public function setSubresource($var) + { + GPBUtil::checkString($var, True); + $this->subresource = $var; + + return $this; + } + + /** + * Verb is a Kubernetes resource API verb, like: get, list, watch, create, + * update, delete, proxy. "*" means all. + * + * Generated from protobuf field string verb = 6; + * @return string + */ + public function getVerb() + { + return $this->verb; + } + + /** + * Verb is a Kubernetes resource API verb, like: get, list, watch, create, + * update, delete, proxy. "*" means all. + * + * Generated from protobuf field string verb = 6; + * @param string $var + * @return $this + */ + public function setVerb($var) + { + GPBUtil::checkString($var, True); + $this->verb = $var; + + return $this; + } + + /** + * Version is the API Version of the Resource. "*" means all. + * + * Generated from protobuf field string version = 7; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Version is the API Version of the Resource. "*" means all. + * + * Generated from protobuf field string version = 7; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AccessReview::class, \Google\Cloud\SecurityCenter\V1\Kubernetes_AccessReview::class); + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/Binding.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/Binding.php new file mode 100644 index 000000000000..b49bad0bdc1f --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/Binding.php @@ -0,0 +1,186 @@ +google.cloud.securitycenter.v1.Kubernetes.Binding + */ +class Binding extends \Google\Protobuf\Internal\Message +{ + /** + * Namespace for binding. + * + * Generated from protobuf field string ns = 1; + */ + protected $ns = ''; + /** + * Name for binding. + * + * Generated from protobuf field string name = 2; + */ + protected $name = ''; + /** + * The Role or ClusterRole referenced by the binding. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Kubernetes.Role role = 3; + */ + protected $role = null; + /** + * Represents the subjects(s) bound to the role. Not always available + * for PATCH requests. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Kubernetes.Subject subjects = 4; + */ + private $subjects; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $ns + * Namespace for binding. + * @type string $name + * Name for binding. + * @type \Google\Cloud\SecurityCenter\V1\Kubernetes\Role $role + * The Role or ClusterRole referenced by the binding. + * @type array<\Google\Cloud\SecurityCenter\V1\Kubernetes\Subject>|\Google\Protobuf\Internal\RepeatedField $subjects + * Represents the subjects(s) bound to the role. Not always available + * for PATCH requests. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\Kubernetes::initOnce(); + parent::__construct($data); + } + + /** + * Namespace for binding. + * + * Generated from protobuf field string ns = 1; + * @return string + */ + public function getNs() + { + return $this->ns; + } + + /** + * Namespace for binding. + * + * Generated from protobuf field string ns = 1; + * @param string $var + * @return $this + */ + public function setNs($var) + { + GPBUtil::checkString($var, True); + $this->ns = $var; + + return $this; + } + + /** + * Name for binding. + * + * Generated from protobuf field string name = 2; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Name for binding. + * + * Generated from protobuf field string name = 2; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The Role or ClusterRole referenced by the binding. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Kubernetes.Role role = 3; + * @return \Google\Cloud\SecurityCenter\V1\Kubernetes\Role|null + */ + public function getRole() + { + return $this->role; + } + + public function hasRole() + { + return isset($this->role); + } + + public function clearRole() + { + unset($this->role); + } + + /** + * The Role or ClusterRole referenced by the binding. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Kubernetes.Role role = 3; + * @param \Google\Cloud\SecurityCenter\V1\Kubernetes\Role $var + * @return $this + */ + public function setRole($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\Kubernetes\Role::class); + $this->role = $var; + + return $this; + } + + /** + * Represents the subjects(s) bound to the role. Not always available + * for PATCH requests. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Kubernetes.Subject subjects = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSubjects() + { + return $this->subjects; + } + + /** + * Represents the subjects(s) bound to the role. Not always available + * for PATCH requests. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Kubernetes.Subject subjects = 4; + * @param array<\Google\Cloud\SecurityCenter\V1\Kubernetes\Subject>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSubjects($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\Kubernetes\Subject::class); + $this->subjects = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Binding::class, \Google\Cloud\SecurityCenter\V1\Kubernetes_Binding::class); + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/Node.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/Node.php new file mode 100644 index 000000000000..dff9526301ff --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/Node.php @@ -0,0 +1,74 @@ +google.cloud.securitycenter.v1.Kubernetes.Node + */ +class Node extends \Google\Protobuf\Internal\Message +{ + /** + * Full Resource name of the Compute Engine VM running the + * cluster node. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Full Resource name of the Compute Engine VM running the + * cluster node. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\Kubernetes::initOnce(); + parent::__construct($data); + } + + /** + * Full Resource name of the Compute Engine VM running the + * cluster node. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Full Resource name of the Compute Engine VM running the + * cluster node. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Node::class, \Google\Cloud\SecurityCenter\V1\Kubernetes_Node::class); + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/NodePool.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/NodePool.php new file mode 100644 index 000000000000..372c9bec0e82 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/NodePool.php @@ -0,0 +1,104 @@ +google.cloud.securitycenter.v1.Kubernetes.NodePool + */ +class NodePool extends \Google\Protobuf\Internal\Message +{ + /** + * Kubernetes Node pool name. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Nodes associated with the finding. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; + */ + private $nodes; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Kubernetes Node pool name. + * @type array<\Google\Cloud\SecurityCenter\V1\Kubernetes\Node>|\Google\Protobuf\Internal\RepeatedField $nodes + * Nodes associated with the finding. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\Kubernetes::initOnce(); + parent::__construct($data); + } + + /** + * Kubernetes Node pool name. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Kubernetes Node pool name. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Nodes associated with the finding. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNodes() + { + return $this->nodes; + } + + /** + * Nodes associated with the finding. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; + * @param array<\Google\Cloud\SecurityCenter\V1\Kubernetes\Node>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNodes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\Kubernetes\Node::class); + $this->nodes = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(NodePool::class, \Google\Cloud\SecurityCenter\V1\Kubernetes_NodePool::class); + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/Pod.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/Pod.php new file mode 100644 index 000000000000..0365bdd2a73f --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/Pod.php @@ -0,0 +1,176 @@ +google.cloud.securitycenter.v1.Kubernetes.Pod + */ +class Pod extends \Google\Protobuf\Internal\Message +{ + /** + * Kubernetes Pod namespace. + * + * Generated from protobuf field string ns = 1; + */ + protected $ns = ''; + /** + * Kubernetes Pod name. + * + * Generated from protobuf field string name = 2; + */ + protected $name = ''; + /** + * Pod labels. For Kubernetes containers, these are applied to the + * container. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Label labels = 3; + */ + private $labels; + /** + * Pod containers associated with this finding, if any. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Container containers = 4; + */ + private $containers; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $ns + * Kubernetes Pod namespace. + * @type string $name + * Kubernetes Pod name. + * @type array<\Google\Cloud\SecurityCenter\V1\Label>|\Google\Protobuf\Internal\RepeatedField $labels + * Pod labels. For Kubernetes containers, these are applied to the + * container. + * @type array<\Google\Cloud\SecurityCenter\V1\Container>|\Google\Protobuf\Internal\RepeatedField $containers + * Pod containers associated with this finding, if any. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\Kubernetes::initOnce(); + parent::__construct($data); + } + + /** + * Kubernetes Pod namespace. + * + * Generated from protobuf field string ns = 1; + * @return string + */ + public function getNs() + { + return $this->ns; + } + + /** + * Kubernetes Pod namespace. + * + * Generated from protobuf field string ns = 1; + * @param string $var + * @return $this + */ + public function setNs($var) + { + GPBUtil::checkString($var, True); + $this->ns = $var; + + return $this; + } + + /** + * Kubernetes Pod name. + * + * Generated from protobuf field string name = 2; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Kubernetes Pod name. + * + * Generated from protobuf field string name = 2; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Pod labels. For Kubernetes containers, these are applied to the + * container. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Label labels = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Pod labels. For Kubernetes containers, these are applied to the + * container. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Label labels = 3; + * @param array<\Google\Cloud\SecurityCenter\V1\Label>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\Label::class); + $this->labels = $arr; + + return $this; + } + + /** + * Pod containers associated with this finding, if any. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Container containers = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getContainers() + { + return $this->containers; + } + + /** + * Pod containers associated with this finding, if any. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Container containers = 4; + * @param array<\Google\Cloud\SecurityCenter\V1\Container>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setContainers($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\Container::class); + $this->containers = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Pod::class, \Google\Cloud\SecurityCenter\V1\Kubernetes_Pod::class); + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/Role.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/Role.php new file mode 100644 index 000000000000..87c452fbdc16 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/Role.php @@ -0,0 +1,138 @@ +google.cloud.securitycenter.v1.Kubernetes.Role + */ +class Role extends \Google\Protobuf\Internal\Message +{ + /** + * Role type. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Kubernetes.Role.Kind kind = 1; + */ + protected $kind = 0; + /** + * Role namespace. + * + * Generated from protobuf field string ns = 2; + */ + protected $ns = ''; + /** + * Role name. + * + * Generated from protobuf field string name = 3; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $kind + * Role type. + * @type string $ns + * Role namespace. + * @type string $name + * Role name. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\Kubernetes::initOnce(); + parent::__construct($data); + } + + /** + * Role type. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Kubernetes.Role.Kind kind = 1; + * @return int + */ + public function getKind() + { + return $this->kind; + } + + /** + * Role type. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Kubernetes.Role.Kind kind = 1; + * @param int $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1\Kubernetes\Role\Kind::class); + $this->kind = $var; + + return $this; + } + + /** + * Role namespace. + * + * Generated from protobuf field string ns = 2; + * @return string + */ + public function getNs() + { + return $this->ns; + } + + /** + * Role namespace. + * + * Generated from protobuf field string ns = 2; + * @param string $var + * @return $this + */ + public function setNs($var) + { + GPBUtil::checkString($var, True); + $this->ns = $var; + + return $this; + } + + /** + * Role name. + * + * Generated from protobuf field string name = 3; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Role name. + * + * Generated from protobuf field string name = 3; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Role::class, \Google\Cloud\SecurityCenter\V1\Kubernetes_Role::class); + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/Role/Kind.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/Role/Kind.php new file mode 100644 index 000000000000..36dd17cbb47b --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/Role/Kind.php @@ -0,0 +1,64 @@ +google.cloud.securitycenter.v1.Kubernetes.Role.Kind + */ +class Kind +{ + /** + * Role type is not specified. + * + * Generated from protobuf enum KIND_UNSPECIFIED = 0; + */ + const KIND_UNSPECIFIED = 0; + /** + * Kubernetes Role. + * + * Generated from protobuf enum ROLE = 1; + */ + const ROLE = 1; + /** + * Kubernetes ClusterRole. + * + * Generated from protobuf enum CLUSTER_ROLE = 2; + */ + const CLUSTER_ROLE = 2; + + private static $valueToName = [ + self::KIND_UNSPECIFIED => 'KIND_UNSPECIFIED', + self::ROLE => 'ROLE', + self::CLUSTER_ROLE => 'CLUSTER_ROLE', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Kind::class, \Google\Cloud\SecurityCenter\V1\Kubernetes_Role_Kind::class); + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/Subject.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/Subject.php new file mode 100644 index 000000000000..ce92c29e71db --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/Subject.php @@ -0,0 +1,138 @@ +google.cloud.securitycenter.v1.Kubernetes.Subject + */ +class Subject extends \Google\Protobuf\Internal\Message +{ + /** + * Authentication type for subject. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Kubernetes.Subject.AuthType kind = 1; + */ + protected $kind = 0; + /** + * Namespace for subject. + * + * Generated from protobuf field string ns = 2; + */ + protected $ns = ''; + /** + * Name for subject. + * + * Generated from protobuf field string name = 3; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $kind + * Authentication type for subject. + * @type string $ns + * Namespace for subject. + * @type string $name + * Name for subject. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\Kubernetes::initOnce(); + parent::__construct($data); + } + + /** + * Authentication type for subject. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Kubernetes.Subject.AuthType kind = 1; + * @return int + */ + public function getKind() + { + return $this->kind; + } + + /** + * Authentication type for subject. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Kubernetes.Subject.AuthType kind = 1; + * @param int $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1\Kubernetes\Subject\AuthType::class); + $this->kind = $var; + + return $this; + } + + /** + * Namespace for subject. + * + * Generated from protobuf field string ns = 2; + * @return string + */ + public function getNs() + { + return $this->ns; + } + + /** + * Namespace for subject. + * + * Generated from protobuf field string ns = 2; + * @param string $var + * @return $this + */ + public function setNs($var) + { + GPBUtil::checkString($var, True); + $this->ns = $var; + + return $this; + } + + /** + * Name for subject. + * + * Generated from protobuf field string name = 3; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Name for subject. + * + * Generated from protobuf field string name = 3; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Subject::class, \Google\Cloud\SecurityCenter\V1\Kubernetes_Subject::class); + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/Subject/AuthType.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/Subject/AuthType.php new file mode 100644 index 000000000000..b71d56232f57 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/Subject/AuthType.php @@ -0,0 +1,71 @@ +google.cloud.securitycenter.v1.Kubernetes.Subject.AuthType + */ +class AuthType +{ + /** + * Authentication is not specified. + * + * Generated from protobuf enum AUTH_TYPE_UNSPECIFIED = 0; + */ + const AUTH_TYPE_UNSPECIFIED = 0; + /** + * User with valid certificate. + * + * Generated from protobuf enum USER = 1; + */ + const USER = 1; + /** + * Users managed by Kubernetes API with credentials stored as Secrets. + * + * Generated from protobuf enum SERVICEACCOUNT = 2; + */ + const SERVICEACCOUNT = 2; + /** + * Collection of users. + * + * Generated from protobuf enum GROUP = 3; + */ + const GROUP = 3; + + private static $valueToName = [ + self::AUTH_TYPE_UNSPECIFIED => 'AUTH_TYPE_UNSPECIFIED', + self::USER => 'USER', + self::SERVICEACCOUNT => 'SERVICEACCOUNT', + self::GROUP => 'GROUP', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AuthType::class, \Google\Cloud\SecurityCenter\V1\Kubernetes_Subject_AuthType::class); + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes_AccessReview.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes_AccessReview.php new file mode 100644 index 000000000000..8a67ce2863ae --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes_AccessReview.php @@ -0,0 +1,16 @@ +google.cloud.securitycenter.v1.Label + */ +class Label extends \Google\Protobuf\Internal\Message +{ + /** + * Label name. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Label value. + * + * Generated from protobuf field string value = 2; + */ + protected $value = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Label name. + * @type string $value + * Label value. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\Label::initOnce(); + parent::__construct($data); + } + + /** + * Label name. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Label name. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Label value. + * + * Generated from protobuf field string value = 2; + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * Label value. + * + * Generated from protobuf field string value = 2; + * @param string $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkString($var, True); + $this->value = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListAssetsRequest.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListAssetsRequest.php new file mode 100644 index 000000000000..0601a927e3bc --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListAssetsRequest.php @@ -0,0 +1,719 @@ +google.cloud.securitycenter.v1.ListAssetsRequest + */ +class ListAssetsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the parent resource that contains the assets. The + * value that you can specify on parent depends on the method in which you + * specify parent. You can specify one of the following values: + * "organizations/[organization_id]", "folders/[folder_id]", or + * "projects/[project_id]". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Expression that defines the filter to apply across assets. + * The expression is a list of zero or more restrictions combined via logical + * operators `AND` and `OR`. + * Parentheses are supported, and `OR` has higher precedence than `AND`. + * Restrictions have the form ` ` and may have a `-` + * character in front of them to indicate negation. The fields map to those + * defined in the Asset resource. Examples include: + * * name + * * security_center_properties.resource_name + * * resource_properties.a_property + * * security_marks.marks.marka + * The supported operators are: + * * `=` for all value types. + * * `>`, `<`, `>=`, `<=` for integer values. + * * `:`, meaning substring matching, for strings. + * The supported value types are: + * * string literals in quotes. + * * integer literals without quotes. + * * boolean literals `true` and `false` without quotes. + * The following are the allowed field and operator combinations: + * * name: `=` + * * update_time: `=`, `>`, `<`, `>=`, `<=` + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `update_time = "2019-06-10T16:07:18-07:00"` + * `update_time = 1560208038000` + * * create_time: `=`, `>`, `<`, `>=`, `<=` + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `create_time = "2019-06-10T16:07:18-07:00"` + * `create_time = 1560208038000` + * * iam_policy.policy_blob: `=`, `:` + * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + * * security_marks.marks: `=`, `:` + * * security_center_properties.resource_name: `=`, `:` + * * security_center_properties.resource_display_name: `=`, `:` + * * security_center_properties.resource_type: `=`, `:` + * * security_center_properties.resource_parent: `=`, `:` + * * security_center_properties.resource_parent_display_name: `=`, `:` + * * security_center_properties.resource_project: `=`, `:` + * * security_center_properties.resource_project_display_name: `=`, `:` + * * security_center_properties.resource_owners: `=`, `:` + * For example, `resource_properties.size = 100` is a valid filter string. + * Use a partial match on the empty string to filter based on a property + * existing: `resource_properties.my_property : ""` + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-resource_properties.my_property : ""` + * + * Generated from protobuf field string filter = 2; + */ + protected $filter = ''; + /** + * Expression that defines what fields and order to use for sorting. The + * string value should follow SQL syntax: comma separated list of fields. For + * example: "name,resource_properties.a_property". The default sorting order + * is ascending. To specify descending order for a field, a suffix " desc" + * should be appended to the field name. For example: "name + * desc,resource_properties.a_property". Redundant space characters in the + * syntax are insignificant. "name desc,resource_properties.a_property" and " + * name desc , resource_properties.a_property " are equivalent. + * The following fields are supported: + * name + * update_time + * resource_properties + * security_marks.marks + * security_center_properties.resource_name + * security_center_properties.resource_display_name + * security_center_properties.resource_parent + * security_center_properties.resource_parent_display_name + * security_center_properties.resource_project + * security_center_properties.resource_project_display_name + * security_center_properties.resource_type + * + * Generated from protobuf field string order_by = 3; + */ + protected $order_by = ''; + /** + * Time used as a reference point when filtering assets. The filter is limited + * to assets existing at the supplied time and their values are those at that + * specific time. Absence of this field will default to the API's version of + * NOW. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; + */ + protected $read_time = null; + /** + * When compare_duration is set, the ListAssetsResult's "state_change" + * attribute is updated to indicate whether the asset was added, removed, or + * remained present during the compare_duration period of time that precedes + * the read_time. This is the time between (read_time - compare_duration) and + * read_time. + * The state_change value is derived based on the presence of the asset at the + * two points in time. Intermediate state changes between the two times don't + * affect the result. For example, the results aren't affected if the asset is + * removed and re-created again. + * Possible "state_change" values when compare_duration is specified: + * * "ADDED": indicates that the asset was not present at the start of + * compare_duration, but present at read_time. + * * "REMOVED": indicates that the asset was present at the start of + * compare_duration, but not present at read_time. + * * "ACTIVE": indicates that the asset was present at both the + * start and the end of the time period defined by + * compare_duration and read_time. + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all assets present at + * read_time. + * + * Generated from protobuf field .google.protobuf.Duration compare_duration = 5; + */ + protected $compare_duration = null; + /** + * A field mask to specify the ListAssetsResult fields to be listed in the + * response. + * An empty field mask will list all fields. + * + * Generated from protobuf field .google.protobuf.FieldMask field_mask = 7; + */ + protected $field_mask = null; + /** + * The value returned by the last `ListAssetsResponse`; indicates + * that this is a continuation of a prior `ListAssets` call, and + * that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 8; + */ + protected $page_token = ''; + /** + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. + * + * Generated from protobuf field int32 page_size = 9; + */ + protected $page_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of the parent resource that contains the assets. The + * value that you can specify on parent depends on the method in which you + * specify parent. You can specify one of the following values: + * "organizations/[organization_id]", "folders/[folder_id]", or + * "projects/[project_id]". + * @type string $filter + * Expression that defines the filter to apply across assets. + * The expression is a list of zero or more restrictions combined via logical + * operators `AND` and `OR`. + * Parentheses are supported, and `OR` has higher precedence than `AND`. + * Restrictions have the form ` ` and may have a `-` + * character in front of them to indicate negation. The fields map to those + * defined in the Asset resource. Examples include: + * * name + * * security_center_properties.resource_name + * * resource_properties.a_property + * * security_marks.marks.marka + * The supported operators are: + * * `=` for all value types. + * * `>`, `<`, `>=`, `<=` for integer values. + * * `:`, meaning substring matching, for strings. + * The supported value types are: + * * string literals in quotes. + * * integer literals without quotes. + * * boolean literals `true` and `false` without quotes. + * The following are the allowed field and operator combinations: + * * name: `=` + * * update_time: `=`, `>`, `<`, `>=`, `<=` + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `update_time = "2019-06-10T16:07:18-07:00"` + * `update_time = 1560208038000` + * * create_time: `=`, `>`, `<`, `>=`, `<=` + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `create_time = "2019-06-10T16:07:18-07:00"` + * `create_time = 1560208038000` + * * iam_policy.policy_blob: `=`, `:` + * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + * * security_marks.marks: `=`, `:` + * * security_center_properties.resource_name: `=`, `:` + * * security_center_properties.resource_display_name: `=`, `:` + * * security_center_properties.resource_type: `=`, `:` + * * security_center_properties.resource_parent: `=`, `:` + * * security_center_properties.resource_parent_display_name: `=`, `:` + * * security_center_properties.resource_project: `=`, `:` + * * security_center_properties.resource_project_display_name: `=`, `:` + * * security_center_properties.resource_owners: `=`, `:` + * For example, `resource_properties.size = 100` is a valid filter string. + * Use a partial match on the empty string to filter based on a property + * existing: `resource_properties.my_property : ""` + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-resource_properties.my_property : ""` + * @type string $order_by + * Expression that defines what fields and order to use for sorting. The + * string value should follow SQL syntax: comma separated list of fields. For + * example: "name,resource_properties.a_property". The default sorting order + * is ascending. To specify descending order for a field, a suffix " desc" + * should be appended to the field name. For example: "name + * desc,resource_properties.a_property". Redundant space characters in the + * syntax are insignificant. "name desc,resource_properties.a_property" and " + * name desc , resource_properties.a_property " are equivalent. + * The following fields are supported: + * name + * update_time + * resource_properties + * security_marks.marks + * security_center_properties.resource_name + * security_center_properties.resource_display_name + * security_center_properties.resource_parent + * security_center_properties.resource_parent_display_name + * security_center_properties.resource_project + * security_center_properties.resource_project_display_name + * security_center_properties.resource_type + * @type \Google\Protobuf\Timestamp $read_time + * Time used as a reference point when filtering assets. The filter is limited + * to assets existing at the supplied time and their values are those at that + * specific time. Absence of this field will default to the API's version of + * NOW. + * @type \Google\Protobuf\Duration $compare_duration + * When compare_duration is set, the ListAssetsResult's "state_change" + * attribute is updated to indicate whether the asset was added, removed, or + * remained present during the compare_duration period of time that precedes + * the read_time. This is the time between (read_time - compare_duration) and + * read_time. + * The state_change value is derived based on the presence of the asset at the + * two points in time. Intermediate state changes between the two times don't + * affect the result. For example, the results aren't affected if the asset is + * removed and re-created again. + * Possible "state_change" values when compare_duration is specified: + * * "ADDED": indicates that the asset was not present at the start of + * compare_duration, but present at read_time. + * * "REMOVED": indicates that the asset was present at the start of + * compare_duration, but not present at read_time. + * * "ACTIVE": indicates that the asset was present at both the + * start and the end of the time period defined by + * compare_duration and read_time. + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all assets present at + * read_time. + * @type \Google\Protobuf\FieldMask $field_mask + * A field mask to specify the ListAssetsResult fields to be listed in the + * response. + * An empty field mask will list all fields. + * @type string $page_token + * The value returned by the last `ListAssetsResponse`; indicates + * that this is a continuation of a prior `ListAssets` call, and + * that the system should return the next page of data. + * @type int $page_size + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the parent resource that contains the assets. The + * value that you can specify on parent depends on the method in which you + * specify parent. You can specify one of the following values: + * "organizations/[organization_id]", "folders/[folder_id]", or + * "projects/[project_id]". + * + * 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. The name of the parent resource that contains the assets. The + * value that you can specify on parent depends on the method in which you + * specify parent. You can specify one of the following values: + * "organizations/[organization_id]", "folders/[folder_id]", or + * "projects/[project_id]". + * + * 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; + } + + /** + * Expression that defines the filter to apply across assets. + * The expression is a list of zero or more restrictions combined via logical + * operators `AND` and `OR`. + * Parentheses are supported, and `OR` has higher precedence than `AND`. + * Restrictions have the form ` ` and may have a `-` + * character in front of them to indicate negation. The fields map to those + * defined in the Asset resource. Examples include: + * * name + * * security_center_properties.resource_name + * * resource_properties.a_property + * * security_marks.marks.marka + * The supported operators are: + * * `=` for all value types. + * * `>`, `<`, `>=`, `<=` for integer values. + * * `:`, meaning substring matching, for strings. + * The supported value types are: + * * string literals in quotes. + * * integer literals without quotes. + * * boolean literals `true` and `false` without quotes. + * The following are the allowed field and operator combinations: + * * name: `=` + * * update_time: `=`, `>`, `<`, `>=`, `<=` + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `update_time = "2019-06-10T16:07:18-07:00"` + * `update_time = 1560208038000` + * * create_time: `=`, `>`, `<`, `>=`, `<=` + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `create_time = "2019-06-10T16:07:18-07:00"` + * `create_time = 1560208038000` + * * iam_policy.policy_blob: `=`, `:` + * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + * * security_marks.marks: `=`, `:` + * * security_center_properties.resource_name: `=`, `:` + * * security_center_properties.resource_display_name: `=`, `:` + * * security_center_properties.resource_type: `=`, `:` + * * security_center_properties.resource_parent: `=`, `:` + * * security_center_properties.resource_parent_display_name: `=`, `:` + * * security_center_properties.resource_project: `=`, `:` + * * security_center_properties.resource_project_display_name: `=`, `:` + * * security_center_properties.resource_owners: `=`, `:` + * For example, `resource_properties.size = 100` is a valid filter string. + * Use a partial match on the empty string to filter based on a property + * existing: `resource_properties.my_property : ""` + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-resource_properties.my_property : ""` + * + * Generated from protobuf field string filter = 2; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Expression that defines the filter to apply across assets. + * The expression is a list of zero or more restrictions combined via logical + * operators `AND` and `OR`. + * Parentheses are supported, and `OR` has higher precedence than `AND`. + * Restrictions have the form ` ` and may have a `-` + * character in front of them to indicate negation. The fields map to those + * defined in the Asset resource. Examples include: + * * name + * * security_center_properties.resource_name + * * resource_properties.a_property + * * security_marks.marks.marka + * The supported operators are: + * * `=` for all value types. + * * `>`, `<`, `>=`, `<=` for integer values. + * * `:`, meaning substring matching, for strings. + * The supported value types are: + * * string literals in quotes. + * * integer literals without quotes. + * * boolean literals `true` and `false` without quotes. + * The following are the allowed field and operator combinations: + * * name: `=` + * * update_time: `=`, `>`, `<`, `>=`, `<=` + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `update_time = "2019-06-10T16:07:18-07:00"` + * `update_time = 1560208038000` + * * create_time: `=`, `>`, `<`, `>=`, `<=` + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `create_time = "2019-06-10T16:07:18-07:00"` + * `create_time = 1560208038000` + * * iam_policy.policy_blob: `=`, `:` + * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + * * security_marks.marks: `=`, `:` + * * security_center_properties.resource_name: `=`, `:` + * * security_center_properties.resource_display_name: `=`, `:` + * * security_center_properties.resource_type: `=`, `:` + * * security_center_properties.resource_parent: `=`, `:` + * * security_center_properties.resource_parent_display_name: `=`, `:` + * * security_center_properties.resource_project: `=`, `:` + * * security_center_properties.resource_project_display_name: `=`, `:` + * * security_center_properties.resource_owners: `=`, `:` + * For example, `resource_properties.size = 100` is a valid filter string. + * Use a partial match on the empty string to filter based on a property + * existing: `resource_properties.my_property : ""` + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-resource_properties.my_property : ""` + * + * Generated from protobuf field string filter = 2; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Expression that defines what fields and order to use for sorting. The + * string value should follow SQL syntax: comma separated list of fields. For + * example: "name,resource_properties.a_property". The default sorting order + * is ascending. To specify descending order for a field, a suffix " desc" + * should be appended to the field name. For example: "name + * desc,resource_properties.a_property". Redundant space characters in the + * syntax are insignificant. "name desc,resource_properties.a_property" and " + * name desc , resource_properties.a_property " are equivalent. + * The following fields are supported: + * name + * update_time + * resource_properties + * security_marks.marks + * security_center_properties.resource_name + * security_center_properties.resource_display_name + * security_center_properties.resource_parent + * security_center_properties.resource_parent_display_name + * security_center_properties.resource_project + * security_center_properties.resource_project_display_name + * security_center_properties.resource_type + * + * Generated from protobuf field string order_by = 3; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Expression that defines what fields and order to use for sorting. The + * string value should follow SQL syntax: comma separated list of fields. For + * example: "name,resource_properties.a_property". The default sorting order + * is ascending. To specify descending order for a field, a suffix " desc" + * should be appended to the field name. For example: "name + * desc,resource_properties.a_property". Redundant space characters in the + * syntax are insignificant. "name desc,resource_properties.a_property" and " + * name desc , resource_properties.a_property " are equivalent. + * The following fields are supported: + * name + * update_time + * resource_properties + * security_marks.marks + * security_center_properties.resource_name + * security_center_properties.resource_display_name + * security_center_properties.resource_parent + * security_center_properties.resource_parent_display_name + * security_center_properties.resource_project + * security_center_properties.resource_project_display_name + * security_center_properties.resource_type + * + * Generated from protobuf field string order_by = 3; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Time used as a reference point when filtering assets. The filter is limited + * to assets existing at the supplied time and their values are those at that + * specific time. Absence of this field will default to the API's version of + * NOW. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->read_time; + } + + public function hasReadTime() + { + return isset($this->read_time); + } + + public function clearReadTime() + { + unset($this->read_time); + } + + /** + * Time used as a reference point when filtering assets. The filter is limited + * to assets existing at the supplied time and their values are those at that + * specific time. Absence of this field will default to the API's version of + * NOW. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->read_time = $var; + + return $this; + } + + /** + * When compare_duration is set, the ListAssetsResult's "state_change" + * attribute is updated to indicate whether the asset was added, removed, or + * remained present during the compare_duration period of time that precedes + * the read_time. This is the time between (read_time - compare_duration) and + * read_time. + * The state_change value is derived based on the presence of the asset at the + * two points in time. Intermediate state changes between the two times don't + * affect the result. For example, the results aren't affected if the asset is + * removed and re-created again. + * Possible "state_change" values when compare_duration is specified: + * * "ADDED": indicates that the asset was not present at the start of + * compare_duration, but present at read_time. + * * "REMOVED": indicates that the asset was present at the start of + * compare_duration, but not present at read_time. + * * "ACTIVE": indicates that the asset was present at both the + * start and the end of the time period defined by + * compare_duration and read_time. + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all assets present at + * read_time. + * + * Generated from protobuf field .google.protobuf.Duration compare_duration = 5; + * @return \Google\Protobuf\Duration|null + */ + public function getCompareDuration() + { + return $this->compare_duration; + } + + public function hasCompareDuration() + { + return isset($this->compare_duration); + } + + public function clearCompareDuration() + { + unset($this->compare_duration); + } + + /** + * When compare_duration is set, the ListAssetsResult's "state_change" + * attribute is updated to indicate whether the asset was added, removed, or + * remained present during the compare_duration period of time that precedes + * the read_time. This is the time between (read_time - compare_duration) and + * read_time. + * The state_change value is derived based on the presence of the asset at the + * two points in time. Intermediate state changes between the two times don't + * affect the result. For example, the results aren't affected if the asset is + * removed and re-created again. + * Possible "state_change" values when compare_duration is specified: + * * "ADDED": indicates that the asset was not present at the start of + * compare_duration, but present at read_time. + * * "REMOVED": indicates that the asset was present at the start of + * compare_duration, but not present at read_time. + * * "ACTIVE": indicates that the asset was present at both the + * start and the end of the time period defined by + * compare_duration and read_time. + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all assets present at + * read_time. + * + * Generated from protobuf field .google.protobuf.Duration compare_duration = 5; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setCompareDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->compare_duration = $var; + + return $this; + } + + /** + * A field mask to specify the ListAssetsResult fields to be listed in the + * response. + * An empty field mask will list all fields. + * + * Generated from protobuf field .google.protobuf.FieldMask field_mask = 7; + * @return \Google\Protobuf\FieldMask|null + */ + public function getFieldMask() + { + return $this->field_mask; + } + + public function hasFieldMask() + { + return isset($this->field_mask); + } + + public function clearFieldMask() + { + unset($this->field_mask); + } + + /** + * A field mask to specify the ListAssetsResult fields to be listed in the + * response. + * An empty field mask will list all fields. + * + * Generated from protobuf field .google.protobuf.FieldMask field_mask = 7; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setFieldMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->field_mask = $var; + + return $this; + } + + /** + * The value returned by the last `ListAssetsResponse`; indicates + * that this is a continuation of a prior `ListAssets` call, and + * that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 8; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The value returned by the last `ListAssetsResponse`; indicates + * that this is a continuation of a prior `ListAssets` call, and + * that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 8; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. + * + * Generated from protobuf field int32 page_size = 9; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. + * + * Generated from protobuf field int32 page_size = 9; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListAssetsResponse.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListAssetsResponse.php new file mode 100644 index 000000000000..0628a39e7ed7 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListAssetsResponse.php @@ -0,0 +1,183 @@ +google.cloud.securitycenter.v1.ListAssetsResponse + */ +class ListAssetsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Assets matching the list request. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult list_assets_results = 1; + */ + private $list_assets_results; + /** + * Time used for executing the list request. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 2; + */ + protected $read_time = null; + /** + * Token to retrieve the next page of results, or empty if there are no more + * results. + * + * Generated from protobuf field string next_page_token = 3; + */ + protected $next_page_token = ''; + /** + * The total number of assets matching the query. + * + * Generated from protobuf field int32 total_size = 4; + */ + protected $total_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\SecurityCenter\V1\ListAssetsResponse\ListAssetsResult>|\Google\Protobuf\Internal\RepeatedField $list_assets_results + * Assets matching the list request. + * @type \Google\Protobuf\Timestamp $read_time + * Time used for executing the list request. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no more + * results. + * @type int $total_size + * The total number of assets matching the query. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Assets matching the list request. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult list_assets_results = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getListAssetsResults() + { + return $this->list_assets_results; + } + + /** + * Assets matching the list request. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult list_assets_results = 1; + * @param array<\Google\Cloud\SecurityCenter\V1\ListAssetsResponse\ListAssetsResult>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setListAssetsResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\ListAssetsResponse\ListAssetsResult::class); + $this->list_assets_results = $arr; + + return $this; + } + + /** + * Time used for executing the list request. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->read_time; + } + + public function hasReadTime() + { + return isset($this->read_time); + } + + public function clearReadTime() + { + unset($this->read_time); + } + + /** + * Time used for executing the list request. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->read_time = $var; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results. + * + * Generated from protobuf field string next_page_token = 3; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results. + * + * Generated from protobuf field string next_page_token = 3; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * The total number of assets matching the query. + * + * Generated from protobuf field int32 total_size = 4; + * @return int + */ + public function getTotalSize() + { + return $this->total_size; + } + + /** + * The total number of assets matching the query. + * + * Generated from protobuf field int32 total_size = 4; + * @param int $var + * @return $this + */ + public function setTotalSize($var) + { + GPBUtil::checkInt32($var); + $this->total_size = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListAssetsResponse/ListAssetsResult.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListAssetsResponse/ListAssetsResult.php new file mode 100644 index 000000000000..32294763c7cc --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListAssetsResponse/ListAssetsResult.php @@ -0,0 +1,114 @@ +google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult + */ +class ListAssetsResult extends \Google\Protobuf\Internal\Message +{ + /** + * Asset matching the search request. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Asset asset = 1; + */ + protected $asset = null; + /** + * State change of the asset between the points in time. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.StateChange state_change = 2; + */ + protected $state_change = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\SecurityCenter\V1\Asset $asset + * Asset matching the search request. + * @type int $state_change + * State change of the asset between the points in time. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Asset matching the search request. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Asset asset = 1; + * @return \Google\Cloud\SecurityCenter\V1\Asset|null + */ + public function getAsset() + { + return $this->asset; + } + + public function hasAsset() + { + return isset($this->asset); + } + + public function clearAsset() + { + unset($this->asset); + } + + /** + * Asset matching the search request. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Asset asset = 1; + * @param \Google\Cloud\SecurityCenter\V1\Asset $var + * @return $this + */ + public function setAsset($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\Asset::class); + $this->asset = $var; + + return $this; + } + + /** + * State change of the asset between the points in time. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.StateChange state_change = 2; + * @return int + */ + public function getStateChange() + { + return $this->state_change; + } + + /** + * State change of the asset between the points in time. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.StateChange state_change = 2; + * @param int $var + * @return $this + */ + public function setStateChange($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1\ListAssetsResponse\ListAssetsResult\StateChange::class); + $this->state_change = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ListAssetsResult::class, \Google\Cloud\SecurityCenter\V1\ListAssetsResponse_ListAssetsResult::class); + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListAssetsResponse/ListAssetsResult/StateChange.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListAssetsResponse/ListAssetsResult/StateChange.php new file mode 100644 index 000000000000..54ae768528cb --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListAssetsResponse/ListAssetsResult/StateChange.php @@ -0,0 +1,75 @@ +google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.StateChange + */ +class StateChange +{ + /** + * State change is unused, this is the canonical default for this enum. + * + * Generated from protobuf enum UNUSED = 0; + */ + const UNUSED = 0; + /** + * Asset was added between the points in time. + * + * Generated from protobuf enum ADDED = 1; + */ + const ADDED = 1; + /** + * Asset was removed between the points in time. + * + * Generated from protobuf enum REMOVED = 2; + */ + const REMOVED = 2; + /** + * Asset was present at both point(s) in time. + * + * Generated from protobuf enum ACTIVE = 3; + */ + const ACTIVE = 3; + + private static $valueToName = [ + self::UNUSED => 'UNUSED', + self::ADDED => 'ADDED', + self::REMOVED => 'REMOVED', + self::ACTIVE => 'ACTIVE', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(StateChange::class, \Google\Cloud\SecurityCenter\V1\ListAssetsResponse_ListAssetsResult_StateChange::class); + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListAssetsResponse_ListAssetsResult.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListAssetsResponse_ListAssetsResult.php new file mode 100644 index 000000000000..f70ed6d1ce31 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListAssetsResponse_ListAssetsResult.php @@ -0,0 +1,16 @@ +google.cloud.securitycenter.v1.ListBigQueryExportsRequest + */ +class ListBigQueryExportsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns the collection of BigQuery exports. Its + * format is "organizations/[organization_id]", "folders/[folder_id]", + * "projects/[project_id]". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of configs to return. The service may return fewer than + * this value. + * If unspecified, at most 10 configs will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A page token, received from a previous `ListBigQueryExports` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListBigQueryExports` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent, which owns the collection of BigQuery exports. Its + * format is "organizations/[organization_id]", "folders/[folder_id]", + * "projects/[project_id]". + * @type int $page_size + * The maximum number of configs to return. The service may return fewer than + * this value. + * If unspecified, at most 10 configs will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * @type string $page_token + * A page token, received from a previous `ListBigQueryExports` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListBigQueryExports` + * must match the call that provided the page token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns the collection of BigQuery exports. Its + * format is "organizations/[organization_id]", "folders/[folder_id]", + * "projects/[project_id]". + * + * 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. The parent, which owns the collection of BigQuery exports. Its + * format is "organizations/[organization_id]", "folders/[folder_id]", + * "projects/[project_id]". + * + * 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; + } + + /** + * The maximum number of configs to return. The service may return fewer than + * this value. + * If unspecified, at most 10 configs will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of configs to return. The service may return fewer than + * this value. + * If unspecified, at most 10 configs will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A page token, received from a previous `ListBigQueryExports` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListBigQueryExports` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A page token, received from a previous `ListBigQueryExports` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListBigQueryExports` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + * @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/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListBigQueryExportsResponse.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListBigQueryExportsResponse.php new file mode 100644 index 000000000000..6a4c6adae970 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListBigQueryExportsResponse.php @@ -0,0 +1,105 @@ +google.cloud.securitycenter.v1.ListBigQueryExportsResponse + */ +class ListBigQueryExportsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The BigQuery exports from the specified parent. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.BigQueryExport big_query_exports = 1; + */ + private $big_query_exports; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\SecurityCenter\V1\BigQueryExport>|\Google\Protobuf\Internal\RepeatedField $big_query_exports + * The BigQuery exports from the specified parent. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * The BigQuery exports from the specified parent. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.BigQueryExport big_query_exports = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getBigQueryExports() + { + return $this->big_query_exports; + } + + /** + * The BigQuery exports from the specified parent. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.BigQueryExport big_query_exports = 1; + * @param array<\Google\Cloud\SecurityCenter\V1\BigQueryExport>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setBigQueryExports($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\BigQueryExport::class); + $this->big_query_exports = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @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/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListFindingsRequest.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListFindingsRequest.php new file mode 100644 index 000000000000..20a7ef23ff7f --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListFindingsRequest.php @@ -0,0 +1,735 @@ +google.cloud.securitycenter.v1.ListFindingsRequest + */ +class ListFindingsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the source the findings belong to. Its format is + * "organizations/[organization_id]/sources/[source_id], + * folders/[folder_id]/sources/[source_id], or + * projects/[project_id]/sources/[source_id]". To list across all sources + * provide a source_id of `-`. For example: + * organizations/{organization_id}/sources/-, folders/{folder_id}/sources/- or + * projects/{projects_id}/sources/- + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Expression that defines the filter to apply across findings. + * The expression is a list of one or more restrictions combined via logical + * operators `AND` and `OR`. + * Parentheses are supported, and `OR` has higher precedence than `AND`. + * Restrictions have the form ` ` and may have a `-` + * character in front of them to indicate negation. Examples include: + * * name + * * source_properties.a_property + * * security_marks.marks.marka + * The supported operators are: + * * `=` for all value types. + * * `>`, `<`, `>=`, `<=` for integer values. + * * `:`, meaning substring matching, for strings. + * The supported value types are: + * * string literals in quotes. + * * integer literals without quotes. + * * boolean literals `true` and `false` without quotes. + * The following field and operator combinations are supported: + * * name: `=` + * * parent: `=`, `:` + * * resource_name: `=`, `:` + * * state: `=`, `:` + * * category: `=`, `:` + * * external_uri: `=`, `:` + * * event_time: `=`, `>`, `<`, `>=`, `<=` + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `event_time = "2019-06-10T16:07:18-07:00"` + * `event_time = 1560208038000` + * * severity: `=`, `:` + * * workflow_state: `=`, `:` + * * security_marks.marks: `=`, `:` + * * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + * For example, `source_properties.size = 100` is a valid filter string. + * Use a partial match on the empty string to filter based on a property + * existing: `source_properties.my_property : ""` + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-source_properties.my_property : ""` + * * resource: + * * resource.name: `=`, `:` + * * resource.parent_name: `=`, `:` + * * resource.parent_display_name: `=`, `:` + * * resource.project_name: `=`, `:` + * * resource.project_display_name: `=`, `:` + * * resource.type: `=`, `:` + * * resource.folders.resource_folder: `=`, `:` + * * resource.display_name: `=`, `:` + * + * Generated from protobuf field string filter = 2; + */ + protected $filter = ''; + /** + * Expression that defines what fields and order to use for sorting. The + * string value should follow SQL syntax: comma separated list of fields. For + * example: "name,resource_properties.a_property". The default sorting order + * is ascending. To specify descending order for a field, a suffix " desc" + * should be appended to the field name. For example: "name + * desc,source_properties.a_property". Redundant space characters in the + * syntax are insignificant. "name desc,source_properties.a_property" and " + * name desc , source_properties.a_property " are equivalent. + * The following fields are supported: + * name + * parent + * state + * category + * resource_name + * event_time + * source_properties + * security_marks.marks + * + * Generated from protobuf field string order_by = 3; + */ + protected $order_by = ''; + /** + * Time used as a reference point when filtering findings. The filter is + * limited to findings existing at the supplied time and their values are + * those at that specific time. Absence of this field will default to the + * API's version of NOW. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; + */ + protected $read_time = null; + /** + * When compare_duration is set, the ListFindingsResult's "state_change" + * attribute is updated to indicate whether the finding had its state changed, + * the finding's state remained unchanged, or if the finding was added in any + * state during the compare_duration period of time that precedes the + * read_time. This is the time between (read_time - compare_duration) and + * read_time. + * The state_change value is derived based on the presence and state of the + * finding at the two points in time. Intermediate state changes between the + * two times don't affect the result. For example, the results aren't affected + * if the finding is made inactive and then active again. + * Possible "state_change" values when compare_duration is specified: + * * "CHANGED": indicates that the finding was present and matched the given + * filter at the start of compare_duration, but changed its + * state at read_time. + * * "UNCHANGED": indicates that the finding was present and matched the given + * filter at the start of compare_duration and did not change + * state at read_time. + * * "ADDED": indicates that the finding did not match the given filter or + * was not present at the start of compare_duration, but was + * present at read_time. + * * "REMOVED": indicates that the finding was present and matched the + * filter at the start of compare_duration, but did not match + * the filter at read_time. + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all findings present at + * read_time. + * + * Generated from protobuf field .google.protobuf.Duration compare_duration = 5; + */ + protected $compare_duration = null; + /** + * A field mask to specify the Finding fields to be listed in the response. + * An empty field mask will list all fields. + * + * Generated from protobuf field .google.protobuf.FieldMask field_mask = 7; + */ + protected $field_mask = null; + /** + * The value returned by the last `ListFindingsResponse`; indicates + * that this is a continuation of a prior `ListFindings` call, and + * that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 8; + */ + protected $page_token = ''; + /** + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. + * + * Generated from protobuf field int32 page_size = 9; + */ + protected $page_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Name of the source the findings belong to. Its format is + * "organizations/[organization_id]/sources/[source_id], + * folders/[folder_id]/sources/[source_id], or + * projects/[project_id]/sources/[source_id]". To list across all sources + * provide a source_id of `-`. For example: + * organizations/{organization_id}/sources/-, folders/{folder_id}/sources/- or + * projects/{projects_id}/sources/- + * @type string $filter + * Expression that defines the filter to apply across findings. + * The expression is a list of one or more restrictions combined via logical + * operators `AND` and `OR`. + * Parentheses are supported, and `OR` has higher precedence than `AND`. + * Restrictions have the form ` ` and may have a `-` + * character in front of them to indicate negation. Examples include: + * * name + * * source_properties.a_property + * * security_marks.marks.marka + * The supported operators are: + * * `=` for all value types. + * * `>`, `<`, `>=`, `<=` for integer values. + * * `:`, meaning substring matching, for strings. + * The supported value types are: + * * string literals in quotes. + * * integer literals without quotes. + * * boolean literals `true` and `false` without quotes. + * The following field and operator combinations are supported: + * * name: `=` + * * parent: `=`, `:` + * * resource_name: `=`, `:` + * * state: `=`, `:` + * * category: `=`, `:` + * * external_uri: `=`, `:` + * * event_time: `=`, `>`, `<`, `>=`, `<=` + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `event_time = "2019-06-10T16:07:18-07:00"` + * `event_time = 1560208038000` + * * severity: `=`, `:` + * * workflow_state: `=`, `:` + * * security_marks.marks: `=`, `:` + * * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + * For example, `source_properties.size = 100` is a valid filter string. + * Use a partial match on the empty string to filter based on a property + * existing: `source_properties.my_property : ""` + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-source_properties.my_property : ""` + * * resource: + * * resource.name: `=`, `:` + * * resource.parent_name: `=`, `:` + * * resource.parent_display_name: `=`, `:` + * * resource.project_name: `=`, `:` + * * resource.project_display_name: `=`, `:` + * * resource.type: `=`, `:` + * * resource.folders.resource_folder: `=`, `:` + * * resource.display_name: `=`, `:` + * @type string $order_by + * Expression that defines what fields and order to use for sorting. The + * string value should follow SQL syntax: comma separated list of fields. For + * example: "name,resource_properties.a_property". The default sorting order + * is ascending. To specify descending order for a field, a suffix " desc" + * should be appended to the field name. For example: "name + * desc,source_properties.a_property". Redundant space characters in the + * syntax are insignificant. "name desc,source_properties.a_property" and " + * name desc , source_properties.a_property " are equivalent. + * The following fields are supported: + * name + * parent + * state + * category + * resource_name + * event_time + * source_properties + * security_marks.marks + * @type \Google\Protobuf\Timestamp $read_time + * Time used as a reference point when filtering findings. The filter is + * limited to findings existing at the supplied time and their values are + * those at that specific time. Absence of this field will default to the + * API's version of NOW. + * @type \Google\Protobuf\Duration $compare_duration + * When compare_duration is set, the ListFindingsResult's "state_change" + * attribute is updated to indicate whether the finding had its state changed, + * the finding's state remained unchanged, or if the finding was added in any + * state during the compare_duration period of time that precedes the + * read_time. This is the time between (read_time - compare_duration) and + * read_time. + * The state_change value is derived based on the presence and state of the + * finding at the two points in time. Intermediate state changes between the + * two times don't affect the result. For example, the results aren't affected + * if the finding is made inactive and then active again. + * Possible "state_change" values when compare_duration is specified: + * * "CHANGED": indicates that the finding was present and matched the given + * filter at the start of compare_duration, but changed its + * state at read_time. + * * "UNCHANGED": indicates that the finding was present and matched the given + * filter at the start of compare_duration and did not change + * state at read_time. + * * "ADDED": indicates that the finding did not match the given filter or + * was not present at the start of compare_duration, but was + * present at read_time. + * * "REMOVED": indicates that the finding was present and matched the + * filter at the start of compare_duration, but did not match + * the filter at read_time. + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all findings present at + * read_time. + * @type \Google\Protobuf\FieldMask $field_mask + * A field mask to specify the Finding fields to be listed in the response. + * An empty field mask will list all fields. + * @type string $page_token + * The value returned by the last `ListFindingsResponse`; indicates + * that this is a continuation of a prior `ListFindings` call, and + * that the system should return the next page of data. + * @type int $page_size + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the source the findings belong to. Its format is + * "organizations/[organization_id]/sources/[source_id], + * folders/[folder_id]/sources/[source_id], or + * projects/[project_id]/sources/[source_id]". To list across all sources + * provide a source_id of `-`. For example: + * organizations/{organization_id}/sources/-, folders/{folder_id}/sources/- or + * projects/{projects_id}/sources/- + * + * 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. Name of the source the findings belong to. Its format is + * "organizations/[organization_id]/sources/[source_id], + * folders/[folder_id]/sources/[source_id], or + * projects/[project_id]/sources/[source_id]". To list across all sources + * provide a source_id of `-`. For example: + * organizations/{organization_id}/sources/-, folders/{folder_id}/sources/- or + * projects/{projects_id}/sources/- + * + * 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; + } + + /** + * Expression that defines the filter to apply across findings. + * The expression is a list of one or more restrictions combined via logical + * operators `AND` and `OR`. + * Parentheses are supported, and `OR` has higher precedence than `AND`. + * Restrictions have the form ` ` and may have a `-` + * character in front of them to indicate negation. Examples include: + * * name + * * source_properties.a_property + * * security_marks.marks.marka + * The supported operators are: + * * `=` for all value types. + * * `>`, `<`, `>=`, `<=` for integer values. + * * `:`, meaning substring matching, for strings. + * The supported value types are: + * * string literals in quotes. + * * integer literals without quotes. + * * boolean literals `true` and `false` without quotes. + * The following field and operator combinations are supported: + * * name: `=` + * * parent: `=`, `:` + * * resource_name: `=`, `:` + * * state: `=`, `:` + * * category: `=`, `:` + * * external_uri: `=`, `:` + * * event_time: `=`, `>`, `<`, `>=`, `<=` + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `event_time = "2019-06-10T16:07:18-07:00"` + * `event_time = 1560208038000` + * * severity: `=`, `:` + * * workflow_state: `=`, `:` + * * security_marks.marks: `=`, `:` + * * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + * For example, `source_properties.size = 100` is a valid filter string. + * Use a partial match on the empty string to filter based on a property + * existing: `source_properties.my_property : ""` + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-source_properties.my_property : ""` + * * resource: + * * resource.name: `=`, `:` + * * resource.parent_name: `=`, `:` + * * resource.parent_display_name: `=`, `:` + * * resource.project_name: `=`, `:` + * * resource.project_display_name: `=`, `:` + * * resource.type: `=`, `:` + * * resource.folders.resource_folder: `=`, `:` + * * resource.display_name: `=`, `:` + * + * Generated from protobuf field string filter = 2; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Expression that defines the filter to apply across findings. + * The expression is a list of one or more restrictions combined via logical + * operators `AND` and `OR`. + * Parentheses are supported, and `OR` has higher precedence than `AND`. + * Restrictions have the form ` ` and may have a `-` + * character in front of them to indicate negation. Examples include: + * * name + * * source_properties.a_property + * * security_marks.marks.marka + * The supported operators are: + * * `=` for all value types. + * * `>`, `<`, `>=`, `<=` for integer values. + * * `:`, meaning substring matching, for strings. + * The supported value types are: + * * string literals in quotes. + * * integer literals without quotes. + * * boolean literals `true` and `false` without quotes. + * The following field and operator combinations are supported: + * * name: `=` + * * parent: `=`, `:` + * * resource_name: `=`, `:` + * * state: `=`, `:` + * * category: `=`, `:` + * * external_uri: `=`, `:` + * * event_time: `=`, `>`, `<`, `>=`, `<=` + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `event_time = "2019-06-10T16:07:18-07:00"` + * `event_time = 1560208038000` + * * severity: `=`, `:` + * * workflow_state: `=`, `:` + * * security_marks.marks: `=`, `:` + * * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + * For example, `source_properties.size = 100` is a valid filter string. + * Use a partial match on the empty string to filter based on a property + * existing: `source_properties.my_property : ""` + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-source_properties.my_property : ""` + * * resource: + * * resource.name: `=`, `:` + * * resource.parent_name: `=`, `:` + * * resource.parent_display_name: `=`, `:` + * * resource.project_name: `=`, `:` + * * resource.project_display_name: `=`, `:` + * * resource.type: `=`, `:` + * * resource.folders.resource_folder: `=`, `:` + * * resource.display_name: `=`, `:` + * + * Generated from protobuf field string filter = 2; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Expression that defines what fields and order to use for sorting. The + * string value should follow SQL syntax: comma separated list of fields. For + * example: "name,resource_properties.a_property". The default sorting order + * is ascending. To specify descending order for a field, a suffix " desc" + * should be appended to the field name. For example: "name + * desc,source_properties.a_property". Redundant space characters in the + * syntax are insignificant. "name desc,source_properties.a_property" and " + * name desc , source_properties.a_property " are equivalent. + * The following fields are supported: + * name + * parent + * state + * category + * resource_name + * event_time + * source_properties + * security_marks.marks + * + * Generated from protobuf field string order_by = 3; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Expression that defines what fields and order to use for sorting. The + * string value should follow SQL syntax: comma separated list of fields. For + * example: "name,resource_properties.a_property". The default sorting order + * is ascending. To specify descending order for a field, a suffix " desc" + * should be appended to the field name. For example: "name + * desc,source_properties.a_property". Redundant space characters in the + * syntax are insignificant. "name desc,source_properties.a_property" and " + * name desc , source_properties.a_property " are equivalent. + * The following fields are supported: + * name + * parent + * state + * category + * resource_name + * event_time + * source_properties + * security_marks.marks + * + * Generated from protobuf field string order_by = 3; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Time used as a reference point when filtering findings. The filter is + * limited to findings existing at the supplied time and their values are + * those at that specific time. Absence of this field will default to the + * API's version of NOW. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->read_time; + } + + public function hasReadTime() + { + return isset($this->read_time); + } + + public function clearReadTime() + { + unset($this->read_time); + } + + /** + * Time used as a reference point when filtering findings. The filter is + * limited to findings existing at the supplied time and their values are + * those at that specific time. Absence of this field will default to the + * API's version of NOW. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->read_time = $var; + + return $this; + } + + /** + * When compare_duration is set, the ListFindingsResult's "state_change" + * attribute is updated to indicate whether the finding had its state changed, + * the finding's state remained unchanged, or if the finding was added in any + * state during the compare_duration period of time that precedes the + * read_time. This is the time between (read_time - compare_duration) and + * read_time. + * The state_change value is derived based on the presence and state of the + * finding at the two points in time. Intermediate state changes between the + * two times don't affect the result. For example, the results aren't affected + * if the finding is made inactive and then active again. + * Possible "state_change" values when compare_duration is specified: + * * "CHANGED": indicates that the finding was present and matched the given + * filter at the start of compare_duration, but changed its + * state at read_time. + * * "UNCHANGED": indicates that the finding was present and matched the given + * filter at the start of compare_duration and did not change + * state at read_time. + * * "ADDED": indicates that the finding did not match the given filter or + * was not present at the start of compare_duration, but was + * present at read_time. + * * "REMOVED": indicates that the finding was present and matched the + * filter at the start of compare_duration, but did not match + * the filter at read_time. + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all findings present at + * read_time. + * + * Generated from protobuf field .google.protobuf.Duration compare_duration = 5; + * @return \Google\Protobuf\Duration|null + */ + public function getCompareDuration() + { + return $this->compare_duration; + } + + public function hasCompareDuration() + { + return isset($this->compare_duration); + } + + public function clearCompareDuration() + { + unset($this->compare_duration); + } + + /** + * When compare_duration is set, the ListFindingsResult's "state_change" + * attribute is updated to indicate whether the finding had its state changed, + * the finding's state remained unchanged, or if the finding was added in any + * state during the compare_duration period of time that precedes the + * read_time. This is the time between (read_time - compare_duration) and + * read_time. + * The state_change value is derived based on the presence and state of the + * finding at the two points in time. Intermediate state changes between the + * two times don't affect the result. For example, the results aren't affected + * if the finding is made inactive and then active again. + * Possible "state_change" values when compare_duration is specified: + * * "CHANGED": indicates that the finding was present and matched the given + * filter at the start of compare_duration, but changed its + * state at read_time. + * * "UNCHANGED": indicates that the finding was present and matched the given + * filter at the start of compare_duration and did not change + * state at read_time. + * * "ADDED": indicates that the finding did not match the given filter or + * was not present at the start of compare_duration, but was + * present at read_time. + * * "REMOVED": indicates that the finding was present and matched the + * filter at the start of compare_duration, but did not match + * the filter at read_time. + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all findings present at + * read_time. + * + * Generated from protobuf field .google.protobuf.Duration compare_duration = 5; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setCompareDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->compare_duration = $var; + + return $this; + } + + /** + * A field mask to specify the Finding fields to be listed in the response. + * An empty field mask will list all fields. + * + * Generated from protobuf field .google.protobuf.FieldMask field_mask = 7; + * @return \Google\Protobuf\FieldMask|null + */ + public function getFieldMask() + { + return $this->field_mask; + } + + public function hasFieldMask() + { + return isset($this->field_mask); + } + + public function clearFieldMask() + { + unset($this->field_mask); + } + + /** + * A field mask to specify the Finding fields to be listed in the response. + * An empty field mask will list all fields. + * + * Generated from protobuf field .google.protobuf.FieldMask field_mask = 7; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setFieldMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->field_mask = $var; + + return $this; + } + + /** + * The value returned by the last `ListFindingsResponse`; indicates + * that this is a continuation of a prior `ListFindings` call, and + * that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 8; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The value returned by the last `ListFindingsResponse`; indicates + * that this is a continuation of a prior `ListFindings` call, and + * that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 8; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. + * + * Generated from protobuf field int32 page_size = 9; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. + * + * Generated from protobuf field int32 page_size = 9; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListFindingsResponse.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListFindingsResponse.php new file mode 100644 index 000000000000..f0f409419e18 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListFindingsResponse.php @@ -0,0 +1,183 @@ +google.cloud.securitycenter.v1.ListFindingsResponse + */ +class ListFindingsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Findings matching the list request. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult list_findings_results = 1; + */ + private $list_findings_results; + /** + * Time used for executing the list request. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 2; + */ + protected $read_time = null; + /** + * Token to retrieve the next page of results, or empty if there are no more + * results. + * + * Generated from protobuf field string next_page_token = 3; + */ + protected $next_page_token = ''; + /** + * The total number of findings matching the query. + * + * Generated from protobuf field int32 total_size = 4; + */ + protected $total_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\SecurityCenter\V1\ListFindingsResponse\ListFindingsResult>|\Google\Protobuf\Internal\RepeatedField $list_findings_results + * Findings matching the list request. + * @type \Google\Protobuf\Timestamp $read_time + * Time used for executing the list request. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no more + * results. + * @type int $total_size + * The total number of findings matching the query. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Findings matching the list request. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult list_findings_results = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getListFindingsResults() + { + return $this->list_findings_results; + } + + /** + * Findings matching the list request. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult list_findings_results = 1; + * @param array<\Google\Cloud\SecurityCenter\V1\ListFindingsResponse\ListFindingsResult>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setListFindingsResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\ListFindingsResponse\ListFindingsResult::class); + $this->list_findings_results = $arr; + + return $this; + } + + /** + * Time used for executing the list request. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->read_time; + } + + public function hasReadTime() + { + return isset($this->read_time); + } + + public function clearReadTime() + { + unset($this->read_time); + } + + /** + * Time used for executing the list request. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->read_time = $var; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results. + * + * Generated from protobuf field string next_page_token = 3; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results. + * + * Generated from protobuf field string next_page_token = 3; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * The total number of findings matching the query. + * + * Generated from protobuf field int32 total_size = 4; + * @return int + */ + public function getTotalSize() + { + return $this->total_size; + } + + /** + * The total number of findings matching the query. + * + * Generated from protobuf field int32 total_size = 4; + * @param int $var + * @return $this + */ + public function setTotalSize($var) + { + GPBUtil::checkInt32($var); + $this->total_size = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListFindingsResponse/ListFindingsResult.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListFindingsResponse/ListFindingsResult.php new file mode 100644 index 000000000000..f24a6f2dedd5 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListFindingsResponse/ListFindingsResult.php @@ -0,0 +1,158 @@ +google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult + */ +class ListFindingsResult extends \Google\Protobuf\Internal\Message +{ + /** + * Finding matching the search request. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Finding finding = 1; + */ + protected $finding = null; + /** + * State change of the finding between the points in time. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.StateChange state_change = 2; + */ + protected $state_change = 0; + /** + * Output only. Resource that is associated with this finding. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource resource = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $resource = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\SecurityCenter\V1\Finding $finding + * Finding matching the search request. + * @type int $state_change + * State change of the finding between the points in time. + * @type \Google\Cloud\SecurityCenter\V1\ListFindingsResponse\ListFindingsResult\Resource $resource + * Output only. Resource that is associated with this finding. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Finding matching the search request. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Finding finding = 1; + * @return \Google\Cloud\SecurityCenter\V1\Finding|null + */ + public function getFinding() + { + return $this->finding; + } + + public function hasFinding() + { + return isset($this->finding); + } + + public function clearFinding() + { + unset($this->finding); + } + + /** + * Finding matching the search request. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Finding finding = 1; + * @param \Google\Cloud\SecurityCenter\V1\Finding $var + * @return $this + */ + public function setFinding($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\Finding::class); + $this->finding = $var; + + return $this; + } + + /** + * State change of the finding between the points in time. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.StateChange state_change = 2; + * @return int + */ + public function getStateChange() + { + return $this->state_change; + } + + /** + * State change of the finding between the points in time. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.StateChange state_change = 2; + * @param int $var + * @return $this + */ + public function setStateChange($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1\ListFindingsResponse\ListFindingsResult\StateChange::class); + $this->state_change = $var; + + return $this; + } + + /** + * Output only. Resource that is associated with this finding. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource resource = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\SecurityCenter\V1\ListFindingsResponse\ListFindingsResult\Resource|null + */ + public function getResource() + { + return $this->resource; + } + + public function hasResource() + { + return isset($this->resource); + } + + public function clearResource() + { + unset($this->resource); + } + + /** + * Output only. Resource that is associated with this finding. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource resource = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\SecurityCenter\V1\ListFindingsResponse\ListFindingsResult\Resource $var + * @return $this + */ + public function setResource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\ListFindingsResponse\ListFindingsResult\Resource::class); + $this->resource = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ListFindingsResult::class, \Google\Cloud\SecurityCenter\V1\ListFindingsResponse_ListFindingsResult::class); + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListFindingsResponse/ListFindingsResult/Resource.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListFindingsResponse/ListFindingsResult/Resource.php new file mode 100644 index 000000000000..be2d2d246150 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListFindingsResponse/ListFindingsResult/Resource.php @@ -0,0 +1,321 @@ +google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource + */ +class Resource extends \Google\Protobuf\Internal\Message +{ + /** + * The full resource name of the resource. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The human readable name of the resource. + * + * Generated from protobuf field string display_name = 8; + */ + protected $display_name = ''; + /** + * The full resource type of the resource. + * + * Generated from protobuf field string type = 6; + */ + protected $type = ''; + /** + * The full resource name of project that the resource belongs to. + * + * Generated from protobuf field string project_name = 2; + */ + protected $project_name = ''; + /** + * The project ID that the resource belongs to. + * + * Generated from protobuf field string project_display_name = 3; + */ + protected $project_display_name = ''; + /** + * The full resource name of resource's parent. + * + * Generated from protobuf field string parent_name = 4; + */ + protected $parent_name = ''; + /** + * The human readable name of resource's parent. + * + * Generated from protobuf field string parent_display_name = 5; + */ + protected $parent_display_name = ''; + /** + * Contains a Folder message for each folder in the assets ancestry. + * The first folder is the deepest nested folder, and the last folder is + * the folder directly under the Organization. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Folder folders = 7; + */ + private $folders; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The full resource name of the resource. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + * @type string $display_name + * The human readable name of the resource. + * @type string $type + * The full resource type of the resource. + * @type string $project_name + * The full resource name of project that the resource belongs to. + * @type string $project_display_name + * The project ID that the resource belongs to. + * @type string $parent_name + * The full resource name of resource's parent. + * @type string $parent_display_name + * The human readable name of resource's parent. + * @type array<\Google\Cloud\SecurityCenter\V1\Folder>|\Google\Protobuf\Internal\RepeatedField $folders + * Contains a Folder message for each folder in the assets ancestry. + * The first folder is the deepest nested folder, and the last folder is + * the folder directly under the Organization. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * The full resource name of the resource. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The full resource name of the resource. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The human readable name of the resource. + * + * Generated from protobuf field string display_name = 8; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The human readable name of the resource. + * + * Generated from protobuf field string display_name = 8; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * The full resource type of the resource. + * + * Generated from protobuf field string type = 6; + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * The full resource type of the resource. + * + * Generated from protobuf field string type = 6; + * @param string $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkString($var, True); + $this->type = $var; + + return $this; + } + + /** + * The full resource name of project that the resource belongs to. + * + * Generated from protobuf field string project_name = 2; + * @return string + */ + public function getProjectName() + { + return $this->project_name; + } + + /** + * The full resource name of project that the resource belongs to. + * + * Generated from protobuf field string project_name = 2; + * @param string $var + * @return $this + */ + public function setProjectName($var) + { + GPBUtil::checkString($var, True); + $this->project_name = $var; + + return $this; + } + + /** + * The project ID that the resource belongs to. + * + * Generated from protobuf field string project_display_name = 3; + * @return string + */ + public function getProjectDisplayName() + { + return $this->project_display_name; + } + + /** + * The project ID that the resource belongs to. + * + * Generated from protobuf field string project_display_name = 3; + * @param string $var + * @return $this + */ + public function setProjectDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->project_display_name = $var; + + return $this; + } + + /** + * The full resource name of resource's parent. + * + * Generated from protobuf field string parent_name = 4; + * @return string + */ + public function getParentName() + { + return $this->parent_name; + } + + /** + * The full resource name of resource's parent. + * + * Generated from protobuf field string parent_name = 4; + * @param string $var + * @return $this + */ + public function setParentName($var) + { + GPBUtil::checkString($var, True); + $this->parent_name = $var; + + return $this; + } + + /** + * The human readable name of resource's parent. + * + * Generated from protobuf field string parent_display_name = 5; + * @return string + */ + public function getParentDisplayName() + { + return $this->parent_display_name; + } + + /** + * The human readable name of resource's parent. + * + * Generated from protobuf field string parent_display_name = 5; + * @param string $var + * @return $this + */ + public function setParentDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->parent_display_name = $var; + + return $this; + } + + /** + * Contains a Folder message for each folder in the assets ancestry. + * The first folder is the deepest nested folder, and the last folder is + * the folder directly under the Organization. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Folder folders = 7; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFolders() + { + return $this->folders; + } + + /** + * Contains a Folder message for each folder in the assets ancestry. + * The first folder is the deepest nested folder, and the last folder is + * the folder directly under the Organization. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Folder folders = 7; + * @param array<\Google\Cloud\SecurityCenter\V1\Folder>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFolders($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\Folder::class); + $this->folders = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Resource::class, \Google\Cloud\SecurityCenter\V1\ListFindingsResponse_ListFindingsResult_Resource::class); + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListFindingsResponse/ListFindingsResult/StateChange.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListFindingsResponse/ListFindingsResult/StateChange.php new file mode 100644 index 000000000000..f723d59d4747 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListFindingsResponse/ListFindingsResult/StateChange.php @@ -0,0 +1,87 @@ +google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.StateChange + */ +class StateChange +{ + /** + * State change is unused, this is the canonical default for this enum. + * + * Generated from protobuf enum UNUSED = 0; + */ + const UNUSED = 0; + /** + * The finding has changed state in some way between the points in time + * and existed at both points. + * + * Generated from protobuf enum CHANGED = 1; + */ + const CHANGED = 1; + /** + * The finding has not changed state between the points in time and + * existed at both points. + * + * Generated from protobuf enum UNCHANGED = 2; + */ + const UNCHANGED = 2; + /** + * The finding was created between the points in time. + * + * Generated from protobuf enum ADDED = 3; + */ + const ADDED = 3; + /** + * The finding at timestamp does not match the filter specified, but it + * did at timestamp - compare_duration. + * + * Generated from protobuf enum REMOVED = 4; + */ + const REMOVED = 4; + + private static $valueToName = [ + self::UNUSED => 'UNUSED', + self::CHANGED => 'CHANGED', + self::UNCHANGED => 'UNCHANGED', + self::ADDED => 'ADDED', + self::REMOVED => 'REMOVED', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(StateChange::class, \Google\Cloud\SecurityCenter\V1\ListFindingsResponse_ListFindingsResult_StateChange::class); + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListFindingsResponse_ListFindingsResult.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListFindingsResponse_ListFindingsResult.php new file mode 100644 index 000000000000..b9d33513225a --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListFindingsResponse_ListFindingsResult.php @@ -0,0 +1,16 @@ +google.cloud.securitycenter.v1.ListMuteConfigsRequest + */ +class ListMuteConfigsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns the collection of mute configs. Its format + * is "organizations/[organization_id]", "folders/[folder_id]", + * "projects/[project_id]". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of configs to return. The service may return fewer than + * this value. + * If unspecified, at most 10 configs will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A page token, received from a previous `ListMuteConfigs` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListMuteConfigs` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent, which owns the collection of mute configs. Its format + * is "organizations/[organization_id]", "folders/[folder_id]", + * "projects/[project_id]". + * @type int $page_size + * The maximum number of configs to return. The service may return fewer than + * this value. + * If unspecified, at most 10 configs will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * @type string $page_token + * A page token, received from a previous `ListMuteConfigs` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListMuteConfigs` must + * match the call that provided the page token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns the collection of mute configs. Its format + * is "organizations/[organization_id]", "folders/[folder_id]", + * "projects/[project_id]". + * + * 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. The parent, which owns the collection of mute configs. Its format + * is "organizations/[organization_id]", "folders/[folder_id]", + * "projects/[project_id]". + * + * 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; + } + + /** + * The maximum number of configs to return. The service may return fewer than + * this value. + * If unspecified, at most 10 configs will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of configs to return. The service may return fewer than + * this value. + * If unspecified, at most 10 configs will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A page token, received from a previous `ListMuteConfigs` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListMuteConfigs` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A page token, received from a previous `ListMuteConfigs` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListMuteConfigs` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + * @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/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListMuteConfigsResponse.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListMuteConfigsResponse.php new file mode 100644 index 000000000000..31b493a80a68 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListMuteConfigsResponse.php @@ -0,0 +1,105 @@ +google.cloud.securitycenter.v1.ListMuteConfigsResponse + */ +class ListMuteConfigsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The mute configs from the specified parent. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.MuteConfig mute_configs = 1; + */ + private $mute_configs; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\SecurityCenter\V1\MuteConfig>|\Google\Protobuf\Internal\RepeatedField $mute_configs + * The mute configs from the specified parent. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * The mute configs from the specified parent. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.MuteConfig mute_configs = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMuteConfigs() + { + return $this->mute_configs; + } + + /** + * The mute configs from the specified parent. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.MuteConfig mute_configs = 1; + * @param array<\Google\Cloud\SecurityCenter\V1\MuteConfig>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMuteConfigs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\MuteConfig::class); + $this->mute_configs = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @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/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListNotificationConfigsRequest.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListNotificationConfigsRequest.php new file mode 100644 index 000000000000..362049967fae --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListNotificationConfigsRequest.php @@ -0,0 +1,155 @@ +google.cloud.securitycenter.v1.ListNotificationConfigsRequest + */ +class ListNotificationConfigsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the parent in which to list the notification + * configurations. Its format is "organizations/[organization_id]", + * "folders/[folder_id]", or "projects/[project_id]". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The value returned by the last `ListNotificationConfigsResponse`; indicates + * that this is a continuation of a prior `ListNotificationConfigs` call, and + * that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 2; + */ + protected $page_token = ''; + /** + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. + * + * Generated from protobuf field int32 page_size = 3; + */ + protected $page_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of the parent in which to list the notification + * configurations. Its format is "organizations/[organization_id]", + * "folders/[folder_id]", or "projects/[project_id]". + * @type string $page_token + * The value returned by the last `ListNotificationConfigsResponse`; indicates + * that this is a continuation of a prior `ListNotificationConfigs` call, and + * that the system should return the next page of data. + * @type int $page_size + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the parent in which to list the notification + * configurations. Its format is "organizations/[organization_id]", + * "folders/[folder_id]", or "projects/[project_id]". + * + * 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. The name of the parent in which to list the notification + * configurations. Its format is "organizations/[organization_id]", + * "folders/[folder_id]", or "projects/[project_id]". + * + * 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; + } + + /** + * The value returned by the last `ListNotificationConfigsResponse`; indicates + * that this is a continuation of a prior `ListNotificationConfigs` call, and + * that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 2; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The value returned by the last `ListNotificationConfigsResponse`; indicates + * that this is a continuation of a prior `ListNotificationConfigs` call, and + * that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 2; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. + * + * Generated from protobuf field int32 page_size = 3; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. + * + * Generated from protobuf field int32 page_size = 3; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListNotificationConfigsResponse.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListNotificationConfigsResponse.php new file mode 100644 index 000000000000..a6fa6d4a15b2 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListNotificationConfigsResponse.php @@ -0,0 +1,105 @@ +google.cloud.securitycenter.v1.ListNotificationConfigsResponse + */ +class ListNotificationConfigsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Notification configs belonging to the requested parent. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.NotificationConfig notification_configs = 1; + */ + private $notification_configs; + /** + * Token to retrieve the next page of results, or empty if there are no more + * results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\SecurityCenter\V1\NotificationConfig>|\Google\Protobuf\Internal\RepeatedField $notification_configs + * Notification configs belonging to the requested parent. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no more + * results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Notification configs belonging to the requested parent. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.NotificationConfig notification_configs = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNotificationConfigs() + { + return $this->notification_configs; + } + + /** + * Notification configs belonging to the requested parent. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.NotificationConfig notification_configs = 1; + * @param array<\Google\Cloud\SecurityCenter\V1\NotificationConfig>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNotificationConfigs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\NotificationConfig::class); + $this->notification_configs = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results. + * + * Generated from protobuf field string next_page_token = 2; + * @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/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListSourcesRequest.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListSourcesRequest.php new file mode 100644 index 000000000000..b81a0d450f1f --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListSourcesRequest.php @@ -0,0 +1,155 @@ +google.cloud.securitycenter.v1.ListSourcesRequest + */ +class ListSourcesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the parent of sources to list. Its format should + * be "organizations/[organization_id]", "folders/[folder_id]", or + * "projects/[project_id]". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The value returned by the last `ListSourcesResponse`; indicates + * that this is a continuation of a prior `ListSources` call, and + * that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 2; + */ + protected $page_token = ''; + /** + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. + * + * Generated from protobuf field int32 page_size = 7; + */ + protected $page_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Resource name of the parent of sources to list. Its format should + * be "organizations/[organization_id]", "folders/[folder_id]", or + * "projects/[project_id]". + * @type string $page_token + * The value returned by the last `ListSourcesResponse`; indicates + * that this is a continuation of a prior `ListSources` call, and + * that the system should return the next page of data. + * @type int $page_size + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the parent of sources to list. Its format should + * be "organizations/[organization_id]", "folders/[folder_id]", or + * "projects/[project_id]". + * + * 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. Resource name of the parent of sources to list. Its format should + * be "organizations/[organization_id]", "folders/[folder_id]", or + * "projects/[project_id]". + * + * 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; + } + + /** + * The value returned by the last `ListSourcesResponse`; indicates + * that this is a continuation of a prior `ListSources` call, and + * that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 2; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The value returned by the last `ListSourcesResponse`; indicates + * that this is a continuation of a prior `ListSources` call, and + * that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 2; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. + * + * Generated from protobuf field int32 page_size = 7; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. + * + * Generated from protobuf field int32 page_size = 7; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListSourcesResponse.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListSourcesResponse.php new file mode 100644 index 000000000000..97309f3b340f --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListSourcesResponse.php @@ -0,0 +1,105 @@ +google.cloud.securitycenter.v1.ListSourcesResponse + */ +class ListSourcesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Sources belonging to the requested parent. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Source sources = 1; + */ + private $sources; + /** + * Token to retrieve the next page of results, or empty if there are no more + * results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\SecurityCenter\V1\Source>|\Google\Protobuf\Internal\RepeatedField $sources + * Sources belonging to the requested parent. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no more + * results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Sources belonging to the requested parent. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Source sources = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSources() + { + return $this->sources; + } + + /** + * Sources belonging to the requested parent. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Source sources = 1; + * @param array<\Google\Cloud\SecurityCenter\V1\Source>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSources($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\Source::class); + $this->sources = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results. + * + * Generated from protobuf field string next_page_token = 2; + * @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/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/MitreAttack.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/MitreAttack.php new file mode 100644 index 000000000000..77ad4a2a0770 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/MitreAttack.php @@ -0,0 +1,228 @@ +google.cloud.securitycenter.v1.MitreAttack + */ +class MitreAttack extends \Google\Protobuf\Internal\Message +{ + /** + * The MITRE ATT&CK tactic most closely represented by this finding, if any. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.MitreAttack.Tactic primary_tactic = 1; + */ + protected $primary_tactic = 0; + /** + * The MITRE ATT&CK technique most closely represented by this finding, if + * any. primary_techniques is a repeated field because there are multiple + * levels of MITRE ATT&CK techniques. If the technique most closely + * represented by this finding is a sub-technique (e.g. `SCANNING_IP_BLOCKS`), + * both the sub-technique and its parent technique(s) will be listed (e.g. + * `SCANNING_IP_BLOCKS`, `ACTIVE_SCANNING`). + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.MitreAttack.Technique primary_techniques = 2; + */ + private $primary_techniques; + /** + * Additional MITRE ATT&CK tactics related to this finding, if any. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.MitreAttack.Tactic additional_tactics = 3; + */ + private $additional_tactics; + /** + * Additional MITRE ATT&CK techniques related to this finding, if any, along + * with any of their respective parent techniques. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.MitreAttack.Technique additional_techniques = 4; + */ + private $additional_techniques; + /** + * The MITRE ATT&CK version referenced by the above fields. E.g. "8". + * + * Generated from protobuf field string version = 5; + */ + protected $version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $primary_tactic + * The MITRE ATT&CK tactic most closely represented by this finding, if any. + * @type array|\Google\Protobuf\Internal\RepeatedField $primary_techniques + * The MITRE ATT&CK technique most closely represented by this finding, if + * any. primary_techniques is a repeated field because there are multiple + * levels of MITRE ATT&CK techniques. If the technique most closely + * represented by this finding is a sub-technique (e.g. `SCANNING_IP_BLOCKS`), + * both the sub-technique and its parent technique(s) will be listed (e.g. + * `SCANNING_IP_BLOCKS`, `ACTIVE_SCANNING`). + * @type array|\Google\Protobuf\Internal\RepeatedField $additional_tactics + * Additional MITRE ATT&CK tactics related to this finding, if any. + * @type array|\Google\Protobuf\Internal\RepeatedField $additional_techniques + * Additional MITRE ATT&CK techniques related to this finding, if any, along + * with any of their respective parent techniques. + * @type string $version + * The MITRE ATT&CK version referenced by the above fields. E.g. "8". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\MitreAttack::initOnce(); + parent::__construct($data); + } + + /** + * The MITRE ATT&CK tactic most closely represented by this finding, if any. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.MitreAttack.Tactic primary_tactic = 1; + * @return int + */ + public function getPrimaryTactic() + { + return $this->primary_tactic; + } + + /** + * The MITRE ATT&CK tactic most closely represented by this finding, if any. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.MitreAttack.Tactic primary_tactic = 1; + * @param int $var + * @return $this + */ + public function setPrimaryTactic($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1\MitreAttack\Tactic::class); + $this->primary_tactic = $var; + + return $this; + } + + /** + * The MITRE ATT&CK technique most closely represented by this finding, if + * any. primary_techniques is a repeated field because there are multiple + * levels of MITRE ATT&CK techniques. If the technique most closely + * represented by this finding is a sub-technique (e.g. `SCANNING_IP_BLOCKS`), + * both the sub-technique and its parent technique(s) will be listed (e.g. + * `SCANNING_IP_BLOCKS`, `ACTIVE_SCANNING`). + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.MitreAttack.Technique primary_techniques = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPrimaryTechniques() + { + return $this->primary_techniques; + } + + /** + * The MITRE ATT&CK technique most closely represented by this finding, if + * any. primary_techniques is a repeated field because there are multiple + * levels of MITRE ATT&CK techniques. If the technique most closely + * represented by this finding is a sub-technique (e.g. `SCANNING_IP_BLOCKS`), + * both the sub-technique and its parent technique(s) will be listed (e.g. + * `SCANNING_IP_BLOCKS`, `ACTIVE_SCANNING`). + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.MitreAttack.Technique primary_techniques = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPrimaryTechniques($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\SecurityCenter\V1\MitreAttack\Technique::class); + $this->primary_techniques = $arr; + + return $this; + } + + /** + * Additional MITRE ATT&CK tactics related to this finding, if any. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.MitreAttack.Tactic additional_tactics = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAdditionalTactics() + { + return $this->additional_tactics; + } + + /** + * Additional MITRE ATT&CK tactics related to this finding, if any. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.MitreAttack.Tactic additional_tactics = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAdditionalTactics($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\SecurityCenter\V1\MitreAttack\Tactic::class); + $this->additional_tactics = $arr; + + return $this; + } + + /** + * Additional MITRE ATT&CK techniques related to this finding, if any, along + * with any of their respective parent techniques. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.MitreAttack.Technique additional_techniques = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAdditionalTechniques() + { + return $this->additional_techniques; + } + + /** + * Additional MITRE ATT&CK techniques related to this finding, if any, along + * with any of their respective parent techniques. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.MitreAttack.Technique additional_techniques = 4; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAdditionalTechniques($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\SecurityCenter\V1\MitreAttack\Technique::class); + $this->additional_techniques = $arr; + + return $this; + } + + /** + * The MITRE ATT&CK version referenced by the above fields. E.g. "8". + * + * Generated from protobuf field string version = 5; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * The MITRE ATT&CK version referenced by the above fields. E.g. "8". + * + * Generated from protobuf field string version = 5; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/MitreAttack/Tactic.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/MitreAttack/Tactic.php new file mode 100644 index 000000000000..d59277981594 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/MitreAttack/Tactic.php @@ -0,0 +1,149 @@ +google.cloud.securitycenter.v1.MitreAttack.Tactic + */ +class Tactic +{ + /** + * Unspecified value. + * + * Generated from protobuf enum TACTIC_UNSPECIFIED = 0; + */ + const TACTIC_UNSPECIFIED = 0; + /** + * TA0043 + * + * Generated from protobuf enum RECONNAISSANCE = 1; + */ + const RECONNAISSANCE = 1; + /** + * TA0042 + * + * Generated from protobuf enum RESOURCE_DEVELOPMENT = 2; + */ + const RESOURCE_DEVELOPMENT = 2; + /** + * TA0001 + * + * Generated from protobuf enum INITIAL_ACCESS = 5; + */ + const INITIAL_ACCESS = 5; + /** + * TA0002 + * + * Generated from protobuf enum EXECUTION = 3; + */ + const EXECUTION = 3; + /** + * TA0003 + * + * Generated from protobuf enum PERSISTENCE = 6; + */ + const PERSISTENCE = 6; + /** + * TA0004 + * + * Generated from protobuf enum PRIVILEGE_ESCALATION = 8; + */ + const PRIVILEGE_ESCALATION = 8; + /** + * TA0005 + * + * Generated from protobuf enum DEFENSE_EVASION = 7; + */ + const DEFENSE_EVASION = 7; + /** + * TA0006 + * + * Generated from protobuf enum CREDENTIAL_ACCESS = 9; + */ + const CREDENTIAL_ACCESS = 9; + /** + * TA0007 + * + * Generated from protobuf enum DISCOVERY = 10; + */ + const DISCOVERY = 10; + /** + * TA0008 + * + * Generated from protobuf enum LATERAL_MOVEMENT = 11; + */ + const LATERAL_MOVEMENT = 11; + /** + * TA0009 + * + * Generated from protobuf enum COLLECTION = 12; + */ + const COLLECTION = 12; + /** + * TA0011 + * + * Generated from protobuf enum COMMAND_AND_CONTROL = 4; + */ + const COMMAND_AND_CONTROL = 4; + /** + * TA0010 + * + * Generated from protobuf enum EXFILTRATION = 13; + */ + const EXFILTRATION = 13; + /** + * TA0040 + * + * Generated from protobuf enum IMPACT = 14; + */ + const IMPACT = 14; + + private static $valueToName = [ + self::TACTIC_UNSPECIFIED => 'TACTIC_UNSPECIFIED', + self::RECONNAISSANCE => 'RECONNAISSANCE', + self::RESOURCE_DEVELOPMENT => 'RESOURCE_DEVELOPMENT', + self::INITIAL_ACCESS => 'INITIAL_ACCESS', + self::EXECUTION => 'EXECUTION', + self::PERSISTENCE => 'PERSISTENCE', + self::PRIVILEGE_ESCALATION => 'PRIVILEGE_ESCALATION', + self::DEFENSE_EVASION => 'DEFENSE_EVASION', + self::CREDENTIAL_ACCESS => 'CREDENTIAL_ACCESS', + self::DISCOVERY => 'DISCOVERY', + self::LATERAL_MOVEMENT => 'LATERAL_MOVEMENT', + self::COLLECTION => 'COLLECTION', + self::COMMAND_AND_CONTROL => 'COMMAND_AND_CONTROL', + self::EXFILTRATION => 'EXFILTRATION', + self::IMPACT => 'IMPACT', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Tactic::class, \Google\Cloud\SecurityCenter\V1\MitreAttack_Tactic::class); + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/MitreAttack/Technique.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/MitreAttack/Technique.php new file mode 100644 index 000000000000..cef1c7d69067 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/MitreAttack/Technique.php @@ -0,0 +1,296 @@ +google.cloud.securitycenter.v1.MitreAttack.Technique + */ +class Technique +{ + /** + * Unspecified value. + * + * Generated from protobuf enum TECHNIQUE_UNSPECIFIED = 0; + */ + const TECHNIQUE_UNSPECIFIED = 0; + /** + * T1595 + * + * Generated from protobuf enum ACTIVE_SCANNING = 1; + */ + const ACTIVE_SCANNING = 1; + /** + * T1595.001 + * + * Generated from protobuf enum SCANNING_IP_BLOCKS = 2; + */ + const SCANNING_IP_BLOCKS = 2; + /** + * T1105 + * + * Generated from protobuf enum INGRESS_TOOL_TRANSFER = 3; + */ + const INGRESS_TOOL_TRANSFER = 3; + /** + * T1106 + * + * Generated from protobuf enum NATIVE_API = 4; + */ + const NATIVE_API = 4; + /** + * T1129 + * + * Generated from protobuf enum SHARED_MODULES = 5; + */ + const SHARED_MODULES = 5; + /** + * T1059 + * + * Generated from protobuf enum COMMAND_AND_SCRIPTING_INTERPRETER = 6; + */ + const COMMAND_AND_SCRIPTING_INTERPRETER = 6; + /** + * T1059.004 + * + * Generated from protobuf enum UNIX_SHELL = 7; + */ + const UNIX_SHELL = 7; + /** + * T1496 + * + * Generated from protobuf enum RESOURCE_HIJACKING = 8; + */ + const RESOURCE_HIJACKING = 8; + /** + * T1090 + * + * Generated from protobuf enum PROXY = 9; + */ + const PROXY = 9; + /** + * T1090.002 + * + * Generated from protobuf enum EXTERNAL_PROXY = 10; + */ + const EXTERNAL_PROXY = 10; + /** + * T1090.003 + * + * Generated from protobuf enum MULTI_HOP_PROXY = 11; + */ + const MULTI_HOP_PROXY = 11; + /** + * T1568 + * + * Generated from protobuf enum DYNAMIC_RESOLUTION = 12; + */ + const DYNAMIC_RESOLUTION = 12; + /** + * T1552 + * + * Generated from protobuf enum UNSECURED_CREDENTIALS = 13; + */ + const UNSECURED_CREDENTIALS = 13; + /** + * T1078 + * + * Generated from protobuf enum VALID_ACCOUNTS = 14; + */ + const VALID_ACCOUNTS = 14; + /** + * T1078.003 + * + * Generated from protobuf enum LOCAL_ACCOUNTS = 15; + */ + const LOCAL_ACCOUNTS = 15; + /** + * T1078.004 + * + * Generated from protobuf enum CLOUD_ACCOUNTS = 16; + */ + const CLOUD_ACCOUNTS = 16; + /** + * T1498 + * + * Generated from protobuf enum NETWORK_DENIAL_OF_SERVICE = 17; + */ + const NETWORK_DENIAL_OF_SERVICE = 17; + /** + * T1069 + * + * Generated from protobuf enum PERMISSION_GROUPS_DISCOVERY = 18; + */ + const PERMISSION_GROUPS_DISCOVERY = 18; + /** + * T1069.003 + * + * Generated from protobuf enum CLOUD_GROUPS = 19; + */ + const CLOUD_GROUPS = 19; + /** + * T1567 + * + * Generated from protobuf enum EXFILTRATION_OVER_WEB_SERVICE = 20; + */ + const EXFILTRATION_OVER_WEB_SERVICE = 20; + /** + * T1567.002 + * + * Generated from protobuf enum EXFILTRATION_TO_CLOUD_STORAGE = 21; + */ + const EXFILTRATION_TO_CLOUD_STORAGE = 21; + /** + * T1098 + * + * Generated from protobuf enum ACCOUNT_MANIPULATION = 22; + */ + const ACCOUNT_MANIPULATION = 22; + /** + * T1098.004 + * + * Generated from protobuf enum SSH_AUTHORIZED_KEYS = 23; + */ + const SSH_AUTHORIZED_KEYS = 23; + /** + * T1543 + * + * Generated from protobuf enum CREATE_OR_MODIFY_SYSTEM_PROCESS = 24; + */ + const CREATE_OR_MODIFY_SYSTEM_PROCESS = 24; + /** + * T1539 + * + * Generated from protobuf enum STEAL_WEB_SESSION_COOKIE = 25; + */ + const STEAL_WEB_SESSION_COOKIE = 25; + /** + * T1578 + * + * Generated from protobuf enum MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE = 26; + */ + const MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE = 26; + /** + * T1190 + * + * Generated from protobuf enum EXPLOIT_PUBLIC_FACING_APPLICATION = 27; + */ + const EXPLOIT_PUBLIC_FACING_APPLICATION = 27; + /** + * T1556 + * + * Generated from protobuf enum MODIFY_AUTHENTICATION_PROCESS = 28; + */ + const MODIFY_AUTHENTICATION_PROCESS = 28; + /** + * T1485 + * + * Generated from protobuf enum DATA_DESTRUCTION = 29; + */ + const DATA_DESTRUCTION = 29; + /** + * T1484 + * + * Generated from protobuf enum DOMAIN_POLICY_MODIFICATION = 30; + */ + const DOMAIN_POLICY_MODIFICATION = 30; + /** + * T1562 + * + * Generated from protobuf enum IMPAIR_DEFENSES = 31; + */ + const IMPAIR_DEFENSES = 31; + /** + * T1046 + * + * Generated from protobuf enum NETWORK_SERVICE_DISCOVERY = 32; + */ + const NETWORK_SERVICE_DISCOVERY = 32; + /** + * T1134 + * + * Generated from protobuf enum ACCESS_TOKEN_MANIPULATION = 33; + */ + const ACCESS_TOKEN_MANIPULATION = 33; + /** + * T1548 + * + * Generated from protobuf enum ABUSE_ELEVATION_CONTROL_MECHANISM = 34; + */ + const ABUSE_ELEVATION_CONTROL_MECHANISM = 34; + /** + * T1078.001 + * + * Generated from protobuf enum DEFAULT_ACCOUNTS = 35; + */ + const DEFAULT_ACCOUNTS = 35; + + private static $valueToName = [ + self::TECHNIQUE_UNSPECIFIED => 'TECHNIQUE_UNSPECIFIED', + self::ACTIVE_SCANNING => 'ACTIVE_SCANNING', + self::SCANNING_IP_BLOCKS => 'SCANNING_IP_BLOCKS', + self::INGRESS_TOOL_TRANSFER => 'INGRESS_TOOL_TRANSFER', + self::NATIVE_API => 'NATIVE_API', + self::SHARED_MODULES => 'SHARED_MODULES', + self::COMMAND_AND_SCRIPTING_INTERPRETER => 'COMMAND_AND_SCRIPTING_INTERPRETER', + self::UNIX_SHELL => 'UNIX_SHELL', + self::RESOURCE_HIJACKING => 'RESOURCE_HIJACKING', + self::PROXY => 'PROXY', + self::EXTERNAL_PROXY => 'EXTERNAL_PROXY', + self::MULTI_HOP_PROXY => 'MULTI_HOP_PROXY', + self::DYNAMIC_RESOLUTION => 'DYNAMIC_RESOLUTION', + self::UNSECURED_CREDENTIALS => 'UNSECURED_CREDENTIALS', + self::VALID_ACCOUNTS => 'VALID_ACCOUNTS', + self::LOCAL_ACCOUNTS => 'LOCAL_ACCOUNTS', + self::CLOUD_ACCOUNTS => 'CLOUD_ACCOUNTS', + self::NETWORK_DENIAL_OF_SERVICE => 'NETWORK_DENIAL_OF_SERVICE', + self::PERMISSION_GROUPS_DISCOVERY => 'PERMISSION_GROUPS_DISCOVERY', + self::CLOUD_GROUPS => 'CLOUD_GROUPS', + self::EXFILTRATION_OVER_WEB_SERVICE => 'EXFILTRATION_OVER_WEB_SERVICE', + self::EXFILTRATION_TO_CLOUD_STORAGE => 'EXFILTRATION_TO_CLOUD_STORAGE', + self::ACCOUNT_MANIPULATION => 'ACCOUNT_MANIPULATION', + self::SSH_AUTHORIZED_KEYS => 'SSH_AUTHORIZED_KEYS', + self::CREATE_OR_MODIFY_SYSTEM_PROCESS => 'CREATE_OR_MODIFY_SYSTEM_PROCESS', + self::STEAL_WEB_SESSION_COOKIE => 'STEAL_WEB_SESSION_COOKIE', + self::MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE => 'MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE', + self::EXPLOIT_PUBLIC_FACING_APPLICATION => 'EXPLOIT_PUBLIC_FACING_APPLICATION', + self::MODIFY_AUTHENTICATION_PROCESS => 'MODIFY_AUTHENTICATION_PROCESS', + self::DATA_DESTRUCTION => 'DATA_DESTRUCTION', + self::DOMAIN_POLICY_MODIFICATION => 'DOMAIN_POLICY_MODIFICATION', + self::IMPAIR_DEFENSES => 'IMPAIR_DEFENSES', + self::NETWORK_SERVICE_DISCOVERY => 'NETWORK_SERVICE_DISCOVERY', + self::ACCESS_TOKEN_MANIPULATION => 'ACCESS_TOKEN_MANIPULATION', + self::ABUSE_ELEVATION_CONTROL_MECHANISM => 'ABUSE_ELEVATION_CONTROL_MECHANISM', + self::DEFAULT_ACCOUNTS => 'DEFAULT_ACCOUNTS', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Technique::class, \Google\Cloud\SecurityCenter\V1\MitreAttack_Technique::class); + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/MitreAttack_Tactic.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/MitreAttack_Tactic.php new file mode 100644 index 000000000000..ca32547c8da4 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/MitreAttack_Tactic.php @@ -0,0 +1,16 @@ +google.cloud.securitycenter.v1.MuteConfig + */ +class MuteConfig extends \Google\Protobuf\Internal\Message +{ + /** + * This field will be ignored if provided on config creation. Format + * "organizations/{organization}/muteConfigs/{mute_config}" + * "folders/{folder}/muteConfigs/{mute_config}" + * "projects/{project}/muteConfigs/{mute_config}" + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The human readable name to be displayed for the mute config. + * + * Generated from protobuf field string display_name = 2 [deprecated = true]; + * @deprecated + */ + protected $display_name = ''; + /** + * A description of the mute config. + * + * Generated from protobuf field string description = 3; + */ + protected $description = ''; + /** + * Required. An expression that defines the filter to apply across create/update events + * of findings. While creating a filter string, be mindful of the + * scope in which the mute configuration is being created. E.g., If a filter + * contains project = X but is created under the project = Y scope, it might + * not match any findings. + * The following field and operator combinations are supported: + * * severity: `=`, `:` + * * category: `=`, `:` + * * resource.name: `=`, `:` + * * resource.project_name: `=`, `:` + * * resource.project_display_name: `=`, `:` + * * resource.folders.resource_folder: `=`, `:` + * * resource.parent_name: `=`, `:` + * * resource.parent_display_name: `=`, `:` + * * resource.type: `=`, `:` + * * finding_class: `=`, `:` + * * indicator.ip_addresses: `=`, `:` + * * indicator.domains: `=`, `:` + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $filter = ''; + /** + * Output only. The time at which the mute config was created. + * This field is set by the server and will be ignored if provided on config + * creation. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The most recent time at which the mute config was updated. + * This field is set by the server and will be ignored if provided on config + * creation or update. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. Email address of the user who last edited the mute config. + * This field is set by the server and will be ignored if provided on config + * creation or update. + * + * Generated from protobuf field string most_recent_editor = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $most_recent_editor = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * This field will be ignored if provided on config creation. Format + * "organizations/{organization}/muteConfigs/{mute_config}" + * "folders/{folder}/muteConfigs/{mute_config}" + * "projects/{project}/muteConfigs/{mute_config}" + * @type string $display_name + * The human readable name to be displayed for the mute config. + * @type string $description + * A description of the mute config. + * @type string $filter + * Required. An expression that defines the filter to apply across create/update events + * of findings. While creating a filter string, be mindful of the + * scope in which the mute configuration is being created. E.g., If a filter + * contains project = X but is created under the project = Y scope, it might + * not match any findings. + * The following field and operator combinations are supported: + * * severity: `=`, `:` + * * category: `=`, `:` + * * resource.name: `=`, `:` + * * resource.project_name: `=`, `:` + * * resource.project_display_name: `=`, `:` + * * resource.folders.resource_folder: `=`, `:` + * * resource.parent_name: `=`, `:` + * * resource.parent_display_name: `=`, `:` + * * resource.type: `=`, `:` + * * finding_class: `=`, `:` + * * indicator.ip_addresses: `=`, `:` + * * indicator.domains: `=`, `:` + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time at which the mute config was created. + * This field is set by the server and will be ignored if provided on config + * creation. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The most recent time at which the mute config was updated. + * This field is set by the server and will be ignored if provided on config + * creation or update. + * @type string $most_recent_editor + * Output only. Email address of the user who last edited the mute config. + * This field is set by the server and will be ignored if provided on config + * creation or update. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\MuteConfig::initOnce(); + parent::__construct($data); + } + + /** + * This field will be ignored if provided on config creation. Format + * "organizations/{organization}/muteConfigs/{mute_config}" + * "folders/{folder}/muteConfigs/{mute_config}" + * "projects/{project}/muteConfigs/{mute_config}" + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * This field will be ignored if provided on config creation. Format + * "organizations/{organization}/muteConfigs/{mute_config}" + * "folders/{folder}/muteConfigs/{mute_config}" + * "projects/{project}/muteConfigs/{mute_config}" + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The human readable name to be displayed for the mute config. + * + * Generated from protobuf field string display_name = 2 [deprecated = true]; + * @return string + * @deprecated + */ + public function getDisplayName() + { + @trigger_error('display_name is deprecated.', E_USER_DEPRECATED); + return $this->display_name; + } + + /** + * The human readable name to be displayed for the mute config. + * + * Generated from protobuf field string display_name = 2 [deprecated = true]; + * @param string $var + * @return $this + * @deprecated + */ + public function setDisplayName($var) + { + @trigger_error('display_name is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * A description of the mute config. + * + * Generated from protobuf field string description = 3; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * A description of the mute config. + * + * Generated from protobuf field string description = 3; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Required. An expression that defines the filter to apply across create/update events + * of findings. While creating a filter string, be mindful of the + * scope in which the mute configuration is being created. E.g., If a filter + * contains project = X but is created under the project = Y scope, it might + * not match any findings. + * The following field and operator combinations are supported: + * * severity: `=`, `:` + * * category: `=`, `:` + * * resource.name: `=`, `:` + * * resource.project_name: `=`, `:` + * * resource.project_display_name: `=`, `:` + * * resource.folders.resource_folder: `=`, `:` + * * resource.parent_name: `=`, `:` + * * resource.parent_display_name: `=`, `:` + * * resource.type: `=`, `:` + * * finding_class: `=`, `:` + * * indicator.ip_addresses: `=`, `:` + * * indicator.domains: `=`, `:` + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Required. An expression that defines the filter to apply across create/update events + * of findings. While creating a filter string, be mindful of the + * scope in which the mute configuration is being created. E.g., If a filter + * contains project = X but is created under the project = Y scope, it might + * not match any findings. + * The following field and operator combinations are supported: + * * severity: `=`, `:` + * * category: `=`, `:` + * * resource.name: `=`, `:` + * * resource.project_name: `=`, `:` + * * resource.project_display_name: `=`, `:` + * * resource.folders.resource_folder: `=`, `:` + * * resource.parent_name: `=`, `:` + * * resource.parent_display_name: `=`, `:` + * * resource.type: `=`, `:` + * * finding_class: `=`, `:` + * * indicator.ip_addresses: `=`, `:` + * * indicator.domains: `=`, `:` + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Output only. The time at which the mute config was created. + * This field is set by the server and will be ignored if provided on config + * creation. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.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. The time at which the mute config was created. + * This field is set by the server and will be ignored if provided on config + * creation. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.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. The most recent time at which the mute config was updated. + * This field is set by the server and will be ignored if provided on config + * creation or update. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The most recent time at which the mute config was updated. + * This field is set by the server and will be ignored if provided on config + * creation or update. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. Email address of the user who last edited the mute config. + * This field is set by the server and will be ignored if provided on config + * creation or update. + * + * Generated from protobuf field string most_recent_editor = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getMostRecentEditor() + { + return $this->most_recent_editor; + } + + /** + * Output only. Email address of the user who last edited the mute config. + * This field is set by the server and will be ignored if provided on config + * creation or update. + * + * Generated from protobuf field string most_recent_editor = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setMostRecentEditor($var) + { + GPBUtil::checkString($var, True); + $this->most_recent_editor = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/NotificationConfig.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/NotificationConfig.php new file mode 100644 index 000000000000..5638bbb45c82 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/NotificationConfig.php @@ -0,0 +1,241 @@ +google.cloud.securitycenter.v1.NotificationConfig + */ +class NotificationConfig extends \Google\Protobuf\Internal\Message +{ + /** + * The relative resource name of this notification config. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Example: + * "organizations/{organization_id}/notificationConfigs/notify_public_bucket", + * "folders/{folder_id}/notificationConfigs/notify_public_bucket", + * or "projects/{project_id}/notificationConfigs/notify_public_bucket". + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The description of the notification config (max of 1024 characters). + * + * Generated from protobuf field string description = 2; + */ + protected $description = ''; + /** + * The Pub/Sub topic to send notifications to. Its format is + * "projects/[project_id]/topics/[topic]". + * + * Generated from protobuf field string pubsub_topic = 3 [(.google.api.resource_reference) = { + */ + protected $pubsub_topic = ''; + /** + * Output only. The service account that needs "pubsub.topics.publish" + * permission to publish to the Pub/Sub topic. + * + * Generated from protobuf field string service_account = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $service_account = ''; + protected $notify_config; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The relative resource name of this notification config. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Example: + * "organizations/{organization_id}/notificationConfigs/notify_public_bucket", + * "folders/{folder_id}/notificationConfigs/notify_public_bucket", + * or "projects/{project_id}/notificationConfigs/notify_public_bucket". + * @type string $description + * The description of the notification config (max of 1024 characters). + * @type string $pubsub_topic + * The Pub/Sub topic to send notifications to. Its format is + * "projects/[project_id]/topics/[topic]". + * @type string $service_account + * Output only. The service account that needs "pubsub.topics.publish" + * permission to publish to the Pub/Sub topic. + * @type \Google\Cloud\SecurityCenter\V1\NotificationConfig\StreamingConfig $streaming_config + * The config for triggering streaming-based notifications. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\NotificationConfig::initOnce(); + parent::__construct($data); + } + + /** + * The relative resource name of this notification config. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Example: + * "organizations/{organization_id}/notificationConfigs/notify_public_bucket", + * "folders/{folder_id}/notificationConfigs/notify_public_bucket", + * or "projects/{project_id}/notificationConfigs/notify_public_bucket". + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The relative resource name of this notification config. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Example: + * "organizations/{organization_id}/notificationConfigs/notify_public_bucket", + * "folders/{folder_id}/notificationConfigs/notify_public_bucket", + * or "projects/{project_id}/notificationConfigs/notify_public_bucket". + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The description of the notification config (max of 1024 characters). + * + * Generated from protobuf field string description = 2; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * The description of the notification config (max of 1024 characters). + * + * Generated from protobuf field string description = 2; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * The Pub/Sub topic to send notifications to. Its format is + * "projects/[project_id]/topics/[topic]". + * + * Generated from protobuf field string pubsub_topic = 3 [(.google.api.resource_reference) = { + * @return string + */ + public function getPubsubTopic() + { + return $this->pubsub_topic; + } + + /** + * The Pub/Sub topic to send notifications to. Its format is + * "projects/[project_id]/topics/[topic]". + * + * Generated from protobuf field string pubsub_topic = 3 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setPubsubTopic($var) + { + GPBUtil::checkString($var, True); + $this->pubsub_topic = $var; + + return $this; + } + + /** + * Output only. The service account that needs "pubsub.topics.publish" + * permission to publish to the Pub/Sub topic. + * + * Generated from protobuf field string service_account = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getServiceAccount() + { + return $this->service_account; + } + + /** + * Output only. The service account that needs "pubsub.topics.publish" + * permission to publish to the Pub/Sub topic. + * + * Generated from protobuf field string service_account = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setServiceAccount($var) + { + GPBUtil::checkString($var, True); + $this->service_account = $var; + + return $this; + } + + /** + * The config for triggering streaming-based notifications. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig streaming_config = 5; + * @return \Google\Cloud\SecurityCenter\V1\NotificationConfig\StreamingConfig|null + */ + public function getStreamingConfig() + { + return $this->readOneof(5); + } + + public function hasStreamingConfig() + { + return $this->hasOneof(5); + } + + /** + * The config for triggering streaming-based notifications. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig streaming_config = 5; + * @param \Google\Cloud\SecurityCenter\V1\NotificationConfig\StreamingConfig $var + * @return $this + */ + public function setStreamingConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\NotificationConfig\StreamingConfig::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * @return string + */ + public function getNotifyConfig() + { + return $this->whichOneof("notify_config"); + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/NotificationConfig/StreamingConfig.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/NotificationConfig/StreamingConfig.php new file mode 100644 index 000000000000..7f332dbc44a0 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/NotificationConfig/StreamingConfig.php @@ -0,0 +1,131 @@ +google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig + */ +class StreamingConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Expression that defines the filter to apply across create/update events + * of assets or findings as specified by the event type. The expression is a + * list of zero or more restrictions combined via logical operators `AND` + * and `OR`. Parentheses are supported, and `OR` has higher precedence than + * `AND`. + * Restrictions have the form ` ` and may have a + * `-` character in front of them to indicate negation. The fields map to + * those defined in the corresponding resource. + * The supported operators are: + * * `=` for all value types. + * * `>`, `<`, `>=`, `<=` for integer values. + * * `:`, meaning substring matching, for strings. + * The supported value types are: + * * string literals in quotes. + * * integer literals without quotes. + * * boolean literals `true` and `false` without quotes. + * + * Generated from protobuf field string filter = 1; + */ + protected $filter = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $filter + * Expression that defines the filter to apply across create/update events + * of assets or findings as specified by the event type. The expression is a + * list of zero or more restrictions combined via logical operators `AND` + * and `OR`. Parentheses are supported, and `OR` has higher precedence than + * `AND`. + * Restrictions have the form ` ` and may have a + * `-` character in front of them to indicate negation. The fields map to + * those defined in the corresponding resource. + * The supported operators are: + * * `=` for all value types. + * * `>`, `<`, `>=`, `<=` for integer values. + * * `:`, meaning substring matching, for strings. + * The supported value types are: + * * string literals in quotes. + * * integer literals without quotes. + * * boolean literals `true` and `false` without quotes. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\NotificationConfig::initOnce(); + parent::__construct($data); + } + + /** + * Expression that defines the filter to apply across create/update events + * of assets or findings as specified by the event type. The expression is a + * list of zero or more restrictions combined via logical operators `AND` + * and `OR`. Parentheses are supported, and `OR` has higher precedence than + * `AND`. + * Restrictions have the form ` ` and may have a + * `-` character in front of them to indicate negation. The fields map to + * those defined in the corresponding resource. + * The supported operators are: + * * `=` for all value types. + * * `>`, `<`, `>=`, `<=` for integer values. + * * `:`, meaning substring matching, for strings. + * The supported value types are: + * * string literals in quotes. + * * integer literals without quotes. + * * boolean literals `true` and `false` without quotes. + * + * Generated from protobuf field string filter = 1; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Expression that defines the filter to apply across create/update events + * of assets or findings as specified by the event type. The expression is a + * list of zero or more restrictions combined via logical operators `AND` + * and `OR`. Parentheses are supported, and `OR` has higher precedence than + * `AND`. + * Restrictions have the form ` ` and may have a + * `-` character in front of them to indicate negation. The fields map to + * those defined in the corresponding resource. + * The supported operators are: + * * `=` for all value types. + * * `>`, `<`, `>=`, `<=` for integer values. + * * `:`, meaning substring matching, for strings. + * The supported value types are: + * * string literals in quotes. + * * integer literals without quotes. + * * boolean literals `true` and `false` without quotes. + * + * Generated from protobuf field string filter = 1; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(StreamingConfig::class, \Google\Cloud\SecurityCenter\V1\NotificationConfig_StreamingConfig::class); + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/NotificationConfig_StreamingConfig.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/NotificationConfig_StreamingConfig.php new file mode 100644 index 000000000000..40a53ab475b6 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/NotificationConfig_StreamingConfig.php @@ -0,0 +1,16 @@ +google.cloud.securitycenter.v1.NotificationMessage + */ +class NotificationMessage extends \Google\Protobuf\Internal\Message +{ + /** + * Name of the notification config that generated current notification. + * + * Generated from protobuf field string notification_config_name = 1; + */ + protected $notification_config_name = ''; + /** + * The Cloud resource tied to this notification's Finding. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Resource resource = 3; + */ + protected $resource = null; + protected $event; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $notification_config_name + * Name of the notification config that generated current notification. + * @type \Google\Cloud\SecurityCenter\V1\Finding $finding + * If it's a Finding based notification config, this field will be + * populated. + * @type \Google\Cloud\SecurityCenter\V1\Resource $resource + * The Cloud resource tied to this notification's Finding. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\NotificationMessage::initOnce(); + parent::__construct($data); + } + + /** + * Name of the notification config that generated current notification. + * + * Generated from protobuf field string notification_config_name = 1; + * @return string + */ + public function getNotificationConfigName() + { + return $this->notification_config_name; + } + + /** + * Name of the notification config that generated current notification. + * + * Generated from protobuf field string notification_config_name = 1; + * @param string $var + * @return $this + */ + public function setNotificationConfigName($var) + { + GPBUtil::checkString($var, True); + $this->notification_config_name = $var; + + return $this; + } + + /** + * If it's a Finding based notification config, this field will be + * populated. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Finding finding = 2; + * @return \Google\Cloud\SecurityCenter\V1\Finding|null + */ + public function getFinding() + { + return $this->readOneof(2); + } + + public function hasFinding() + { + return $this->hasOneof(2); + } + + /** + * If it's a Finding based notification config, this field will be + * populated. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Finding finding = 2; + * @param \Google\Cloud\SecurityCenter\V1\Finding $var + * @return $this + */ + public function setFinding($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\Finding::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * The Cloud resource tied to this notification's Finding. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Resource resource = 3; + * @return \Google\Cloud\SecurityCenter\V1\Resource|null + */ + public function getResource() + { + return $this->resource; + } + + public function hasResource() + { + return isset($this->resource); + } + + public function clearResource() + { + unset($this->resource); + } + + /** + * The Cloud resource tied to this notification's Finding. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Resource resource = 3; + * @param \Google\Cloud\SecurityCenter\V1\Resource $var + * @return $this + */ + public function setResource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\Resource::class); + $this->resource = $var; + + return $this; + } + + /** + * @return string + */ + public function getEvent() + { + return $this->whichOneof("event"); + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/OrganizationSettings.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/OrganizationSettings.php new file mode 100644 index 000000000000..08d83dfae30c --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/OrganizationSettings.php @@ -0,0 +1,170 @@ +google.cloud.securitycenter.v1.OrganizationSettings + */ +class OrganizationSettings extends \Google\Protobuf\Internal\Message +{ + /** + * The relative resource name of the settings. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Example: + * "organizations/{organization_id}/organizationSettings". + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * A flag that indicates if Asset Discovery should be enabled. If the flag is + * set to `true`, then discovery of assets will occur. If it is set to `false, + * all historical assets will remain, but discovery of future assets will not + * occur. + * + * Generated from protobuf field bool enable_asset_discovery = 2; + */ + protected $enable_asset_discovery = false; + /** + * The configuration used for Asset Discovery runs. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig asset_discovery_config = 3; + */ + protected $asset_discovery_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The relative resource name of the settings. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Example: + * "organizations/{organization_id}/organizationSettings". + * @type bool $enable_asset_discovery + * A flag that indicates if Asset Discovery should be enabled. If the flag is + * set to `true`, then discovery of assets will occur. If it is set to `false, + * all historical assets will remain, but discovery of future assets will not + * occur. + * @type \Google\Cloud\SecurityCenter\V1\OrganizationSettings\AssetDiscoveryConfig $asset_discovery_config + * The configuration used for Asset Discovery runs. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\OrganizationSettings::initOnce(); + parent::__construct($data); + } + + /** + * The relative resource name of the settings. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Example: + * "organizations/{organization_id}/organizationSettings". + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The relative resource name of the settings. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Example: + * "organizations/{organization_id}/organizationSettings". + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * A flag that indicates if Asset Discovery should be enabled. If the flag is + * set to `true`, then discovery of assets will occur. If it is set to `false, + * all historical assets will remain, but discovery of future assets will not + * occur. + * + * Generated from protobuf field bool enable_asset_discovery = 2; + * @return bool + */ + public function getEnableAssetDiscovery() + { + return $this->enable_asset_discovery; + } + + /** + * A flag that indicates if Asset Discovery should be enabled. If the flag is + * set to `true`, then discovery of assets will occur. If it is set to `false, + * all historical assets will remain, but discovery of future assets will not + * occur. + * + * Generated from protobuf field bool enable_asset_discovery = 2; + * @param bool $var + * @return $this + */ + public function setEnableAssetDiscovery($var) + { + GPBUtil::checkBool($var); + $this->enable_asset_discovery = $var; + + return $this; + } + + /** + * The configuration used for Asset Discovery runs. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig asset_discovery_config = 3; + * @return \Google\Cloud\SecurityCenter\V1\OrganizationSettings\AssetDiscoveryConfig|null + */ + public function getAssetDiscoveryConfig() + { + return $this->asset_discovery_config; + } + + public function hasAssetDiscoveryConfig() + { + return isset($this->asset_discovery_config); + } + + public function clearAssetDiscoveryConfig() + { + unset($this->asset_discovery_config); + } + + /** + * The configuration used for Asset Discovery runs. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig asset_discovery_config = 3; + * @param \Google\Cloud\SecurityCenter\V1\OrganizationSettings\AssetDiscoveryConfig $var + * @return $this + */ + public function setAssetDiscoveryConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\OrganizationSettings\AssetDiscoveryConfig::class); + $this->asset_discovery_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/OrganizationSettings/AssetDiscoveryConfig.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/OrganizationSettings/AssetDiscoveryConfig.php new file mode 100644 index 000000000000..bfa7935a6f48 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/OrganizationSettings/AssetDiscoveryConfig.php @@ -0,0 +1,142 @@ +google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig + */ +class AssetDiscoveryConfig extends \Google\Protobuf\Internal\Message +{ + /** + * The project ids to use for filtering asset discovery. + * + * Generated from protobuf field repeated string project_ids = 1; + */ + private $project_ids; + /** + * The mode to use for filtering asset discovery. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.InclusionMode inclusion_mode = 2; + */ + protected $inclusion_mode = 0; + /** + * The folder ids to use for filtering asset discovery. + * It consists of only digits, e.g., 756619654966. + * + * Generated from protobuf field repeated string folder_ids = 3; + */ + private $folder_ids; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $project_ids + * The project ids to use for filtering asset discovery. + * @type int $inclusion_mode + * The mode to use for filtering asset discovery. + * @type array|\Google\Protobuf\Internal\RepeatedField $folder_ids + * The folder ids to use for filtering asset discovery. + * It consists of only digits, e.g., 756619654966. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\OrganizationSettings::initOnce(); + parent::__construct($data); + } + + /** + * The project ids to use for filtering asset discovery. + * + * Generated from protobuf field repeated string project_ids = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getProjectIds() + { + return $this->project_ids; + } + + /** + * The project ids to use for filtering asset discovery. + * + * Generated from protobuf field repeated string project_ids = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setProjectIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->project_ids = $arr; + + return $this; + } + + /** + * The mode to use for filtering asset discovery. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.InclusionMode inclusion_mode = 2; + * @return int + */ + public function getInclusionMode() + { + return $this->inclusion_mode; + } + + /** + * The mode to use for filtering asset discovery. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.InclusionMode inclusion_mode = 2; + * @param int $var + * @return $this + */ + public function setInclusionMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1\OrganizationSettings\AssetDiscoveryConfig\InclusionMode::class); + $this->inclusion_mode = $var; + + return $this; + } + + /** + * The folder ids to use for filtering asset discovery. + * It consists of only digits, e.g., 756619654966. + * + * Generated from protobuf field repeated string folder_ids = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFolderIds() + { + return $this->folder_ids; + } + + /** + * The folder ids to use for filtering asset discovery. + * It consists of only digits, e.g., 756619654966. + * + * Generated from protobuf field repeated string folder_ids = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFolderIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->folder_ids = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AssetDiscoveryConfig::class, \Google\Cloud\SecurityCenter\V1\OrganizationSettings_AssetDiscoveryConfig::class); + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/OrganizationSettings/AssetDiscoveryConfig/InclusionMode.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/OrganizationSettings/AssetDiscoveryConfig/InclusionMode.php new file mode 100644 index 000000000000..33dd51cd818b --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/OrganizationSettings/AssetDiscoveryConfig/InclusionMode.php @@ -0,0 +1,74 @@ +google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.InclusionMode + */ +class InclusionMode +{ + /** + * Unspecified. Setting the mode with this value will disable + * inclusion/exclusion filtering for Asset Discovery. + * + * Generated from protobuf enum INCLUSION_MODE_UNSPECIFIED = 0; + */ + const INCLUSION_MODE_UNSPECIFIED = 0; + /** + * Asset Discovery will capture only the resources within the projects + * specified. All other resources will be ignored. + * + * Generated from protobuf enum INCLUDE_ONLY = 1; + */ + const INCLUDE_ONLY = 1; + /** + * Asset Discovery will ignore all resources under the projects specified. + * All other resources will be retrieved. + * + * Generated from protobuf enum EXCLUDE = 2; + */ + const EXCLUDE = 2; + + private static $valueToName = [ + self::INCLUSION_MODE_UNSPECIFIED => 'INCLUSION_MODE_UNSPECIFIED', + self::INCLUDE_ONLY => 'INCLUDE_ONLY', + self::EXCLUDE => 'EXCLUDE', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(InclusionMode::class, \Google\Cloud\SecurityCenter\V1\OrganizationSettings_AssetDiscoveryConfig_InclusionMode::class); + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/OrganizationSettings_AssetDiscoveryConfig.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/OrganizationSettings_AssetDiscoveryConfig.php new file mode 100644 index 000000000000..c2e11ae882d1 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/OrganizationSettings_AssetDiscoveryConfig.php @@ -0,0 +1,16 @@ +google.cloud.securitycenter.v1.Process + */ +class Process extends \Google\Protobuf\Internal\Message +{ + /** + * The process name visible in utilities like `top` and `ps`; it can + * be accessed via `/proc/[pid]/comm` and changed with `prctl(PR_SET_NAME)`. + * + * Generated from protobuf field string name = 12; + */ + protected $name = ''; + /** + * File information for the process executable. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.File binary = 3; + */ + protected $binary = null; + /** + * File information for libraries loaded by the process. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.File libraries = 4; + */ + private $libraries; + /** + * When the process represents the invocation of a script, + * `binary` provides information about the interpreter while `script` + * provides information about the script file provided to the + * interpreter. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.File script = 5; + */ + protected $script = null; + /** + * Process arguments as JSON encoded strings. + * + * Generated from protobuf field repeated string args = 6; + */ + private $args; + /** + * True if `args` is incomplete. + * + * Generated from protobuf field bool arguments_truncated = 7; + */ + protected $arguments_truncated = false; + /** + * Process environment variables. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.EnvironmentVariable env_variables = 8; + */ + private $env_variables; + /** + * True if `env_variables` is incomplete. + * + * Generated from protobuf field bool env_variables_truncated = 9; + */ + protected $env_variables_truncated = false; + /** + * The process id. + * + * Generated from protobuf field int64 pid = 10; + */ + protected $pid = 0; + /** + * The parent process id. + * + * Generated from protobuf field int64 parent_pid = 11; + */ + protected $parent_pid = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The process name visible in utilities like `top` and `ps`; it can + * be accessed via `/proc/[pid]/comm` and changed with `prctl(PR_SET_NAME)`. + * @type \Google\Cloud\SecurityCenter\V1\File $binary + * File information for the process executable. + * @type array<\Google\Cloud\SecurityCenter\V1\File>|\Google\Protobuf\Internal\RepeatedField $libraries + * File information for libraries loaded by the process. + * @type \Google\Cloud\SecurityCenter\V1\File $script + * When the process represents the invocation of a script, + * `binary` provides information about the interpreter while `script` + * provides information about the script file provided to the + * interpreter. + * @type array|\Google\Protobuf\Internal\RepeatedField $args + * Process arguments as JSON encoded strings. + * @type bool $arguments_truncated + * True if `args` is incomplete. + * @type array<\Google\Cloud\SecurityCenter\V1\EnvironmentVariable>|\Google\Protobuf\Internal\RepeatedField $env_variables + * Process environment variables. + * @type bool $env_variables_truncated + * True if `env_variables` is incomplete. + * @type int|string $pid + * The process id. + * @type int|string $parent_pid + * The parent process id. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\Process::initOnce(); + parent::__construct($data); + } + + /** + * The process name visible in utilities like `top` and `ps`; it can + * be accessed via `/proc/[pid]/comm` and changed with `prctl(PR_SET_NAME)`. + * + * Generated from protobuf field string name = 12; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The process name visible in utilities like `top` and `ps`; it can + * be accessed via `/proc/[pid]/comm` and changed with `prctl(PR_SET_NAME)`. + * + * Generated from protobuf field string name = 12; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * File information for the process executable. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.File binary = 3; + * @return \Google\Cloud\SecurityCenter\V1\File|null + */ + public function getBinary() + { + return $this->binary; + } + + public function hasBinary() + { + return isset($this->binary); + } + + public function clearBinary() + { + unset($this->binary); + } + + /** + * File information for the process executable. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.File binary = 3; + * @param \Google\Cloud\SecurityCenter\V1\File $var + * @return $this + */ + public function setBinary($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\File::class); + $this->binary = $var; + + return $this; + } + + /** + * File information for libraries loaded by the process. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.File libraries = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLibraries() + { + return $this->libraries; + } + + /** + * File information for libraries loaded by the process. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.File libraries = 4; + * @param array<\Google\Cloud\SecurityCenter\V1\File>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLibraries($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\File::class); + $this->libraries = $arr; + + return $this; + } + + /** + * When the process represents the invocation of a script, + * `binary` provides information about the interpreter while `script` + * provides information about the script file provided to the + * interpreter. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.File script = 5; + * @return \Google\Cloud\SecurityCenter\V1\File|null + */ + public function getScript() + { + return $this->script; + } + + public function hasScript() + { + return isset($this->script); + } + + public function clearScript() + { + unset($this->script); + } + + /** + * When the process represents the invocation of a script, + * `binary` provides information about the interpreter while `script` + * provides information about the script file provided to the + * interpreter. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.File script = 5; + * @param \Google\Cloud\SecurityCenter\V1\File $var + * @return $this + */ + public function setScript($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\File::class); + $this->script = $var; + + return $this; + } + + /** + * Process arguments as JSON encoded strings. + * + * Generated from protobuf field repeated string args = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getArgs() + { + return $this->args; + } + + /** + * Process arguments as JSON encoded strings. + * + * Generated from protobuf field repeated string args = 6; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setArgs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->args = $arr; + + return $this; + } + + /** + * True if `args` is incomplete. + * + * Generated from protobuf field bool arguments_truncated = 7; + * @return bool + */ + public function getArgumentsTruncated() + { + return $this->arguments_truncated; + } + + /** + * True if `args` is incomplete. + * + * Generated from protobuf field bool arguments_truncated = 7; + * @param bool $var + * @return $this + */ + public function setArgumentsTruncated($var) + { + GPBUtil::checkBool($var); + $this->arguments_truncated = $var; + + return $this; + } + + /** + * Process environment variables. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.EnvironmentVariable env_variables = 8; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEnvVariables() + { + return $this->env_variables; + } + + /** + * Process environment variables. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.EnvironmentVariable env_variables = 8; + * @param array<\Google\Cloud\SecurityCenter\V1\EnvironmentVariable>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEnvVariables($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\EnvironmentVariable::class); + $this->env_variables = $arr; + + return $this; + } + + /** + * True if `env_variables` is incomplete. + * + * Generated from protobuf field bool env_variables_truncated = 9; + * @return bool + */ + public function getEnvVariablesTruncated() + { + return $this->env_variables_truncated; + } + + /** + * True if `env_variables` is incomplete. + * + * Generated from protobuf field bool env_variables_truncated = 9; + * @param bool $var + * @return $this + */ + public function setEnvVariablesTruncated($var) + { + GPBUtil::checkBool($var); + $this->env_variables_truncated = $var; + + return $this; + } + + /** + * The process id. + * + * Generated from protobuf field int64 pid = 10; + * @return int|string + */ + public function getPid() + { + return $this->pid; + } + + /** + * The process id. + * + * Generated from protobuf field int64 pid = 10; + * @param int|string $var + * @return $this + */ + public function setPid($var) + { + GPBUtil::checkInt64($var); + $this->pid = $var; + + return $this; + } + + /** + * The parent process id. + * + * Generated from protobuf field int64 parent_pid = 11; + * @return int|string + */ + public function getParentPid() + { + return $this->parent_pid; + } + + /** + * The parent process id. + * + * Generated from protobuf field int64 parent_pid = 11; + * @param int|string $var + * @return $this + */ + public function setParentPid($var) + { + GPBUtil::checkInt64($var); + $this->parent_pid = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Reference.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Reference.php new file mode 100644 index 000000000000..0dead12073c9 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Reference.php @@ -0,0 +1,105 @@ +google.cloud.securitycenter.v1.Reference + */ +class Reference extends \Google\Protobuf\Internal\Message +{ + /** + * Source of the reference e.g. NVD + * + * Generated from protobuf field string source = 1; + */ + protected $source = ''; + /** + * Uri for the mentioned source e.g. + * https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527. + * + * Generated from protobuf field string uri = 2; + */ + protected $uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $source + * Source of the reference e.g. NVD + * @type string $uri + * Uri for the mentioned source e.g. + * https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\Vulnerability::initOnce(); + parent::__construct($data); + } + + /** + * Source of the reference e.g. NVD + * + * Generated from protobuf field string source = 1; + * @return string + */ + public function getSource() + { + return $this->source; + } + + /** + * Source of the reference e.g. NVD + * + * Generated from protobuf field string source = 1; + * @param string $var + * @return $this + */ + public function setSource($var) + { + GPBUtil::checkString($var, True); + $this->source = $var; + + return $this; + } + + /** + * Uri for the mentioned source e.g. + * https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527. + * + * Generated from protobuf field string uri = 2; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * Uri for the mentioned source e.g. + * https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527. + * + * Generated from protobuf field string uri = 2; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Resource.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Resource.php new file mode 100644 index 000000000000..ae3d5819c440 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Resource.php @@ -0,0 +1,317 @@ +google.cloud.securitycenter.v1.Resource + */ +class Resource extends \Google\Protobuf\Internal\Message +{ + /** + * The full resource name of the resource. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The human readable name of the resource. + * + * Generated from protobuf field string display_name = 8; + */ + protected $display_name = ''; + /** + * The full resource type of the resource. + * + * Generated from protobuf field string type = 6; + */ + protected $type = ''; + /** + * The full resource name of project that the resource belongs to. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * The project ID that the resource belongs to. + * + * Generated from protobuf field string project_display_name = 3; + */ + protected $project_display_name = ''; + /** + * The full resource name of resource's parent. + * + * Generated from protobuf field string parent = 4; + */ + protected $parent = ''; + /** + * The human readable name of resource's parent. + * + * Generated from protobuf field string parent_display_name = 5; + */ + protected $parent_display_name = ''; + /** + * Output only. Contains a Folder message for each folder in the assets ancestry. + * The first folder is the deepest nested folder, and the last folder is the + * folder directly under the Organization. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Folder folders = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $folders; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The full resource name of the resource. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + * @type string $display_name + * The human readable name of the resource. + * @type string $type + * The full resource type of the resource. + * @type string $project + * The full resource name of project that the resource belongs to. + * @type string $project_display_name + * The project ID that the resource belongs to. + * @type string $parent + * The full resource name of resource's parent. + * @type string $parent_display_name + * The human readable name of resource's parent. + * @type array<\Google\Cloud\SecurityCenter\V1\Folder>|\Google\Protobuf\Internal\RepeatedField $folders + * Output only. Contains a Folder message for each folder in the assets ancestry. + * The first folder is the deepest nested folder, and the last folder is the + * folder directly under the Organization. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\Resource::initOnce(); + parent::__construct($data); + } + + /** + * The full resource name of the resource. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The full resource name of the resource. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The human readable name of the resource. + * + * Generated from protobuf field string display_name = 8; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The human readable name of the resource. + * + * Generated from protobuf field string display_name = 8; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * The full resource type of the resource. + * + * Generated from protobuf field string type = 6; + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * The full resource type of the resource. + * + * Generated from protobuf field string type = 6; + * @param string $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkString($var, True); + $this->type = $var; + + return $this; + } + + /** + * The full resource name of project that the resource belongs to. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * The full resource name of project that the resource belongs to. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * The project ID that the resource belongs to. + * + * Generated from protobuf field string project_display_name = 3; + * @return string + */ + public function getProjectDisplayName() + { + return $this->project_display_name; + } + + /** + * The project ID that the resource belongs to. + * + * Generated from protobuf field string project_display_name = 3; + * @param string $var + * @return $this + */ + public function setProjectDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->project_display_name = $var; + + return $this; + } + + /** + * The full resource name of resource's parent. + * + * Generated from protobuf field string parent = 4; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * The full resource name of resource's parent. + * + * Generated from protobuf field string parent = 4; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The human readable name of resource's parent. + * + * Generated from protobuf field string parent_display_name = 5; + * @return string + */ + public function getParentDisplayName() + { + return $this->parent_display_name; + } + + /** + * The human readable name of resource's parent. + * + * Generated from protobuf field string parent_display_name = 5; + * @param string $var + * @return $this + */ + public function setParentDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->parent_display_name = $var; + + return $this; + } + + /** + * Output only. Contains a Folder message for each folder in the assets ancestry. + * The first folder is the deepest nested folder, and the last folder is the + * folder directly under the Organization. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Folder folders = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFolders() + { + return $this->folders; + } + + /** + * Output only. Contains a Folder message for each folder in the assets ancestry. + * The first folder is the deepest nested folder, and the last folder is the + * folder directly under the Organization. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Folder folders = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\SecurityCenter\V1\Folder>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFolders($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\Folder::class); + $this->folders = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/RunAssetDiscoveryRequest.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/RunAssetDiscoveryRequest.php new file mode 100644 index 000000000000..f698c9d65783 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/RunAssetDiscoveryRequest.php @@ -0,0 +1,71 @@ +google.cloud.securitycenter.v1.RunAssetDiscoveryRequest + */ +class RunAssetDiscoveryRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the organization to run asset discovery for. Its format + * is "organizations/[organization_id]". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Name of the organization to run asset discovery for. Its format + * is "organizations/[organization_id]". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the organization to run asset discovery for. Its format + * is "organizations/[organization_id]". + * + * 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. Name of the organization to run asset discovery for. Its format + * is "organizations/[organization_id]". + * + * 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; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/RunAssetDiscoveryResponse.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/RunAssetDiscoveryResponse.php new file mode 100644 index 000000000000..ff4858d1b647 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/RunAssetDiscoveryResponse.php @@ -0,0 +1,111 @@ +google.cloud.securitycenter.v1.RunAssetDiscoveryResponse + */ +class RunAssetDiscoveryResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The state of an asset discovery run. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.RunAssetDiscoveryResponse.State state = 1; + */ + protected $state = 0; + /** + * The duration between asset discovery run start and end + * + * Generated from protobuf field .google.protobuf.Duration duration = 2; + */ + protected $duration = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $state + * The state of an asset discovery run. + * @type \Google\Protobuf\Duration $duration + * The duration between asset discovery run start and end + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\RunAssetDiscoveryResponse::initOnce(); + parent::__construct($data); + } + + /** + * The state of an asset discovery run. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.RunAssetDiscoveryResponse.State state = 1; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * The state of an asset discovery run. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.RunAssetDiscoveryResponse.State state = 1; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1\RunAssetDiscoveryResponse\State::class); + $this->state = $var; + + return $this; + } + + /** + * The duration between asset discovery run start and end + * + * Generated from protobuf field .google.protobuf.Duration duration = 2; + * @return \Google\Protobuf\Duration|null + */ + public function getDuration() + { + return $this->duration; + } + + public function hasDuration() + { + return isset($this->duration); + } + + public function clearDuration() + { + unset($this->duration); + } + + /** + * The duration between asset discovery run start and end + * + * Generated from protobuf field .google.protobuf.Duration duration = 2; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->duration = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/RunAssetDiscoveryResponse/State.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/RunAssetDiscoveryResponse/State.php new file mode 100644 index 000000000000..51273e889fe3 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/RunAssetDiscoveryResponse/State.php @@ -0,0 +1,72 @@ +google.cloud.securitycenter.v1.RunAssetDiscoveryResponse.State + */ +class State +{ + /** + * Asset discovery run state was unspecified. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Asset discovery run completed successfully. + * + * Generated from protobuf enum COMPLETED = 1; + */ + const COMPLETED = 1; + /** + * Asset discovery run was cancelled with tasks still pending, as another + * run for the same organization was started with a higher priority. + * + * Generated from protobuf enum SUPERSEDED = 2; + */ + const SUPERSEDED = 2; + /** + * Asset discovery run was killed and terminated. + * + * Generated from protobuf enum TERMINATED = 3; + */ + const TERMINATED = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::COMPLETED => 'COMPLETED', + self::SUPERSEDED => 'SUPERSEDED', + self::TERMINATED => 'TERMINATED', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\SecurityCenter\V1\RunAssetDiscoveryResponse_State::class); + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/RunAssetDiscoveryResponse_State.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/RunAssetDiscoveryResponse_State.php new file mode 100644 index 000000000000..83777996b9da --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/RunAssetDiscoveryResponse_State.php @@ -0,0 +1,16 @@ +_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/BulkMuteFindings', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Creates a source. + * @param \Google\Cloud\SecurityCenter\V1\CreateSourceRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateSource(\Google\Cloud\SecurityCenter\V1\CreateSourceRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/CreateSource', + $argument, + ['\Google\Cloud\SecurityCenter\V1\Source', 'decode'], + $metadata, $options); + } + + /** + * Creates a finding. The corresponding source must exist for finding creation + * to succeed. + * @param \Google\Cloud\SecurityCenter\V1\CreateFindingRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateFinding(\Google\Cloud\SecurityCenter\V1\CreateFindingRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/CreateFinding', + $argument, + ['\Google\Cloud\SecurityCenter\V1\Finding', 'decode'], + $metadata, $options); + } + + /** + * Creates a mute config. + * @param \Google\Cloud\SecurityCenter\V1\CreateMuteConfigRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateMuteConfig(\Google\Cloud\SecurityCenter\V1\CreateMuteConfigRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/CreateMuteConfig', + $argument, + ['\Google\Cloud\SecurityCenter\V1\MuteConfig', 'decode'], + $metadata, $options); + } + + /** + * Creates a notification config. + * @param \Google\Cloud\SecurityCenter\V1\CreateNotificationConfigRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateNotificationConfig(\Google\Cloud\SecurityCenter\V1\CreateNotificationConfigRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/CreateNotificationConfig', + $argument, + ['\Google\Cloud\SecurityCenter\V1\NotificationConfig', 'decode'], + $metadata, $options); + } + + /** + * Deletes an existing mute config. + * @param \Google\Cloud\SecurityCenter\V1\DeleteMuteConfigRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteMuteConfig(\Google\Cloud\SecurityCenter\V1\DeleteMuteConfigRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/DeleteMuteConfig', + $argument, + ['\Google\Protobuf\GPBEmpty', 'decode'], + $metadata, $options); + } + + /** + * Deletes a notification config. + * @param \Google\Cloud\SecurityCenter\V1\DeleteNotificationConfigRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteNotificationConfig(\Google\Cloud\SecurityCenter\V1\DeleteNotificationConfigRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/DeleteNotificationConfig', + $argument, + ['\Google\Protobuf\GPBEmpty', 'decode'], + $metadata, $options); + } + + /** + * Gets a BigQuery export. + * @param \Google\Cloud\SecurityCenter\V1\GetBigQueryExportRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetBigQueryExport(\Google\Cloud\SecurityCenter\V1\GetBigQueryExportRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/GetBigQueryExport', + $argument, + ['\Google\Cloud\SecurityCenter\V1\BigQueryExport', 'decode'], + $metadata, $options); + } + + /** + * Gets the access control policy on the specified Source. + * @param \Google\Cloud\Iam\V1\GetIamPolicyRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetIamPolicy(\Google\Cloud\Iam\V1\GetIamPolicyRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/GetIamPolicy', + $argument, + ['\Google\Cloud\Iam\V1\Policy', 'decode'], + $metadata, $options); + } + + /** + * Gets a mute config. + * @param \Google\Cloud\SecurityCenter\V1\GetMuteConfigRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetMuteConfig(\Google\Cloud\SecurityCenter\V1\GetMuteConfigRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/GetMuteConfig', + $argument, + ['\Google\Cloud\SecurityCenter\V1\MuteConfig', 'decode'], + $metadata, $options); + } + + /** + * Gets a notification config. + * @param \Google\Cloud\SecurityCenter\V1\GetNotificationConfigRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetNotificationConfig(\Google\Cloud\SecurityCenter\V1\GetNotificationConfigRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/GetNotificationConfig', + $argument, + ['\Google\Cloud\SecurityCenter\V1\NotificationConfig', 'decode'], + $metadata, $options); + } + + /** + * Gets the settings for an organization. + * @param \Google\Cloud\SecurityCenter\V1\GetOrganizationSettingsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetOrganizationSettings(\Google\Cloud\SecurityCenter\V1\GetOrganizationSettingsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/GetOrganizationSettings', + $argument, + ['\Google\Cloud\SecurityCenter\V1\OrganizationSettings', 'decode'], + $metadata, $options); + } + + /** + * Gets a source. + * @param \Google\Cloud\SecurityCenter\V1\GetSourceRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetSource(\Google\Cloud\SecurityCenter\V1\GetSourceRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/GetSource', + $argument, + ['\Google\Cloud\SecurityCenter\V1\Source', 'decode'], + $metadata, $options); + } + + /** + * Filters an organization's assets and groups them by their specified + * properties. + * @param \Google\Cloud\SecurityCenter\V1\GroupAssetsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GroupAssets(\Google\Cloud\SecurityCenter\V1\GroupAssetsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/GroupAssets', + $argument, + ['\Google\Cloud\SecurityCenter\V1\GroupAssetsResponse', 'decode'], + $metadata, $options); + } + + /** + * Filters an organization or source's findings and groups them by their + * specified properties. + * + * To group across all sources provide a `-` as the source id. + * Example: /v1/organizations/{organization_id}/sources/-/findings, + * /v1/folders/{folder_id}/sources/-/findings, + * /v1/projects/{project_id}/sources/-/findings + * @param \Google\Cloud\SecurityCenter\V1\GroupFindingsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GroupFindings(\Google\Cloud\SecurityCenter\V1\GroupFindingsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/GroupFindings', + $argument, + ['\Google\Cloud\SecurityCenter\V1\GroupFindingsResponse', 'decode'], + $metadata, $options); + } + + /** + * Lists an organization's assets. + * @param \Google\Cloud\SecurityCenter\V1\ListAssetsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListAssets(\Google\Cloud\SecurityCenter\V1\ListAssetsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/ListAssets', + $argument, + ['\Google\Cloud\SecurityCenter\V1\ListAssetsResponse', 'decode'], + $metadata, $options); + } + + /** + * Lists an organization or source's findings. + * + * To list across all sources provide a `-` as the source id. + * Example: /v1/organizations/{organization_id}/sources/-/findings + * @param \Google\Cloud\SecurityCenter\V1\ListFindingsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListFindings(\Google\Cloud\SecurityCenter\V1\ListFindingsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/ListFindings', + $argument, + ['\Google\Cloud\SecurityCenter\V1\ListFindingsResponse', 'decode'], + $metadata, $options); + } + + /** + * Lists mute configs. + * @param \Google\Cloud\SecurityCenter\V1\ListMuteConfigsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListMuteConfigs(\Google\Cloud\SecurityCenter\V1\ListMuteConfigsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/ListMuteConfigs', + $argument, + ['\Google\Cloud\SecurityCenter\V1\ListMuteConfigsResponse', 'decode'], + $metadata, $options); + } + + /** + * Lists notification configs. + * @param \Google\Cloud\SecurityCenter\V1\ListNotificationConfigsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListNotificationConfigs(\Google\Cloud\SecurityCenter\V1\ListNotificationConfigsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/ListNotificationConfigs', + $argument, + ['\Google\Cloud\SecurityCenter\V1\ListNotificationConfigsResponse', 'decode'], + $metadata, $options); + } + + /** + * Lists all sources belonging to an organization. + * @param \Google\Cloud\SecurityCenter\V1\ListSourcesRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListSources(\Google\Cloud\SecurityCenter\V1\ListSourcesRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/ListSources', + $argument, + ['\Google\Cloud\SecurityCenter\V1\ListSourcesResponse', 'decode'], + $metadata, $options); + } + + /** + * Runs asset discovery. The discovery is tracked with a long-running + * operation. + * + * This API can only be called with limited frequency for an organization. If + * it is called too frequently the caller will receive a TOO_MANY_REQUESTS + * error. + * @param \Google\Cloud\SecurityCenter\V1\RunAssetDiscoveryRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function RunAssetDiscovery(\Google\Cloud\SecurityCenter\V1\RunAssetDiscoveryRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/RunAssetDiscovery', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Updates the state of a finding. + * @param \Google\Cloud\SecurityCenter\V1\SetFindingStateRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function SetFindingState(\Google\Cloud\SecurityCenter\V1\SetFindingStateRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/SetFindingState', + $argument, + ['\Google\Cloud\SecurityCenter\V1\Finding', 'decode'], + $metadata, $options); + } + + /** + * Updates the mute state of a finding. + * @param \Google\Cloud\SecurityCenter\V1\SetMuteRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function SetMute(\Google\Cloud\SecurityCenter\V1\SetMuteRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/SetMute', + $argument, + ['\Google\Cloud\SecurityCenter\V1\Finding', 'decode'], + $metadata, $options); + } + + /** + * Sets the access control policy on the specified Source. + * @param \Google\Cloud\Iam\V1\SetIamPolicyRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function SetIamPolicy(\Google\Cloud\Iam\V1\SetIamPolicyRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/SetIamPolicy', + $argument, + ['\Google\Cloud\Iam\V1\Policy', 'decode'], + $metadata, $options); + } + + /** + * Returns the permissions that a caller has on the specified source. + * @param \Google\Cloud\Iam\V1\TestIamPermissionsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function TestIamPermissions(\Google\Cloud\Iam\V1\TestIamPermissionsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/TestIamPermissions', + $argument, + ['\Google\Cloud\Iam\V1\TestIamPermissionsResponse', 'decode'], + $metadata, $options); + } + + /** + * Updates external system. This is for a given finding. + * @param \Google\Cloud\SecurityCenter\V1\UpdateExternalSystemRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateExternalSystem(\Google\Cloud\SecurityCenter\V1\UpdateExternalSystemRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/UpdateExternalSystem', + $argument, + ['\Google\Cloud\SecurityCenter\V1\ExternalSystem', 'decode'], + $metadata, $options); + } + + /** + * Creates or updates a finding. The corresponding source must exist for a + * finding creation to succeed. + * @param \Google\Cloud\SecurityCenter\V1\UpdateFindingRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateFinding(\Google\Cloud\SecurityCenter\V1\UpdateFindingRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/UpdateFinding', + $argument, + ['\Google\Cloud\SecurityCenter\V1\Finding', 'decode'], + $metadata, $options); + } + + /** + * Updates a mute config. + * @param \Google\Cloud\SecurityCenter\V1\UpdateMuteConfigRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateMuteConfig(\Google\Cloud\SecurityCenter\V1\UpdateMuteConfigRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/UpdateMuteConfig', + $argument, + ['\Google\Cloud\SecurityCenter\V1\MuteConfig', 'decode'], + $metadata, $options); + } + + /** + * + * Updates a notification config. The following update + * fields are allowed: description, pubsub_topic, streaming_config.filter + * @param \Google\Cloud\SecurityCenter\V1\UpdateNotificationConfigRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateNotificationConfig(\Google\Cloud\SecurityCenter\V1\UpdateNotificationConfigRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/UpdateNotificationConfig', + $argument, + ['\Google\Cloud\SecurityCenter\V1\NotificationConfig', 'decode'], + $metadata, $options); + } + + /** + * Updates an organization's settings. + * @param \Google\Cloud\SecurityCenter\V1\UpdateOrganizationSettingsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateOrganizationSettings(\Google\Cloud\SecurityCenter\V1\UpdateOrganizationSettingsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/UpdateOrganizationSettings', + $argument, + ['\Google\Cloud\SecurityCenter\V1\OrganizationSettings', 'decode'], + $metadata, $options); + } + + /** + * Updates a source. + * @param \Google\Cloud\SecurityCenter\V1\UpdateSourceRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateSource(\Google\Cloud\SecurityCenter\V1\UpdateSourceRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/UpdateSource', + $argument, + ['\Google\Cloud\SecurityCenter\V1\Source', 'decode'], + $metadata, $options); + } + + /** + * Updates security marks. + * @param \Google\Cloud\SecurityCenter\V1\UpdateSecurityMarksRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateSecurityMarks(\Google\Cloud\SecurityCenter\V1\UpdateSecurityMarksRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/UpdateSecurityMarks', + $argument, + ['\Google\Cloud\SecurityCenter\V1\SecurityMarks', 'decode'], + $metadata, $options); + } + + /** + * Creates a BigQuery export. + * @param \Google\Cloud\SecurityCenter\V1\CreateBigQueryExportRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateBigQueryExport(\Google\Cloud\SecurityCenter\V1\CreateBigQueryExportRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/CreateBigQueryExport', + $argument, + ['\Google\Cloud\SecurityCenter\V1\BigQueryExport', 'decode'], + $metadata, $options); + } + + /** + * Deletes an existing BigQuery export. + * @param \Google\Cloud\SecurityCenter\V1\DeleteBigQueryExportRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteBigQueryExport(\Google\Cloud\SecurityCenter\V1\DeleteBigQueryExportRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/DeleteBigQueryExport', + $argument, + ['\Google\Protobuf\GPBEmpty', 'decode'], + $metadata, $options); + } + + /** + * Updates a BigQuery export. + * @param \Google\Cloud\SecurityCenter\V1\UpdateBigQueryExportRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateBigQueryExport(\Google\Cloud\SecurityCenter\V1\UpdateBigQueryExportRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/UpdateBigQueryExport', + $argument, + ['\Google\Cloud\SecurityCenter\V1\BigQueryExport', 'decode'], + $metadata, $options); + } + + /** + * Lists BigQuery exports. Note that when requesting BigQuery exports at a + * given level all exports under that level are also returned e.g. if + * requesting BigQuery exports under a folder, then all BigQuery exports + * immediately under the folder plus the ones created under the projects + * within the folder are returned. + * @param \Google\Cloud\SecurityCenter\V1\ListBigQueryExportsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListBigQueryExports(\Google\Cloud\SecurityCenter\V1\ListBigQueryExportsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/ListBigQueryExports', + $argument, + ['\Google\Cloud\SecurityCenter\V1\ListBigQueryExportsResponse', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/SecurityMarks.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/SecurityMarks.php new file mode 100644 index 000000000000..d5a9c82d0fbc --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/SecurityMarks.php @@ -0,0 +1,206 @@ +google.cloud.securitycenter.v1.SecurityMarks + */ +class SecurityMarks extends \Google\Protobuf\Internal\Message +{ + /** + * The relative resource name of the SecurityMarks. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Examples: + * "organizations/{organization_id}/assets/{asset_id}/securityMarks" + * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks". + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Mutable user specified security marks belonging to the parent resource. + * Constraints are as follows: + * * Keys and values are treated as case insensitive + * * Keys must be between 1 - 256 characters (inclusive) + * * Keys must be letters, numbers, underscores, or dashes + * * Values have leading and trailing whitespace trimmed, remaining + * characters must be between 1 - 4096 characters (inclusive) + * + * Generated from protobuf field map marks = 2; + */ + private $marks; + /** + * The canonical name of the marks. + * Examples: + * "organizations/{organization_id}/assets/{asset_id}/securityMarks" + * "folders/{folder_id}/assets/{asset_id}/securityMarks" + * "projects/{project_number}/assets/{asset_id}/securityMarks" + * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks" + * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks" + * "projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks" + * + * Generated from protobuf field string canonical_name = 3; + */ + protected $canonical_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The relative resource name of the SecurityMarks. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Examples: + * "organizations/{organization_id}/assets/{asset_id}/securityMarks" + * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks". + * @type array|\Google\Protobuf\Internal\MapField $marks + * Mutable user specified security marks belonging to the parent resource. + * Constraints are as follows: + * * Keys and values are treated as case insensitive + * * Keys must be between 1 - 256 characters (inclusive) + * * Keys must be letters, numbers, underscores, or dashes + * * Values have leading and trailing whitespace trimmed, remaining + * characters must be between 1 - 4096 characters (inclusive) + * @type string $canonical_name + * The canonical name of the marks. + * Examples: + * "organizations/{organization_id}/assets/{asset_id}/securityMarks" + * "folders/{folder_id}/assets/{asset_id}/securityMarks" + * "projects/{project_number}/assets/{asset_id}/securityMarks" + * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks" + * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks" + * "projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks" + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\SecurityMarks::initOnce(); + parent::__construct($data); + } + + /** + * The relative resource name of the SecurityMarks. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Examples: + * "organizations/{organization_id}/assets/{asset_id}/securityMarks" + * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks". + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The relative resource name of the SecurityMarks. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Examples: + * "organizations/{organization_id}/assets/{asset_id}/securityMarks" + * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks". + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Mutable user specified security marks belonging to the parent resource. + * Constraints are as follows: + * * Keys and values are treated as case insensitive + * * Keys must be between 1 - 256 characters (inclusive) + * * Keys must be letters, numbers, underscores, or dashes + * * Values have leading and trailing whitespace trimmed, remaining + * characters must be between 1 - 4096 characters (inclusive) + * + * Generated from protobuf field map marks = 2; + * @return \Google\Protobuf\Internal\MapField + */ + public function getMarks() + { + return $this->marks; + } + + /** + * Mutable user specified security marks belonging to the parent resource. + * Constraints are as follows: + * * Keys and values are treated as case insensitive + * * Keys must be between 1 - 256 characters (inclusive) + * * Keys must be letters, numbers, underscores, or dashes + * * Values have leading and trailing whitespace trimmed, remaining + * characters must be between 1 - 4096 characters (inclusive) + * + * Generated from protobuf field map marks = 2; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setMarks($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->marks = $arr; + + return $this; + } + + /** + * The canonical name of the marks. + * Examples: + * "organizations/{organization_id}/assets/{asset_id}/securityMarks" + * "folders/{folder_id}/assets/{asset_id}/securityMarks" + * "projects/{project_number}/assets/{asset_id}/securityMarks" + * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks" + * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks" + * "projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks" + * + * Generated from protobuf field string canonical_name = 3; + * @return string + */ + public function getCanonicalName() + { + return $this->canonical_name; + } + + /** + * The canonical name of the marks. + * Examples: + * "organizations/{organization_id}/assets/{asset_id}/securityMarks" + * "folders/{folder_id}/assets/{asset_id}/securityMarks" + * "projects/{project_number}/assets/{asset_id}/securityMarks" + * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks" + * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks" + * "projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks" + * + * Generated from protobuf field string canonical_name = 3; + * @param string $var + * @return $this + */ + public function setCanonicalName($var) + { + GPBUtil::checkString($var, True); + $this->canonical_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ServiceAccountDelegationInfo.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ServiceAccountDelegationInfo.php new file mode 100644 index 000000000000..d6cb5540abbe --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ServiceAccountDelegationInfo.php @@ -0,0 +1,125 @@ +google.cloud.securitycenter.v1.ServiceAccountDelegationInfo + */ +class ServiceAccountDelegationInfo extends \Google\Protobuf\Internal\Message +{ + /** + * The email address of a Google account. + * + * Generated from protobuf field string principal_email = 1; + */ + protected $principal_email = ''; + /** + * A string representing the principal_subject associated with the identity. + * As compared to `principal_email`, supports principals that aren't + * associated with email addresses, such as third party principals. For most + * identities, the format will be `principal://iam.googleapis.com/{identity + * pool name}/subjects/{subject}` except for some GKE identities + * (GKE_WORKLOAD, FREEFORM, GKE_HUB_WORKLOAD) that are still in the legacy + * format `serviceAccount:{identity pool name}[{subject}]` + * + * Generated from protobuf field string principal_subject = 2; + */ + protected $principal_subject = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $principal_email + * The email address of a Google account. + * @type string $principal_subject + * A string representing the principal_subject associated with the identity. + * As compared to `principal_email`, supports principals that aren't + * associated with email addresses, such as third party principals. For most + * identities, the format will be `principal://iam.googleapis.com/{identity + * pool name}/subjects/{subject}` except for some GKE identities + * (GKE_WORKLOAD, FREEFORM, GKE_HUB_WORKLOAD) that are still in the legacy + * format `serviceAccount:{identity pool name}[{subject}]` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\Access::initOnce(); + parent::__construct($data); + } + + /** + * The email address of a Google account. + * + * Generated from protobuf field string principal_email = 1; + * @return string + */ + public function getPrincipalEmail() + { + return $this->principal_email; + } + + /** + * The email address of a Google account. + * + * Generated from protobuf field string principal_email = 1; + * @param string $var + * @return $this + */ + public function setPrincipalEmail($var) + { + GPBUtil::checkString($var, True); + $this->principal_email = $var; + + return $this; + } + + /** + * A string representing the principal_subject associated with the identity. + * As compared to `principal_email`, supports principals that aren't + * associated with email addresses, such as third party principals. For most + * identities, the format will be `principal://iam.googleapis.com/{identity + * pool name}/subjects/{subject}` except for some GKE identities + * (GKE_WORKLOAD, FREEFORM, GKE_HUB_WORKLOAD) that are still in the legacy + * format `serviceAccount:{identity pool name}[{subject}]` + * + * Generated from protobuf field string principal_subject = 2; + * @return string + */ + public function getPrincipalSubject() + { + return $this->principal_subject; + } + + /** + * A string representing the principal_subject associated with the identity. + * As compared to `principal_email`, supports principals that aren't + * associated with email addresses, such as third party principals. For most + * identities, the format will be `principal://iam.googleapis.com/{identity + * pool name}/subjects/{subject}` except for some GKE identities + * (GKE_WORKLOAD, FREEFORM, GKE_HUB_WORKLOAD) that are still in the legacy + * format `serviceAccount:{identity pool name}[{subject}]` + * + * Generated from protobuf field string principal_subject = 2; + * @param string $var + * @return $this + */ + public function setPrincipalSubject($var) + { + GPBUtil::checkString($var, True); + $this->principal_subject = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/SetFindingStateRequest.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/SetFindingStateRequest.php new file mode 100644 index 000000000000..5f89458834fd --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/SetFindingStateRequest.php @@ -0,0 +1,165 @@ +google.cloud.securitycenter.v1.SetFindingStateRequest + */ +class SetFindingStateRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The [relative resource + * name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) + * of the finding. Example: + * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", + * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", + * "projects/{project_id}/sources/{source_id}/findings/{finding_id}". + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The desired State of the finding. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Finding.State state = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $state = 0; + /** + * Required. The time at which the updated state takes effect. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $start_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The [relative resource + * name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) + * of the finding. Example: + * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", + * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", + * "projects/{project_id}/sources/{source_id}/findings/{finding_id}". + * @type int $state + * Required. The desired State of the finding. + * @type \Google\Protobuf\Timestamp $start_time + * Required. The time at which the updated state takes effect. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The [relative resource + * name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) + * of the finding. Example: + * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", + * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", + * "projects/{project_id}/sources/{source_id}/findings/{finding_id}". + * + * 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. The [relative resource + * name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) + * of the finding. Example: + * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", + * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", + * "projects/{project_id}/sources/{source_id}/findings/{finding_id}". + * + * 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; + } + + /** + * Required. The desired State of the finding. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Finding.State state = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Required. The desired State of the finding. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Finding.State state = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1\Finding\State::class); + $this->state = $var; + + return $this; + } + + /** + * Required. The time at which the updated state takes effect. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * Required. The time at which the updated state takes effect. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/SetMuteRequest.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/SetMuteRequest.php new file mode 100644 index 000000000000..9f085063a7e4 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/SetMuteRequest.php @@ -0,0 +1,121 @@ +google.cloud.securitycenter.v1.SetMuteRequest + */ +class SetMuteRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The [relative resource + * name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) + * of the finding. Example: + * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", + * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", + * "projects/{project_id}/sources/{source_id}/findings/{finding_id}". + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The desired state of the Mute. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Finding.Mute mute = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $mute = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The [relative resource + * name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) + * of the finding. Example: + * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", + * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", + * "projects/{project_id}/sources/{source_id}/findings/{finding_id}". + * @type int $mute + * Required. The desired state of the Mute. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The [relative resource + * name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) + * of the finding. Example: + * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", + * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", + * "projects/{project_id}/sources/{source_id}/findings/{finding_id}". + * + * 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. The [relative resource + * name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) + * of the finding. Example: + * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", + * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", + * "projects/{project_id}/sources/{source_id}/findings/{finding_id}". + * + * 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; + } + + /** + * Required. The desired state of the Mute. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Finding.Mute mute = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getMute() + { + return $this->mute; + } + + /** + * Required. The desired state of the Mute. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Finding.Mute mute = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setMute($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1\Finding\Mute::class); + $this->mute = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Source.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Source.php new file mode 100644 index 000000000000..b2107f876e61 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Source.php @@ -0,0 +1,244 @@ +google.cloud.securitycenter.v1.Source + */ +class Source extends \Google\Protobuf\Internal\Message +{ + /** + * The relative resource name of this source. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Example: + * "organizations/{organization_id}/sources/{source_id}" + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The source's display name. + * A source's display name must be unique amongst its siblings, for example, + * two sources with the same parent can't share the same display name. + * The display name must have a length between 1 and 64 characters + * (inclusive). + * + * Generated from protobuf field string display_name = 2; + */ + protected $display_name = ''; + /** + * The description of the source (max of 1024 characters). + * Example: + * "Web Security Scanner is a web security scanner for common + * vulnerabilities in App Engine applications. It can automatically + * scan and detect four common vulnerabilities, including cross-site-scripting + * (XSS), Flash injection, mixed content (HTTP in HTTPS), and + * outdated or insecure libraries." + * + * Generated from protobuf field string description = 3; + */ + protected $description = ''; + /** + * The canonical name of the finding. It's either + * "organizations/{organization_id}/sources/{source_id}", + * "folders/{folder_id}/sources/{source_id}" or + * "projects/{project_number}/sources/{source_id}", + * depending on the closest CRM ancestor of the resource associated with the + * finding. + * + * Generated from protobuf field string canonical_name = 14; + */ + protected $canonical_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The relative resource name of this source. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Example: + * "organizations/{organization_id}/sources/{source_id}" + * @type string $display_name + * The source's display name. + * A source's display name must be unique amongst its siblings, for example, + * two sources with the same parent can't share the same display name. + * The display name must have a length between 1 and 64 characters + * (inclusive). + * @type string $description + * The description of the source (max of 1024 characters). + * Example: + * "Web Security Scanner is a web security scanner for common + * vulnerabilities in App Engine applications. It can automatically + * scan and detect four common vulnerabilities, including cross-site-scripting + * (XSS), Flash injection, mixed content (HTTP in HTTPS), and + * outdated or insecure libraries." + * @type string $canonical_name + * The canonical name of the finding. It's either + * "organizations/{organization_id}/sources/{source_id}", + * "folders/{folder_id}/sources/{source_id}" or + * "projects/{project_number}/sources/{source_id}", + * depending on the closest CRM ancestor of the resource associated with the + * finding. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\Source::initOnce(); + parent::__construct($data); + } + + /** + * The relative resource name of this source. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Example: + * "organizations/{organization_id}/sources/{source_id}" + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The relative resource name of this source. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Example: + * "organizations/{organization_id}/sources/{source_id}" + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The source's display name. + * A source's display name must be unique amongst its siblings, for example, + * two sources with the same parent can't share the same display name. + * The display name must have a length between 1 and 64 characters + * (inclusive). + * + * Generated from protobuf field string display_name = 2; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The source's display name. + * A source's display name must be unique amongst its siblings, for example, + * two sources with the same parent can't share the same display name. + * The display name must have a length between 1 and 64 characters + * (inclusive). + * + * 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; + } + + /** + * The description of the source (max of 1024 characters). + * Example: + * "Web Security Scanner is a web security scanner for common + * vulnerabilities in App Engine applications. It can automatically + * scan and detect four common vulnerabilities, including cross-site-scripting + * (XSS), Flash injection, mixed content (HTTP in HTTPS), and + * outdated or insecure libraries." + * + * Generated from protobuf field string description = 3; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * The description of the source (max of 1024 characters). + * Example: + * "Web Security Scanner is a web security scanner for common + * vulnerabilities in App Engine applications. It can automatically + * scan and detect four common vulnerabilities, including cross-site-scripting + * (XSS), Flash injection, mixed content (HTTP in HTTPS), and + * outdated or insecure libraries." + * + * Generated from protobuf field string description = 3; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * The canonical name of the finding. It's either + * "organizations/{organization_id}/sources/{source_id}", + * "folders/{folder_id}/sources/{source_id}" or + * "projects/{project_number}/sources/{source_id}", + * depending on the closest CRM ancestor of the resource associated with the + * finding. + * + * Generated from protobuf field string canonical_name = 14; + * @return string + */ + public function getCanonicalName() + { + return $this->canonical_name; + } + + /** + * The canonical name of the finding. It's either + * "organizations/{organization_id}/sources/{source_id}", + * "folders/{folder_id}/sources/{source_id}" or + * "projects/{project_number}/sources/{source_id}", + * depending on the closest CRM ancestor of the resource associated with the + * finding. + * + * Generated from protobuf field string canonical_name = 14; + * @param string $var + * @return $this + */ + public function setCanonicalName($var) + { + GPBUtil::checkString($var, True); + $this->canonical_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/UpdateBigQueryExportRequest.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/UpdateBigQueryExportRequest.php new file mode 100644 index 000000000000..46ca095a0bf4 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/UpdateBigQueryExportRequest.php @@ -0,0 +1,125 @@ +google.cloud.securitycenter.v1.UpdateBigQueryExportRequest + */ +class UpdateBigQueryExportRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The BigQuery export being updated. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.BigQueryExport big_query_export = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $big_query_export = null; + /** + * The list of fields to be updated. + * If empty all mutable fields will be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\SecurityCenter\V1\BigQueryExport $big_query_export + * Required. The BigQuery export being updated. + * @type \Google\Protobuf\FieldMask $update_mask + * The list of fields to be updated. + * If empty all mutable fields will be updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The BigQuery export being updated. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.BigQueryExport big_query_export = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\SecurityCenter\V1\BigQueryExport|null + */ + public function getBigQueryExport() + { + return $this->big_query_export; + } + + public function hasBigQueryExport() + { + return isset($this->big_query_export); + } + + public function clearBigQueryExport() + { + unset($this->big_query_export); + } + + /** + * Required. The BigQuery export being updated. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.BigQueryExport big_query_export = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\SecurityCenter\V1\BigQueryExport $var + * @return $this + */ + public function setBigQueryExport($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\BigQueryExport::class); + $this->big_query_export = $var; + + return $this; + } + + /** + * The list of fields to be updated. + * If empty all mutable fields will be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * The list of fields to be updated. + * If empty all mutable fields will be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/UpdateExternalSystemRequest.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/UpdateExternalSystemRequest.php new file mode 100644 index 000000000000..36a5808fa31f --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/UpdateExternalSystemRequest.php @@ -0,0 +1,125 @@ +google.cloud.securitycenter.v1.UpdateExternalSystemRequest + */ +class UpdateExternalSystemRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The external system resource to update. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.ExternalSystem external_system = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $external_system = null; + /** + * The FieldMask to use when updating the external system resource. + * If empty all mutable fields will be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\SecurityCenter\V1\ExternalSystem $external_system + * Required. The external system resource to update. + * @type \Google\Protobuf\FieldMask $update_mask + * The FieldMask to use when updating the external system resource. + * If empty all mutable fields will be updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The external system resource to update. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.ExternalSystem external_system = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\SecurityCenter\V1\ExternalSystem|null + */ + public function getExternalSystem() + { + return $this->external_system; + } + + public function hasExternalSystem() + { + return isset($this->external_system); + } + + public function clearExternalSystem() + { + unset($this->external_system); + } + + /** + * Required. The external system resource to update. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.ExternalSystem external_system = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\SecurityCenter\V1\ExternalSystem $var + * @return $this + */ + public function setExternalSystem($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\ExternalSystem::class); + $this->external_system = $var; + + return $this; + } + + /** + * The FieldMask to use when updating the external system resource. + * If empty all mutable fields will be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * The FieldMask to use when updating the external system resource. + * If empty all mutable fields will be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/UpdateFindingRequest.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/UpdateFindingRequest.php new file mode 100644 index 000000000000..135264ee18ba --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/UpdateFindingRequest.php @@ -0,0 +1,157 @@ +google.cloud.securitycenter.v1.UpdateFindingRequest + */ +class UpdateFindingRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The finding resource to update or create if it does not already + * exist. parent, security_marks, and update_time will be ignored. + * In the case of creation, the finding id portion of the name must be + * alphanumeric and less than or equal to 32 characters and greater than 0 + * characters in length. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Finding finding = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $finding = null; + /** + * The FieldMask to use when updating the finding resource. This field should + * not be specified when creating a finding. + * When updating a finding, an empty mask is treated as updating all mutable + * fields and replacing source_properties. Individual source_properties can + * be added/updated by using "source_properties." in the field + * mask. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\SecurityCenter\V1\Finding $finding + * Required. The finding resource to update or create if it does not already + * exist. parent, security_marks, and update_time will be ignored. + * In the case of creation, the finding id portion of the name must be + * alphanumeric and less than or equal to 32 characters and greater than 0 + * characters in length. + * @type \Google\Protobuf\FieldMask $update_mask + * The FieldMask to use when updating the finding resource. This field should + * not be specified when creating a finding. + * When updating a finding, an empty mask is treated as updating all mutable + * fields and replacing source_properties. Individual source_properties can + * be added/updated by using "source_properties." in the field + * mask. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The finding resource to update or create if it does not already + * exist. parent, security_marks, and update_time will be ignored. + * In the case of creation, the finding id portion of the name must be + * alphanumeric and less than or equal to 32 characters and greater than 0 + * characters in length. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Finding finding = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\SecurityCenter\V1\Finding|null + */ + public function getFinding() + { + return $this->finding; + } + + public function hasFinding() + { + return isset($this->finding); + } + + public function clearFinding() + { + unset($this->finding); + } + + /** + * Required. The finding resource to update or create if it does not already + * exist. parent, security_marks, and update_time will be ignored. + * In the case of creation, the finding id portion of the name must be + * alphanumeric and less than or equal to 32 characters and greater than 0 + * characters in length. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Finding finding = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\SecurityCenter\V1\Finding $var + * @return $this + */ + public function setFinding($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\Finding::class); + $this->finding = $var; + + return $this; + } + + /** + * The FieldMask to use when updating the finding resource. This field should + * not be specified when creating a finding. + * When updating a finding, an empty mask is treated as updating all mutable + * fields and replacing source_properties. Individual source_properties can + * be added/updated by using "source_properties." in the field + * mask. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * The FieldMask to use when updating the finding resource. This field should + * not be specified when creating a finding. + * When updating a finding, an empty mask is treated as updating all mutable + * fields and replacing source_properties. Individual source_properties can + * be added/updated by using "source_properties." in the field + * mask. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/UpdateMuteConfigRequest.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/UpdateMuteConfigRequest.php new file mode 100644 index 000000000000..11bbba4166da --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/UpdateMuteConfigRequest.php @@ -0,0 +1,125 @@ +google.cloud.securitycenter.v1.UpdateMuteConfigRequest + */ +class UpdateMuteConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The mute config being updated. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.MuteConfig mute_config = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $mute_config = null; + /** + * The list of fields to be updated. + * If empty all mutable fields will be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\SecurityCenter\V1\MuteConfig $mute_config + * Required. The mute config being updated. + * @type \Google\Protobuf\FieldMask $update_mask + * The list of fields to be updated. + * If empty all mutable fields will be updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The mute config being updated. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.MuteConfig mute_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\SecurityCenter\V1\MuteConfig|null + */ + public function getMuteConfig() + { + return $this->mute_config; + } + + public function hasMuteConfig() + { + return isset($this->mute_config); + } + + public function clearMuteConfig() + { + unset($this->mute_config); + } + + /** + * Required. The mute config being updated. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.MuteConfig mute_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\SecurityCenter\V1\MuteConfig $var + * @return $this + */ + public function setMuteConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\MuteConfig::class); + $this->mute_config = $var; + + return $this; + } + + /** + * The list of fields to be updated. + * If empty all mutable fields will be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * The list of fields to be updated. + * If empty all mutable fields will be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/UpdateNotificationConfigRequest.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/UpdateNotificationConfigRequest.php new file mode 100644 index 000000000000..f1bfc5f55bed --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/UpdateNotificationConfigRequest.php @@ -0,0 +1,125 @@ +google.cloud.securitycenter.v1.UpdateNotificationConfigRequest + */ +class UpdateNotificationConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The notification config to update. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.NotificationConfig notification_config = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $notification_config = null; + /** + * The FieldMask to use when updating the notification config. + * If empty all mutable fields will be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\SecurityCenter\V1\NotificationConfig $notification_config + * Required. The notification config to update. + * @type \Google\Protobuf\FieldMask $update_mask + * The FieldMask to use when updating the notification config. + * If empty all mutable fields will be updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The notification config to update. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.NotificationConfig notification_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\SecurityCenter\V1\NotificationConfig|null + */ + public function getNotificationConfig() + { + return $this->notification_config; + } + + public function hasNotificationConfig() + { + return isset($this->notification_config); + } + + public function clearNotificationConfig() + { + unset($this->notification_config); + } + + /** + * Required. The notification config to update. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.NotificationConfig notification_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\SecurityCenter\V1\NotificationConfig $var + * @return $this + */ + public function setNotificationConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\NotificationConfig::class); + $this->notification_config = $var; + + return $this; + } + + /** + * The FieldMask to use when updating the notification config. + * If empty all mutable fields will be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * The FieldMask to use when updating the notification config. + * If empty all mutable fields will be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/UpdateOrganizationSettingsRequest.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/UpdateOrganizationSettingsRequest.php new file mode 100644 index 000000000000..4c599cb317bc --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/UpdateOrganizationSettingsRequest.php @@ -0,0 +1,125 @@ +google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest + */ +class UpdateOrganizationSettingsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The organization settings resource to update. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.OrganizationSettings organization_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $organization_settings = null; + /** + * The FieldMask to use when updating the settings resource. + * If empty all mutable fields will be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\SecurityCenter\V1\OrganizationSettings $organization_settings + * Required. The organization settings resource to update. + * @type \Google\Protobuf\FieldMask $update_mask + * The FieldMask to use when updating the settings resource. + * If empty all mutable fields will be updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The organization settings resource to update. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.OrganizationSettings organization_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\SecurityCenter\V1\OrganizationSettings|null + */ + public function getOrganizationSettings() + { + return $this->organization_settings; + } + + public function hasOrganizationSettings() + { + return isset($this->organization_settings); + } + + public function clearOrganizationSettings() + { + unset($this->organization_settings); + } + + /** + * Required. The organization settings resource to update. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.OrganizationSettings organization_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\SecurityCenter\V1\OrganizationSettings $var + * @return $this + */ + public function setOrganizationSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\OrganizationSettings::class); + $this->organization_settings = $var; + + return $this; + } + + /** + * The FieldMask to use when updating the settings resource. + * If empty all mutable fields will be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * The FieldMask to use when updating the settings resource. + * If empty all mutable fields will be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/UpdateSecurityMarksRequest.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/UpdateSecurityMarksRequest.php new file mode 100644 index 000000000000..ea41825873de --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/UpdateSecurityMarksRequest.php @@ -0,0 +1,189 @@ +google.cloud.securitycenter.v1.UpdateSecurityMarksRequest + */ +class UpdateSecurityMarksRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The security marks resource to update. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.SecurityMarks security_marks = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $security_marks = null; + /** + * The FieldMask to use when updating the security marks resource. + * The field mask must not contain duplicate fields. + * If empty or set to "marks", all marks will be replaced. Individual + * marks can be updated using "marks.". + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + /** + * The time at which the updated SecurityMarks take effect. + * If not set uses current server time. Updates will be applied to the + * SecurityMarks that are active immediately preceding this time. Must be + * earlier or equal to the server time. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 3; + */ + protected $start_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\SecurityCenter\V1\SecurityMarks $security_marks + * Required. The security marks resource to update. + * @type \Google\Protobuf\FieldMask $update_mask + * The FieldMask to use when updating the security marks resource. + * The field mask must not contain duplicate fields. + * If empty or set to "marks", all marks will be replaced. Individual + * marks can be updated using "marks.". + * @type \Google\Protobuf\Timestamp $start_time + * The time at which the updated SecurityMarks take effect. + * If not set uses current server time. Updates will be applied to the + * SecurityMarks that are active immediately preceding this time. Must be + * earlier or equal to the server time. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The security marks resource to update. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.SecurityMarks security_marks = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\SecurityCenter\V1\SecurityMarks|null + */ + public function getSecurityMarks() + { + return $this->security_marks; + } + + public function hasSecurityMarks() + { + return isset($this->security_marks); + } + + public function clearSecurityMarks() + { + unset($this->security_marks); + } + + /** + * Required. The security marks resource to update. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.SecurityMarks security_marks = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\SecurityCenter\V1\SecurityMarks $var + * @return $this + */ + public function setSecurityMarks($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\SecurityMarks::class); + $this->security_marks = $var; + + return $this; + } + + /** + * The FieldMask to use when updating the security marks resource. + * The field mask must not contain duplicate fields. + * If empty or set to "marks", all marks will be replaced. Individual + * marks can be updated using "marks.". + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * The FieldMask to use when updating the security marks resource. + * The field mask must not contain duplicate fields. + * If empty or set to "marks", all marks will be replaced. Individual + * marks can be updated using "marks.". + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * The time at which the updated SecurityMarks take effect. + * If not set uses current server time. Updates will be applied to the + * SecurityMarks that are active immediately preceding this time. Must be + * earlier or equal to the server time. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * The time at which the updated SecurityMarks take effect. + * If not set uses current server time. Updates will be applied to the + * SecurityMarks that are active immediately preceding this time. Must be + * earlier or equal to the server time. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/UpdateSourceRequest.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/UpdateSourceRequest.php new file mode 100644 index 000000000000..26ff9ea1462b --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/UpdateSourceRequest.php @@ -0,0 +1,125 @@ +google.cloud.securitycenter.v1.UpdateSourceRequest + */ +class UpdateSourceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The source resource to update. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Source source = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $source = null; + /** + * The FieldMask to use when updating the source resource. + * If empty all mutable fields will be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\SecurityCenter\V1\Source $source + * Required. The source resource to update. + * @type \Google\Protobuf\FieldMask $update_mask + * The FieldMask to use when updating the source resource. + * If empty all mutable fields will be updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The source resource to update. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Source source = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\SecurityCenter\V1\Source|null + */ + public function getSource() + { + return $this->source; + } + + public function hasSource() + { + return isset($this->source); + } + + public function clearSource() + { + unset($this->source); + } + + /** + * Required. The source resource to update. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Source source = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\SecurityCenter\V1\Source $var + * @return $this + */ + public function setSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\Source::class); + $this->source = $var; + + return $this; + } + + /** + * The FieldMask to use when updating the source resource. + * If empty all mutable fields will be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * The FieldMask to use when updating the source resource. + * If empty all mutable fields will be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Vulnerability.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Vulnerability.php new file mode 100644 index 000000000000..a8e652cc2dc8 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Vulnerability.php @@ -0,0 +1,81 @@ +google.cloud.securitycenter.v1.Vulnerability + */ +class Vulnerability extends \Google\Protobuf\Internal\Message +{ + /** + * CVE stands for Common Vulnerabilities and Exposures + * (https://cve.mitre.org/about/) + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Cve cve = 1; + */ + protected $cve = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\SecurityCenter\V1\Cve $cve + * CVE stands for Common Vulnerabilities and Exposures + * (https://cve.mitre.org/about/) + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\Vulnerability::initOnce(); + parent::__construct($data); + } + + /** + * CVE stands for Common Vulnerabilities and Exposures + * (https://cve.mitre.org/about/) + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Cve cve = 1; + * @return \Google\Cloud\SecurityCenter\V1\Cve|null + */ + public function getCve() + { + return $this->cve; + } + + public function hasCve() + { + return isset($this->cve); + } + + public function clearCve() + { + unset($this->cve); + } + + /** + * CVE stands for Common Vulnerabilities and Exposures + * (https://cve.mitre.org/about/) + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Cve cve = 1; + * @param \Google\Cloud\SecurityCenter\V1\Cve $var + * @return $this + */ + public function setCve($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\Cve::class); + $this->cve = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/bulk_mute_findings.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/bulk_mute_findings.php new file mode 100644 index 000000000000..8433dbdf73ca --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/bulk_mute_findings.php @@ -0,0 +1,81 @@ +bulkMuteFindings($parent); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var BulkMuteFindingsResponse $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 +{ + $parent = '[PARENT]'; + + bulk_mute_findings_sample($parent); +} +// [END securitycenter_v1_generated_SecurityCenter_BulkMuteFindings_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/create_big_query_export.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/create_big_query_export.php new file mode 100644 index 000000000000..21e1a9e72a04 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/create_big_query_export.php @@ -0,0 +1,80 @@ +createBigQueryExport( + $formattedParent, + $bigQueryExport, + $bigQueryExportId + ); + 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 +{ + $formattedParent = SecurityCenterClient::projectName('[PROJECT]'); + $bigQueryExportId = '[BIG_QUERY_EXPORT_ID]'; + + create_big_query_export_sample($formattedParent, $bigQueryExportId); +} +// [END securitycenter_v1_generated_SecurityCenter_CreateBigQueryExport_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/create_finding.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/create_finding.php new file mode 100644 index 000000000000..97ba3b3d3852 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/create_finding.php @@ -0,0 +1,75 @@ +createFinding($formattedParent, $findingId, $finding); + 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 +{ + $formattedParent = SecurityCenterClient::sourceName('[ORGANIZATION]', '[SOURCE]'); + $findingId = '[FINDING_ID]'; + + create_finding_sample($formattedParent, $findingId); +} +// [END securitycenter_v1_generated_SecurityCenter_CreateFinding_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/create_mute_config.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/create_mute_config.php new file mode 100644 index 000000000000..3788910af6ee --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/create_mute_config.php @@ -0,0 +1,101 @@ +setFilter($muteConfigFilter); + + // Call the API and handle any network failures. + try { + /** @var MuteConfig $response */ + $response = $securityCenterClient->createMuteConfig($formattedParent, $muteConfig, $muteConfigId); + 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 +{ + $formattedParent = SecurityCenterClient::projectName('[PROJECT]'); + $muteConfigFilter = '[FILTER]'; + $muteConfigId = '[MUTE_CONFIG_ID]'; + + create_mute_config_sample($formattedParent, $muteConfigFilter, $muteConfigId); +} +// [END securitycenter_v1_generated_SecurityCenter_CreateMuteConfig_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/create_notification_config.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/create_notification_config.php new file mode 100644 index 000000000000..ceeeaa05202f --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/create_notification_config.php @@ -0,0 +1,80 @@ +createNotificationConfig( + $formattedParent, + $configId, + $notificationConfig + ); + 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 +{ + $formattedParent = SecurityCenterClient::projectName('[PROJECT]'); + $configId = '[CONFIG_ID]'; + + create_notification_config_sample($formattedParent, $configId); +} +// [END securitycenter_v1_generated_SecurityCenter_CreateNotificationConfig_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/create_source.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/create_source.php new file mode 100644 index 000000000000..84030ced073c --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/create_source.php @@ -0,0 +1,70 @@ +createSource($formattedParent, $source); + 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 +{ + $formattedParent = SecurityCenterClient::organizationName('[ORGANIZATION]'); + + create_source_sample($formattedParent); +} +// [END securitycenter_v1_generated_SecurityCenter_CreateSource_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/delete_big_query_export.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/delete_big_query_export.php new file mode 100644 index 000000000000..7fa5495df72d --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/delete_big_query_export.php @@ -0,0 +1,67 @@ +deleteBigQueryExport($formattedName); + printf('Call completed successfully.' . PHP_EOL); + } 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 = SecurityCenterClient::bigQueryExportName('[ORGANIZATION]', '[EXPORT]'); + + delete_big_query_export_sample($formattedName); +} +// [END securitycenter_v1_generated_SecurityCenter_DeleteBigQueryExport_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/delete_mute_config.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/delete_mute_config.php new file mode 100644 index 000000000000..0f3c310a1135 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/delete_mute_config.php @@ -0,0 +1,67 @@ +deleteMuteConfig($formattedName); + printf('Call completed successfully.' . PHP_EOL); + } 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 = SecurityCenterClient::muteConfigName('[ORGANIZATION]', '[MUTE_CONFIG]'); + + delete_mute_config_sample($formattedName); +} +// [END securitycenter_v1_generated_SecurityCenter_DeleteMuteConfig_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/delete_notification_config.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/delete_notification_config.php new file mode 100644 index 000000000000..eea667f7f412 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/delete_notification_config.php @@ -0,0 +1,70 @@ +deleteNotificationConfig($formattedName); + printf('Call completed successfully.' . PHP_EOL); + } 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 = SecurityCenterClient::notificationConfigName( + '[ORGANIZATION]', + '[NOTIFICATION_CONFIG]' + ); + + delete_notification_config_sample($formattedName); +} +// [END securitycenter_v1_generated_SecurityCenter_DeleteNotificationConfig_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/get_big_query_export.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/get_big_query_export.php new file mode 100644 index 000000000000..a0f6d7e6b097 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/get_big_query_export.php @@ -0,0 +1,69 @@ +getBigQueryExport($formattedName); + 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 = SecurityCenterClient::bigQueryExportName('[ORGANIZATION]', '[EXPORT]'); + + get_big_query_export_sample($formattedName); +} +// [END securitycenter_v1_generated_SecurityCenter_GetBigQueryExport_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/get_iam_policy.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/get_iam_policy.php new file mode 100644 index 000000000000..188ae37c7c32 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/get_iam_policy.php @@ -0,0 +1,66 @@ +getIamPolicy($resource); + 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 +{ + $resource = '[RESOURCE]'; + + get_iam_policy_sample($resource); +} +// [END securitycenter_v1_generated_SecurityCenter_GetIamPolicy_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/get_mute_config.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/get_mute_config.php new file mode 100644 index 000000000000..4e91da3b91b9 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/get_mute_config.php @@ -0,0 +1,69 @@ +getMuteConfig($formattedName); + 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 = SecurityCenterClient::muteConfigName('[ORGANIZATION]', '[MUTE_CONFIG]'); + + get_mute_config_sample($formattedName); +} +// [END securitycenter_v1_generated_SecurityCenter_GetMuteConfig_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/get_notification_config.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/get_notification_config.php new file mode 100644 index 000000000000..87b2ce209daf --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/get_notification_config.php @@ -0,0 +1,72 @@ +getNotificationConfig($formattedName); + 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 = SecurityCenterClient::notificationConfigName( + '[ORGANIZATION]', + '[NOTIFICATION_CONFIG]' + ); + + get_notification_config_sample($formattedName); +} +// [END securitycenter_v1_generated_SecurityCenter_GetNotificationConfig_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/get_organization_settings.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/get_organization_settings.php new file mode 100644 index 000000000000..537925cb86e2 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/get_organization_settings.php @@ -0,0 +1,67 @@ +getOrganizationSettings($formattedName); + 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 = SecurityCenterClient::organizationSettingsName('[ORGANIZATION]'); + + get_organization_settings_sample($formattedName); +} +// [END securitycenter_v1_generated_SecurityCenter_GetOrganizationSettings_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/get_source.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/get_source.php new file mode 100644 index 000000000000..55f019cb6d5c --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/get_source.php @@ -0,0 +1,67 @@ +getSource($formattedName); + 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 = SecurityCenterClient::sourceName('[ORGANIZATION]', '[SOURCE]'); + + get_source_sample($formattedName); +} +// [END securitycenter_v1_generated_SecurityCenter_GetSource_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/group_assets.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/group_assets.php new file mode 100644 index 000000000000..39e8f21c5d5b --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/group_assets.php @@ -0,0 +1,93 @@ +groupAssets($formattedParent, $groupBy); + + /** @var GroupResult $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 = SecurityCenterClient::projectName('[PROJECT]'); + $groupBy = '[GROUP_BY]'; + + group_assets_sample($formattedParent, $groupBy); +} +// [END securitycenter_v1_generated_SecurityCenter_GroupAssets_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/group_findings.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/group_findings.php new file mode 100644 index 000000000000..6564953c8496 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/group_findings.php @@ -0,0 +1,99 @@ +groupFindings($formattedParent, $groupBy); + + /** @var GroupResult $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 = SecurityCenterClient::sourceName('[ORGANIZATION]', '[SOURCE]'); + $groupBy = '[GROUP_BY]'; + + group_findings_sample($formattedParent, $groupBy); +} +// [END securitycenter_v1_generated_SecurityCenter_GroupFindings_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/list_assets.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/list_assets.php new file mode 100644 index 000000000000..539028714e34 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/list_assets.php @@ -0,0 +1,75 @@ +listAssets($formattedParent); + + /** @var ListAssetsResult $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 = SecurityCenterClient::projectName('[PROJECT]'); + + list_assets_sample($formattedParent); +} +// [END securitycenter_v1_generated_SecurityCenter_ListAssets_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/list_big_query_exports.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/list_big_query_exports.php new file mode 100644 index 000000000000..ecc07211a529 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/list_big_query_exports.php @@ -0,0 +1,77 @@ +listBigQueryExports($formattedParent); + + /** @var BigQueryExport $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 = SecurityCenterClient::projectName('[PROJECT]'); + + list_big_query_exports_sample($formattedParent); +} +// [END securitycenter_v1_generated_SecurityCenter_ListBigQueryExports_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/list_findings.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/list_findings.php new file mode 100644 index 000000000000..e508f6bc9f36 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/list_findings.php @@ -0,0 +1,80 @@ +listFindings($formattedParent); + + /** @var ListFindingsResult $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 = SecurityCenterClient::sourceName('[ORGANIZATION]', '[SOURCE]'); + + list_findings_sample($formattedParent); +} +// [END securitycenter_v1_generated_SecurityCenter_ListFindings_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/list_mute_configs.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/list_mute_configs.php new file mode 100644 index 000000000000..9d0fed13bc8e --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/list_mute_configs.php @@ -0,0 +1,73 @@ +listMuteConfigs($formattedParent); + + /** @var MuteConfig $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 = SecurityCenterClient::projectName('[PROJECT]'); + + list_mute_configs_sample($formattedParent); +} +// [END securitycenter_v1_generated_SecurityCenter_ListMuteConfigs_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/list_notification_configs.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/list_notification_configs.php new file mode 100644 index 000000000000..256e9d5ee709 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/list_notification_configs.php @@ -0,0 +1,73 @@ +listNotificationConfigs($formattedParent); + + /** @var NotificationConfig $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 = SecurityCenterClient::projectName('[PROJECT]'); + + list_notification_configs_sample($formattedParent); +} +// [END securitycenter_v1_generated_SecurityCenter_ListNotificationConfigs_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/list_sources.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/list_sources.php new file mode 100644 index 000000000000..c5c57702ede3 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/list_sources.php @@ -0,0 +1,73 @@ +listSources($formattedParent); + + /** @var Source $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 = SecurityCenterClient::projectName('[PROJECT]'); + + list_sources_sample($formattedParent); +} +// [END securitycenter_v1_generated_SecurityCenter_ListSources_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/run_asset_discovery.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/run_asset_discovery.php new file mode 100644 index 000000000000..bef4f5e1dcf0 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/run_asset_discovery.php @@ -0,0 +1,84 @@ +runAssetDiscovery($formattedParent); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var RunAssetDiscoveryResponse $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 +{ + $formattedParent = SecurityCenterClient::organizationName('[ORGANIZATION]'); + + run_asset_discovery_sample($formattedParent); +} +// [END securitycenter_v1_generated_SecurityCenter_RunAssetDiscovery_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/set_finding_state.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/set_finding_state.php new file mode 100644 index 000000000000..8486f2d6bdc8 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/set_finding_state.php @@ -0,0 +1,78 @@ +setFindingState($formattedName, $state, $startTime); + 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 = SecurityCenterClient::findingName('[ORGANIZATION]', '[SOURCE]', '[FINDING]'); + $state = State::STATE_UNSPECIFIED; + + set_finding_state_sample($formattedName, $state); +} +// [END securitycenter_v1_generated_SecurityCenter_SetFindingState_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/set_iam_policy.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/set_iam_policy.php new file mode 100644 index 000000000000..a7dc78a3c23d --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/set_iam_policy.php @@ -0,0 +1,69 @@ +setIamPolicy($resource, $policy); + 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 +{ + $resource = '[RESOURCE]'; + + set_iam_policy_sample($resource); +} +// [END securitycenter_v1_generated_SecurityCenter_SetIamPolicy_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/set_mute.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/set_mute.php new file mode 100644 index 000000000000..7493e122f959 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/set_mute.php @@ -0,0 +1,74 @@ +setMute($formattedName, $mute); + 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 = SecurityCenterClient::findingName('[ORGANIZATION]', '[SOURCE]', '[FINDING]'); + $mute = Mute::MUTE_UNSPECIFIED; + + set_mute_sample($formattedName, $mute); +} +// [END securitycenter_v1_generated_SecurityCenter_SetMute_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/test_iam_permissions.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/test_iam_permissions.php new file mode 100644 index 000000000000..3cf842ef28ea --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/test_iam_permissions.php @@ -0,0 +1,74 @@ +testIamPermissions($resource, $permissions); + 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 +{ + $resource = '[RESOURCE]'; + $permissionsElement = '[PERMISSIONS]'; + + test_iam_permissions_sample($resource, $permissionsElement); +} +// [END securitycenter_v1_generated_SecurityCenter_TestIamPermissions_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/update_big_query_export.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/update_big_query_export.php new file mode 100644 index 000000000000..60e826e18b3c --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/update_big_query_export.php @@ -0,0 +1,56 @@ +updateBigQueryExport($bigQueryExport); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END securitycenter_v1_generated_SecurityCenter_UpdateBigQueryExport_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/update_external_system.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/update_external_system.php new file mode 100644 index 000000000000..ac4a3880ee24 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/update_external_system.php @@ -0,0 +1,56 @@ +updateExternalSystem($externalSystem); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END securitycenter_v1_generated_SecurityCenter_UpdateExternalSystem_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/update_finding.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/update_finding.php new file mode 100644 index 000000000000..3645d5e4038c --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/update_finding.php @@ -0,0 +1,57 @@ +updateFinding($finding); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END securitycenter_v1_generated_SecurityCenter_UpdateFinding_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/update_mute_config.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/update_mute_config.php new file mode 100644 index 000000000000..0c88b6d13cf2 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/update_mute_config.php @@ -0,0 +1,88 @@ +setFilter($muteConfigFilter); + + // Call the API and handle any network failures. + try { + /** @var MuteConfig $response */ + $response = $securityCenterClient->updateMuteConfig($muteConfig); + 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 +{ + $muteConfigFilter = '[FILTER]'; + + update_mute_config_sample($muteConfigFilter); +} +// [END securitycenter_v1_generated_SecurityCenter_UpdateMuteConfig_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/update_notification_config.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/update_notification_config.php new file mode 100644 index 000000000000..493ce8bc4af1 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/update_notification_config.php @@ -0,0 +1,58 @@ +updateNotificationConfig($notificationConfig); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END securitycenter_v1_generated_SecurityCenter_UpdateNotificationConfig_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/update_organization_settings.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/update_organization_settings.php new file mode 100644 index 000000000000..6c247225516d --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/update_organization_settings.php @@ -0,0 +1,56 @@ +updateOrganizationSettings($organizationSettings); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END securitycenter_v1_generated_SecurityCenter_UpdateOrganizationSettings_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/update_security_marks.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/update_security_marks.php new file mode 100644 index 000000000000..bf664ce827d8 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/update_security_marks.php @@ -0,0 +1,56 @@ +updateSecurityMarks($securityMarks); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END securitycenter_v1_generated_SecurityCenter_UpdateSecurityMarks_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/update_source.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/update_source.php new file mode 100644 index 000000000000..3dc638b49c8a --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/update_source.php @@ -0,0 +1,56 @@ +updateSource($source); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END securitycenter_v1_generated_SecurityCenter_UpdateSource_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/src/V1/Gapic/SecurityCenterGapicClient.php b/owl-bot-staging/SecurityCenter/v1/src/V1/Gapic/SecurityCenterGapicClient.php new file mode 100644 index 000000000000..ce5d74e0fc08 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/src/V1/Gapic/SecurityCenterGapicClient.php @@ -0,0 +1,3937 @@ +bulkMuteFindings($parent); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $securityCenterClient->bulkMuteFindings($parent); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $securityCenterClient->resumeOperation($operationName, 'bulkMuteFindings'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $securityCenterClient->close(); + * } + * ``` + * + * Many parameters require resource names to be formatted in a particular way. To + * assist with these names, this class includes a format method for each type of + * name, and additionally a parseName method to extract the individual identifiers + * contained within formatted names that are returned by the API. + */ +class SecurityCenterGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.securitycenter.v1.SecurityCenter'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'securitycenter.googleapis.com'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static $bigQueryExportNameTemplate; + + private static $externalSystemNameTemplate; + + private static $findingNameTemplate; + + private static $folderNameTemplate; + + private static $folderAssetSecurityMarksNameTemplate; + + private static $folderExportNameTemplate; + + private static $folderMuteConfigNameTemplate; + + private static $folderNotificationConfigNameTemplate; + + private static $folderSourceNameTemplate; + + private static $folderSourceFindingNameTemplate; + + private static $folderSourceFindingExternalsystemNameTemplate; + + private static $folderSourceFindingSecurityMarksNameTemplate; + + private static $muteConfigNameTemplate; + + private static $notificationConfigNameTemplate; + + private static $organizationNameTemplate; + + private static $organizationAssetSecurityMarksNameTemplate; + + private static $organizationExportNameTemplate; + + private static $organizationMuteConfigNameTemplate; + + private static $organizationNotificationConfigNameTemplate; + + private static $organizationSettingsNameTemplate; + + private static $organizationSourceNameTemplate; + + private static $organizationSourceFindingNameTemplate; + + private static $organizationSourceFindingExternalsystemNameTemplate; + + private static $organizationSourceFindingSecurityMarksNameTemplate; + + private static $projectNameTemplate; + + private static $projectAssetSecurityMarksNameTemplate; + + private static $projectExportNameTemplate; + + private static $projectMuteConfigNameTemplate; + + private static $projectNotificationConfigNameTemplate; + + private static $projectSourceNameTemplate; + + private static $projectSourceFindingNameTemplate; + + private static $projectSourceFindingExternalsystemNameTemplate; + + private static $projectSourceFindingSecurityMarksNameTemplate; + + private static $securityMarksNameTemplate; + + private static $sourceNameTemplate; + + private static $topicNameTemplate; + + private static $pathTemplateMap; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/security_center_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/security_center_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/security_center_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/security_center_rest_client_config.php', + ], + ], + ]; + } + + private static function getBigQueryExportNameTemplate() + { + if (self::$bigQueryExportNameTemplate == null) { + self::$bigQueryExportNameTemplate = new PathTemplate('organizations/{organization}/bigQueryExports/{export}'); + } + + return self::$bigQueryExportNameTemplate; + } + + private static function getExternalSystemNameTemplate() + { + if (self::$externalSystemNameTemplate == null) { + self::$externalSystemNameTemplate = new PathTemplate('organizations/{organization}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}'); + } + + return self::$externalSystemNameTemplate; + } + + private static function getFindingNameTemplate() + { + if (self::$findingNameTemplate == null) { + self::$findingNameTemplate = new PathTemplate('organizations/{organization}/sources/{source}/findings/{finding}'); + } + + return self::$findingNameTemplate; + } + + private static function getFolderNameTemplate() + { + if (self::$folderNameTemplate == null) { + self::$folderNameTemplate = new PathTemplate('folders/{folder}'); + } + + return self::$folderNameTemplate; + } + + private static function getFolderAssetSecurityMarksNameTemplate() + { + if (self::$folderAssetSecurityMarksNameTemplate == null) { + self::$folderAssetSecurityMarksNameTemplate = new PathTemplate('folders/{folder}/assets/{asset}/securityMarks'); + } + + return self::$folderAssetSecurityMarksNameTemplate; + } + + private static function getFolderExportNameTemplate() + { + if (self::$folderExportNameTemplate == null) { + self::$folderExportNameTemplate = new PathTemplate('folders/{folder}/bigQueryExports/{export}'); + } + + return self::$folderExportNameTemplate; + } + + private static function getFolderMuteConfigNameTemplate() + { + if (self::$folderMuteConfigNameTemplate == null) { + self::$folderMuteConfigNameTemplate = new PathTemplate('folders/{folder}/muteConfigs/{mute_config}'); + } + + return self::$folderMuteConfigNameTemplate; + } + + private static function getFolderNotificationConfigNameTemplate() + { + if (self::$folderNotificationConfigNameTemplate == null) { + self::$folderNotificationConfigNameTemplate = new PathTemplate('folders/{folder}/notificationConfigs/{notification_config}'); + } + + return self::$folderNotificationConfigNameTemplate; + } + + private static function getFolderSourceNameTemplate() + { + if (self::$folderSourceNameTemplate == null) { + self::$folderSourceNameTemplate = new PathTemplate('folders/{folder}/sources/{source}'); + } + + return self::$folderSourceNameTemplate; + } + + private static function getFolderSourceFindingNameTemplate() + { + if (self::$folderSourceFindingNameTemplate == null) { + self::$folderSourceFindingNameTemplate = new PathTemplate('folders/{folder}/sources/{source}/findings/{finding}'); + } + + return self::$folderSourceFindingNameTemplate; + } + + private static function getFolderSourceFindingExternalsystemNameTemplate() + { + if (self::$folderSourceFindingExternalsystemNameTemplate == null) { + self::$folderSourceFindingExternalsystemNameTemplate = new PathTemplate('folders/{folder}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}'); + } + + return self::$folderSourceFindingExternalsystemNameTemplate; + } + + private static function getFolderSourceFindingSecurityMarksNameTemplate() + { + if (self::$folderSourceFindingSecurityMarksNameTemplate == null) { + self::$folderSourceFindingSecurityMarksNameTemplate = new PathTemplate('folders/{folder}/sources/{source}/findings/{finding}/securityMarks'); + } + + return self::$folderSourceFindingSecurityMarksNameTemplate; + } + + private static function getMuteConfigNameTemplate() + { + if (self::$muteConfigNameTemplate == null) { + self::$muteConfigNameTemplate = new PathTemplate('organizations/{organization}/muteConfigs/{mute_config}'); + } + + return self::$muteConfigNameTemplate; + } + + private static function getNotificationConfigNameTemplate() + { + if (self::$notificationConfigNameTemplate == null) { + self::$notificationConfigNameTemplate = new PathTemplate('organizations/{organization}/notificationConfigs/{notification_config}'); + } + + return self::$notificationConfigNameTemplate; + } + + private static function getOrganizationNameTemplate() + { + if (self::$organizationNameTemplate == null) { + self::$organizationNameTemplate = new PathTemplate('organizations/{organization}'); + } + + return self::$organizationNameTemplate; + } + + private static function getOrganizationAssetSecurityMarksNameTemplate() + { + if (self::$organizationAssetSecurityMarksNameTemplate == null) { + self::$organizationAssetSecurityMarksNameTemplate = new PathTemplate('organizations/{organization}/assets/{asset}/securityMarks'); + } + + return self::$organizationAssetSecurityMarksNameTemplate; + } + + private static function getOrganizationExportNameTemplate() + { + if (self::$organizationExportNameTemplate == null) { + self::$organizationExportNameTemplate = new PathTemplate('organizations/{organization}/bigQueryExports/{export}'); + } + + return self::$organizationExportNameTemplate; + } + + private static function getOrganizationMuteConfigNameTemplate() + { + if (self::$organizationMuteConfigNameTemplate == null) { + self::$organizationMuteConfigNameTemplate = new PathTemplate('organizations/{organization}/muteConfigs/{mute_config}'); + } + + return self::$organizationMuteConfigNameTemplate; + } + + private static function getOrganizationNotificationConfigNameTemplate() + { + if (self::$organizationNotificationConfigNameTemplate == null) { + self::$organizationNotificationConfigNameTemplate = new PathTemplate('organizations/{organization}/notificationConfigs/{notification_config}'); + } + + return self::$organizationNotificationConfigNameTemplate; + } + + private static function getOrganizationSettingsNameTemplate() + { + if (self::$organizationSettingsNameTemplate == null) { + self::$organizationSettingsNameTemplate = new PathTemplate('organizations/{organization}/organizationSettings'); + } + + return self::$organizationSettingsNameTemplate; + } + + private static function getOrganizationSourceNameTemplate() + { + if (self::$organizationSourceNameTemplate == null) { + self::$organizationSourceNameTemplate = new PathTemplate('organizations/{organization}/sources/{source}'); + } + + return self::$organizationSourceNameTemplate; + } + + private static function getOrganizationSourceFindingNameTemplate() + { + if (self::$organizationSourceFindingNameTemplate == null) { + self::$organizationSourceFindingNameTemplate = new PathTemplate('organizations/{organization}/sources/{source}/findings/{finding}'); + } + + return self::$organizationSourceFindingNameTemplate; + } + + private static function getOrganizationSourceFindingExternalsystemNameTemplate() + { + if (self::$organizationSourceFindingExternalsystemNameTemplate == null) { + self::$organizationSourceFindingExternalsystemNameTemplate = new PathTemplate('organizations/{organization}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}'); + } + + return self::$organizationSourceFindingExternalsystemNameTemplate; + } + + private static function getOrganizationSourceFindingSecurityMarksNameTemplate() + { + if (self::$organizationSourceFindingSecurityMarksNameTemplate == null) { + self::$organizationSourceFindingSecurityMarksNameTemplate = new PathTemplate('organizations/{organization}/sources/{source}/findings/{finding}/securityMarks'); + } + + return self::$organizationSourceFindingSecurityMarksNameTemplate; + } + + private static function getProjectNameTemplate() + { + if (self::$projectNameTemplate == null) { + self::$projectNameTemplate = new PathTemplate('projects/{project}'); + } + + return self::$projectNameTemplate; + } + + private static function getProjectAssetSecurityMarksNameTemplate() + { + if (self::$projectAssetSecurityMarksNameTemplate == null) { + self::$projectAssetSecurityMarksNameTemplate = new PathTemplate('projects/{project}/assets/{asset}/securityMarks'); + } + + return self::$projectAssetSecurityMarksNameTemplate; + } + + private static function getProjectExportNameTemplate() + { + if (self::$projectExportNameTemplate == null) { + self::$projectExportNameTemplate = new PathTemplate('projects/{project}/bigQueryExports/{export}'); + } + + return self::$projectExportNameTemplate; + } + + private static function getProjectMuteConfigNameTemplate() + { + if (self::$projectMuteConfigNameTemplate == null) { + self::$projectMuteConfigNameTemplate = new PathTemplate('projects/{project}/muteConfigs/{mute_config}'); + } + + return self::$projectMuteConfigNameTemplate; + } + + private static function getProjectNotificationConfigNameTemplate() + { + if (self::$projectNotificationConfigNameTemplate == null) { + self::$projectNotificationConfigNameTemplate = new PathTemplate('projects/{project}/notificationConfigs/{notification_config}'); + } + + return self::$projectNotificationConfigNameTemplate; + } + + private static function getProjectSourceNameTemplate() + { + if (self::$projectSourceNameTemplate == null) { + self::$projectSourceNameTemplate = new PathTemplate('projects/{project}/sources/{source}'); + } + + return self::$projectSourceNameTemplate; + } + + private static function getProjectSourceFindingNameTemplate() + { + if (self::$projectSourceFindingNameTemplate == null) { + self::$projectSourceFindingNameTemplate = new PathTemplate('projects/{project}/sources/{source}/findings/{finding}'); + } + + return self::$projectSourceFindingNameTemplate; + } + + private static function getProjectSourceFindingExternalsystemNameTemplate() + { + if (self::$projectSourceFindingExternalsystemNameTemplate == null) { + self::$projectSourceFindingExternalsystemNameTemplate = new PathTemplate('projects/{project}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}'); + } + + return self::$projectSourceFindingExternalsystemNameTemplate; + } + + private static function getProjectSourceFindingSecurityMarksNameTemplate() + { + if (self::$projectSourceFindingSecurityMarksNameTemplate == null) { + self::$projectSourceFindingSecurityMarksNameTemplate = new PathTemplate('projects/{project}/sources/{source}/findings/{finding}/securityMarks'); + } + + return self::$projectSourceFindingSecurityMarksNameTemplate; + } + + private static function getSecurityMarksNameTemplate() + { + if (self::$securityMarksNameTemplate == null) { + self::$securityMarksNameTemplate = new PathTemplate('organizations/{organization}/assets/{asset}/securityMarks'); + } + + return self::$securityMarksNameTemplate; + } + + private static function getSourceNameTemplate() + { + if (self::$sourceNameTemplate == null) { + self::$sourceNameTemplate = new PathTemplate('organizations/{organization}/sources/{source}'); + } + + return self::$sourceNameTemplate; + } + + private static function getTopicNameTemplate() + { + if (self::$topicNameTemplate == null) { + self::$topicNameTemplate = new PathTemplate('projects/{project}/topics/{topic}'); + } + + return self::$topicNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'bigQueryExport' => self::getBigQueryExportNameTemplate(), + 'externalSystem' => self::getExternalSystemNameTemplate(), + 'finding' => self::getFindingNameTemplate(), + 'folder' => self::getFolderNameTemplate(), + 'folderAssetSecurityMarks' => self::getFolderAssetSecurityMarksNameTemplate(), + 'folderExport' => self::getFolderExportNameTemplate(), + 'folderMuteConfig' => self::getFolderMuteConfigNameTemplate(), + 'folderNotificationConfig' => self::getFolderNotificationConfigNameTemplate(), + 'folderSource' => self::getFolderSourceNameTemplate(), + 'folderSourceFinding' => self::getFolderSourceFindingNameTemplate(), + 'folderSourceFindingExternalsystem' => self::getFolderSourceFindingExternalsystemNameTemplate(), + 'folderSourceFindingSecurityMarks' => self::getFolderSourceFindingSecurityMarksNameTemplate(), + 'muteConfig' => self::getMuteConfigNameTemplate(), + 'notificationConfig' => self::getNotificationConfigNameTemplate(), + 'organization' => self::getOrganizationNameTemplate(), + 'organizationAssetSecurityMarks' => self::getOrganizationAssetSecurityMarksNameTemplate(), + 'organizationExport' => self::getOrganizationExportNameTemplate(), + 'organizationMuteConfig' => self::getOrganizationMuteConfigNameTemplate(), + 'organizationNotificationConfig' => self::getOrganizationNotificationConfigNameTemplate(), + 'organizationSettings' => self::getOrganizationSettingsNameTemplate(), + 'organizationSource' => self::getOrganizationSourceNameTemplate(), + 'organizationSourceFinding' => self::getOrganizationSourceFindingNameTemplate(), + 'organizationSourceFindingExternalsystem' => self::getOrganizationSourceFindingExternalsystemNameTemplate(), + 'organizationSourceFindingSecurityMarks' => self::getOrganizationSourceFindingSecurityMarksNameTemplate(), + 'project' => self::getProjectNameTemplate(), + 'projectAssetSecurityMarks' => self::getProjectAssetSecurityMarksNameTemplate(), + 'projectExport' => self::getProjectExportNameTemplate(), + 'projectMuteConfig' => self::getProjectMuteConfigNameTemplate(), + 'projectNotificationConfig' => self::getProjectNotificationConfigNameTemplate(), + 'projectSource' => self::getProjectSourceNameTemplate(), + 'projectSourceFinding' => self::getProjectSourceFindingNameTemplate(), + 'projectSourceFindingExternalsystem' => self::getProjectSourceFindingExternalsystemNameTemplate(), + 'projectSourceFindingSecurityMarks' => self::getProjectSourceFindingSecurityMarksNameTemplate(), + 'securityMarks' => self::getSecurityMarksNameTemplate(), + 'source' => self::getSourceNameTemplate(), + 'topic' => self::getTopicNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * big_query_export resource. + * + * @param string $organization + * @param string $export + * + * @return string The formatted big_query_export resource. + */ + public static function bigQueryExportName($organization, $export) + { + return self::getBigQueryExportNameTemplate()->render([ + 'organization' => $organization, + 'export' => $export, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * external_system resource. + * + * @param string $organization + * @param string $source + * @param string $finding + * @param string $externalsystem + * + * @return string The formatted external_system resource. + */ + public static function externalSystemName($organization, $source, $finding, $externalsystem) + { + return self::getExternalSystemNameTemplate()->render([ + 'organization' => $organization, + 'source' => $source, + 'finding' => $finding, + 'externalsystem' => $externalsystem, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a finding + * resource. + * + * @param string $organization + * @param string $source + * @param string $finding + * + * @return string The formatted finding resource. + */ + public static function findingName($organization, $source, $finding) + { + return self::getFindingNameTemplate()->render([ + 'organization' => $organization, + 'source' => $source, + 'finding' => $finding, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a folder + * resource. + * + * @param string $folder + * + * @return string The formatted folder resource. + */ + public static function folderName($folder) + { + return self::getFolderNameTemplate()->render([ + 'folder' => $folder, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * folder_asset_securityMarks resource. + * + * @param string $folder + * @param string $asset + * + * @return string The formatted folder_asset_securityMarks resource. + */ + public static function folderAssetSecurityMarksName($folder, $asset) + { + return self::getFolderAssetSecurityMarksNameTemplate()->render([ + 'folder' => $folder, + 'asset' => $asset, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * folder_export resource. + * + * @param string $folder + * @param string $export + * + * @return string The formatted folder_export resource. + */ + public static function folderExportName($folder, $export) + { + return self::getFolderExportNameTemplate()->render([ + 'folder' => $folder, + 'export' => $export, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * folder_mute_config resource. + * + * @param string $folder + * @param string $muteConfig + * + * @return string The formatted folder_mute_config resource. + */ + public static function folderMuteConfigName($folder, $muteConfig) + { + return self::getFolderMuteConfigNameTemplate()->render([ + 'folder' => $folder, + 'mute_config' => $muteConfig, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * folder_notification_config resource. + * + * @param string $folder + * @param string $notificationConfig + * + * @return string The formatted folder_notification_config resource. + */ + public static function folderNotificationConfigName($folder, $notificationConfig) + { + return self::getFolderNotificationConfigNameTemplate()->render([ + 'folder' => $folder, + 'notification_config' => $notificationConfig, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * folder_source resource. + * + * @param string $folder + * @param string $source + * + * @return string The formatted folder_source resource. + */ + public static function folderSourceName($folder, $source) + { + return self::getFolderSourceNameTemplate()->render([ + 'folder' => $folder, + 'source' => $source, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * folder_source_finding resource. + * + * @param string $folder + * @param string $source + * @param string $finding + * + * @return string The formatted folder_source_finding resource. + */ + public static function folderSourceFindingName($folder, $source, $finding) + { + return self::getFolderSourceFindingNameTemplate()->render([ + 'folder' => $folder, + 'source' => $source, + 'finding' => $finding, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * folder_source_finding_externalsystem resource. + * + * @param string $folder + * @param string $source + * @param string $finding + * @param string $externalsystem + * + * @return string The formatted folder_source_finding_externalsystem resource. + */ + public static function folderSourceFindingExternalsystemName($folder, $source, $finding, $externalsystem) + { + return self::getFolderSourceFindingExternalsystemNameTemplate()->render([ + 'folder' => $folder, + 'source' => $source, + 'finding' => $finding, + 'externalsystem' => $externalsystem, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * folder_source_finding_securityMarks resource. + * + * @param string $folder + * @param string $source + * @param string $finding + * + * @return string The formatted folder_source_finding_securityMarks resource. + */ + public static function folderSourceFindingSecurityMarksName($folder, $source, $finding) + { + return self::getFolderSourceFindingSecurityMarksNameTemplate()->render([ + 'folder' => $folder, + 'source' => $source, + 'finding' => $finding, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a mute_config + * resource. + * + * @param string $organization + * @param string $muteConfig + * + * @return string The formatted mute_config resource. + */ + public static function muteConfigName($organization, $muteConfig) + { + return self::getMuteConfigNameTemplate()->render([ + 'organization' => $organization, + 'mute_config' => $muteConfig, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * notification_config resource. + * + * @param string $organization + * @param string $notificationConfig + * + * @return string The formatted notification_config resource. + */ + public static function notificationConfigName($organization, $notificationConfig) + { + return self::getNotificationConfigNameTemplate()->render([ + 'organization' => $organization, + 'notification_config' => $notificationConfig, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a organization + * resource. + * + * @param string $organization + * + * @return string The formatted organization resource. + */ + public static function organizationName($organization) + { + return self::getOrganizationNameTemplate()->render([ + 'organization' => $organization, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_asset_securityMarks resource. + * + * @param string $organization + * @param string $asset + * + * @return string The formatted organization_asset_securityMarks resource. + */ + public static function organizationAssetSecurityMarksName($organization, $asset) + { + return self::getOrganizationAssetSecurityMarksNameTemplate()->render([ + 'organization' => $organization, + 'asset' => $asset, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_export resource. + * + * @param string $organization + * @param string $export + * + * @return string The formatted organization_export resource. + */ + public static function organizationExportName($organization, $export) + { + return self::getOrganizationExportNameTemplate()->render([ + 'organization' => $organization, + 'export' => $export, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_mute_config resource. + * + * @param string $organization + * @param string $muteConfig + * + * @return string The formatted organization_mute_config resource. + */ + public static function organizationMuteConfigName($organization, $muteConfig) + { + return self::getOrganizationMuteConfigNameTemplate()->render([ + 'organization' => $organization, + 'mute_config' => $muteConfig, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_notification_config resource. + * + * @param string $organization + * @param string $notificationConfig + * + * @return string The formatted organization_notification_config resource. + */ + public static function organizationNotificationConfigName($organization, $notificationConfig) + { + return self::getOrganizationNotificationConfigNameTemplate()->render([ + 'organization' => $organization, + 'notification_config' => $notificationConfig, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_settings resource. + * + * @param string $organization + * + * @return string The formatted organization_settings resource. + */ + public static function organizationSettingsName($organization) + { + return self::getOrganizationSettingsNameTemplate()->render([ + 'organization' => $organization, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_source resource. + * + * @param string $organization + * @param string $source + * + * @return string The formatted organization_source resource. + */ + public static function organizationSourceName($organization, $source) + { + return self::getOrganizationSourceNameTemplate()->render([ + 'organization' => $organization, + 'source' => $source, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_source_finding resource. + * + * @param string $organization + * @param string $source + * @param string $finding + * + * @return string The formatted organization_source_finding resource. + */ + public static function organizationSourceFindingName($organization, $source, $finding) + { + return self::getOrganizationSourceFindingNameTemplate()->render([ + 'organization' => $organization, + 'source' => $source, + 'finding' => $finding, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_source_finding_externalsystem resource. + * + * @param string $organization + * @param string $source + * @param string $finding + * @param string $externalsystem + * + * @return string The formatted organization_source_finding_externalsystem resource. + */ + public static function organizationSourceFindingExternalsystemName($organization, $source, $finding, $externalsystem) + { + return self::getOrganizationSourceFindingExternalsystemNameTemplate()->render([ + 'organization' => $organization, + 'source' => $source, + 'finding' => $finding, + 'externalsystem' => $externalsystem, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_source_finding_securityMarks resource. + * + * @param string $organization + * @param string $source + * @param string $finding + * + * @return string The formatted organization_source_finding_securityMarks resource. + */ + public static function organizationSourceFindingSecurityMarksName($organization, $source, $finding) + { + return self::getOrganizationSourceFindingSecurityMarksNameTemplate()->render([ + 'organization' => $organization, + 'source' => $source, + 'finding' => $finding, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a project + * resource. + * + * @param string $project + * + * @return string The formatted project resource. + */ + public static function projectName($project) + { + return self::getProjectNameTemplate()->render([ + 'project' => $project, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_asset_securityMarks resource. + * + * @param string $project + * @param string $asset + * + * @return string The formatted project_asset_securityMarks resource. + */ + public static function projectAssetSecurityMarksName($project, $asset) + { + return self::getProjectAssetSecurityMarksNameTemplate()->render([ + 'project' => $project, + 'asset' => $asset, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_export resource. + * + * @param string $project + * @param string $export + * + * @return string The formatted project_export resource. + */ + public static function projectExportName($project, $export) + { + return self::getProjectExportNameTemplate()->render([ + 'project' => $project, + 'export' => $export, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_mute_config resource. + * + * @param string $project + * @param string $muteConfig + * + * @return string The formatted project_mute_config resource. + */ + public static function projectMuteConfigName($project, $muteConfig) + { + return self::getProjectMuteConfigNameTemplate()->render([ + 'project' => $project, + 'mute_config' => $muteConfig, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_notification_config resource. + * + * @param string $project + * @param string $notificationConfig + * + * @return string The formatted project_notification_config resource. + */ + public static function projectNotificationConfigName($project, $notificationConfig) + { + return self::getProjectNotificationConfigNameTemplate()->render([ + 'project' => $project, + 'notification_config' => $notificationConfig, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_source resource. + * + * @param string $project + * @param string $source + * + * @return string The formatted project_source resource. + */ + public static function projectSourceName($project, $source) + { + return self::getProjectSourceNameTemplate()->render([ + 'project' => $project, + 'source' => $source, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_source_finding resource. + * + * @param string $project + * @param string $source + * @param string $finding + * + * @return string The formatted project_source_finding resource. + */ + public static function projectSourceFindingName($project, $source, $finding) + { + return self::getProjectSourceFindingNameTemplate()->render([ + 'project' => $project, + 'source' => $source, + 'finding' => $finding, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_source_finding_externalsystem resource. + * + * @param string $project + * @param string $source + * @param string $finding + * @param string $externalsystem + * + * @return string The formatted project_source_finding_externalsystem resource. + */ + public static function projectSourceFindingExternalsystemName($project, $source, $finding, $externalsystem) + { + return self::getProjectSourceFindingExternalsystemNameTemplate()->render([ + 'project' => $project, + 'source' => $source, + 'finding' => $finding, + 'externalsystem' => $externalsystem, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_source_finding_securityMarks resource. + * + * @param string $project + * @param string $source + * @param string $finding + * + * @return string The formatted project_source_finding_securityMarks resource. + */ + public static function projectSourceFindingSecurityMarksName($project, $source, $finding) + { + return self::getProjectSourceFindingSecurityMarksNameTemplate()->render([ + 'project' => $project, + 'source' => $source, + 'finding' => $finding, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * security_marks resource. + * + * @param string $organization + * @param string $asset + * + * @return string The formatted security_marks resource. + */ + public static function securityMarksName($organization, $asset) + { + return self::getSecurityMarksNameTemplate()->render([ + 'organization' => $organization, + 'asset' => $asset, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a source + * resource. + * + * @param string $organization + * @param string $source + * + * @return string The formatted source resource. + */ + public static function sourceName($organization, $source) + { + return self::getSourceNameTemplate()->render([ + 'organization' => $organization, + 'source' => $source, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a topic + * resource. + * + * @param string $project + * @param string $topic + * + * @return string The formatted topic resource. + */ + public static function topicName($project, $topic) + { + return self::getTopicNameTemplate()->render([ + 'project' => $project, + 'topic' => $topic, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - bigQueryExport: organizations/{organization}/bigQueryExports/{export} + * - externalSystem: organizations/{organization}/sources/{source}/findings/{finding}/externalSystems/{externalsystem} + * - finding: organizations/{organization}/sources/{source}/findings/{finding} + * - folder: folders/{folder} + * - folderAssetSecurityMarks: folders/{folder}/assets/{asset}/securityMarks + * - folderExport: folders/{folder}/bigQueryExports/{export} + * - folderMuteConfig: folders/{folder}/muteConfigs/{mute_config} + * - folderNotificationConfig: folders/{folder}/notificationConfigs/{notification_config} + * - folderSource: folders/{folder}/sources/{source} + * - folderSourceFinding: folders/{folder}/sources/{source}/findings/{finding} + * - folderSourceFindingExternalsystem: folders/{folder}/sources/{source}/findings/{finding}/externalSystems/{externalsystem} + * - folderSourceFindingSecurityMarks: folders/{folder}/sources/{source}/findings/{finding}/securityMarks + * - muteConfig: organizations/{organization}/muteConfigs/{mute_config} + * - notificationConfig: organizations/{organization}/notificationConfigs/{notification_config} + * - organization: organizations/{organization} + * - organizationAssetSecurityMarks: organizations/{organization}/assets/{asset}/securityMarks + * - organizationExport: organizations/{organization}/bigQueryExports/{export} + * - organizationMuteConfig: organizations/{organization}/muteConfigs/{mute_config} + * - organizationNotificationConfig: organizations/{organization}/notificationConfigs/{notification_config} + * - organizationSettings: organizations/{organization}/organizationSettings + * - organizationSource: organizations/{organization}/sources/{source} + * - organizationSourceFinding: organizations/{organization}/sources/{source}/findings/{finding} + * - organizationSourceFindingExternalsystem: organizations/{organization}/sources/{source}/findings/{finding}/externalSystems/{externalsystem} + * - organizationSourceFindingSecurityMarks: organizations/{organization}/sources/{source}/findings/{finding}/securityMarks + * - project: projects/{project} + * - projectAssetSecurityMarks: projects/{project}/assets/{asset}/securityMarks + * - projectExport: projects/{project}/bigQueryExports/{export} + * - projectMuteConfig: projects/{project}/muteConfigs/{mute_config} + * - projectNotificationConfig: projects/{project}/notificationConfigs/{notification_config} + * - projectSource: projects/{project}/sources/{source} + * - projectSourceFinding: projects/{project}/sources/{source}/findings/{finding} + * - projectSourceFindingExternalsystem: projects/{project}/sources/{source}/findings/{finding}/externalSystems/{externalsystem} + * - projectSourceFindingSecurityMarks: projects/{project}/sources/{source}/findings/{finding}/securityMarks + * - securityMarks: organizations/{organization}/assets/{asset}/securityMarks + * - source: organizations/{organization}/sources/{source} + * - topic: projects/{project}/topics/{topic} + * + * 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($formattedName, $template = null) + { + $templateMap = self::getPathTemplateMap(); + if ($template) { + if (!isset($templateMap[$template])) { + throw new ValidationException("Template name $template does not exist"); + } + + return $templateMap[$template]->match($formattedName); + } + + foreach ($templateMap as $templateName => $pathTemplate) { + try { + return $pathTemplate->match($formattedName); + } catch (ValidationException $ex) { + // Swallow the exception to continue trying other path templates + } + } + + throw new ValidationException("Input did not match any known format. Input: $formattedName"); + } + + /** + * 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 = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Constructor. + * + * @param array $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 'securitycenter.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @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. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** + * Kicks off an LRO to bulk mute findings for a parent based on a filter. The + * parent can be either an organization, folder or project. The findings + * matched by the filter will be muted after the LRO is done. + * + * Sample code: + * ``` + * $securityCenterClient = new SecurityCenterClient(); + * try { + * $parent = 'parent'; + * $operationResponse = $securityCenterClient->bulkMuteFindings($parent); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $securityCenterClient->bulkMuteFindings($parent); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $securityCenterClient->resumeOperation($operationName, 'bulkMuteFindings'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $securityCenterClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent, at which bulk action needs to be applied. Its format + * is "organizations/[organization_id]", "folders/[folder_id]", + * "projects/[project_id]". + * @param array $optionalArgs { + * Optional. + * + * @type string $filter + * Expression that identifies findings that should be updated. + * The expression is a list of zero or more restrictions combined + * via logical operators `AND` and `OR`. Parentheses are supported, and `OR` + * has higher precedence than `AND`. + * + * Restrictions have the form ` ` and may have a + * `-` character in front of them to indicate negation. The fields map to + * those defined in the corresponding resource. + * + * The supported operators are: + * + * * `=` for all value types. + * * `>`, `<`, `>=`, `<=` for integer values. + * * `:`, meaning substring matching, for strings. + * + * The supported value types are: + * + * * string literals in quotes. + * * integer literals without quotes. + * * boolean literals `true` and `false` without quotes. + * @type string $muteAnnotation + * This can be a mute configuration name or any identifier for mute/unmute + * of findings based on the filter. + * @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 \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function bulkMuteFindings($parent, array $optionalArgs = []) + { + $request = new BulkMuteFindingsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['muteAnnotation'])) { + $request->setMuteAnnotation($optionalArgs['muteAnnotation']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('BulkMuteFindings', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Creates a BigQuery export. + * + * Sample code: + * ``` + * $securityCenterClient = new SecurityCenterClient(); + * try { + * $formattedParent = $securityCenterClient->projectName('[PROJECT]'); + * $bigQueryExport = new BigQueryExport(); + * $bigQueryExportId = 'big_query_export_id'; + * $response = $securityCenterClient->createBigQueryExport($formattedParent, $bigQueryExport, $bigQueryExportId); + * } finally { + * $securityCenterClient->close(); + * } + * ``` + * + * @param string $parent Required. The name of the parent resource of the new BigQuery export. Its + * format is "organizations/[organization_id]", "folders/[folder_id]", or + * "projects/[project_id]". + * @param BigQueryExport $bigQueryExport Required. The BigQuery export being created. + * @param string $bigQueryExportId Required. Unique identifier provided by the client within the parent scope. + * It must consist of lower case letters, numbers, and hyphen, with the first + * character a letter, the last a letter or a number, and a 63 character + * maximum. + * @param array $optionalArgs { + * 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 \Google\Cloud\SecurityCenter\V1\BigQueryExport + * + * @throws ApiException if the remote call fails + */ + public function createBigQueryExport($parent, $bigQueryExport, $bigQueryExportId, array $optionalArgs = []) + { + $request = new CreateBigQueryExportRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setBigQueryExport($bigQueryExport); + $request->setBigQueryExportId($bigQueryExportId); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateBigQueryExport', BigQueryExport::class, $optionalArgs, $request)->wait(); + } + + /** + * Creates a finding. The corresponding source must exist for finding creation + * to succeed. + * + * Sample code: + * ``` + * $securityCenterClient = new SecurityCenterClient(); + * try { + * $formattedParent = $securityCenterClient->sourceName('[ORGANIZATION]', '[SOURCE]'); + * $findingId = 'finding_id'; + * $finding = new Finding(); + * $response = $securityCenterClient->createFinding($formattedParent, $findingId, $finding); + * } finally { + * $securityCenterClient->close(); + * } + * ``` + * + * @param string $parent Required. Resource name of the new finding's parent. Its format should be + * "organizations/[organization_id]/sources/[source_id]". + * @param string $findingId Required. Unique identifier provided by the client within the parent scope. + * It must be alphanumeric and less than or equal to 32 characters and + * greater than 0 characters in length. + * @param Finding $finding Required. The Finding being created. The name and security_marks will be + * ignored as they are both output only fields on this resource. + * @param array $optionalArgs { + * 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 \Google\Cloud\SecurityCenter\V1\Finding + * + * @throws ApiException if the remote call fails + */ + public function createFinding($parent, $findingId, $finding, array $optionalArgs = []) + { + $request = new CreateFindingRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setFindingId($findingId); + $request->setFinding($finding); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateFinding', Finding::class, $optionalArgs, $request)->wait(); + } + + /** + * Creates a mute config. + * + * Sample code: + * ``` + * $securityCenterClient = new SecurityCenterClient(); + * try { + * $formattedParent = $securityCenterClient->projectName('[PROJECT]'); + * $muteConfig = new MuteConfig(); + * $muteConfigId = 'mute_config_id'; + * $response = $securityCenterClient->createMuteConfig($formattedParent, $muteConfig, $muteConfigId); + * } finally { + * $securityCenterClient->close(); + * } + * ``` + * + * @param string $parent Required. Resource name of the new mute configs's parent. Its format is + * "organizations/[organization_id]", "folders/[folder_id]", or + * "projects/[project_id]". + * @param MuteConfig $muteConfig Required. The mute config being created. + * @param string $muteConfigId Required. Unique identifier provided by the client within the parent scope. + * It must consist of lower case letters, numbers, and hyphen, with the first + * character a letter, the last a letter or a number, and a 63 character + * maximum. + * @param array $optionalArgs { + * 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 \Google\Cloud\SecurityCenter\V1\MuteConfig + * + * @throws ApiException if the remote call fails + */ + public function createMuteConfig($parent, $muteConfig, $muteConfigId, array $optionalArgs = []) + { + $request = new CreateMuteConfigRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setMuteConfig($muteConfig); + $request->setMuteConfigId($muteConfigId); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateMuteConfig', MuteConfig::class, $optionalArgs, $request)->wait(); + } + + /** + * Creates a notification config. + * + * Sample code: + * ``` + * $securityCenterClient = new SecurityCenterClient(); + * try { + * $formattedParent = $securityCenterClient->projectName('[PROJECT]'); + * $configId = 'config_id'; + * $notificationConfig = new NotificationConfig(); + * $response = $securityCenterClient->createNotificationConfig($formattedParent, $configId, $notificationConfig); + * } finally { + * $securityCenterClient->close(); + * } + * ``` + * + * @param string $parent Required. Resource name of the new notification config's parent. Its format + * is "organizations/[organization_id]", "folders/[folder_id]", or + * "projects/[project_id]". + * @param string $configId Required. + * Unique identifier provided by the client within the parent scope. + * It must be between 1 and 128 characters and contain alphanumeric + * characters, underscores, or hyphens only. + * @param NotificationConfig $notificationConfig Required. The notification config being created. The name and the service + * account will be ignored as they are both output only fields on this + * resource. + * @param array $optionalArgs { + * 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 \Google\Cloud\SecurityCenter\V1\NotificationConfig + * + * @throws ApiException if the remote call fails + */ + public function createNotificationConfig($parent, $configId, $notificationConfig, array $optionalArgs = []) + { + $request = new CreateNotificationConfigRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setConfigId($configId); + $request->setNotificationConfig($notificationConfig); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateNotificationConfig', NotificationConfig::class, $optionalArgs, $request)->wait(); + } + + /** + * Creates a source. + * + * Sample code: + * ``` + * $securityCenterClient = new SecurityCenterClient(); + * try { + * $formattedParent = $securityCenterClient->organizationName('[ORGANIZATION]'); + * $source = new Source(); + * $response = $securityCenterClient->createSource($formattedParent, $source); + * } finally { + * $securityCenterClient->close(); + * } + * ``` + * + * @param string $parent Required. Resource name of the new source's parent. Its format should be + * "organizations/[organization_id]". + * @param Source $source Required. The Source being created, only the display_name and description + * will be used. All other fields will be ignored. + * @param array $optionalArgs { + * 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 \Google\Cloud\SecurityCenter\V1\Source + * + * @throws ApiException if the remote call fails + */ + public function createSource($parent, $source, array $optionalArgs = []) + { + $request = new CreateSourceRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setSource($source); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateSource', Source::class, $optionalArgs, $request)->wait(); + } + + /** + * Deletes an existing BigQuery export. + * + * Sample code: + * ``` + * $securityCenterClient = new SecurityCenterClient(); + * try { + * $formattedName = $securityCenterClient->bigQueryExportName('[ORGANIZATION]', '[EXPORT]'); + * $securityCenterClient->deleteBigQueryExport($formattedName); + * } finally { + * $securityCenterClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the BigQuery export to delete. Its format is + * organizations/{organization}/bigQueryExports/{export_id}, + * folders/{folder}/bigQueryExports/{export_id}, or + * projects/{project}/bigQueryExports/{export_id} + * @param array $optionalArgs { + * 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. + * } + * + * @throws ApiException if the remote call fails + */ + public function deleteBigQueryExport($name, array $optionalArgs = []) + { + $request = new DeleteBigQueryExportRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('DeleteBigQueryExport', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Deletes an existing mute config. + * + * Sample code: + * ``` + * $securityCenterClient = new SecurityCenterClient(); + * try { + * $formattedName = $securityCenterClient->muteConfigName('[ORGANIZATION]', '[MUTE_CONFIG]'); + * $securityCenterClient->deleteMuteConfig($formattedName); + * } finally { + * $securityCenterClient->close(); + * } + * ``` + * + * @param string $name Required. Name of the mute config to delete. Its format is + * organizations/{organization}/muteConfigs/{config_id}, + * folders/{folder}/muteConfigs/{config_id}, or + * projects/{project}/muteConfigs/{config_id} + * @param array $optionalArgs { + * 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. + * } + * + * @throws ApiException if the remote call fails + */ + public function deleteMuteConfig($name, array $optionalArgs = []) + { + $request = new DeleteMuteConfigRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('DeleteMuteConfig', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Deletes a notification config. + * + * Sample code: + * ``` + * $securityCenterClient = new SecurityCenterClient(); + * try { + * $formattedName = $securityCenterClient->notificationConfigName('[ORGANIZATION]', '[NOTIFICATION_CONFIG]'); + * $securityCenterClient->deleteNotificationConfig($formattedName); + * } finally { + * $securityCenterClient->close(); + * } + * ``` + * + * @param string $name Required. Name of the notification config to delete. Its format is + * "organizations/[organization_id]/notificationConfigs/[config_id]", + * "folders/[folder_id]/notificationConfigs/[config_id]", + * or "projects/[project_id]/notificationConfigs/[config_id]". + * @param array $optionalArgs { + * 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. + * } + * + * @throws ApiException if the remote call fails + */ + public function deleteNotificationConfig($name, array $optionalArgs = []) + { + $request = new DeleteNotificationConfigRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('DeleteNotificationConfig', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets a BigQuery export. + * + * Sample code: + * ``` + * $securityCenterClient = new SecurityCenterClient(); + * try { + * $formattedName = $securityCenterClient->bigQueryExportName('[ORGANIZATION]', '[EXPORT]'); + * $response = $securityCenterClient->getBigQueryExport($formattedName); + * } finally { + * $securityCenterClient->close(); + * } + * ``` + * + * @param string $name Required. Name of the BigQuery export to retrieve. Its format is + * organizations/{organization}/bigQueryExports/{export_id}, + * folders/{folder}/bigQueryExports/{export_id}, or + * projects/{project}/bigQueryExports/{export_id} + * @param array $optionalArgs { + * 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 \Google\Cloud\SecurityCenter\V1\BigQueryExport + * + * @throws ApiException if the remote call fails + */ + public function getBigQueryExport($name, array $optionalArgs = []) + { + $request = new GetBigQueryExportRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetBigQueryExport', BigQueryExport::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets the access control policy on the specified Source. + * + * Sample code: + * ``` + * $securityCenterClient = new SecurityCenterClient(); + * try { + * $resource = 'resource'; + * $response = $securityCenterClient->getIamPolicy($resource); + * } finally { + * $securityCenterClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param array $optionalArgs { + * Optional. + * + * @type GetPolicyOptions $options + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. + * @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 \Google\Cloud\Iam\V1\Policy + * + * @throws ApiException if the remote call fails + */ + public function getIamPolicy($resource, array $optionalArgs = []) + { + $request = new GetIamPolicyRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $requestParamHeaders['resource'] = $resource; + if (isset($optionalArgs['options'])) { + $request->setOptions($optionalArgs['options']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets a mute config. + * + * Sample code: + * ``` + * $securityCenterClient = new SecurityCenterClient(); + * try { + * $formattedName = $securityCenterClient->muteConfigName('[ORGANIZATION]', '[MUTE_CONFIG]'); + * $response = $securityCenterClient->getMuteConfig($formattedName); + * } finally { + * $securityCenterClient->close(); + * } + * ``` + * + * @param string $name Required. Name of the mute config to retrieve. Its format is + * organizations/{organization}/muteConfigs/{config_id}, + * folders/{folder}/muteConfigs/{config_id}, or + * projects/{project}/muteConfigs/{config_id} + * @param array $optionalArgs { + * 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 \Google\Cloud\SecurityCenter\V1\MuteConfig + * + * @throws ApiException if the remote call fails + */ + public function getMuteConfig($name, array $optionalArgs = []) + { + $request = new GetMuteConfigRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetMuteConfig', MuteConfig::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets a notification config. + * + * Sample code: + * ``` + * $securityCenterClient = new SecurityCenterClient(); + * try { + * $formattedName = $securityCenterClient->notificationConfigName('[ORGANIZATION]', '[NOTIFICATION_CONFIG]'); + * $response = $securityCenterClient->getNotificationConfig($formattedName); + * } finally { + * $securityCenterClient->close(); + * } + * ``` + * + * @param string $name Required. Name of the notification config to get. Its format is + * "organizations/[organization_id]/notificationConfigs/[config_id]", + * "folders/[folder_id]/notificationConfigs/[config_id]", + * or "projects/[project_id]/notificationConfigs/[config_id]". + * @param array $optionalArgs { + * 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 \Google\Cloud\SecurityCenter\V1\NotificationConfig + * + * @throws ApiException if the remote call fails + */ + public function getNotificationConfig($name, array $optionalArgs = []) + { + $request = new GetNotificationConfigRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetNotificationConfig', NotificationConfig::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets the settings for an organization. + * + * Sample code: + * ``` + * $securityCenterClient = new SecurityCenterClient(); + * try { + * $formattedName = $securityCenterClient->organizationSettingsName('[ORGANIZATION]'); + * $response = $securityCenterClient->getOrganizationSettings($formattedName); + * } finally { + * $securityCenterClient->close(); + * } + * ``` + * + * @param string $name Required. Name of the organization to get organization settings for. Its + * format is "organizations/[organization_id]/organizationSettings". + * @param array $optionalArgs { + * 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 \Google\Cloud\SecurityCenter\V1\OrganizationSettings + * + * @throws ApiException if the remote call fails + */ + public function getOrganizationSettings($name, array $optionalArgs = []) + { + $request = new GetOrganizationSettingsRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetOrganizationSettings', OrganizationSettings::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets a source. + * + * Sample code: + * ``` + * $securityCenterClient = new SecurityCenterClient(); + * try { + * $formattedName = $securityCenterClient->sourceName('[ORGANIZATION]', '[SOURCE]'); + * $response = $securityCenterClient->getSource($formattedName); + * } finally { + * $securityCenterClient->close(); + * } + * ``` + * + * @param string $name Required. Relative resource name of the source. Its format is + * "organizations/[organization_id]/source/[source_id]". + * @param array $optionalArgs { + * 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 \Google\Cloud\SecurityCenter\V1\Source + * + * @throws ApiException if the remote call fails + */ + public function getSource($name, array $optionalArgs = []) + { + $request = new GetSourceRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetSource', Source::class, $optionalArgs, $request)->wait(); + } + + /** + * Filters an organization's assets and groups them by their specified + * properties. + * + * Sample code: + * ``` + * $securityCenterClient = new SecurityCenterClient(); + * try { + * $formattedParent = $securityCenterClient->projectName('[PROJECT]'); + * $groupBy = 'group_by'; + * // Iterate over pages of elements + * $pagedResponse = $securityCenterClient->groupAssets($formattedParent, $groupBy); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $securityCenterClient->groupAssets($formattedParent, $groupBy); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $securityCenterClient->close(); + * } + * ``` + * + * @param string $parent Required. The name of the parent to group the assets by. Its format is + * "organizations/[organization_id]", "folders/[folder_id]", or + * "projects/[project_id]". + * @param string $groupBy Required. Expression that defines what assets fields to use for grouping. + * The string value should follow SQL syntax: comma separated list of fields. + * For example: + * "security_center_properties.resource_project,security_center_properties.project". + * + * The following fields are supported when compare_duration is not set: + * + * * security_center_properties.resource_project + * * security_center_properties.resource_project_display_name + * * security_center_properties.resource_type + * * security_center_properties.resource_parent + * * security_center_properties.resource_parent_display_name + * + * The following fields are supported when compare_duration is set: + * + * * security_center_properties.resource_type + * * security_center_properties.resource_project_display_name + * * security_center_properties.resource_parent_display_name + * @param array $optionalArgs { + * Optional. + * + * @type string $filter + * Expression that defines the filter to apply across assets. + * The expression is a list of zero or more restrictions combined via logical + * operators `AND` and `OR`. + * Parentheses are supported, and `OR` has higher precedence than `AND`. + * + * Restrictions have the form ` ` and may have a `-` + * character in front of them to indicate negation. The fields map to those + * defined in the Asset resource. Examples include: + * + * * name + * * security_center_properties.resource_name + * * resource_properties.a_property + * * security_marks.marks.marka + * + * The supported operators are: + * + * * `=` for all value types. + * * `>`, `<`, `>=`, `<=` for integer values. + * * `:`, meaning substring matching, for strings. + * + * The supported value types are: + * + * * string literals in quotes. + * * integer literals without quotes. + * * boolean literals `true` and `false` without quotes. + * + * The following field and operator combinations are supported: + * + * * name: `=` + * * update_time: `=`, `>`, `<`, `>=`, `<=` + * + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `update_time = "2019-06-10T16:07:18-07:00"` + * `update_time = 1560208038000` + * + * * create_time: `=`, `>`, `<`, `>=`, `<=` + * + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `create_time = "2019-06-10T16:07:18-07:00"` + * `create_time = 1560208038000` + * + * * iam_policy.policy_blob: `=`, `:` + * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + * * security_marks.marks: `=`, `:` + * * security_center_properties.resource_name: `=`, `:` + * * security_center_properties.resource_display_name: `=`, `:` + * * security_center_properties.resource_type: `=`, `:` + * * security_center_properties.resource_parent: `=`, `:` + * * security_center_properties.resource_parent_display_name: `=`, `:` + * * security_center_properties.resource_project: `=`, `:` + * * security_center_properties.resource_project_display_name: `=`, `:` + * * security_center_properties.resource_owners: `=`, `:` + * + * For example, `resource_properties.size = 100` is a valid filter string. + * + * Use a partial match on the empty string to filter based on a property + * existing: `resource_properties.my_property : ""` + * + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-resource_properties.my_property : ""` + * @type Duration $compareDuration + * When compare_duration is set, the GroupResult's "state_change" property is + * updated to indicate whether the asset was added, removed, or remained + * present during the compare_duration period of time that precedes the + * read_time. This is the time between (read_time - compare_duration) and + * read_time. + * + * The state change value is derived based on the presence of the asset at the + * two points in time. Intermediate state changes between the two times don't + * affect the result. For example, the results aren't affected if the asset is + * removed and re-created again. + * + * Possible "state_change" values when compare_duration is specified: + * + * * "ADDED": indicates that the asset was not present at the start of + * compare_duration, but present at reference_time. + * * "REMOVED": indicates that the asset was present at the start of + * compare_duration, but not present at reference_time. + * * "ACTIVE": indicates that the asset was present at both the + * start and the end of the time period defined by + * compare_duration and reference_time. + * + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all assets present at + * read_time. + * + * If this field is set then `state_change` must be a specified field in + * `group_by`. + * @type Timestamp $readTime + * Time used as a reference point when filtering assets. The filter is limited + * to assets existing at the supplied time and their values are those at that + * specific time. Absence of this field will default to the API's version of + * NOW. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @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 \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function groupAssets($parent, $groupBy, array $optionalArgs = []) + { + $request = new GroupAssetsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setGroupBy($groupBy); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['compareDuration'])) { + $request->setCompareDuration($optionalArgs['compareDuration']); + } + + if (isset($optionalArgs['readTime'])) { + $request->setReadTime($optionalArgs['readTime']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('GroupAssets', $optionalArgs, GroupAssetsResponse::class, $request); + } + + /** + * Filters an organization or source's findings and groups them by their + * specified properties. + * + * To group across all sources provide a `-` as the source id. + * Example: /v1/organizations/{organization_id}/sources/-/findings, + * /v1/folders/{folder_id}/sources/-/findings, + * /v1/projects/{project_id}/sources/-/findings + * + * Sample code: + * ``` + * $securityCenterClient = new SecurityCenterClient(); + * try { + * $formattedParent = $securityCenterClient->sourceName('[ORGANIZATION]', '[SOURCE]'); + * $groupBy = 'group_by'; + * // Iterate over pages of elements + * $pagedResponse = $securityCenterClient->groupFindings($formattedParent, $groupBy); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $securityCenterClient->groupFindings($formattedParent, $groupBy); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $securityCenterClient->close(); + * } + * ``` + * + * @param string $parent Required. Name of the source to groupBy. Its format is + * "organizations/[organization_id]/sources/[source_id]", + * folders/[folder_id]/sources/[source_id], or + * projects/[project_id]/sources/[source_id]. To groupBy across all sources + * provide a source_id of `-`. For example: + * organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-, + * or projects/{project_id}/sources/- + * @param string $groupBy Required. Expression that defines what assets fields to use for grouping + * (including `state_change`). The string value should follow SQL syntax: + * comma separated list of fields. For example: "parent,resource_name". + * + * The following fields are supported: + * + * * resource_name + * * category + * * state + * * parent + * * severity + * + * The following fields are supported when compare_duration is set: + * + * * state_change + * @param array $optionalArgs { + * Optional. + * + * @type string $filter + * Expression that defines the filter to apply across findings. + * The expression is a list of one or more restrictions combined via logical + * operators `AND` and `OR`. + * Parentheses are supported, and `OR` has higher precedence than `AND`. + * + * Restrictions have the form ` ` and may have a `-` + * character in front of them to indicate negation. Examples include: + * + * * name + * * source_properties.a_property + * * security_marks.marks.marka + * + * The supported operators are: + * + * * `=` for all value types. + * * `>`, `<`, `>=`, `<=` for integer values. + * * `:`, meaning substring matching, for strings. + * + * The supported value types are: + * + * * string literals in quotes. + * * integer literals without quotes. + * * boolean literals `true` and `false` without quotes. + * + * The following field and operator combinations are supported: + * + * * name: `=` + * * parent: `=`, `:` + * * resource_name: `=`, `:` + * * state: `=`, `:` + * * category: `=`, `:` + * * external_uri: `=`, `:` + * * event_time: `=`, `>`, `<`, `>=`, `<=` + * + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `event_time = "2019-06-10T16:07:18-07:00"` + * `event_time = 1560208038000` + * + * * severity: `=`, `:` + * * workflow_state: `=`, `:` + * * security_marks.marks: `=`, `:` + * * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + * + * For example, `source_properties.size = 100` is a valid filter string. + * + * Use a partial match on the empty string to filter based on a property + * existing: `source_properties.my_property : ""` + * + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-source_properties.my_property : ""` + * + * * resource: + * * resource.name: `=`, `:` + * * resource.parent_name: `=`, `:` + * * resource.parent_display_name: `=`, `:` + * * resource.project_name: `=`, `:` + * * resource.project_display_name: `=`, `:` + * * resource.type: `=`, `:` + * @type Timestamp $readTime + * Time used as a reference point when filtering findings. The filter is + * limited to findings existing at the supplied time and their values are + * those at that specific time. Absence of this field will default to the + * API's version of NOW. + * @type Duration $compareDuration + * When compare_duration is set, the GroupResult's "state_change" attribute is + * updated to indicate whether the finding had its state changed, the + * finding's state remained unchanged, or if the finding was added during the + * compare_duration period of time that precedes the read_time. This is the + * time between (read_time - compare_duration) and read_time. + * + * The state_change value is derived based on the presence and state of the + * finding at the two points in time. Intermediate state changes between the + * two times don't affect the result. For example, the results aren't affected + * if the finding is made inactive and then active again. + * + * Possible "state_change" values when compare_duration is specified: + * + * * "CHANGED": indicates that the finding was present and matched the given + * filter at the start of compare_duration, but changed its + * state at read_time. + * * "UNCHANGED": indicates that the finding was present and matched the given + * filter at the start of compare_duration and did not change + * state at read_time. + * * "ADDED": indicates that the finding did not match the given filter or + * was not present at the start of compare_duration, but was + * present at read_time. + * * "REMOVED": indicates that the finding was present and matched the + * filter at the start of compare_duration, but did not match + * the filter at read_time. + * + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all findings present + * at read_time. + * + * If this field is set then `state_change` must be a specified field in + * `group_by`. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @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 \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function groupFindings($parent, $groupBy, array $optionalArgs = []) + { + $request = new GroupFindingsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setGroupBy($groupBy); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['readTime'])) { + $request->setReadTime($optionalArgs['readTime']); + } + + if (isset($optionalArgs['compareDuration'])) { + $request->setCompareDuration($optionalArgs['compareDuration']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('GroupFindings', $optionalArgs, GroupFindingsResponse::class, $request); + } + + /** + * Lists an organization's assets. + * + * Sample code: + * ``` + * $securityCenterClient = new SecurityCenterClient(); + * try { + * $formattedParent = $securityCenterClient->projectName('[PROJECT]'); + * // Iterate over pages of elements + * $pagedResponse = $securityCenterClient->listAssets($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $securityCenterClient->listAssets($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $securityCenterClient->close(); + * } + * ``` + * + * @param string $parent Required. The name of the parent resource that contains the assets. The + * value that you can specify on parent depends on the method in which you + * specify parent. You can specify one of the following values: + * "organizations/[organization_id]", "folders/[folder_id]", or + * "projects/[project_id]". + * @param array $optionalArgs { + * Optional. + * + * @type string $filter + * Expression that defines the filter to apply across assets. + * The expression is a list of zero or more restrictions combined via logical + * operators `AND` and `OR`. + * Parentheses are supported, and `OR` has higher precedence than `AND`. + * + * Restrictions have the form ` ` and may have a `-` + * character in front of them to indicate negation. The fields map to those + * defined in the Asset resource. Examples include: + * + * * name + * * security_center_properties.resource_name + * * resource_properties.a_property + * * security_marks.marks.marka + * + * The supported operators are: + * + * * `=` for all value types. + * * `>`, `<`, `>=`, `<=` for integer values. + * * `:`, meaning substring matching, for strings. + * + * The supported value types are: + * + * * string literals in quotes. + * * integer literals without quotes. + * * boolean literals `true` and `false` without quotes. + * + * The following are the allowed field and operator combinations: + * + * * name: `=` + * * update_time: `=`, `>`, `<`, `>=`, `<=` + * + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `update_time = "2019-06-10T16:07:18-07:00"` + * `update_time = 1560208038000` + * + * * create_time: `=`, `>`, `<`, `>=`, `<=` + * + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `create_time = "2019-06-10T16:07:18-07:00"` + * `create_time = 1560208038000` + * + * * iam_policy.policy_blob: `=`, `:` + * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + * * security_marks.marks: `=`, `:` + * * security_center_properties.resource_name: `=`, `:` + * * security_center_properties.resource_display_name: `=`, `:` + * * security_center_properties.resource_type: `=`, `:` + * * security_center_properties.resource_parent: `=`, `:` + * * security_center_properties.resource_parent_display_name: `=`, `:` + * * security_center_properties.resource_project: `=`, `:` + * * security_center_properties.resource_project_display_name: `=`, `:` + * * security_center_properties.resource_owners: `=`, `:` + * + * For example, `resource_properties.size = 100` is a valid filter string. + * + * Use a partial match on the empty string to filter based on a property + * existing: `resource_properties.my_property : ""` + * + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-resource_properties.my_property : ""` + * @type string $orderBy + * Expression that defines what fields and order to use for sorting. The + * string value should follow SQL syntax: comma separated list of fields. For + * example: "name,resource_properties.a_property". The default sorting order + * is ascending. To specify descending order for a field, a suffix " desc" + * should be appended to the field name. For example: "name + * desc,resource_properties.a_property". Redundant space characters in the + * syntax are insignificant. "name desc,resource_properties.a_property" and " + * name desc , resource_properties.a_property " are equivalent. + * + * The following fields are supported: + * name + * update_time + * resource_properties + * security_marks.marks + * security_center_properties.resource_name + * security_center_properties.resource_display_name + * security_center_properties.resource_parent + * security_center_properties.resource_parent_display_name + * security_center_properties.resource_project + * security_center_properties.resource_project_display_name + * security_center_properties.resource_type + * @type Timestamp $readTime + * Time used as a reference point when filtering assets. The filter is limited + * to assets existing at the supplied time and their values are those at that + * specific time. Absence of this field will default to the API's version of + * NOW. + * @type Duration $compareDuration + * When compare_duration is set, the ListAssetsResult's "state_change" + * attribute is updated to indicate whether the asset was added, removed, or + * remained present during the compare_duration period of time that precedes + * the read_time. This is the time between (read_time - compare_duration) and + * read_time. + * + * The state_change value is derived based on the presence of the asset at the + * two points in time. Intermediate state changes between the two times don't + * affect the result. For example, the results aren't affected if the asset is + * removed and re-created again. + * + * Possible "state_change" values when compare_duration is specified: + * + * * "ADDED": indicates that the asset was not present at the start of + * compare_duration, but present at read_time. + * * "REMOVED": indicates that the asset was present at the start of + * compare_duration, but not present at read_time. + * * "ACTIVE": indicates that the asset was present at both the + * start and the end of the time period defined by + * compare_duration and read_time. + * + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all assets present at + * read_time. + * @type FieldMask $fieldMask + * A field mask to specify the ListAssetsResult fields to be listed in the + * response. + * An empty field mask will list all fields. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @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 \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listAssets($parent, array $optionalArgs = []) + { + $request = new ListAssetsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + if (isset($optionalArgs['readTime'])) { + $request->setReadTime($optionalArgs['readTime']); + } + + if (isset($optionalArgs['compareDuration'])) { + $request->setCompareDuration($optionalArgs['compareDuration']); + } + + if (isset($optionalArgs['fieldMask'])) { + $request->setFieldMask($optionalArgs['fieldMask']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListAssets', $optionalArgs, ListAssetsResponse::class, $request); + } + + /** + * Lists BigQuery exports. Note that when requesting BigQuery exports at a + * given level all exports under that level are also returned e.g. if + * requesting BigQuery exports under a folder, then all BigQuery exports + * immediately under the folder plus the ones created under the projects + * within the folder are returned. + * + * Sample code: + * ``` + * $securityCenterClient = new SecurityCenterClient(); + * try { + * $formattedParent = $securityCenterClient->projectName('[PROJECT]'); + * // Iterate over pages of elements + * $pagedResponse = $securityCenterClient->listBigQueryExports($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $securityCenterClient->listBigQueryExports($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $securityCenterClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent, which owns the collection of BigQuery exports. Its + * format is "organizations/[organization_id]", "folders/[folder_id]", + * "projects/[project_id]". + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @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 \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listBigQueryExports($parent, array $optionalArgs = []) + { + $request = new ListBigQueryExportsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListBigQueryExports', $optionalArgs, ListBigQueryExportsResponse::class, $request); + } + + /** + * Lists an organization or source's findings. + * + * To list across all sources provide a `-` as the source id. + * Example: /v1/organizations/{organization_id}/sources/-/findings + * + * Sample code: + * ``` + * $securityCenterClient = new SecurityCenterClient(); + * try { + * $formattedParent = $securityCenterClient->sourceName('[ORGANIZATION]', '[SOURCE]'); + * // Iterate over pages of elements + * $pagedResponse = $securityCenterClient->listFindings($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $securityCenterClient->listFindings($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $securityCenterClient->close(); + * } + * ``` + * + * @param string $parent Required. Name of the source the findings belong to. Its format is + * "organizations/[organization_id]/sources/[source_id], + * folders/[folder_id]/sources/[source_id], or + * projects/[project_id]/sources/[source_id]". To list across all sources + * provide a source_id of `-`. For example: + * organizations/{organization_id}/sources/-, folders/{folder_id}/sources/- or + * projects/{projects_id}/sources/- + * @param array $optionalArgs { + * Optional. + * + * @type string $filter + * Expression that defines the filter to apply across findings. + * The expression is a list of one or more restrictions combined via logical + * operators `AND` and `OR`. + * Parentheses are supported, and `OR` has higher precedence than `AND`. + * + * Restrictions have the form ` ` and may have a `-` + * character in front of them to indicate negation. Examples include: + * + * * name + * * source_properties.a_property + * * security_marks.marks.marka + * + * The supported operators are: + * + * * `=` for all value types. + * * `>`, `<`, `>=`, `<=` for integer values. + * * `:`, meaning substring matching, for strings. + * + * The supported value types are: + * + * * string literals in quotes. + * * integer literals without quotes. + * * boolean literals `true` and `false` without quotes. + * + * The following field and operator combinations are supported: + * + * * name: `=` + * * parent: `=`, `:` + * * resource_name: `=`, `:` + * * state: `=`, `:` + * * category: `=`, `:` + * * external_uri: `=`, `:` + * * event_time: `=`, `>`, `<`, `>=`, `<=` + * + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `event_time = "2019-06-10T16:07:18-07:00"` + * `event_time = 1560208038000` + * + * * severity: `=`, `:` + * * workflow_state: `=`, `:` + * * security_marks.marks: `=`, `:` + * * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + * + * For example, `source_properties.size = 100` is a valid filter string. + * + * Use a partial match on the empty string to filter based on a property + * existing: `source_properties.my_property : ""` + * + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-source_properties.my_property : ""` + * + * * resource: + * * resource.name: `=`, `:` + * * resource.parent_name: `=`, `:` + * * resource.parent_display_name: `=`, `:` + * * resource.project_name: `=`, `:` + * * resource.project_display_name: `=`, `:` + * * resource.type: `=`, `:` + * * resource.folders.resource_folder: `=`, `:` + * * resource.display_name: `=`, `:` + * @type string $orderBy + * Expression that defines what fields and order to use for sorting. The + * string value should follow SQL syntax: comma separated list of fields. For + * example: "name,resource_properties.a_property". The default sorting order + * is ascending. To specify descending order for a field, a suffix " desc" + * should be appended to the field name. For example: "name + * desc,source_properties.a_property". Redundant space characters in the + * syntax are insignificant. "name desc,source_properties.a_property" and " + * name desc , source_properties.a_property " are equivalent. + * + * The following fields are supported: + * name + * parent + * state + * category + * resource_name + * event_time + * source_properties + * security_marks.marks + * @type Timestamp $readTime + * Time used as a reference point when filtering findings. The filter is + * limited to findings existing at the supplied time and their values are + * those at that specific time. Absence of this field will default to the + * API's version of NOW. + * @type Duration $compareDuration + * When compare_duration is set, the ListFindingsResult's "state_change" + * attribute is updated to indicate whether the finding had its state changed, + * the finding's state remained unchanged, or if the finding was added in any + * state during the compare_duration period of time that precedes the + * read_time. This is the time between (read_time - compare_duration) and + * read_time. + * + * The state_change value is derived based on the presence and state of the + * finding at the two points in time. Intermediate state changes between the + * two times don't affect the result. For example, the results aren't affected + * if the finding is made inactive and then active again. + * + * Possible "state_change" values when compare_duration is specified: + * + * * "CHANGED": indicates that the finding was present and matched the given + * filter at the start of compare_duration, but changed its + * state at read_time. + * * "UNCHANGED": indicates that the finding was present and matched the given + * filter at the start of compare_duration and did not change + * state at read_time. + * * "ADDED": indicates that the finding did not match the given filter or + * was not present at the start of compare_duration, but was + * present at read_time. + * * "REMOVED": indicates that the finding was present and matched the + * filter at the start of compare_duration, but did not match + * the filter at read_time. + * + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all findings present at + * read_time. + * @type FieldMask $fieldMask + * A field mask to specify the Finding fields to be listed in the response. + * An empty field mask will list all fields. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @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 \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listFindings($parent, array $optionalArgs = []) + { + $request = new ListFindingsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + if (isset($optionalArgs['readTime'])) { + $request->setReadTime($optionalArgs['readTime']); + } + + if (isset($optionalArgs['compareDuration'])) { + $request->setCompareDuration($optionalArgs['compareDuration']); + } + + if (isset($optionalArgs['fieldMask'])) { + $request->setFieldMask($optionalArgs['fieldMask']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListFindings', $optionalArgs, ListFindingsResponse::class, $request); + } + + /** + * Lists mute configs. + * + * Sample code: + * ``` + * $securityCenterClient = new SecurityCenterClient(); + * try { + * $formattedParent = $securityCenterClient->projectName('[PROJECT]'); + * // Iterate over pages of elements + * $pagedResponse = $securityCenterClient->listMuteConfigs($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $securityCenterClient->listMuteConfigs($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $securityCenterClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent, which owns the collection of mute configs. Its format + * is "organizations/[organization_id]", "folders/[folder_id]", + * "projects/[project_id]". + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @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 \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listMuteConfigs($parent, array $optionalArgs = []) + { + $request = new ListMuteConfigsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListMuteConfigs', $optionalArgs, ListMuteConfigsResponse::class, $request); + } + + /** + * Lists notification configs. + * + * Sample code: + * ``` + * $securityCenterClient = new SecurityCenterClient(); + * try { + * $formattedParent = $securityCenterClient->projectName('[PROJECT]'); + * // Iterate over pages of elements + * $pagedResponse = $securityCenterClient->listNotificationConfigs($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $securityCenterClient->listNotificationConfigs($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $securityCenterClient->close(); + * } + * ``` + * + * @param string $parent Required. The name of the parent in which to list the notification + * configurations. Its format is "organizations/[organization_id]", + * "folders/[folder_id]", or "projects/[project_id]". + * @param array $optionalArgs { + * Optional. + * + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @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 \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listNotificationConfigs($parent, array $optionalArgs = []) + { + $request = new ListNotificationConfigsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListNotificationConfigs', $optionalArgs, ListNotificationConfigsResponse::class, $request); + } + + /** + * Lists all sources belonging to an organization. + * + * Sample code: + * ``` + * $securityCenterClient = new SecurityCenterClient(); + * try { + * $formattedParent = $securityCenterClient->projectName('[PROJECT]'); + * // Iterate over pages of elements + * $pagedResponse = $securityCenterClient->listSources($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $securityCenterClient->listSources($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $securityCenterClient->close(); + * } + * ``` + * + * @param string $parent Required. Resource name of the parent of sources to list. Its format should + * be "organizations/[organization_id]", "folders/[folder_id]", or + * "projects/[project_id]". + * @param array $optionalArgs { + * Optional. + * + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @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 \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listSources($parent, array $optionalArgs = []) + { + $request = new ListSourcesRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListSources', $optionalArgs, ListSourcesResponse::class, $request); + } + + /** + * Runs asset discovery. The discovery is tracked with a long-running + * operation. + * + * This API can only be called with limited frequency for an organization. If + * it is called too frequently the caller will receive a TOO_MANY_REQUESTS + * error. + * + * Sample code: + * ``` + * $securityCenterClient = new SecurityCenterClient(); + * try { + * $formattedParent = $securityCenterClient->organizationName('[ORGANIZATION]'); + * $operationResponse = $securityCenterClient->runAssetDiscovery($formattedParent); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $securityCenterClient->runAssetDiscovery($formattedParent); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $securityCenterClient->resumeOperation($operationName, 'runAssetDiscovery'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $securityCenterClient->close(); + * } + * ``` + * + * @param string $parent Required. Name of the organization to run asset discovery for. Its format + * is "organizations/[organization_id]". + * @param array $optionalArgs { + * 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 \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function runAssetDiscovery($parent, array $optionalArgs = []) + { + $request = new RunAssetDiscoveryRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('RunAssetDiscovery', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Updates the state of a finding. + * + * Sample code: + * ``` + * $securityCenterClient = new SecurityCenterClient(); + * try { + * $formattedName = $securityCenterClient->findingName('[ORGANIZATION]', '[SOURCE]', '[FINDING]'); + * $state = State::STATE_UNSPECIFIED; + * $startTime = new Timestamp(); + * $response = $securityCenterClient->setFindingState($formattedName, $state, $startTime); + * } finally { + * $securityCenterClient->close(); + * } + * ``` + * + * @param string $name Required. The [relative resource + * name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) + * of the finding. Example: + * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", + * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", + * "projects/{project_id}/sources/{source_id}/findings/{finding_id}". + * @param int $state Required. The desired State of the finding. + * For allowed values, use constants defined on {@see \Google\Cloud\SecurityCenter\V1\Finding\State} + * @param Timestamp $startTime Required. The time at which the updated state takes effect. + * @param array $optionalArgs { + * 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 \Google\Cloud\SecurityCenter\V1\Finding + * + * @throws ApiException if the remote call fails + */ + public function setFindingState($name, $state, $startTime, array $optionalArgs = []) + { + $request = new SetFindingStateRequest(); + $requestParamHeaders = []; + $request->setName($name); + $request->setState($state); + $request->setStartTime($startTime); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('SetFindingState', Finding::class, $optionalArgs, $request)->wait(); + } + + /** + * Sets the access control policy on the specified Source. + * + * Sample code: + * ``` + * $securityCenterClient = new SecurityCenterClient(); + * try { + * $resource = 'resource'; + * $policy = new Policy(); + * $response = $securityCenterClient->setIamPolicy($resource, $policy); + * } finally { + * $securityCenterClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy is being specified. + * See the operation documentation for the appropriate value for this field. + * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of + * the policy is limited to a few 10s of KB. An empty policy is a + * valid policy but certain Cloud Platform services (such as Projects) + * might reject them. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + * the fields in the mask will be modified. If no mask is provided, the + * following default mask is used: + * + * `paths: "bindings, etag"` + * @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 \Google\Cloud\Iam\V1\Policy + * + * @throws ApiException if the remote call fails + */ + public function setIamPolicy($resource, $policy, array $optionalArgs = []) + { + $request = new SetIamPolicyRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $request->setPolicy($policy); + $requestParamHeaders['resource'] = $resource; + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('SetIamPolicy', Policy::class, $optionalArgs, $request)->wait(); + } + + /** + * Updates the mute state of a finding. + * + * Sample code: + * ``` + * $securityCenterClient = new SecurityCenterClient(); + * try { + * $formattedName = $securityCenterClient->findingName('[ORGANIZATION]', '[SOURCE]', '[FINDING]'); + * $mute = Mute::MUTE_UNSPECIFIED; + * $response = $securityCenterClient->setMute($formattedName, $mute); + * } finally { + * $securityCenterClient->close(); + * } + * ``` + * + * @param string $name Required. The [relative resource + * name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) + * of the finding. Example: + * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", + * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", + * "projects/{project_id}/sources/{source_id}/findings/{finding_id}". + * @param int $mute Required. The desired state of the Mute. + * For allowed values, use constants defined on {@see \Google\Cloud\SecurityCenter\V1\Finding\Mute} + * @param array $optionalArgs { + * 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 \Google\Cloud\SecurityCenter\V1\Finding + * + * @throws ApiException if the remote call fails + */ + public function setMute($name, $mute, array $optionalArgs = []) + { + $request = new SetMuteRequest(); + $requestParamHeaders = []; + $request->setName($name); + $request->setMute($mute); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('SetMute', Finding::class, $optionalArgs, $request)->wait(); + } + + /** + * Returns the permissions that a caller has on the specified source. + * + * Sample code: + * ``` + * $securityCenterClient = new SecurityCenterClient(); + * try { + * $resource = 'resource'; + * $permissions = []; + * $response = $securityCenterClient->testIamPermissions($resource, $permissions); + * } finally { + * $securityCenterClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param array $optionalArgs { + * 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 \Google\Cloud\Iam\V1\TestIamPermissionsResponse + * + * @throws ApiException if the remote call fails + */ + public function testIamPermissions($resource, $permissions, array $optionalArgs = []) + { + $request = new TestIamPermissionsRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $request->setPermissions($permissions); + $requestParamHeaders['resource'] = $resource; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Updates a BigQuery export. + * + * Sample code: + * ``` + * $securityCenterClient = new SecurityCenterClient(); + * try { + * $bigQueryExport = new BigQueryExport(); + * $response = $securityCenterClient->updateBigQueryExport($bigQueryExport); + * } finally { + * $securityCenterClient->close(); + * } + * ``` + * + * @param BigQueryExport $bigQueryExport Required. The BigQuery export being updated. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * The list of fields to be updated. + * If empty all mutable fields will be updated. + * @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 \Google\Cloud\SecurityCenter\V1\BigQueryExport + * + * @throws ApiException if the remote call fails + */ + public function updateBigQueryExport($bigQueryExport, array $optionalArgs = []) + { + $request = new UpdateBigQueryExportRequest(); + $requestParamHeaders = []; + $request->setBigQueryExport($bigQueryExport); + $requestParamHeaders['big_query_export.name'] = $bigQueryExport->getName(); + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UpdateBigQueryExport', BigQueryExport::class, $optionalArgs, $request)->wait(); + } + + /** + * Updates external system. This is for a given finding. + * + * Sample code: + * ``` + * $securityCenterClient = new SecurityCenterClient(); + * try { + * $externalSystem = new ExternalSystem(); + * $response = $securityCenterClient->updateExternalSystem($externalSystem); + * } finally { + * $securityCenterClient->close(); + * } + * ``` + * + * @param ExternalSystem $externalSystem Required. The external system resource to update. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * The FieldMask to use when updating the external system resource. + * + * If empty all mutable fields will be updated. + * @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 \Google\Cloud\SecurityCenter\V1\ExternalSystem + * + * @throws ApiException if the remote call fails + */ + public function updateExternalSystem($externalSystem, array $optionalArgs = []) + { + $request = new UpdateExternalSystemRequest(); + $requestParamHeaders = []; + $request->setExternalSystem($externalSystem); + $requestParamHeaders['external_system.name'] = $externalSystem->getName(); + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UpdateExternalSystem', ExternalSystem::class, $optionalArgs, $request)->wait(); + } + + /** + * Creates or updates a finding. The corresponding source must exist for a + * finding creation to succeed. + * + * Sample code: + * ``` + * $securityCenterClient = new SecurityCenterClient(); + * try { + * $finding = new Finding(); + * $response = $securityCenterClient->updateFinding($finding); + * } finally { + * $securityCenterClient->close(); + * } + * ``` + * + * @param Finding $finding Required. The finding resource to update or create if it does not already + * exist. parent, security_marks, and update_time will be ignored. + * + * In the case of creation, the finding id portion of the name must be + * alphanumeric and less than or equal to 32 characters and greater than 0 + * characters in length. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * The FieldMask to use when updating the finding resource. This field should + * not be specified when creating a finding. + * + * When updating a finding, an empty mask is treated as updating all mutable + * fields and replacing source_properties. Individual source_properties can + * be added/updated by using "source_properties." in the field + * mask. + * @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 \Google\Cloud\SecurityCenter\V1\Finding + * + * @throws ApiException if the remote call fails + */ + public function updateFinding($finding, array $optionalArgs = []) + { + $request = new UpdateFindingRequest(); + $requestParamHeaders = []; + $request->setFinding($finding); + $requestParamHeaders['finding.name'] = $finding->getName(); + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UpdateFinding', Finding::class, $optionalArgs, $request)->wait(); + } + + /** + * Updates a mute config. + * + * Sample code: + * ``` + * $securityCenterClient = new SecurityCenterClient(); + * try { + * $muteConfig = new MuteConfig(); + * $response = $securityCenterClient->updateMuteConfig($muteConfig); + * } finally { + * $securityCenterClient->close(); + * } + * ``` + * + * @param MuteConfig $muteConfig Required. The mute config being updated. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * The list of fields to be updated. + * If empty all mutable fields will be updated. + * @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 \Google\Cloud\SecurityCenter\V1\MuteConfig + * + * @throws ApiException if the remote call fails + */ + public function updateMuteConfig($muteConfig, array $optionalArgs = []) + { + $request = new UpdateMuteConfigRequest(); + $requestParamHeaders = []; + $request->setMuteConfig($muteConfig); + $requestParamHeaders['mute_config.name'] = $muteConfig->getName(); + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UpdateMuteConfig', MuteConfig::class, $optionalArgs, $request)->wait(); + } + + /** + * + * Updates a notification config. The following update + * fields are allowed: description, pubsub_topic, streaming_config.filter + * + * Sample code: + * ``` + * $securityCenterClient = new SecurityCenterClient(); + * try { + * $notificationConfig = new NotificationConfig(); + * $response = $securityCenterClient->updateNotificationConfig($notificationConfig); + * } finally { + * $securityCenterClient->close(); + * } + * ``` + * + * @param NotificationConfig $notificationConfig Required. The notification config to update. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * The FieldMask to use when updating the notification config. + * + * If empty all mutable fields will be updated. + * @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 \Google\Cloud\SecurityCenter\V1\NotificationConfig + * + * @throws ApiException if the remote call fails + */ + public function updateNotificationConfig($notificationConfig, array $optionalArgs = []) + { + $request = new UpdateNotificationConfigRequest(); + $requestParamHeaders = []; + $request->setNotificationConfig($notificationConfig); + $requestParamHeaders['notification_config.name'] = $notificationConfig->getName(); + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UpdateNotificationConfig', NotificationConfig::class, $optionalArgs, $request)->wait(); + } + + /** + * Updates an organization's settings. + * + * Sample code: + * ``` + * $securityCenterClient = new SecurityCenterClient(); + * try { + * $organizationSettings = new OrganizationSettings(); + * $response = $securityCenterClient->updateOrganizationSettings($organizationSettings); + * } finally { + * $securityCenterClient->close(); + * } + * ``` + * + * @param OrganizationSettings $organizationSettings Required. The organization settings resource to update. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * The FieldMask to use when updating the settings resource. + * + * If empty all mutable fields will be updated. + * @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 \Google\Cloud\SecurityCenter\V1\OrganizationSettings + * + * @throws ApiException if the remote call fails + */ + public function updateOrganizationSettings($organizationSettings, array $optionalArgs = []) + { + $request = new UpdateOrganizationSettingsRequest(); + $requestParamHeaders = []; + $request->setOrganizationSettings($organizationSettings); + $requestParamHeaders['organization_settings.name'] = $organizationSettings->getName(); + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UpdateOrganizationSettings', OrganizationSettings::class, $optionalArgs, $request)->wait(); + } + + /** + * Updates security marks. + * + * Sample code: + * ``` + * $securityCenterClient = new SecurityCenterClient(); + * try { + * $securityMarks = new SecurityMarks(); + * $response = $securityCenterClient->updateSecurityMarks($securityMarks); + * } finally { + * $securityCenterClient->close(); + * } + * ``` + * + * @param SecurityMarks $securityMarks Required. The security marks resource to update. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * The FieldMask to use when updating the security marks resource. + * + * The field mask must not contain duplicate fields. + * If empty or set to "marks", all marks will be replaced. Individual + * marks can be updated using "marks.". + * @type Timestamp $startTime + * The time at which the updated SecurityMarks take effect. + * If not set uses current server time. Updates will be applied to the + * SecurityMarks that are active immediately preceding this time. Must be + * earlier or equal to the server time. + * @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 \Google\Cloud\SecurityCenter\V1\SecurityMarks + * + * @throws ApiException if the remote call fails + */ + public function updateSecurityMarks($securityMarks, array $optionalArgs = []) + { + $request = new UpdateSecurityMarksRequest(); + $requestParamHeaders = []; + $request->setSecurityMarks($securityMarks); + $requestParamHeaders['security_marks.name'] = $securityMarks->getName(); + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + if (isset($optionalArgs['startTime'])) { + $request->setStartTime($optionalArgs['startTime']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UpdateSecurityMarks', SecurityMarks::class, $optionalArgs, $request)->wait(); + } + + /** + * Updates a source. + * + * Sample code: + * ``` + * $securityCenterClient = new SecurityCenterClient(); + * try { + * $source = new Source(); + * $response = $securityCenterClient->updateSource($source); + * } finally { + * $securityCenterClient->close(); + * } + * ``` + * + * @param Source $source Required. The source resource to update. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * The FieldMask to use when updating the source resource. + * + * If empty all mutable fields will be updated. + * @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 \Google\Cloud\SecurityCenter\V1\Source + * + * @throws ApiException if the remote call fails + */ + public function updateSource($source, array $optionalArgs = []) + { + $request = new UpdateSourceRequest(); + $requestParamHeaders = []; + $request->setSource($source); + $requestParamHeaders['source.name'] = $source->getName(); + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UpdateSource', Source::class, $optionalArgs, $request)->wait(); + } +} diff --git a/owl-bot-staging/SecurityCenter/v1/src/V1/SecurityCenterClient.php b/owl-bot-staging/SecurityCenter/v1/src/V1/SecurityCenterClient.php new file mode 100644 index 000000000000..295be9f992ad --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/src/V1/SecurityCenterClient.php @@ -0,0 +1,34 @@ + [ + 'google.cloud.securitycenter.v1.SecurityCenter' => [ + 'BulkMuteFindings' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\SecurityCenter\V1\BulkMuteFindingsResponse', + 'metadataReturnType' => '\Google\Protobuf\GPBEmpty', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'RunAssetDiscovery' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\SecurityCenter\V1\RunAssetDiscoveryResponse', + 'metadataReturnType' => '\Google\Protobuf\GPBEmpty', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'GroupAssets' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getGroupByResults', + ], + ], + 'GroupFindings' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getGroupByResults', + ], + ], + 'ListAssets' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getListAssetsResults', + ], + ], + 'ListBigQueryExports' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getBigQueryExports', + ], + ], + 'ListFindings' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getListFindingsResults', + ], + ], + 'ListMuteConfigs' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getMuteConfigs', + ], + ], + 'ListNotificationConfigs' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getNotificationConfigs', + ], + ], + 'ListSources' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getSources', + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/SecurityCenter/v1/src/V1/resources/security_center_rest_client_config.php b/owl-bot-staging/SecurityCenter/v1/src/V1/resources/security_center_rest_client_config.php new file mode 100644 index 000000000000..d5913fa340e5 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/src/V1/resources/security_center_rest_client_config.php @@ -0,0 +1,814 @@ + [ + 'google.cloud.securitycenter.v1.SecurityCenter' => [ + 'BulkMuteFindings' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=organizations/*}/findings:bulkMute', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=folders/*}/findings:bulkMute', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*}/findings:bulkMute', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateBigQueryExport' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=organizations/*}/bigQueryExports', + 'body' => 'big_query_export', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=folders/*}/bigQueryExports', + 'body' => 'big_query_export', + 'queryParams' => [ + 'big_query_export_id', + ], + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*}/bigQueryExports', + 'body' => 'big_query_export', + 'queryParams' => [ + 'big_query_export_id', + ], + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'big_query_export_id', + ], + ], + 'CreateFinding' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=organizations/*/sources/*}/findings', + 'body' => 'finding', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'finding_id', + ], + ], + 'CreateMuteConfig' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=organizations/*}/muteConfigs', + 'body' => 'mute_config', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=folders/*}/muteConfigs', + 'body' => 'mute_config', + 'queryParams' => [ + 'mute_config_id', + ], + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*}/muteConfigs', + 'body' => 'mute_config', + 'queryParams' => [ + 'mute_config_id', + ], + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'mute_config_id', + ], + ], + 'CreateNotificationConfig' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=organizations/*}/notificationConfigs', + 'body' => 'notification_config', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=folders/*}/notificationConfigs', + 'body' => 'notification_config', + 'queryParams' => [ + 'config_id', + ], + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*}/notificationConfigs', + 'body' => 'notification_config', + 'queryParams' => [ + 'config_id', + ], + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'config_id', + ], + ], + 'CreateSource' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=organizations/*}/sources', + 'body' => 'source', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteBigQueryExport' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=organizations/*/bigQueryExports/*}', + 'additionalBindings' => [ + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=folders/*/bigQueryExports/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/bigQueryExports/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteMuteConfig' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=organizations/*/muteConfigs/*}', + 'additionalBindings' => [ + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=folders/*/muteConfigs/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/muteConfigs/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteNotificationConfig' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=organizations/*/notificationConfigs/*}', + 'additionalBindings' => [ + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=folders/*/notificationConfigs/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/notificationConfigs/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetBigQueryExport' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/bigQueryExports/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=folders/*/bigQueryExports/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/bigQueryExports/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=organizations/*/sources/*}:getIamPolicy', + 'body' => '*', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'GetMuteConfig' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/muteConfigs/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=folders/*/muteConfigs/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/muteConfigs/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetNotificationConfig' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/notificationConfigs/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=folders/*/notificationConfigs/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/notificationConfigs/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOrganizationSettings' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/organizationSettings}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetSource' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/sources/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GroupAssets' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=organizations/*}/assets:group', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=folders/*}/assets:group', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*}/assets:group', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'GroupFindings' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=organizations/*/sources/*}/findings:group', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=folders/*/sources/*}/findings:group', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/sources/*}/findings:group', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListAssets' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=organizations/*}/assets', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=folders/*}/assets', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*}/assets', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListBigQueryExports' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=organizations/*}/bigQueryExports', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=folders/*}/bigQueryExports', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*}/bigQueryExports', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListFindings' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=organizations/*/sources/*}/findings', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=folders/*/sources/*}/findings', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/sources/*}/findings', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListMuteConfigs' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=organizations/*}/muteConfigs', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=folders/*}/muteConfigs', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*}/muteConfigs', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListNotificationConfigs' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=organizations/*}/notificationConfigs', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=folders/*}/notificationConfigs', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*}/notificationConfigs', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListSources' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=organizations/*}/sources', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=folders/*}/sources', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*}/sources', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'RunAssetDiscovery' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=organizations/*}/assets:runDiscovery', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'SetFindingState' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=organizations/*/sources/*/findings/*}:setState', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=folders/*/sources/*/findings/*}:setState', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/sources/*/findings/*}:setState', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=organizations/*/sources/*}:setIamPolicy', + 'body' => '*', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'SetMute' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=organizations/*/sources/*/findings/*}:setMute', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=folders/*/sources/*/findings/*}:setMute', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/sources/*/findings/*}:setMute', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=organizations/*/sources/*}:testIamPermissions', + 'body' => '*', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'UpdateBigQueryExport' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{big_query_export.name=organizations/*/bigQueryExports/*}', + 'body' => 'big_query_export', + 'additionalBindings' => [ + [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{big_query_export.name=folders/*/bigQueryExports/*}', + 'body' => 'big_query_export', + ], + [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{big_query_export.name=projects/*/bigQueryExports/*}', + 'body' => 'big_query_export', + ], + ], + 'placeholders' => [ + 'big_query_export.name' => [ + 'getters' => [ + 'getBigQueryExport', + 'getName', + ], + ], + ], + ], + 'UpdateExternalSystem' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{external_system.name=organizations/*/sources/*/findings/*/externalSystems/*}', + 'body' => 'external_system', + 'additionalBindings' => [ + [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{external_system.name=folders/*/sources/*/findings/*/externalSystems/*}', + 'body' => 'external_system', + ], + [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{external_system.name=projects/*/sources/*/findings/*/externalSystems/*}', + 'body' => 'external_system', + ], + ], + 'placeholders' => [ + 'external_system.name' => [ + 'getters' => [ + 'getExternalSystem', + 'getName', + ], + ], + ], + ], + 'UpdateFinding' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{finding.name=organizations/*/sources/*/findings/*}', + 'body' => 'finding', + 'additionalBindings' => [ + [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{finding.name=folders/*/sources/*/findings/*}', + 'body' => 'finding', + ], + [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{finding.name=projects/*/sources/*/findings/*}', + 'body' => 'finding', + ], + ], + 'placeholders' => [ + 'finding.name' => [ + 'getters' => [ + 'getFinding', + 'getName', + ], + ], + ], + ], + 'UpdateMuteConfig' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{mute_config.name=organizations/*/muteConfigs/*}', + 'body' => 'mute_config', + 'additionalBindings' => [ + [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{mute_config.name=folders/*/muteConfigs/*}', + 'body' => 'mute_config', + ], + [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{mute_config.name=projects/*/muteConfigs/*}', + 'body' => 'mute_config', + ], + ], + 'placeholders' => [ + 'mute_config.name' => [ + 'getters' => [ + 'getMuteConfig', + 'getName', + ], + ], + ], + ], + 'UpdateNotificationConfig' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{notification_config.name=organizations/*/notificationConfigs/*}', + 'body' => 'notification_config', + 'additionalBindings' => [ + [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{notification_config.name=folders/*/notificationConfigs/*}', + 'body' => 'notification_config', + ], + [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{notification_config.name=projects/*/notificationConfigs/*}', + 'body' => 'notification_config', + ], + ], + 'placeholders' => [ + 'notification_config.name' => [ + 'getters' => [ + 'getNotificationConfig', + 'getName', + ], + ], + ], + ], + 'UpdateOrganizationSettings' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{organization_settings.name=organizations/*/organizationSettings}', + 'body' => 'organization_settings', + 'placeholders' => [ + 'organization_settings.name' => [ + 'getters' => [ + 'getOrganizationSettings', + 'getName', + ], + ], + ], + ], + 'UpdateSecurityMarks' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{security_marks.name=organizations/*/assets/*/securityMarks}', + 'body' => 'security_marks', + 'additionalBindings' => [ + [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{security_marks.name=folders/*/assets/*/securityMarks}', + 'body' => 'security_marks', + ], + [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{security_marks.name=projects/*/assets/*/securityMarks}', + 'body' => 'security_marks', + ], + [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{security_marks.name=organizations/*/sources/*/findings/*/securityMarks}', + 'body' => 'security_marks', + ], + [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{security_marks.name=folders/*/sources/*/findings/*/securityMarks}', + 'body' => 'security_marks', + ], + [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{security_marks.name=projects/*/sources/*/findings/*/securityMarks}', + 'body' => 'security_marks', + ], + ], + 'placeholders' => [ + 'security_marks.name' => [ + 'getters' => [ + 'getSecurityMarks', + 'getName', + ], + ], + ], + ], + 'UpdateSource' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{source.name=organizations/*/sources/*}', + 'body' => 'source', + 'placeholders' => [ + 'source.name' => [ + 'getters' => [ + 'getSource', + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=organizations/*/operations/*}:cancel', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=organizations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/operations}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/SecurityCenter/v1/tests/Unit/V1/SecurityCenterClientTest.php b/owl-bot-staging/SecurityCenter/v1/tests/Unit/V1/SecurityCenterClientTest.php new file mode 100644 index 000000000000..2d437b434aa8 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1/tests/Unit/V1/SecurityCenterClientTest.php @@ -0,0 +1,2674 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return SecurityCenterClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new SecurityCenterClient($options); + } + + /** @test */ + public function bulkMuteFindingsTest() + { + $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/bulkMuteFindingsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new BulkMuteFindingsResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/bulkMuteFindingsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $parent = 'parent-995424086'; + $response = $gapicClient->bulkMuteFindings($parent); + $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.securitycenter.v1.SecurityCenter/BulkMuteFindings', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($parent, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/bulkMuteFindingsTest'); + $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 bulkMuteFindingsExceptionTest() + { + $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/bulkMuteFindingsTest'); + $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 + $parent = 'parent-995424086'; + $response = $gapicClient->bulkMuteFindings($parent); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/bulkMuteFindingsTest'); + 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 createBigQueryExportTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $description = 'description-1724546052'; + $filter = 'filter-1274492040'; + $dataset = 'dataset1443214456'; + $mostRecentEditor = 'mostRecentEditor-657770475'; + $principal = 'principal-1812041682'; + $expectedResponse = new BigQueryExport(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setFilter($filter); + $expectedResponse->setDataset($dataset); + $expectedResponse->setMostRecentEditor($mostRecentEditor); + $expectedResponse->setPrincipal($principal); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $bigQueryExport = new BigQueryExport(); + $bigQueryExportId = 'bigQueryExportId269737360'; + $response = $gapicClient->createBigQueryExport($formattedParent, $bigQueryExport, $bigQueryExportId); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/CreateBigQueryExport', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getBigQueryExport(); + $this->assertProtobufEquals($bigQueryExport, $actualValue); + $actualValue = $actualRequestObject->getBigQueryExportId(); + $this->assertProtobufEquals($bigQueryExportId, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createBigQueryExportExceptionTest() + { + $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->projectName('[PROJECT]'); + $bigQueryExport = new BigQueryExport(); + $bigQueryExportId = 'bigQueryExportId269737360'; + try { + $gapicClient->createBigQueryExport($formattedParent, $bigQueryExport, $bigQueryExportId); + // 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 createFindingTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $parent2 = 'parent21175163357'; + $resourceName = 'resourceName979421212'; + $category = 'category50511102'; + $externalUri = 'externalUri-1385596168'; + $canonicalName = 'canonicalName1385400054'; + $muteInitiator = 'muteInitiator7603081'; + $parentDisplayName = 'parentDisplayName934119773'; + $description = 'description-1724546052'; + $nextSteps = 'nextSteps-921338149'; + $expectedResponse = new Finding(); + $expectedResponse->setName($name); + $expectedResponse->setParent($parent2); + $expectedResponse->setResourceName($resourceName); + $expectedResponse->setCategory($category); + $expectedResponse->setExternalUri($externalUri); + $expectedResponse->setCanonicalName($canonicalName); + $expectedResponse->setMuteInitiator($muteInitiator); + $expectedResponse->setParentDisplayName($parentDisplayName); + $expectedResponse->setDescription($description); + $expectedResponse->setNextSteps($nextSteps); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->sourceName('[ORGANIZATION]', '[SOURCE]'); + $findingId = 'findingId728776081'; + $finding = new Finding(); + $response = $gapicClient->createFinding($formattedParent, $findingId, $finding); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/CreateFinding', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getFindingId(); + $this->assertProtobufEquals($findingId, $actualValue); + $actualValue = $actualRequestObject->getFinding(); + $this->assertProtobufEquals($finding, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createFindingExceptionTest() + { + $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->sourceName('[ORGANIZATION]', '[SOURCE]'); + $findingId = 'findingId728776081'; + $finding = new Finding(); + try { + $gapicClient->createFinding($formattedParent, $findingId, $finding); + // 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 createMuteConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $filter = 'filter-1274492040'; + $mostRecentEditor = 'mostRecentEditor-657770475'; + $expectedResponse = new MuteConfig(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setFilter($filter); + $expectedResponse->setMostRecentEditor($mostRecentEditor); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $muteConfig = new MuteConfig(); + $muteConfigFilter = 'muteConfigFilter-1921414637'; + $muteConfig->setFilter($muteConfigFilter); + $muteConfigId = 'muteConfigId-547860334'; + $response = $gapicClient->createMuteConfig($formattedParent, $muteConfig, $muteConfigId); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/CreateMuteConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getMuteConfig(); + $this->assertProtobufEquals($muteConfig, $actualValue); + $actualValue = $actualRequestObject->getMuteConfigId(); + $this->assertProtobufEquals($muteConfigId, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createMuteConfigExceptionTest() + { + $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->projectName('[PROJECT]'); + $muteConfig = new MuteConfig(); + $muteConfigFilter = 'muteConfigFilter-1921414637'; + $muteConfig->setFilter($muteConfigFilter); + $muteConfigId = 'muteConfigId-547860334'; + try { + $gapicClient->createMuteConfig($formattedParent, $muteConfig, $muteConfigId); + // 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 createNotificationConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $description = 'description-1724546052'; + $pubsubTopic = 'pubsubTopic-338126829'; + $serviceAccount = 'serviceAccount-1948028253'; + $expectedResponse = new NotificationConfig(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setPubsubTopic($pubsubTopic); + $expectedResponse->setServiceAccount($serviceAccount); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $configId = 'configId-804450504'; + $notificationConfig = new NotificationConfig(); + $response = $gapicClient->createNotificationConfig($formattedParent, $configId, $notificationConfig); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/CreateNotificationConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getConfigId(); + $this->assertProtobufEquals($configId, $actualValue); + $actualValue = $actualRequestObject->getNotificationConfig(); + $this->assertProtobufEquals($notificationConfig, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createNotificationConfigExceptionTest() + { + $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->projectName('[PROJECT]'); + $configId = 'configId-804450504'; + $notificationConfig = new NotificationConfig(); + try { + $gapicClient->createNotificationConfig($formattedParent, $configId, $notificationConfig); + // 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 createSourceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $canonicalName = 'canonicalName1385400054'; + $expectedResponse = new Source(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setCanonicalName($canonicalName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->organizationName('[ORGANIZATION]'); + $source = new Source(); + $response = $gapicClient->createSource($formattedParent, $source); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/CreateSource', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getSource(); + $this->assertProtobufEquals($source, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createSourceExceptionTest() + { + $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->organizationName('[ORGANIZATION]'); + $source = new Source(); + try { + $gapicClient->createSource($formattedParent, $source); + // 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 deleteBigQueryExportTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->bigQueryExportName('[ORGANIZATION]', '[EXPORT]'); + $gapicClient->deleteBigQueryExport($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/DeleteBigQueryExport', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteBigQueryExportExceptionTest() + { + $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->bigQueryExportName('[ORGANIZATION]', '[EXPORT]'); + try { + $gapicClient->deleteBigQueryExport($formattedName); + // 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 deleteMuteConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->muteConfigName('[ORGANIZATION]', '[MUTE_CONFIG]'); + $gapicClient->deleteMuteConfig($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/DeleteMuteConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteMuteConfigExceptionTest() + { + $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->muteConfigName('[ORGANIZATION]', '[MUTE_CONFIG]'); + try { + $gapicClient->deleteMuteConfig($formattedName); + // 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 deleteNotificationConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->notificationConfigName('[ORGANIZATION]', '[NOTIFICATION_CONFIG]'); + $gapicClient->deleteNotificationConfig($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/DeleteNotificationConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteNotificationConfigExceptionTest() + { + $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->notificationConfigName('[ORGANIZATION]', '[NOTIFICATION_CONFIG]'); + try { + $gapicClient->deleteNotificationConfig($formattedName); + // 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 getBigQueryExportTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $filter = 'filter-1274492040'; + $dataset = 'dataset1443214456'; + $mostRecentEditor = 'mostRecentEditor-657770475'; + $principal = 'principal-1812041682'; + $expectedResponse = new BigQueryExport(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setFilter($filter); + $expectedResponse->setDataset($dataset); + $expectedResponse->setMostRecentEditor($mostRecentEditor); + $expectedResponse->setPrincipal($principal); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->bigQueryExportName('[ORGANIZATION]', '[EXPORT]'); + $response = $gapicClient->getBigQueryExport($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/GetBigQueryExport', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getBigQueryExportExceptionTest() + { + $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->bigQueryExportName('[ORGANIZATION]', '[EXPORT]'); + try { + $gapicClient->getBigQueryExport($formattedName); + // 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 getIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $response = $gapicClient->getIamPolicy($resource); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/GetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyExceptionTest() + { + $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 + $resource = 'resource-341064690'; + try { + $gapicClient->getIamPolicy($resource); + // 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 getMuteConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $filter = 'filter-1274492040'; + $mostRecentEditor = 'mostRecentEditor-657770475'; + $expectedResponse = new MuteConfig(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setFilter($filter); + $expectedResponse->setMostRecentEditor($mostRecentEditor); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->muteConfigName('[ORGANIZATION]', '[MUTE_CONFIG]'); + $response = $gapicClient->getMuteConfig($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/GetMuteConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getMuteConfigExceptionTest() + { + $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->muteConfigName('[ORGANIZATION]', '[MUTE_CONFIG]'); + try { + $gapicClient->getMuteConfig($formattedName); + // 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 getNotificationConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $pubsubTopic = 'pubsubTopic-338126829'; + $serviceAccount = 'serviceAccount-1948028253'; + $expectedResponse = new NotificationConfig(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setPubsubTopic($pubsubTopic); + $expectedResponse->setServiceAccount($serviceAccount); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->notificationConfigName('[ORGANIZATION]', '[NOTIFICATION_CONFIG]'); + $response = $gapicClient->getNotificationConfig($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/GetNotificationConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getNotificationConfigExceptionTest() + { + $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->notificationConfigName('[ORGANIZATION]', '[NOTIFICATION_CONFIG]'); + try { + $gapicClient->getNotificationConfig($formattedName); + // 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 getOrganizationSettingsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $enableAssetDiscovery = false; + $expectedResponse = new OrganizationSettings(); + $expectedResponse->setName($name2); + $expectedResponse->setEnableAssetDiscovery($enableAssetDiscovery); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->organizationSettingsName('[ORGANIZATION]'); + $response = $gapicClient->getOrganizationSettings($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/GetOrganizationSettings', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getOrganizationSettingsExceptionTest() + { + $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->organizationSettingsName('[ORGANIZATION]'); + try { + $gapicClient->getOrganizationSettings($formattedName); + // 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 getSourceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $canonicalName = 'canonicalName1385400054'; + $expectedResponse = new Source(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setCanonicalName($canonicalName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->sourceName('[ORGANIZATION]', '[SOURCE]'); + $response = $gapicClient->getSource($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/GetSource', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSourceExceptionTest() + { + $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->sourceName('[ORGANIZATION]', '[SOURCE]'); + try { + $gapicClient->getSource($formattedName); + // 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 groupAssetsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $totalSize = 705419236; + $groupByResultsElement = new GroupResult(); + $groupByResults = [ + $groupByResultsElement, + ]; + $expectedResponse = new GroupAssetsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setGroupByResults($groupByResults); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $groupBy = 'groupBy506361367'; + $response = $gapicClient->groupAssets($formattedParent, $groupBy); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getGroupByResults()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/GroupAssets', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getGroupBy(); + $this->assertProtobufEquals($groupBy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function groupAssetsExceptionTest() + { + $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->projectName('[PROJECT]'); + $groupBy = 'groupBy506361367'; + try { + $gapicClient->groupAssets($formattedParent, $groupBy); + // 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 groupFindingsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $totalSize = 705419236; + $groupByResultsElement = new GroupResult(); + $groupByResults = [ + $groupByResultsElement, + ]; + $expectedResponse = new GroupFindingsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setGroupByResults($groupByResults); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->sourceName('[ORGANIZATION]', '[SOURCE]'); + $groupBy = 'groupBy506361367'; + $response = $gapicClient->groupFindings($formattedParent, $groupBy); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getGroupByResults()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/GroupFindings', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getGroupBy(); + $this->assertProtobufEquals($groupBy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function groupFindingsExceptionTest() + { + $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->sourceName('[ORGANIZATION]', '[SOURCE]'); + $groupBy = 'groupBy506361367'; + try { + $gapicClient->groupFindings($formattedParent, $groupBy); + // 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 listAssetsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $totalSize = 705419236; + $listAssetsResultsElement = new ListAssetsResult(); + $listAssetsResults = [ + $listAssetsResultsElement, + ]; + $expectedResponse = new ListAssetsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setListAssetsResults($listAssetsResults); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $response = $gapicClient->listAssets($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getListAssetsResults()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/ListAssets', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAssetsExceptionTest() + { + $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->projectName('[PROJECT]'); + try { + $gapicClient->listAssets($formattedParent); + // 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 listBigQueryExportsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $bigQueryExportsElement = new BigQueryExport(); + $bigQueryExports = [ + $bigQueryExportsElement, + ]; + $expectedResponse = new ListBigQueryExportsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setBigQueryExports($bigQueryExports); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $response = $gapicClient->listBigQueryExports($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getBigQueryExports()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/ListBigQueryExports', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listBigQueryExportsExceptionTest() + { + $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->projectName('[PROJECT]'); + try { + $gapicClient->listBigQueryExports($formattedParent); + // 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 listFindingsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $totalSize = 705419236; + $listFindingsResultsElement = new ListFindingsResult(); + $listFindingsResults = [ + $listFindingsResultsElement, + ]; + $expectedResponse = new ListFindingsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setListFindingsResults($listFindingsResults); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->sourceName('[ORGANIZATION]', '[SOURCE]'); + $response = $gapicClient->listFindings($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getListFindingsResults()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/ListFindings', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listFindingsExceptionTest() + { + $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->sourceName('[ORGANIZATION]', '[SOURCE]'); + try { + $gapicClient->listFindings($formattedParent); + // 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 listMuteConfigsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $muteConfigsElement = new MuteConfig(); + $muteConfigs = [ + $muteConfigsElement, + ]; + $expectedResponse = new ListMuteConfigsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setMuteConfigs($muteConfigs); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $response = $gapicClient->listMuteConfigs($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getMuteConfigs()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/ListMuteConfigs', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listMuteConfigsExceptionTest() + { + $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->projectName('[PROJECT]'); + try { + $gapicClient->listMuteConfigs($formattedParent); + // 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 listNotificationConfigsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $notificationConfigsElement = new NotificationConfig(); + $notificationConfigs = [ + $notificationConfigsElement, + ]; + $expectedResponse = new ListNotificationConfigsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setNotificationConfigs($notificationConfigs); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $response = $gapicClient->listNotificationConfigs($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getNotificationConfigs()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/ListNotificationConfigs', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listNotificationConfigsExceptionTest() + { + $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->projectName('[PROJECT]'); + try { + $gapicClient->listNotificationConfigs($formattedParent); + // 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 listSourcesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $sourcesElement = new Source(); + $sources = [ + $sourcesElement, + ]; + $expectedResponse = new ListSourcesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSources($sources); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $response = $gapicClient->listSources($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getSources()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/ListSources', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSourcesExceptionTest() + { + $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->projectName('[PROJECT]'); + try { + $gapicClient->listSources($formattedParent); + // 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 runAssetDiscoveryTest() + { + $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/runAssetDiscoveryTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new RunAssetDiscoveryResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/runAssetDiscoveryTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->organizationName('[ORGANIZATION]'); + $response = $gapicClient->runAssetDiscovery($formattedParent); + $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.securitycenter.v1.SecurityCenter/RunAssetDiscovery', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/runAssetDiscoveryTest'); + $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 runAssetDiscoveryExceptionTest() + { + $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/runAssetDiscoveryTest'); + $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 + $formattedParent = $gapicClient->organizationName('[ORGANIZATION]'); + $response = $gapicClient->runAssetDiscovery($formattedParent); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/runAssetDiscoveryTest'); + 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 setFindingStateTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $parent = 'parent-995424086'; + $resourceName = 'resourceName979421212'; + $category = 'category50511102'; + $externalUri = 'externalUri-1385596168'; + $canonicalName = 'canonicalName1385400054'; + $muteInitiator = 'muteInitiator7603081'; + $parentDisplayName = 'parentDisplayName934119773'; + $description = 'description-1724546052'; + $nextSteps = 'nextSteps-921338149'; + $expectedResponse = new Finding(); + $expectedResponse->setName($name2); + $expectedResponse->setParent($parent); + $expectedResponse->setResourceName($resourceName); + $expectedResponse->setCategory($category); + $expectedResponse->setExternalUri($externalUri); + $expectedResponse->setCanonicalName($canonicalName); + $expectedResponse->setMuteInitiator($muteInitiator); + $expectedResponse->setParentDisplayName($parentDisplayName); + $expectedResponse->setDescription($description); + $expectedResponse->setNextSteps($nextSteps); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->findingName('[ORGANIZATION]', '[SOURCE]', '[FINDING]'); + $state = State::STATE_UNSPECIFIED; + $startTime = new Timestamp(); + $response = $gapicClient->setFindingState($formattedName, $state, $startTime); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/SetFindingState', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getState(); + $this->assertProtobufEquals($state, $actualValue); + $actualValue = $actualRequestObject->getStartTime(); + $this->assertProtobufEquals($startTime, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setFindingStateExceptionTest() + { + $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->findingName('[ORGANIZATION]', '[SOURCE]', '[FINDING]'); + $state = State::STATE_UNSPECIFIED; + $startTime = new Timestamp(); + try { + $gapicClient->setFindingState($formattedName, $state, $startTime); + // 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 setIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $response = $gapicClient->setIamPolicy($resource, $policy); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/SetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPolicy(); + $this->assertProtobufEquals($policy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyExceptionTest() + { + $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 + $resource = 'resource-341064690'; + $policy = new Policy(); + try { + $gapicClient->setIamPolicy($resource, $policy); + // 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 setMuteTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $parent = 'parent-995424086'; + $resourceName = 'resourceName979421212'; + $category = 'category50511102'; + $externalUri = 'externalUri-1385596168'; + $canonicalName = 'canonicalName1385400054'; + $muteInitiator = 'muteInitiator7603081'; + $parentDisplayName = 'parentDisplayName934119773'; + $description = 'description-1724546052'; + $nextSteps = 'nextSteps-921338149'; + $expectedResponse = new Finding(); + $expectedResponse->setName($name2); + $expectedResponse->setParent($parent); + $expectedResponse->setResourceName($resourceName); + $expectedResponse->setCategory($category); + $expectedResponse->setExternalUri($externalUri); + $expectedResponse->setCanonicalName($canonicalName); + $expectedResponse->setMuteInitiator($muteInitiator); + $expectedResponse->setParentDisplayName($parentDisplayName); + $expectedResponse->setDescription($description); + $expectedResponse->setNextSteps($nextSteps); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->findingName('[ORGANIZATION]', '[SOURCE]', '[FINDING]'); + $mute = Mute::MUTE_UNSPECIFIED; + $response = $gapicClient->setMute($formattedName, $mute); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/SetMute', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getMute(); + $this->assertProtobufEquals($mute, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setMuteExceptionTest() + { + $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->findingName('[ORGANIZATION]', '[SOURCE]', '[FINDING]'); + $mute = Mute::MUTE_UNSPECIFIED; + try { + $gapicClient->setMute($formattedName, $mute); + // 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 testIamPermissionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new TestIamPermissionsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $response = $gapicClient->testIamPermissions($resource, $permissions); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/TestIamPermissions', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPermissions(); + $this->assertProtobufEquals($permissions, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsExceptionTest() + { + $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 + $resource = 'resource-341064690'; + $permissions = []; + try { + $gapicClient->testIamPermissions($resource, $permissions); + // 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 updateBigQueryExportTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $description = 'description-1724546052'; + $filter = 'filter-1274492040'; + $dataset = 'dataset1443214456'; + $mostRecentEditor = 'mostRecentEditor-657770475'; + $principal = 'principal-1812041682'; + $expectedResponse = new BigQueryExport(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setFilter($filter); + $expectedResponse->setDataset($dataset); + $expectedResponse->setMostRecentEditor($mostRecentEditor); + $expectedResponse->setPrincipal($principal); + $transport->addResponse($expectedResponse); + // Mock request + $bigQueryExport = new BigQueryExport(); + $response = $gapicClient->updateBigQueryExport($bigQueryExport); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/UpdateBigQueryExport', $actualFuncCall); + $actualValue = $actualRequestObject->getBigQueryExport(); + $this->assertProtobufEquals($bigQueryExport, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateBigQueryExportExceptionTest() + { + $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 + $bigQueryExport = new BigQueryExport(); + try { + $gapicClient->updateBigQueryExport($bigQueryExport); + // 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 updateExternalSystemTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $externalUid = 'externalUid-1385596452'; + $status = 'status-892481550'; + $expectedResponse = new ExternalSystem(); + $expectedResponse->setName($name); + $expectedResponse->setExternalUid($externalUid); + $expectedResponse->setStatus($status); + $transport->addResponse($expectedResponse); + // Mock request + $externalSystem = new ExternalSystem(); + $response = $gapicClient->updateExternalSystem($externalSystem); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/UpdateExternalSystem', $actualFuncCall); + $actualValue = $actualRequestObject->getExternalSystem(); + $this->assertProtobufEquals($externalSystem, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateExternalSystemExceptionTest() + { + $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 + $externalSystem = new ExternalSystem(); + try { + $gapicClient->updateExternalSystem($externalSystem); + // 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 updateFindingTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $parent = 'parent-995424086'; + $resourceName = 'resourceName979421212'; + $category = 'category50511102'; + $externalUri = 'externalUri-1385596168'; + $canonicalName = 'canonicalName1385400054'; + $muteInitiator = 'muteInitiator7603081'; + $parentDisplayName = 'parentDisplayName934119773'; + $description = 'description-1724546052'; + $nextSteps = 'nextSteps-921338149'; + $expectedResponse = new Finding(); + $expectedResponse->setName($name); + $expectedResponse->setParent($parent); + $expectedResponse->setResourceName($resourceName); + $expectedResponse->setCategory($category); + $expectedResponse->setExternalUri($externalUri); + $expectedResponse->setCanonicalName($canonicalName); + $expectedResponse->setMuteInitiator($muteInitiator); + $expectedResponse->setParentDisplayName($parentDisplayName); + $expectedResponse->setDescription($description); + $expectedResponse->setNextSteps($nextSteps); + $transport->addResponse($expectedResponse); + // Mock request + $finding = new Finding(); + $response = $gapicClient->updateFinding($finding); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/UpdateFinding', $actualFuncCall); + $actualValue = $actualRequestObject->getFinding(); + $this->assertProtobufEquals($finding, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateFindingExceptionTest() + { + $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 + $finding = new Finding(); + try { + $gapicClient->updateFinding($finding); + // 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 updateMuteConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $filter = 'filter-1274492040'; + $mostRecentEditor = 'mostRecentEditor-657770475'; + $expectedResponse = new MuteConfig(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setFilter($filter); + $expectedResponse->setMostRecentEditor($mostRecentEditor); + $transport->addResponse($expectedResponse); + // Mock request + $muteConfig = new MuteConfig(); + $muteConfigFilter = 'muteConfigFilter-1921414637'; + $muteConfig->setFilter($muteConfigFilter); + $response = $gapicClient->updateMuteConfig($muteConfig); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/UpdateMuteConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getMuteConfig(); + $this->assertProtobufEquals($muteConfig, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateMuteConfigExceptionTest() + { + $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 + $muteConfig = new MuteConfig(); + $muteConfigFilter = 'muteConfigFilter-1921414637'; + $muteConfig->setFilter($muteConfigFilter); + try { + $gapicClient->updateMuteConfig($muteConfig); + // 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 updateNotificationConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $description = 'description-1724546052'; + $pubsubTopic = 'pubsubTopic-338126829'; + $serviceAccount = 'serviceAccount-1948028253'; + $expectedResponse = new NotificationConfig(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setPubsubTopic($pubsubTopic); + $expectedResponse->setServiceAccount($serviceAccount); + $transport->addResponse($expectedResponse); + // Mock request + $notificationConfig = new NotificationConfig(); + $response = $gapicClient->updateNotificationConfig($notificationConfig); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/UpdateNotificationConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getNotificationConfig(); + $this->assertProtobufEquals($notificationConfig, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateNotificationConfigExceptionTest() + { + $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 + $notificationConfig = new NotificationConfig(); + try { + $gapicClient->updateNotificationConfig($notificationConfig); + // 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 updateOrganizationSettingsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $enableAssetDiscovery = false; + $expectedResponse = new OrganizationSettings(); + $expectedResponse->setName($name); + $expectedResponse->setEnableAssetDiscovery($enableAssetDiscovery); + $transport->addResponse($expectedResponse); + // Mock request + $organizationSettings = new OrganizationSettings(); + $response = $gapicClient->updateOrganizationSettings($organizationSettings); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/UpdateOrganizationSettings', $actualFuncCall); + $actualValue = $actualRequestObject->getOrganizationSettings(); + $this->assertProtobufEquals($organizationSettings, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateOrganizationSettingsExceptionTest() + { + $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 + $organizationSettings = new OrganizationSettings(); + try { + $gapicClient->updateOrganizationSettings($organizationSettings); + // 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 updateSecurityMarksTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $canonicalName = 'canonicalName1385400054'; + $expectedResponse = new SecurityMarks(); + $expectedResponse->setName($name); + $expectedResponse->setCanonicalName($canonicalName); + $transport->addResponse($expectedResponse); + // Mock request + $securityMarks = new SecurityMarks(); + $response = $gapicClient->updateSecurityMarks($securityMarks); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/UpdateSecurityMarks', $actualFuncCall); + $actualValue = $actualRequestObject->getSecurityMarks(); + $this->assertProtobufEquals($securityMarks, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateSecurityMarksExceptionTest() + { + $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 + $securityMarks = new SecurityMarks(); + try { + $gapicClient->updateSecurityMarks($securityMarks); + // 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 updateSourceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $canonicalName = 'canonicalName1385400054'; + $expectedResponse = new Source(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setCanonicalName($canonicalName); + $transport->addResponse($expectedResponse); + // Mock request + $source = new Source(); + $response = $gapicClient->updateSource($source); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/UpdateSource', $actualFuncCall); + $actualValue = $actualRequestObject->getSource(); + $this->assertProtobufEquals($source, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateSourceExceptionTest() + { + $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 + $source = new Source(); + try { + $gapicClient->updateSource($source); + // 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()); + } +} diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/Asset.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/Asset.php new file mode 100644 index 000000000000..77eff788a24d --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/Asset.php @@ -0,0 +1,60 @@ +internalAddGeneratedFile( + ' + +1google/cloud/securitycenter/v1p1beta1/asset.proto%google.cloud.securitycenter.v1p1beta12google/cloud/securitycenter/v1p1beta1/folder.proto:google/cloud/securitycenter/v1p1beta1/security_marks.protogoogle/protobuf/struct.protogoogle/protobuf/timestamp.proto" +Asset +name ( i +security_center_properties ( 2E.google.cloud.securitycenter.v1p1beta1.Asset.SecurityCenterPropertiesa +resource_properties ( 2D.google.cloud.securitycenter.v1p1beta1.Asset.ResourcePropertiesEntryL +security_marks ( 24.google.cloud.securitycenter.v1p1beta1.SecurityMarks/ + create_time ( 2.google.protobuf.Timestamp/ + update_time + ( 2.google.protobuf.TimestampJ + +iam_policy ( 26.google.cloud.securitycenter.v1p1beta1.Asset.IamPolicy +canonical_name (  +SecurityCenterProperties + resource_name (  + resource_type (  +resource_parent (  +resource_project (  +resource_owners (  +resource_display_name ( $ +resource_parent_display_name ( % +resource_project_display_name ( > +folders + ( 2-.google.cloud.securitycenter.v1p1beta1.Folder + IamPolicy + policy_blob ( Q +ResourcePropertiesEntry +key ( % +value ( 2.google.protobuf.Value:8:A +#securitycenter.googleapis.com/Asset+organizations/{organization}/assets/{asset}folders/{folder}/assets/{asset}!projects/{project}/assets/{asset}B +)com.google.cloud.securitycenter.v1p1beta1PZSgoogle.golang.org/genproto/googleapis/cloud/securitycenter/v1p1beta1;securitycenter%Google.Cloud.SecurityCenter.V1P1Beta1%Google\\Cloud\\SecurityCenter\\V1p1beta1(Google::Cloud::SecurityCenter::V1p1beta1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/Finding.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/Finding.php new file mode 100644 index 0000000000000000000000000000000000000000..505a1190ca23794b030ca008068eed17cef2e29f GIT binary patch literal 2389 zcmbVO-EP}96rSz;ICN{cLQ{CbfN@!aI>0KyX|WZ`vdw>S4K%S^yBRtdFld=}xGIuB z(ZSrpFSJM53+!S8w(GvbfE|*O61Q36)i)N&^L;%0&N)2%_WR&8Kwsh}^(ZHTj_`1X z#VN%B_l58HE*?(DW6H7Pp9RdN+{C!v#>ed*Zq!@7F8~_)Q|?e3PkevkQp<7u>BtJH zGv!Ro9O?sXc!QO;%29M1QsJANWZD5`ZY<_?=DdF zPs*KgRZ{IE805&~`la z9Kn1KOF-LmXlWN~PHB5T@Ij3O96Q&M0)aUFmOP$TvX|R7rXHM0p(E^P z5mwb4q^uPxHKWzf-(MB6WZGc+uXVH@)tGS$t;musrf{mXVdT+TKsc0mF|Ed%=yvS( zK$&IKbPcV_RHwxi80PmLn|j9^)G(tx&91~61(bE*f8z65aaGaYMYrfLy7mTe*%a5* z>;T=-xjTU429yg%!{R#5lyZCZ|GTle*&qianuaI%%y^FSiz*khuyJnbW5xHGDurt1 z?@Gon5u)cH<3LJZ+)#8|v9od1%p{c!3*{V6K@AN+Hv(EH8^R9qMlRk4>-^p~G5z%^ zc@cyNZrnq8hj_ln9OCLA=YeoztBp3hSL&5Rnb&j{Wy}s*Jtyvzs)Why-HW|Q4tXM1 z?evq>_7k+KBfp96bbFOvWAO60+iBEVhpk4v@QH!YTBX)&oiqw5NXu;NI2xt5pQCIy zcDIP`b{i*+7p>l__wazJ!E~!uc?JwwwDPpod|F6L-XrL3FOLctV;yClwSO$E*ngzn zRen#QojCHkuSMQNxrQb*NGqt zk9~JUxtvlT%b~so8GojZ09f?36t4PD3hjdbaWJk=iB9ULZdAY%-zCt?;ds`BdMbvN zUXqgB@D$iz)biK#PE)mgQ?(K^E|Z#iL6}L~|1GxbNAH8Aw`j{gybz+t#=CS$Q`)xT pwCzPw+fGb}Ys&ja50VT2E8T-HwQPBZG3SbQtt@p@oufHI{{kO-7i<6k literal 0 HcmV?d00001 diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/Folder.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/Folder.php new file mode 100644 index 000000000000..638d4b7923b9 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/Folder.php @@ -0,0 +1,30 @@ +internalAddGeneratedFile( + ' + +2google/cloud/securitycenter/v1p1beta1/folder.proto%google.cloud.securitycenter.v1p1beta1"G +Folder +resource_folder ( $ +resource_folder_display_name ( B +)com.google.cloud.securitycenter.v1p1beta1B FolderProtoPZSgoogle.golang.org/genproto/googleapis/cloud/securitycenter/v1p1beta1;securitycenter%Google.Cloud.SecurityCenter.V1P1Beta1%Google\\Cloud\\SecurityCenter\\V1p1beta1(Google::Cloud::SecurityCenter::V1p1Beta1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/NotificationConfig.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/NotificationConfig.php new file mode 100644 index 0000000000000000000000000000000000000000..235ef45bda37bfcff7d518dada683d7d2efaf111 GIT binary patch literal 1740 zcmbtU-A)rh80Alt0fDTEsi?_-5K5xE7L6B+i2b)0mPRT@vq>|ZPM0yu%w~3$1W2!a z7azcDuYC%yc?7SVon5vq1tr>>w%>kpzVDnpb6)QF2R?WNtAr7OB6Nz#bX~@&ck@Mti#< z!_l@dIL+L7SxwqG*qi?yF{jHN0sbG zGB$#vU6_q`wC#~4x1kgv8JrHGATkteOYa>4^wM9>B`W59>QpH4It6lojwlzl-DlMY zx$5XUlDzCoPiZNhyrK#5e5aH0tSIYb)6Jqi*TI)tVCO$QW30shrZ$~9Y&tVF-O{~e z4)Uob5)QHJR=!OEW7IUp9GHsim>GxT*%{*wnC&EQQ5hjKp^F~?AVPG|LfIQ$ZOoz?^bx5Vl*A`xIxUqHzWIEB_GOj~^sc6rI3S7t?A+eZ~W@ z5D;-hF=-);dB|kuhCVv^Ge2n%uoy@|&>>}Ra`7_L>hbJm?cbN)J4cM~+MBVZWw3Ce zXv~A@F7?!Hh}B$q4rcmfm%!cfe!1RkH9t1Wt@ri4M!8t4)XJsBF=H0otkmkITD`hB zZuideC*bLYR~)OI>M$y+QQ^WxjGpMg39Qq>zrCR}iYcfTHjp8SQoX_gxUK8QNu}_8 z0&FPlucuvO{L^0I43~R|xu)8~atYJXXZ30PB|f)?`G1{QtLk_(bv&Bq@mSQUYo_t| zBwiVZx-$-~9_Rt^8_kDJYXATM literal 0 HcmV?d00001 diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/NotificationMessage.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/NotificationMessage.php new file mode 100644 index 0000000000000000000000000000000000000000..e7bba59150d4ec5200d00c9dfe53f3ac02079a69 GIT binary patch literal 1383 zcmbu9O>fgM7{_UO8JJtSRGc1Q(^3f%m2q+@u&%7^u(e_n2NbDt9VfGt*^%Q+8mM20 z55j?u!ig_{gzcnRs|``0r^Zn$T;;qeML{Lr0r2bSAI zh^8dZ;b@6}SmM!V1m>3&vy@ZFwaHCkljl<|xaK6~pG@0*h)J3=!?_w87lPV)!Cn{( z%DfJgOdGqINi(KCEDD|2$(gBz2ex%V(s0Ofs(7ZQnwU_G6Q=8V+Y_%-rL{O7gICsw z@s%R`pjE+^vjZrm3nhB4ZVQ;#|H8i>W4O;n#6^PfWviFuf8f1ml{~Hmy3sv*#j8Q> zMo~SNeIqun?!@-BjeguhZ~j+ht*w&aJDvKgI`wOvK76rWB31QQO8D{D26}Lf0$YIE zE5fHz#5|c=!M7XG@b0yC(MDX(zTGqj_n-UzT7~-6i@m#H5O){lv~M~_uqI>iN`nn_ zo1GiW4t_RJ$5?*7`;*4UT7&yZjGGxedm3D z;r%_gQ~cWd-xhIUwIu2-QAUPlO;qdWd($hC7&|7$t5A&V(AgbV{mynR!l$MAmc05~ NpSsA>ICC^d=ofWn);0hD literal 0 HcmV?d00001 diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/OrganizationSettings.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/OrganizationSettings.php new file mode 100644 index 0000000000000000000000000000000000000000..3787430f994393dde0362e105e0b579b62735fb3 GIT binary patch literal 1583 zcmb_c-A>yu7+nk6k720F5JFrakAW!CmZTlm?Me11yu+k9P8(Y2G^8z8NxskLobSiy&Aa#{1}|U}Q_Ovd1K7KO@&v<}GszH( zU@z(SF^7nq#U#Sqgs|R$?amQw)LTc-)ltC`j<5|w#=;0&C}K%q35*g>ky0n^o$8z0N{gp{?7rH8at@!8ZGvx)K=q%8Z){``rrsZOa(~Qxf7X7?g2ibgHs-->x<1PVSSUX+ zR>2acelNnF+6gSZfC$9SF~3+Ys`z6g21~aB9%8gl!sQtipWAlKd&x1UNinM_Wqrh0 z)3_^Ni(qkDz<37c)cT)dBs~%crGG~0KL-nhq9_sRH92De*18wAzx;1qW@|)qs8|dG zfIf=?%(a%8RLfc$Je^Eh1uLy~?cliE>a@MXPQBqBx4TZG*4l41>ZJ!p3C!!b3Ut~B zpGpN|4m@gnR43|internalAddGeneratedFile( + ' + +4google/cloud/securitycenter/v1p1beta1/resource.proto%google.cloud.securitycenter.v1p1beta12google/cloud/securitycenter/v1p1beta1/folder.proto" +Resource +name (  +project (  +project_display_name (  +parent (  +parent_display_name ( C +folders ( 2-.google.cloud.securitycenter.v1p1beta1.FolderBAB +)com.google.cloud.securitycenter.v1p1beta1B ResourceProtoPZSgoogle.golang.org/genproto/googleapis/cloud/securitycenter/v1p1beta1;securitycenter%Google.Cloud.SecurityCenter.V1P1Beta1%Google\\Cloud\\SecurityCenter\\V1p1beta1(Google::Cloud::SecurityCenter::V1p1beta1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/RunAssetDiscoveryResponse.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/RunAssetDiscoveryResponse.php new file mode 100644 index 0000000000000000000000000000000000000000..87ed299925376d3d0a28ae7e4c0c3361cd68d5b9 GIT binary patch literal 1289 zcmb`H-)_?|6vk;`2#lCUrAgbJ8JpG#aMf|=G0@gzr4n7ErsD!ds$9p-EM<1&IFkn2 z3-KsC$}V^VB<%d#sxjb#-n357`JHn;mdj1`{Q@Fp@HgS%=0l3p**Jnd16_GNGC3oOhG% zjA_#Cs7y>rnle2Nc}nFuQx{Xk(nN}sp}Z&nf}EKrgfiIo4u>W!B$@>MoFDWoKkyg$ z!Kbd*J+%Bi0BCIZaGZ$)TgIuXjLRb6D}d&cWV4u4m};WU*CtP=TyV`v%)b~B_Tikw zDKoU&vGYt&&82`gVI(MP@4$j-V>c6NMB9f|yPnn2Xc!Ev5Q4;k!&0hvqNVaoD8>=f zwfgo+d#5aGaeNNjMUNQYYH}ZHm9d-EAyiCfO6=u*Tfk-gEBK9=b$3o?Zr==r@%2>K zkbJ1u?|3=FK^WE@ADN|S*EMX#ZE*DfeE476(Ap|UDBmlzxL2s&tBoHGuzu&Aw@$#4 zRgtYVV57afdxZW8itYp=-_lwy!K1JgZmns^Pj=TUa=yyu-chCO#tr-&vEi5C G5`bT#+pppP literal 0 HcmV?d00001 diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/SecurityMarks.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/SecurityMarks.php new file mode 100644 index 000000000000..6a8c600957ce --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/SecurityMarks.php @@ -0,0 +1,37 @@ +internalAddGeneratedFile( + ' + +:google/cloud/securitycenter/v1p1beta1/security_marks.proto%google.cloud.securitycenter.v1p1beta1" + SecurityMarks +name ( N +marks ( 2?.google.cloud.securitycenter.v1p1beta1.SecurityMarks.MarksEntry +canonical_name ( , + +MarksEntry +key (  +value ( :8:A ++securitycenter.googleapis.com/SecurityMarks9organizations/{organization}/assets/{asset}/securityMarksNorganizations/{organization}/sources/{source}/findings/{finding}/securityMarks-folders/{folder}/assets/{asset}/securityMarks/projects/{project}/assets/{asset}/securityMarksBfolders/{folder}/sources/{source}/findings/{finding}/securityMarksDprojects/{project}/sources/{source}/findings/{finding}/securityMarksB +)com.google.cloud.securitycenter.v1p1beta1PZSgoogle.golang.org/genproto/googleapis/cloud/securitycenter/v1p1beta1;securitycenter%Google.Cloud.SecurityCenter.V1P1Beta1%Google\\Cloud\\SecurityCenter\\V1p1beta1(Google::Cloud::SecurityCenter::V1p1beta1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/SecuritycenterService.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/SecuritycenterService.php new file mode 100644 index 0000000000000000000000000000000000000000..ef97e18ab73f501c8d22d3b75d8dfa070a6a4be6 GIT binary patch literal 15638 zcmdrTTWlOxwX=?s_&N{w+HPF;k?k~ToYdK^H-)C-JT!iX#*P~&DVUYEw zGn?X87KloGR3H`ggMNSjfhqywC4__o;w1r6e?U+qWIm{%5)z+?57dIhxv!Z!yR*A9 zj`IQei0!%eoO|A{xpVGf{bn6Knw>Xo(=~jvl3m-(`ZvvN-F1AY?9{SrjcV0&vt?(a zZq-aTm(9*x$u3>FmYtosbnOuU^_+%VHnr@!!u&boIDvj$&V%ItZH_Q(Wq%HM4r$3Zo`yM&t_fIZ@Bg(rJEqw3Vti57G!bB@vW*= z1`#>-qUm|Yx~XX)+uz-%&GnQ9&Zkz7rRnWI%dnr!P>sC>>ZHMR(Ad{0u z0H(cQY(Z|F5Jj>Vs@#o=3sZPTd$2l5Z zkE}h)*J@z^$~!>-;t0e6bzYj~D?G~Z^#?eTVBI8fgfEKXHdtilwgJ(C?+_*&?C@wv z;H$z?gH>PnJ=>suUqM6Dt_c-5&&gNKk2N4N;B#ni-Eg618BwyzSl`t6J9_3l{V{Y* zNS;;LIYvD=ke7o}J-9QS&_2E}(gRQX3ptLVi__;gc~b<7 z`i_E*GOAlswP0YOiGj0}fdYDhdY8P( zbT*?_bZQknIB)u`3%h;J3+Q1uM>YUar-_pmA{=SduAW4N&K$)dRF}{IoE25D7Qvp% z?bKH?2+zAtqfX0pPY^uWs1OGrJY2${z50(kD$Z0`EkD_F+c)fA7RRep0ZY=91xN9s-MoFA$k^%dVwbIEGj2d zWkf4Xhn+Z!(>&8<2hAr`<X=TEpbg|2{!M;H5Xns+KvcsGn2N z!C$|AR=<@&_mTteVyYQH`yCes zJ3*?62Hm?9nsTIeB~2ZvvT2ryi|lh`3+dXMvJy!_OgSI=%r=C)xPI2rU=5_m zI#sVJFMUWjWtY4p>w)3TMIJ$_i;8Y{^VR6T6*SOt;3VobNc&CWO@CoLAup`zsG$R7 z5N(#qHw}B81*t=Y8wqhlXrW`?7J1}W2>NM?T|JNbr9Z*p_FiAQzA`&Aa1ZW7z52`y z{Hox7wD0Qd;*}flM~3Xtr>|YQF+0$semBE>@9t*n|0{3!=3X>Jv=oYr`@;qrt`UEz zvS~)MM=YhVfM(p(2Be2~+be#(hk1O{kr%@jn6%cZTVPy|^^Mitm5l5k*hc$B!_3>; z=XUutD5~k?fHV_5qd!s5e(?k!kQ*XAgbqN3@`73ROSG+I1;T@9NIZpMU%h5*vQ<`M z52AiH%U};l-sr;*ph5mH0zoR*J`7p2N+)C92%;TA(yTd0q146p0R^JS^n$)LPeaN< z)OUSJ{Fw=ZO^+OG_NZ?w=sxH|xgpU|74~*=dwrUAcEuCuc<0uRW5Nrlmxftd1Rg3p znNX`7oY{!z{}5nueb&pd*-nS9fsGF;Xe8#v92-FGT1BaT7G_-6>+nXmdB!CTqjuzp zjPpF|Z&2*4U}%?GgMvZ*4wSBpp7zs>HnSy0=FThE9a8)Q1wFzjjvHeLQ!JrjCvLLK z3xLUl#uazO4(WasCIO7@=!_*CeKCP1^=^h`hs69=L8F`)ewBc}rxVh979A2k%ZA!q zY)O4`MMk` z(bW%j=S8qWxT^B9NfTrCZT)`E7hi%Q_Bj8wWlb!=9{j@$8eyEYMkzd(N~x^~gj9AO z$<#L#DxoFysqPZm%FA;A_DbK=;->f8`Y|r9VB|k8!}9lC+xjTq7PE+dp`ej=WAVhI zYllFHu61BTUqGvKR4h-Qiim}jO3f}1ClfHCZJibr_>17kFq{rv<6~9m9Nv+^+t{4E zD2N(v+QVMut5>-(pOaN3D#{kRxMu<_Hh$u)rQR0HoS=m^jlmk;r5avtO01(!)fS{x2_mTL7Zj)bUKOOu1Ic$*R!8k9qQ zz$VMB_^ITKF$lp*%3PsQ;!op9u81W*G)LhYZ)W&Jm(6l;Qd^-@U@`xpRqklg>=*%M zt+M(h76IQ-)F))WVu7jItG4oV7~^T{^>9*yi$Dn#pG#^Rghg>A^pSJ|r2c`4>&J>32}AMXip{Bk=q6*+av-|S zz~^E!Rw%}f(A)Z9o_HuRFd4*(Qg8Fm|mcWw2(9stDqN=sPhtaw_f^B`6P(DsaljMIs zR>WU}o&+Qov;-|ZiM%Le*`_D?$WD6_kW@ebHL=5@lNo2X1MzPZgs;IRI-*`=7=3*?eI$b#17F9P}50K0hB90QFr>nsW zEZchc+aO0V-Uuhk_-8PQVPb4e$ce`Z?GOl+BrX10Nl?Gcw6j)tMwV#IU?dl-D0w3v z&5(c;Kb?txdQ`^2M>G);emx^*uW_9$UJ(A)C0a8f#-R{mOj;|(;ZR>;f;0=4WkJfR zF1#%rD@u7QghKjt$(9yBm4_fJZx1lzKS7XXjIvTFaqTPv33;UK%Acpv>|CKB3xL%) z@y5gJA7U`UAUF60v(<rp6!dPW!;qI0>9s;60+)H`y1qr{U$gUv=D#DR@D060ZCv^P6R5b%j^Y>rM@> z^yEN|`E}C+ NJK1-wTWAZR{{l5IXD|Q& literal 0 HcmV?d00001 diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/Source.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/Source.php new file mode 100644 index 000000000000..1634a1df8533 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/Source.php @@ -0,0 +1,34 @@ +internalAddGeneratedFile( + ' + +2google/cloud/securitycenter/v1p1beta1/source.proto%google.cloud.securitycenter.v1p1beta1" +Source +name (  + display_name (  + description (  +canonical_name ( :A +$securitycenter.googleapis.com/Source-organizations/{organization}/sources/{source}!folders/{folder}/sources/{source}#projects/{project}/sources/{source}B +)com.google.cloud.securitycenter.v1p1beta1PZSgoogle.golang.org/genproto/googleapis/cloud/securitycenter/v1p1beta1;securitycenter%Google.Cloud.SecurityCenter.V1P1Beta1%Google\\Cloud\\SecurityCenter\\V1p1beta1(Google::Cloud::SecurityCenter::V1p1beta1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Asset.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Asset.php new file mode 100644 index 000000000000..0f552c3e99a7 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Asset.php @@ -0,0 +1,412 @@ +google.cloud.securitycenter.v1p1beta1.Asset + */ +class Asset extends \Google\Protobuf\Internal\Message +{ + /** + * The relative resource name of this asset. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Example: + * "organizations/{organization_id}/assets/{asset_id}". + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Security Command Center managed properties. These properties are managed by + * Security Command Center and cannot be modified by the user. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Asset.SecurityCenterProperties security_center_properties = 2; + */ + protected $security_center_properties = null; + /** + * Resource managed properties. These properties are managed and defined by + * the Google Cloud resource and cannot be modified by the user. + * + * Generated from protobuf field map resource_properties = 7; + */ + private $resource_properties; + /** + * User specified security marks. These marks are entirely managed by the user + * and come from the SecurityMarks resource that belongs to the asset. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.SecurityMarks security_marks = 8; + */ + protected $security_marks = null; + /** + * The time at which the asset was created in Security Command Center. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 9; + */ + protected $create_time = null; + /** + * The time at which the asset was last updated or added in Cloud SCC. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 10; + */ + protected $update_time = null; + /** + * Cloud IAM Policy information associated with the Google Cloud resource + * described by the Security Command Center asset. This information is managed + * and defined by the Google Cloud resource and cannot be modified by the + * user. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Asset.IamPolicy iam_policy = 11; + */ + protected $iam_policy = null; + /** + * The canonical name of the resource. It's either + * "organizations/{organization_id}/assets/{asset_id}", + * "folders/{folder_id}/assets/{asset_id}" or + * "projects/{project_number}/assets/{asset_id}", depending on the closest CRM + * ancestor of the resource. + * + * Generated from protobuf field string canonical_name = 13; + */ + protected $canonical_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The relative resource name of this asset. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Example: + * "organizations/{organization_id}/assets/{asset_id}". + * @type \Google\Cloud\SecurityCenter\V1p1beta1\Asset\SecurityCenterProperties $security_center_properties + * Security Command Center managed properties. These properties are managed by + * Security Command Center and cannot be modified by the user. + * @type array|\Google\Protobuf\Internal\MapField $resource_properties + * Resource managed properties. These properties are managed and defined by + * the Google Cloud resource and cannot be modified by the user. + * @type \Google\Cloud\SecurityCenter\V1p1beta1\SecurityMarks $security_marks + * User specified security marks. These marks are entirely managed by the user + * and come from the SecurityMarks resource that belongs to the asset. + * @type \Google\Protobuf\Timestamp $create_time + * The time at which the asset was created in Security Command Center. + * @type \Google\Protobuf\Timestamp $update_time + * The time at which the asset was last updated or added in Cloud SCC. + * @type \Google\Cloud\SecurityCenter\V1p1beta1\Asset\IamPolicy $iam_policy + * Cloud IAM Policy information associated with the Google Cloud resource + * described by the Security Command Center asset. This information is managed + * and defined by the Google Cloud resource and cannot be modified by the + * user. + * @type string $canonical_name + * The canonical name of the resource. It's either + * "organizations/{organization_id}/assets/{asset_id}", + * "folders/{folder_id}/assets/{asset_id}" or + * "projects/{project_number}/assets/{asset_id}", depending on the closest CRM + * ancestor of the resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\Asset::initOnce(); + parent::__construct($data); + } + + /** + * The relative resource name of this asset. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Example: + * "organizations/{organization_id}/assets/{asset_id}". + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The relative resource name of this asset. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Example: + * "organizations/{organization_id}/assets/{asset_id}". + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Security Command Center managed properties. These properties are managed by + * Security Command Center and cannot be modified by the user. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Asset.SecurityCenterProperties security_center_properties = 2; + * @return \Google\Cloud\SecurityCenter\V1p1beta1\Asset\SecurityCenterProperties|null + */ + public function getSecurityCenterProperties() + { + return $this->security_center_properties; + } + + public function hasSecurityCenterProperties() + { + return isset($this->security_center_properties); + } + + public function clearSecurityCenterProperties() + { + unset($this->security_center_properties); + } + + /** + * Security Command Center managed properties. These properties are managed by + * Security Command Center and cannot be modified by the user. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Asset.SecurityCenterProperties security_center_properties = 2; + * @param \Google\Cloud\SecurityCenter\V1p1beta1\Asset\SecurityCenterProperties $var + * @return $this + */ + public function setSecurityCenterProperties($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1p1beta1\Asset\SecurityCenterProperties::class); + $this->security_center_properties = $var; + + return $this; + } + + /** + * Resource managed properties. These properties are managed and defined by + * the Google Cloud resource and cannot be modified by the user. + * + * Generated from protobuf field map resource_properties = 7; + * @return \Google\Protobuf\Internal\MapField + */ + public function getResourceProperties() + { + return $this->resource_properties; + } + + /** + * Resource managed properties. These properties are managed and defined by + * the Google Cloud resource and cannot be modified by the user. + * + * Generated from protobuf field map resource_properties = 7; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setResourceProperties($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Value::class); + $this->resource_properties = $arr; + + return $this; + } + + /** + * User specified security marks. These marks are entirely managed by the user + * and come from the SecurityMarks resource that belongs to the asset. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.SecurityMarks security_marks = 8; + * @return \Google\Cloud\SecurityCenter\V1p1beta1\SecurityMarks|null + */ + public function getSecurityMarks() + { + return $this->security_marks; + } + + public function hasSecurityMarks() + { + return isset($this->security_marks); + } + + public function clearSecurityMarks() + { + unset($this->security_marks); + } + + /** + * User specified security marks. These marks are entirely managed by the user + * and come from the SecurityMarks resource that belongs to the asset. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.SecurityMarks security_marks = 8; + * @param \Google\Cloud\SecurityCenter\V1p1beta1\SecurityMarks $var + * @return $this + */ + public function setSecurityMarks($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1p1beta1\SecurityMarks::class); + $this->security_marks = $var; + + return $this; + } + + /** + * The time at which the asset was created in Security Command Center. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 9; + * @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); + } + + /** + * The time at which the asset was created in Security Command Center. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 9; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * The time at which the asset was last updated or added in Cloud SCC. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 10; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * The time at which the asset was last updated or added in Cloud SCC. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 10; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Cloud IAM Policy information associated with the Google Cloud resource + * described by the Security Command Center asset. This information is managed + * and defined by the Google Cloud resource and cannot be modified by the + * user. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Asset.IamPolicy iam_policy = 11; + * @return \Google\Cloud\SecurityCenter\V1p1beta1\Asset\IamPolicy|null + */ + public function getIamPolicy() + { + return $this->iam_policy; + } + + public function hasIamPolicy() + { + return isset($this->iam_policy); + } + + public function clearIamPolicy() + { + unset($this->iam_policy); + } + + /** + * Cloud IAM Policy information associated with the Google Cloud resource + * described by the Security Command Center asset. This information is managed + * and defined by the Google Cloud resource and cannot be modified by the + * user. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Asset.IamPolicy iam_policy = 11; + * @param \Google\Cloud\SecurityCenter\V1p1beta1\Asset\IamPolicy $var + * @return $this + */ + public function setIamPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1p1beta1\Asset\IamPolicy::class); + $this->iam_policy = $var; + + return $this; + } + + /** + * The canonical name of the resource. It's either + * "organizations/{organization_id}/assets/{asset_id}", + * "folders/{folder_id}/assets/{asset_id}" or + * "projects/{project_number}/assets/{asset_id}", depending on the closest CRM + * ancestor of the resource. + * + * Generated from protobuf field string canonical_name = 13; + * @return string + */ + public function getCanonicalName() + { + return $this->canonical_name; + } + + /** + * The canonical name of the resource. It's either + * "organizations/{organization_id}/assets/{asset_id}", + * "folders/{folder_id}/assets/{asset_id}" or + * "projects/{project_number}/assets/{asset_id}", depending on the closest CRM + * ancestor of the resource. + * + * Generated from protobuf field string canonical_name = 13; + * @param string $var + * @return $this + */ + public function setCanonicalName($var) + { + GPBUtil::checkString($var, True); + $this->canonical_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Asset/IamPolicy.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Asset/IamPolicy.php new file mode 100644 index 000000000000..c39f062ad72f --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Asset/IamPolicy.php @@ -0,0 +1,81 @@ +google.cloud.securitycenter.v1p1beta1.Asset.IamPolicy + */ +class IamPolicy extends \Google\Protobuf\Internal\Message +{ + /** + * The JSON representation of the Policy associated with the asset. + * See https://cloud.google.com/iam/docs/reference/rest/v1/Policy for + * format details. + * + * Generated from protobuf field string policy_blob = 1; + */ + protected $policy_blob = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $policy_blob + * The JSON representation of the Policy associated with the asset. + * See https://cloud.google.com/iam/docs/reference/rest/v1/Policy for + * format details. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\Asset::initOnce(); + parent::__construct($data); + } + + /** + * The JSON representation of the Policy associated with the asset. + * See https://cloud.google.com/iam/docs/reference/rest/v1/Policy for + * format details. + * + * Generated from protobuf field string policy_blob = 1; + * @return string + */ + public function getPolicyBlob() + { + return $this->policy_blob; + } + + /** + * The JSON representation of the Policy associated with the asset. + * See https://cloud.google.com/iam/docs/reference/rest/v1/Policy for + * format details. + * + * Generated from protobuf field string policy_blob = 1; + * @param string $var + * @return $this + */ + public function setPolicyBlob($var) + { + GPBUtil::checkString($var, True); + $this->policy_blob = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(IamPolicy::class, \Google\Cloud\SecurityCenter\V1p1beta1\Asset_IamPolicy::class); + diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Asset/SecurityCenterProperties.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Asset/SecurityCenterProperties.php new file mode 100644 index 000000000000..45ece235170d --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Asset/SecurityCenterProperties.php @@ -0,0 +1,379 @@ +google.cloud.securitycenter.v1p1beta1.Asset.SecurityCenterProperties + */ +class SecurityCenterProperties extends \Google\Protobuf\Internal\Message +{ + /** + * The full resource name of the Google Cloud resource this asset + * represents. This field is immutable after create time. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + * + * Generated from protobuf field string resource_name = 1; + */ + protected $resource_name = ''; + /** + * The type of the Google Cloud resource. Examples include: APPLICATION, + * PROJECT, and ORGANIZATION. This is a case insensitive field defined by + * Security Command Center and/or the producer of the resource and is + * immutable after create time. + * + * Generated from protobuf field string resource_type = 2; + */ + protected $resource_type = ''; + /** + * The full resource name of the immediate parent of the resource. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + * + * Generated from protobuf field string resource_parent = 3; + */ + protected $resource_parent = ''; + /** + * The full resource name of the project the resource belongs to. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + * + * Generated from protobuf field string resource_project = 4; + */ + protected $resource_project = ''; + /** + * Owners of the Google Cloud resource. + * + * Generated from protobuf field repeated string resource_owners = 5; + */ + private $resource_owners; + /** + * The user defined display name for this resource. + * + * Generated from protobuf field string resource_display_name = 6; + */ + protected $resource_display_name = ''; + /** + * The user defined display name for the parent of this resource. + * + * Generated from protobuf field string resource_parent_display_name = 7; + */ + protected $resource_parent_display_name = ''; + /** + * The user defined display name for the project of this resource. + * + * Generated from protobuf field string resource_project_display_name = 8; + */ + protected $resource_project_display_name = ''; + /** + * Contains a Folder message for each folder in the assets ancestry. + * The first folder is the deepest nested folder, and the last folder is the + * folder directly under the Organization. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1p1beta1.Folder folders = 10; + */ + private $folders; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $resource_name + * The full resource name of the Google Cloud resource this asset + * represents. This field is immutable after create time. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + * @type string $resource_type + * The type of the Google Cloud resource. Examples include: APPLICATION, + * PROJECT, and ORGANIZATION. This is a case insensitive field defined by + * Security Command Center and/or the producer of the resource and is + * immutable after create time. + * @type string $resource_parent + * The full resource name of the immediate parent of the resource. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + * @type string $resource_project + * The full resource name of the project the resource belongs to. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + * @type array|\Google\Protobuf\Internal\RepeatedField $resource_owners + * Owners of the Google Cloud resource. + * @type string $resource_display_name + * The user defined display name for this resource. + * @type string $resource_parent_display_name + * The user defined display name for the parent of this resource. + * @type string $resource_project_display_name + * The user defined display name for the project of this resource. + * @type array<\Google\Cloud\SecurityCenter\V1p1beta1\Folder>|\Google\Protobuf\Internal\RepeatedField $folders + * Contains a Folder message for each folder in the assets ancestry. + * The first folder is the deepest nested folder, and the last folder is the + * folder directly under the Organization. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\Asset::initOnce(); + parent::__construct($data); + } + + /** + * The full resource name of the Google Cloud resource this asset + * represents. This field is immutable after create time. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + * + * Generated from protobuf field string resource_name = 1; + * @return string + */ + public function getResourceName() + { + return $this->resource_name; + } + + /** + * The full resource name of the Google Cloud resource this asset + * represents. This field is immutable after create time. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + * + * Generated from protobuf field string resource_name = 1; + * @param string $var + * @return $this + */ + public function setResourceName($var) + { + GPBUtil::checkString($var, True); + $this->resource_name = $var; + + return $this; + } + + /** + * The type of the Google Cloud resource. Examples include: APPLICATION, + * PROJECT, and ORGANIZATION. This is a case insensitive field defined by + * Security Command Center and/or the producer of the resource and is + * immutable after create time. + * + * Generated from protobuf field string resource_type = 2; + * @return string + */ + public function getResourceType() + { + return $this->resource_type; + } + + /** + * The type of the Google Cloud resource. Examples include: APPLICATION, + * PROJECT, and ORGANIZATION. This is a case insensitive field defined by + * Security Command Center and/or the producer of the resource and is + * immutable after create time. + * + * Generated from protobuf field string resource_type = 2; + * @param string $var + * @return $this + */ + public function setResourceType($var) + { + GPBUtil::checkString($var, True); + $this->resource_type = $var; + + return $this; + } + + /** + * The full resource name of the immediate parent of the resource. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + * + * Generated from protobuf field string resource_parent = 3; + * @return string + */ + public function getResourceParent() + { + return $this->resource_parent; + } + + /** + * The full resource name of the immediate parent of the resource. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + * + * Generated from protobuf field string resource_parent = 3; + * @param string $var + * @return $this + */ + public function setResourceParent($var) + { + GPBUtil::checkString($var, True); + $this->resource_parent = $var; + + return $this; + } + + /** + * The full resource name of the project the resource belongs to. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + * + * Generated from protobuf field string resource_project = 4; + * @return string + */ + public function getResourceProject() + { + return $this->resource_project; + } + + /** + * The full resource name of the project the resource belongs to. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + * + * Generated from protobuf field string resource_project = 4; + * @param string $var + * @return $this + */ + public function setResourceProject($var) + { + GPBUtil::checkString($var, True); + $this->resource_project = $var; + + return $this; + } + + /** + * Owners of the Google Cloud resource. + * + * Generated from protobuf field repeated string resource_owners = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getResourceOwners() + { + return $this->resource_owners; + } + + /** + * Owners of the Google Cloud resource. + * + * Generated from protobuf field repeated string resource_owners = 5; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setResourceOwners($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->resource_owners = $arr; + + return $this; + } + + /** + * The user defined display name for this resource. + * + * Generated from protobuf field string resource_display_name = 6; + * @return string + */ + public function getResourceDisplayName() + { + return $this->resource_display_name; + } + + /** + * The user defined display name for this resource. + * + * Generated from protobuf field string resource_display_name = 6; + * @param string $var + * @return $this + */ + public function setResourceDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->resource_display_name = $var; + + return $this; + } + + /** + * The user defined display name for the parent of this resource. + * + * Generated from protobuf field string resource_parent_display_name = 7; + * @return string + */ + public function getResourceParentDisplayName() + { + return $this->resource_parent_display_name; + } + + /** + * The user defined display name for the parent of this resource. + * + * Generated from protobuf field string resource_parent_display_name = 7; + * @param string $var + * @return $this + */ + public function setResourceParentDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->resource_parent_display_name = $var; + + return $this; + } + + /** + * The user defined display name for the project of this resource. + * + * Generated from protobuf field string resource_project_display_name = 8; + * @return string + */ + public function getResourceProjectDisplayName() + { + return $this->resource_project_display_name; + } + + /** + * The user defined display name for the project of this resource. + * + * Generated from protobuf field string resource_project_display_name = 8; + * @param string $var + * @return $this + */ + public function setResourceProjectDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->resource_project_display_name = $var; + + return $this; + } + + /** + * Contains a Folder message for each folder in the assets ancestry. + * The first folder is the deepest nested folder, and the last folder is the + * folder directly under the Organization. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1p1beta1.Folder folders = 10; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFolders() + { + return $this->folders; + } + + /** + * Contains a Folder message for each folder in the assets ancestry. + * The first folder is the deepest nested folder, and the last folder is the + * folder directly under the Organization. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1p1beta1.Folder folders = 10; + * @param array<\Google\Cloud\SecurityCenter\V1p1beta1\Folder>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFolders($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1p1beta1\Folder::class); + $this->folders = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SecurityCenterProperties::class, \Google\Cloud\SecurityCenter\V1p1beta1\Asset_SecurityCenterProperties::class); + diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Asset_IamPolicy.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Asset_IamPolicy.php new file mode 100644 index 000000000000..3b0c90b985fb --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Asset_IamPolicy.php @@ -0,0 +1,16 @@ +google.cloud.securitycenter.v1p1beta1.CreateFindingRequest + */ +class CreateFindingRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the new finding's parent. Its format should be + * "organizations/[organization_id]/sources/[source_id]". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Unique identifier provided by the client within the parent scope. + * + * Generated from protobuf field string finding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $finding_id = ''; + /** + * Required. The Finding being created. The name and security_marks will be ignored as + * they are both output only fields on this resource. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Finding finding = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $finding = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Resource name of the new finding's parent. Its format should be + * "organizations/[organization_id]/sources/[source_id]". + * @type string $finding_id + * Required. Unique identifier provided by the client within the parent scope. + * @type \Google\Cloud\SecurityCenter\V1p1beta1\Finding $finding + * Required. The Finding being created. The name and security_marks will be ignored as + * they are both output only fields on this resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the new finding's parent. Its format should be + * "organizations/[organization_id]/sources/[source_id]". + * + * 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. Resource name of the new finding's parent. Its format should be + * "organizations/[organization_id]/sources/[source_id]". + * + * 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; + } + + /** + * Required. Unique identifier provided by the client within the parent scope. + * + * Generated from protobuf field string finding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getFindingId() + { + return $this->finding_id; + } + + /** + * Required. Unique identifier provided by the client within the parent scope. + * + * Generated from protobuf field string finding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setFindingId($var) + { + GPBUtil::checkString($var, True); + $this->finding_id = $var; + + return $this; + } + + /** + * Required. The Finding being created. The name and security_marks will be ignored as + * they are both output only fields on this resource. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Finding finding = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\SecurityCenter\V1p1beta1\Finding|null + */ + public function getFinding() + { + return $this->finding; + } + + public function hasFinding() + { + return isset($this->finding); + } + + public function clearFinding() + { + unset($this->finding); + } + + /** + * Required. The Finding being created. The name and security_marks will be ignored as + * they are both output only fields on this resource. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Finding finding = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\SecurityCenter\V1p1beta1\Finding $var + * @return $this + */ + public function setFinding($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1p1beta1\Finding::class); + $this->finding = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/CreateNotificationConfigRequest.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/CreateNotificationConfigRequest.php new file mode 100644 index 000000000000..350e616be37a --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/CreateNotificationConfigRequest.php @@ -0,0 +1,161 @@ +google.cloud.securitycenter.v1p1beta1.CreateNotificationConfigRequest + */ +class CreateNotificationConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the new notification config's parent. Its format is + * "organizations/[organization_id]". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Unique identifier provided by the client within the parent scope. + * It must be between 1 and 128 characters, and contains alphanumeric + * characters, underscores or hyphens only. + * + * Generated from protobuf field string config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $config_id = ''; + /** + * Required. The notification config being created. The name and the service account + * will be ignored as they are both output only fields on this resource. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.NotificationConfig notification_config = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $notification_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Resource name of the new notification config's parent. Its format is + * "organizations/[organization_id]". + * @type string $config_id + * Required. Unique identifier provided by the client within the parent scope. + * It must be between 1 and 128 characters, and contains alphanumeric + * characters, underscores or hyphens only. + * @type \Google\Cloud\SecurityCenter\V1p1beta1\NotificationConfig $notification_config + * Required. The notification config being created. The name and the service account + * will be ignored as they are both output only fields on this resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the new notification config's parent. Its format is + * "organizations/[organization_id]". + * + * 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. Resource name of the new notification config's parent. Its format is + * "organizations/[organization_id]". + * + * 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; + } + + /** + * Required. Unique identifier provided by the client within the parent scope. + * It must be between 1 and 128 characters, and contains alphanumeric + * characters, underscores or hyphens only. + * + * Generated from protobuf field string config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getConfigId() + { + return $this->config_id; + } + + /** + * Required. Unique identifier provided by the client within the parent scope. + * It must be between 1 and 128 characters, and contains alphanumeric + * characters, underscores or hyphens only. + * + * Generated from protobuf field string config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setConfigId($var) + { + GPBUtil::checkString($var, True); + $this->config_id = $var; + + return $this; + } + + /** + * Required. The notification config being created. The name and the service account + * will be ignored as they are both output only fields on this resource. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.NotificationConfig notification_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\SecurityCenter\V1p1beta1\NotificationConfig|null + */ + public function getNotificationConfig() + { + return $this->notification_config; + } + + public function hasNotificationConfig() + { + return isset($this->notification_config); + } + + public function clearNotificationConfig() + { + unset($this->notification_config); + } + + /** + * Required. The notification config being created. The name and the service account + * will be ignored as they are both output only fields on this resource. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.NotificationConfig notification_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\SecurityCenter\V1p1beta1\NotificationConfig $var + * @return $this + */ + public function setNotificationConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1p1beta1\NotificationConfig::class); + $this->notification_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/CreateSourceRequest.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/CreateSourceRequest.php new file mode 100644 index 000000000000..b9856ab4564a --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/CreateSourceRequest.php @@ -0,0 +1,119 @@ +google.cloud.securitycenter.v1p1beta1.CreateSourceRequest + */ +class CreateSourceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the new source's parent. Its format should be + * "organizations/[organization_id]". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The Source being created, only the display_name and description will be + * used. All other fields will be ignored. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $source = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Resource name of the new source's parent. Its format should be + * "organizations/[organization_id]". + * @type \Google\Cloud\SecurityCenter\V1p1beta1\Source $source + * Required. The Source being created, only the display_name and description will be + * used. All other fields will be ignored. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the new source's parent. Its format should be + * "organizations/[organization_id]". + * + * 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. Resource name of the new source's parent. Its format should be + * "organizations/[organization_id]". + * + * 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; + } + + /** + * Required. The Source being created, only the display_name and description will be + * used. All other fields will be ignored. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\SecurityCenter\V1p1beta1\Source|null + */ + public function getSource() + { + return $this->source; + } + + public function hasSource() + { + return isset($this->source); + } + + public function clearSource() + { + unset($this->source); + } + + /** + * Required. The Source being created, only the display_name and description will be + * used. All other fields will be ignored. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\SecurityCenter\V1p1beta1\Source $var + * @return $this + */ + public function setSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1p1beta1\Source::class); + $this->source = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/DeleteNotificationConfigRequest.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/DeleteNotificationConfigRequest.php new file mode 100644 index 000000000000..677c4d41b9bf --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/DeleteNotificationConfigRequest.php @@ -0,0 +1,71 @@ +google.cloud.securitycenter.v1p1beta1.DeleteNotificationConfigRequest + */ +class DeleteNotificationConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the notification config to delete. Its format is + * "organizations/[organization_id]/notificationConfigs/[config_id]". + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the notification config to delete. Its format is + * "organizations/[organization_id]/notificationConfigs/[config_id]". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the notification config to delete. Its format is + * "organizations/[organization_id]/notificationConfigs/[config_id]". + * + * 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 notification config to delete. Its format is + * "organizations/[organization_id]/notificationConfigs/[config_id]". + * + * 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/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Finding.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Finding.php new file mode 100644 index 000000000000..572c4c7113fd --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Finding.php @@ -0,0 +1,603 @@ +google.cloud.securitycenter.v1p1beta1.Finding + */ +class Finding extends \Google\Protobuf\Internal\Message +{ + /** + * The relative resource name of this finding. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Example: + * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}" + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The relative resource name of the source the finding belongs to. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * This field is immutable after creation time. + * For example: + * "organizations/{organization_id}/sources/{source_id}" + * + * Generated from protobuf field string parent = 2; + */ + protected $parent = ''; + /** + * For findings on Google Cloud resources, the full resource + * name of the Google Cloud resource this finding is for. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + * When the finding is for a non-Google Cloud resource, the resourceName can + * be a customer or partner defined string. This field is immutable after + * creation time. + * + * Generated from protobuf field string resource_name = 3; + */ + protected $resource_name = ''; + /** + * The state of the finding. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Finding.State state = 4; + */ + protected $state = 0; + /** + * The additional taxonomy group within findings from a given source. + * This field is immutable after creation time. + * Example: "XSS_FLASH_INJECTION" + * + * Generated from protobuf field string category = 5; + */ + protected $category = ''; + /** + * The URI that, if available, points to a web page outside of Security + * Command Center where additional information about the finding can be found. + * This field is guaranteed to be either empty or a well formed URL. + * + * Generated from protobuf field string external_uri = 6; + */ + protected $external_uri = ''; + /** + * Source specific properties. These properties are managed by the source + * that writes the finding. The key names in the source_properties map must be + * between 1 and 255 characters, and must start with a letter and contain + * alphanumeric characters or underscores only. + * + * Generated from protobuf field map source_properties = 7; + */ + private $source_properties; + /** + * Output only. User specified security marks. These marks are entirely + * managed by the user and come from the SecurityMarks resource that belongs + * to the finding. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.SecurityMarks security_marks = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $security_marks = null; + /** + * The time at which the event took place, or when an update to the finding + * occurred. For example, if the finding represents an open firewall it would + * capture the time the detector believes the firewall became open. The + * accuracy is determined by the detector. If the finding were to be resolved + * afterward, this time would reflect when the finding was resolved. Must not + * be set to a value greater than the current timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp event_time = 9; + */ + protected $event_time = null; + /** + * The time at which the finding was created in Security Command Center. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 10; + */ + protected $create_time = null; + /** + * The severity of the finding. This field is managed by the source that + * writes the finding. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Finding.Severity severity = 13; + */ + protected $severity = 0; + /** + * The canonical name of the finding. It's either + * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", + * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}" or + * "projects/{project_number}/sources/{source_id}/findings/{finding_id}", + * depending on the closest CRM ancestor of the resource associated with the + * finding. + * + * Generated from protobuf field string canonical_name = 14; + */ + protected $canonical_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The relative resource name of this finding. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Example: + * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}" + * @type string $parent + * The relative resource name of the source the finding belongs to. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * This field is immutable after creation time. + * For example: + * "organizations/{organization_id}/sources/{source_id}" + * @type string $resource_name + * For findings on Google Cloud resources, the full resource + * name of the Google Cloud resource this finding is for. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + * When the finding is for a non-Google Cloud resource, the resourceName can + * be a customer or partner defined string. This field is immutable after + * creation time. + * @type int $state + * The state of the finding. + * @type string $category + * The additional taxonomy group within findings from a given source. + * This field is immutable after creation time. + * Example: "XSS_FLASH_INJECTION" + * @type string $external_uri + * The URI that, if available, points to a web page outside of Security + * Command Center where additional information about the finding can be found. + * This field is guaranteed to be either empty or a well formed URL. + * @type array|\Google\Protobuf\Internal\MapField $source_properties + * Source specific properties. These properties are managed by the source + * that writes the finding. The key names in the source_properties map must be + * between 1 and 255 characters, and must start with a letter and contain + * alphanumeric characters or underscores only. + * @type \Google\Cloud\SecurityCenter\V1p1beta1\SecurityMarks $security_marks + * Output only. User specified security marks. These marks are entirely + * managed by the user and come from the SecurityMarks resource that belongs + * to the finding. + * @type \Google\Protobuf\Timestamp $event_time + * The time at which the event took place, or when an update to the finding + * occurred. For example, if the finding represents an open firewall it would + * capture the time the detector believes the firewall became open. The + * accuracy is determined by the detector. If the finding were to be resolved + * afterward, this time would reflect when the finding was resolved. Must not + * be set to a value greater than the current timestamp. + * @type \Google\Protobuf\Timestamp $create_time + * The time at which the finding was created in Security Command Center. + * @type int $severity + * The severity of the finding. This field is managed by the source that + * writes the finding. + * @type string $canonical_name + * The canonical name of the finding. It's either + * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", + * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}" or + * "projects/{project_number}/sources/{source_id}/findings/{finding_id}", + * depending on the closest CRM ancestor of the resource associated with the + * finding. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\Finding::initOnce(); + parent::__construct($data); + } + + /** + * The relative resource name of this finding. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Example: + * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}" + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The relative resource name of this finding. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Example: + * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}" + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The relative resource name of the source the finding belongs to. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * This field is immutable after creation time. + * For example: + * "organizations/{organization_id}/sources/{source_id}" + * + * Generated from protobuf field string parent = 2; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * The relative resource name of the source the finding belongs to. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * This field is immutable after creation time. + * For example: + * "organizations/{organization_id}/sources/{source_id}" + * + * Generated from protobuf field string parent = 2; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * For findings on Google Cloud resources, the full resource + * name of the Google Cloud resource this finding is for. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + * When the finding is for a non-Google Cloud resource, the resourceName can + * be a customer or partner defined string. This field is immutable after + * creation time. + * + * Generated from protobuf field string resource_name = 3; + * @return string + */ + public function getResourceName() + { + return $this->resource_name; + } + + /** + * For findings on Google Cloud resources, the full resource + * name of the Google Cloud resource this finding is for. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + * When the finding is for a non-Google Cloud resource, the resourceName can + * be a customer or partner defined string. This field is immutable after + * creation time. + * + * Generated from protobuf field string resource_name = 3; + * @param string $var + * @return $this + */ + public function setResourceName($var) + { + GPBUtil::checkString($var, True); + $this->resource_name = $var; + + return $this; + } + + /** + * The state of the finding. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Finding.State state = 4; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * The state of the finding. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Finding.State state = 4; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1p1beta1\Finding\State::class); + $this->state = $var; + + return $this; + } + + /** + * The additional taxonomy group within findings from a given source. + * This field is immutable after creation time. + * Example: "XSS_FLASH_INJECTION" + * + * Generated from protobuf field string category = 5; + * @return string + */ + public function getCategory() + { + return $this->category; + } + + /** + * The additional taxonomy group within findings from a given source. + * This field is immutable after creation time. + * Example: "XSS_FLASH_INJECTION" + * + * Generated from protobuf field string category = 5; + * @param string $var + * @return $this + */ + public function setCategory($var) + { + GPBUtil::checkString($var, True); + $this->category = $var; + + return $this; + } + + /** + * The URI that, if available, points to a web page outside of Security + * Command Center where additional information about the finding can be found. + * This field is guaranteed to be either empty or a well formed URL. + * + * Generated from protobuf field string external_uri = 6; + * @return string + */ + public function getExternalUri() + { + return $this->external_uri; + } + + /** + * The URI that, if available, points to a web page outside of Security + * Command Center where additional information about the finding can be found. + * This field is guaranteed to be either empty or a well formed URL. + * + * Generated from protobuf field string external_uri = 6; + * @param string $var + * @return $this + */ + public function setExternalUri($var) + { + GPBUtil::checkString($var, True); + $this->external_uri = $var; + + return $this; + } + + /** + * Source specific properties. These properties are managed by the source + * that writes the finding. The key names in the source_properties map must be + * between 1 and 255 characters, and must start with a letter and contain + * alphanumeric characters or underscores only. + * + * Generated from protobuf field map source_properties = 7; + * @return \Google\Protobuf\Internal\MapField + */ + public function getSourceProperties() + { + return $this->source_properties; + } + + /** + * Source specific properties. These properties are managed by the source + * that writes the finding. The key names in the source_properties map must be + * between 1 and 255 characters, and must start with a letter and contain + * alphanumeric characters or underscores only. + * + * Generated from protobuf field map source_properties = 7; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setSourceProperties($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Value::class); + $this->source_properties = $arr; + + return $this; + } + + /** + * Output only. User specified security marks. These marks are entirely + * managed by the user and come from the SecurityMarks resource that belongs + * to the finding. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.SecurityMarks security_marks = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\SecurityCenter\V1p1beta1\SecurityMarks|null + */ + public function getSecurityMarks() + { + return $this->security_marks; + } + + public function hasSecurityMarks() + { + return isset($this->security_marks); + } + + public function clearSecurityMarks() + { + unset($this->security_marks); + } + + /** + * Output only. User specified security marks. These marks are entirely + * managed by the user and come from the SecurityMarks resource that belongs + * to the finding. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.SecurityMarks security_marks = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\SecurityCenter\V1p1beta1\SecurityMarks $var + * @return $this + */ + public function setSecurityMarks($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1p1beta1\SecurityMarks::class); + $this->security_marks = $var; + + return $this; + } + + /** + * The time at which the event took place, or when an update to the finding + * occurred. For example, if the finding represents an open firewall it would + * capture the time the detector believes the firewall became open. The + * accuracy is determined by the detector. If the finding were to be resolved + * afterward, this time would reflect when the finding was resolved. Must not + * be set to a value greater than the current timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp event_time = 9; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEventTime() + { + return $this->event_time; + } + + public function hasEventTime() + { + return isset($this->event_time); + } + + public function clearEventTime() + { + unset($this->event_time); + } + + /** + * The time at which the event took place, or when an update to the finding + * occurred. For example, if the finding represents an open firewall it would + * capture the time the detector believes the firewall became open. The + * accuracy is determined by the detector. If the finding were to be resolved + * afterward, this time would reflect when the finding was resolved. Must not + * be set to a value greater than the current timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp event_time = 9; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEventTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->event_time = $var; + + return $this; + } + + /** + * The time at which the finding was created in Security Command Center. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 10; + * @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); + } + + /** + * The time at which the finding was created in Security Command Center. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 10; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * The severity of the finding. This field is managed by the source that + * writes the finding. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Finding.Severity severity = 13; + * @return int + */ + public function getSeverity() + { + return $this->severity; + } + + /** + * The severity of the finding. This field is managed by the source that + * writes the finding. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Finding.Severity severity = 13; + * @param int $var + * @return $this + */ + public function setSeverity($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1p1beta1\Finding\Severity::class); + $this->severity = $var; + + return $this; + } + + /** + * The canonical name of the finding. It's either + * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", + * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}" or + * "projects/{project_number}/sources/{source_id}/findings/{finding_id}", + * depending on the closest CRM ancestor of the resource associated with the + * finding. + * + * Generated from protobuf field string canonical_name = 14; + * @return string + */ + public function getCanonicalName() + { + return $this->canonical_name; + } + + /** + * The canonical name of the finding. It's either + * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", + * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}" or + * "projects/{project_number}/sources/{source_id}/findings/{finding_id}", + * depending on the closest CRM ancestor of the resource associated with the + * finding. + * + * Generated from protobuf field string canonical_name = 14; + * @param string $var + * @return $this + */ + public function setCanonicalName($var) + { + GPBUtil::checkString($var, True); + $this->canonical_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Finding/Severity.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Finding/Severity.php new file mode 100644 index 000000000000..7b66c33d8bd0 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Finding/Severity.php @@ -0,0 +1,79 @@ +google.cloud.securitycenter.v1p1beta1.Finding.Severity + */ +class Severity +{ + /** + * No severity specified. The default value. + * + * Generated from protobuf enum SEVERITY_UNSPECIFIED = 0; + */ + const SEVERITY_UNSPECIFIED = 0; + /** + * Critical severity. + * + * Generated from protobuf enum CRITICAL = 1; + */ + const CRITICAL = 1; + /** + * High severity. + * + * Generated from protobuf enum HIGH = 2; + */ + const HIGH = 2; + /** + * Medium severity. + * + * Generated from protobuf enum MEDIUM = 3; + */ + const MEDIUM = 3; + /** + * Low severity. + * + * Generated from protobuf enum LOW = 4; + */ + const LOW = 4; + + private static $valueToName = [ + self::SEVERITY_UNSPECIFIED => 'SEVERITY_UNSPECIFIED', + self::CRITICAL => 'CRITICAL', + self::HIGH => 'HIGH', + self::MEDIUM => 'MEDIUM', + self::LOW => 'LOW', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Severity::class, \Google\Cloud\SecurityCenter\V1p1beta1\Finding_Severity::class); + diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Finding/State.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Finding/State.php new file mode 100644 index 000000000000..188e804f89de --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Finding/State.php @@ -0,0 +1,65 @@ +google.cloud.securitycenter.v1p1beta1.Finding.State + */ +class State +{ + /** + * Unspecified state. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The finding requires attention and has not been addressed yet. + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + /** + * The finding has been fixed, triaged as a non-issue or otherwise addressed + * and is no longer active. + * + * Generated from protobuf enum INACTIVE = 2; + */ + const INACTIVE = 2; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + self::INACTIVE => 'INACTIVE', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\SecurityCenter\V1p1beta1\Finding_State::class); + diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Finding_Severity.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Finding_Severity.php new file mode 100644 index 000000000000..57d9bc75735a --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Finding_Severity.php @@ -0,0 +1,16 @@ +google.cloud.securitycenter.v1p1beta1.Folder + */ +class Folder extends \Google\Protobuf\Internal\Message +{ + /** + * Full resource name of this folder. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + * + * Generated from protobuf field string resource_folder = 1; + */ + protected $resource_folder = ''; + /** + * The user defined display name for this folder. + * + * Generated from protobuf field string resource_folder_display_name = 2; + */ + protected $resource_folder_display_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $resource_folder + * Full resource name of this folder. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + * @type string $resource_folder_display_name + * The user defined display name for this folder. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\Folder::initOnce(); + parent::__construct($data); + } + + /** + * Full resource name of this folder. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + * + * Generated from protobuf field string resource_folder = 1; + * @return string + */ + public function getResourceFolder() + { + return $this->resource_folder; + } + + /** + * Full resource name of this folder. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + * + * Generated from protobuf field string resource_folder = 1; + * @param string $var + * @return $this + */ + public function setResourceFolder($var) + { + GPBUtil::checkString($var, True); + $this->resource_folder = $var; + + return $this; + } + + /** + * The user defined display name for this folder. + * + * Generated from protobuf field string resource_folder_display_name = 2; + * @return string + */ + public function getResourceFolderDisplayName() + { + return $this->resource_folder_display_name; + } + + /** + * The user defined display name for this folder. + * + * Generated from protobuf field string resource_folder_display_name = 2; + * @param string $var + * @return $this + */ + public function setResourceFolderDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->resource_folder_display_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/GetNotificationConfigRequest.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/GetNotificationConfigRequest.php new file mode 100644 index 000000000000..b612d7b962c2 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/GetNotificationConfigRequest.php @@ -0,0 +1,71 @@ +google.cloud.securitycenter.v1p1beta1.GetNotificationConfigRequest + */ +class GetNotificationConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the notification config to get. Its format is + * "organizations/[organization_id]/notificationConfigs/[config_id]". + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the notification config to get. Its format is + * "organizations/[organization_id]/notificationConfigs/[config_id]". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the notification config to get. Its format is + * "organizations/[organization_id]/notificationConfigs/[config_id]". + * + * 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 notification config to get. Its format is + * "organizations/[organization_id]/notificationConfigs/[config_id]". + * + * 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/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/GetOrganizationSettingsRequest.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/GetOrganizationSettingsRequest.php new file mode 100644 index 000000000000..1f0cdc6d247d --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/GetOrganizationSettingsRequest.php @@ -0,0 +1,71 @@ +google.cloud.securitycenter.v1p1beta1.GetOrganizationSettingsRequest + */ +class GetOrganizationSettingsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the organization to get organization settings for. Its format is + * "organizations/[organization_id]/organizationSettings". + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the organization to get organization settings for. Its format is + * "organizations/[organization_id]/organizationSettings". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the organization to get organization settings for. Its format is + * "organizations/[organization_id]/organizationSettings". + * + * 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 organization to get organization settings for. Its format is + * "organizations/[organization_id]/organizationSettings". + * + * 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/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/GetSourceRequest.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/GetSourceRequest.php new file mode 100644 index 000000000000..4372471b4525 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/GetSourceRequest.php @@ -0,0 +1,71 @@ +google.cloud.securitycenter.v1p1beta1.GetSourceRequest + */ +class GetSourceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Relative resource name of the source. Its format is + * "organizations/[organization_id]/source/[source_id]". + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Relative resource name of the source. Its format is + * "organizations/[organization_id]/source/[source_id]". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Relative resource name of the source. Its format is + * "organizations/[organization_id]/source/[source_id]". + * + * 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. Relative resource name of the source. Its format is + * "organizations/[organization_id]/source/[source_id]". + * + * 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/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/GroupAssetsRequest.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/GroupAssetsRequest.php new file mode 100644 index 000000000000..22d91ed7c020 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/GroupAssetsRequest.php @@ -0,0 +1,643 @@ +google.cloud.securitycenter.v1p1beta1.GroupAssetsRequest + */ +class GroupAssetsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the organization to groupBy. Its format is + * "organizations/[organization_id], folders/[folder_id], or + * projects/[project_id]". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Expression that defines the filter to apply across assets. + * The expression is a list of zero or more restrictions combined via logical + * operators `AND` and `OR`. + * Parentheses are supported, and `OR` has higher precedence than `AND`. + * Restrictions have the form ` ` and may have a `-` + * character in front of them to indicate negation. The fields map to those + * defined in the Asset resource. Examples include: + * * name + * * security_center_properties.resource_name + * * resource_properties.a_property + * * security_marks.marks.marka + * The supported operators are: + * * `=` for all value types. + * * `>`, `<`, `>=`, `<=` for integer values. + * * `:`, meaning substring matching, for strings. + * The supported value types are: + * * string literals in quotes. + * * integer literals without quotes. + * * boolean literals `true` and `false` without quotes. + * The following field and operator combinations are supported: + * * name: `=` + * * update_time: `=`, `>`, `<`, `>=`, `<=` + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `update_time = "2019-06-10T16:07:18-07:00"` + * `update_time = 1560208038000` + * * create_time: `=`, `>`, `<`, `>=`, `<=` + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `create_time = "2019-06-10T16:07:18-07:00"` + * `create_time = 1560208038000` + * * iam_policy.policy_blob: `=`, `:` + * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + * * security_marks.marks: `=`, `:` + * * security_center_properties.resource_name: `=`, `:` + * * security_center_properties.resource_name_display_name: `=`, `:` + * * security_center_properties.resource_type: `=`, `:` + * * security_center_properties.resource_parent: `=`, `:` + * * security_center_properties.resource_parent_display_name: `=`, `:` + * * security_center_properties.resource_project: `=`, `:` + * * security_center_properties.resource_project_display_name: `=`, `:` + * * security_center_properties.resource_owners: `=`, `:` + * For example, `resource_properties.size = 100` is a valid filter string. + * Use a partial match on the empty string to filter based on a property + * existing: `resource_properties.my_property : ""` + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-resource_properties.my_property : ""` + * + * Generated from protobuf field string filter = 2; + */ + protected $filter = ''; + /** + * Required. Expression that defines what assets fields to use for grouping. The string + * value should follow SQL syntax: comma separated list of fields. For + * example: + * "security_center_properties.resource_project,security_center_properties.project". + * The following fields are supported when compare_duration is not set: + * * security_center_properties.resource_project + * * security_center_properties.resource_project_display_name + * * security_center_properties.resource_type + * * security_center_properties.resource_parent + * * security_center_properties.resource_parent_display_name + * The following fields are supported when compare_duration is set: + * * security_center_properties.resource_type + * * security_center_properties.resource_project_display_name + * * security_center_properties.resource_parent_display_name + * + * Generated from protobuf field string group_by = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $group_by = ''; + /** + * When compare_duration is set, the GroupResult's "state_change" property is + * updated to indicate whether the asset was added, removed, or remained + * present during the compare_duration period of time that precedes the + * read_time. This is the time between (read_time - compare_duration) and + * read_time. + * The state change value is derived based on the presence of the asset at the + * two points in time. Intermediate state changes between the two times don't + * affect the result. For example, the results aren't affected if the asset is + * removed and re-created again. + * Possible "state_change" values when compare_duration is specified: + * * "ADDED": indicates that the asset was not present at the start of + * compare_duration, but present at reference_time. + * * "REMOVED": indicates that the asset was present at the start of + * compare_duration, but not present at reference_time. + * * "ACTIVE": indicates that the asset was present at both the + * start and the end of the time period defined by + * compare_duration and reference_time. + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all assets present at + * read_time. + * If this field is set then `state_change` must be a specified field in + * `group_by`. + * + * Generated from protobuf field .google.protobuf.Duration compare_duration = 4; + */ + protected $compare_duration = null; + /** + * Time used as a reference point when filtering assets. The filter is limited + * to assets existing at the supplied time and their values are those at that + * specific time. Absence of this field will default to the API's version of + * NOW. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 5; + */ + protected $read_time = null; + /** + * The value returned by the last `GroupAssetsResponse`; indicates + * that this is a continuation of a prior `GroupAssets` call, and that the + * system should return the next page of data. + * + * Generated from protobuf field string page_token = 7; + */ + protected $page_token = ''; + /** + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. + * + * Generated from protobuf field int32 page_size = 8; + */ + protected $page_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Name of the organization to groupBy. Its format is + * "organizations/[organization_id], folders/[folder_id], or + * projects/[project_id]". + * @type string $filter + * Expression that defines the filter to apply across assets. + * The expression is a list of zero or more restrictions combined via logical + * operators `AND` and `OR`. + * Parentheses are supported, and `OR` has higher precedence than `AND`. + * Restrictions have the form ` ` and may have a `-` + * character in front of them to indicate negation. The fields map to those + * defined in the Asset resource. Examples include: + * * name + * * security_center_properties.resource_name + * * resource_properties.a_property + * * security_marks.marks.marka + * The supported operators are: + * * `=` for all value types. + * * `>`, `<`, `>=`, `<=` for integer values. + * * `:`, meaning substring matching, for strings. + * The supported value types are: + * * string literals in quotes. + * * integer literals without quotes. + * * boolean literals `true` and `false` without quotes. + * The following field and operator combinations are supported: + * * name: `=` + * * update_time: `=`, `>`, `<`, `>=`, `<=` + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `update_time = "2019-06-10T16:07:18-07:00"` + * `update_time = 1560208038000` + * * create_time: `=`, `>`, `<`, `>=`, `<=` + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `create_time = "2019-06-10T16:07:18-07:00"` + * `create_time = 1560208038000` + * * iam_policy.policy_blob: `=`, `:` + * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + * * security_marks.marks: `=`, `:` + * * security_center_properties.resource_name: `=`, `:` + * * security_center_properties.resource_name_display_name: `=`, `:` + * * security_center_properties.resource_type: `=`, `:` + * * security_center_properties.resource_parent: `=`, `:` + * * security_center_properties.resource_parent_display_name: `=`, `:` + * * security_center_properties.resource_project: `=`, `:` + * * security_center_properties.resource_project_display_name: `=`, `:` + * * security_center_properties.resource_owners: `=`, `:` + * For example, `resource_properties.size = 100` is a valid filter string. + * Use a partial match on the empty string to filter based on a property + * existing: `resource_properties.my_property : ""` + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-resource_properties.my_property : ""` + * @type string $group_by + * Required. Expression that defines what assets fields to use for grouping. The string + * value should follow SQL syntax: comma separated list of fields. For + * example: + * "security_center_properties.resource_project,security_center_properties.project". + * The following fields are supported when compare_duration is not set: + * * security_center_properties.resource_project + * * security_center_properties.resource_project_display_name + * * security_center_properties.resource_type + * * security_center_properties.resource_parent + * * security_center_properties.resource_parent_display_name + * The following fields are supported when compare_duration is set: + * * security_center_properties.resource_type + * * security_center_properties.resource_project_display_name + * * security_center_properties.resource_parent_display_name + * @type \Google\Protobuf\Duration $compare_duration + * When compare_duration is set, the GroupResult's "state_change" property is + * updated to indicate whether the asset was added, removed, or remained + * present during the compare_duration period of time that precedes the + * read_time. This is the time between (read_time - compare_duration) and + * read_time. + * The state change value is derived based on the presence of the asset at the + * two points in time. Intermediate state changes between the two times don't + * affect the result. For example, the results aren't affected if the asset is + * removed and re-created again. + * Possible "state_change" values when compare_duration is specified: + * * "ADDED": indicates that the asset was not present at the start of + * compare_duration, but present at reference_time. + * * "REMOVED": indicates that the asset was present at the start of + * compare_duration, but not present at reference_time. + * * "ACTIVE": indicates that the asset was present at both the + * start and the end of the time period defined by + * compare_duration and reference_time. + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all assets present at + * read_time. + * If this field is set then `state_change` must be a specified field in + * `group_by`. + * @type \Google\Protobuf\Timestamp $read_time + * Time used as a reference point when filtering assets. The filter is limited + * to assets existing at the supplied time and their values are those at that + * specific time. Absence of this field will default to the API's version of + * NOW. + * @type string $page_token + * The value returned by the last `GroupAssetsResponse`; indicates + * that this is a continuation of a prior `GroupAssets` call, and that the + * system should return the next page of data. + * @type int $page_size + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the organization to groupBy. Its format is + * "organizations/[organization_id], folders/[folder_id], or + * projects/[project_id]". + * + * 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. Name of the organization to groupBy. Its format is + * "organizations/[organization_id], folders/[folder_id], or + * projects/[project_id]". + * + * 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; + } + + /** + * Expression that defines the filter to apply across assets. + * The expression is a list of zero or more restrictions combined via logical + * operators `AND` and `OR`. + * Parentheses are supported, and `OR` has higher precedence than `AND`. + * Restrictions have the form ` ` and may have a `-` + * character in front of them to indicate negation. The fields map to those + * defined in the Asset resource. Examples include: + * * name + * * security_center_properties.resource_name + * * resource_properties.a_property + * * security_marks.marks.marka + * The supported operators are: + * * `=` for all value types. + * * `>`, `<`, `>=`, `<=` for integer values. + * * `:`, meaning substring matching, for strings. + * The supported value types are: + * * string literals in quotes. + * * integer literals without quotes. + * * boolean literals `true` and `false` without quotes. + * The following field and operator combinations are supported: + * * name: `=` + * * update_time: `=`, `>`, `<`, `>=`, `<=` + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `update_time = "2019-06-10T16:07:18-07:00"` + * `update_time = 1560208038000` + * * create_time: `=`, `>`, `<`, `>=`, `<=` + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `create_time = "2019-06-10T16:07:18-07:00"` + * `create_time = 1560208038000` + * * iam_policy.policy_blob: `=`, `:` + * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + * * security_marks.marks: `=`, `:` + * * security_center_properties.resource_name: `=`, `:` + * * security_center_properties.resource_name_display_name: `=`, `:` + * * security_center_properties.resource_type: `=`, `:` + * * security_center_properties.resource_parent: `=`, `:` + * * security_center_properties.resource_parent_display_name: `=`, `:` + * * security_center_properties.resource_project: `=`, `:` + * * security_center_properties.resource_project_display_name: `=`, `:` + * * security_center_properties.resource_owners: `=`, `:` + * For example, `resource_properties.size = 100` is a valid filter string. + * Use a partial match on the empty string to filter based on a property + * existing: `resource_properties.my_property : ""` + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-resource_properties.my_property : ""` + * + * Generated from protobuf field string filter = 2; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Expression that defines the filter to apply across assets. + * The expression is a list of zero or more restrictions combined via logical + * operators `AND` and `OR`. + * Parentheses are supported, and `OR` has higher precedence than `AND`. + * Restrictions have the form ` ` and may have a `-` + * character in front of them to indicate negation. The fields map to those + * defined in the Asset resource. Examples include: + * * name + * * security_center_properties.resource_name + * * resource_properties.a_property + * * security_marks.marks.marka + * The supported operators are: + * * `=` for all value types. + * * `>`, `<`, `>=`, `<=` for integer values. + * * `:`, meaning substring matching, for strings. + * The supported value types are: + * * string literals in quotes. + * * integer literals without quotes. + * * boolean literals `true` and `false` without quotes. + * The following field and operator combinations are supported: + * * name: `=` + * * update_time: `=`, `>`, `<`, `>=`, `<=` + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `update_time = "2019-06-10T16:07:18-07:00"` + * `update_time = 1560208038000` + * * create_time: `=`, `>`, `<`, `>=`, `<=` + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `create_time = "2019-06-10T16:07:18-07:00"` + * `create_time = 1560208038000` + * * iam_policy.policy_blob: `=`, `:` + * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + * * security_marks.marks: `=`, `:` + * * security_center_properties.resource_name: `=`, `:` + * * security_center_properties.resource_name_display_name: `=`, `:` + * * security_center_properties.resource_type: `=`, `:` + * * security_center_properties.resource_parent: `=`, `:` + * * security_center_properties.resource_parent_display_name: `=`, `:` + * * security_center_properties.resource_project: `=`, `:` + * * security_center_properties.resource_project_display_name: `=`, `:` + * * security_center_properties.resource_owners: `=`, `:` + * For example, `resource_properties.size = 100` is a valid filter string. + * Use a partial match on the empty string to filter based on a property + * existing: `resource_properties.my_property : ""` + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-resource_properties.my_property : ""` + * + * Generated from protobuf field string filter = 2; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Required. Expression that defines what assets fields to use for grouping. The string + * value should follow SQL syntax: comma separated list of fields. For + * example: + * "security_center_properties.resource_project,security_center_properties.project". + * The following fields are supported when compare_duration is not set: + * * security_center_properties.resource_project + * * security_center_properties.resource_project_display_name + * * security_center_properties.resource_type + * * security_center_properties.resource_parent + * * security_center_properties.resource_parent_display_name + * The following fields are supported when compare_duration is set: + * * security_center_properties.resource_type + * * security_center_properties.resource_project_display_name + * * security_center_properties.resource_parent_display_name + * + * Generated from protobuf field string group_by = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getGroupBy() + { + return $this->group_by; + } + + /** + * Required. Expression that defines what assets fields to use for grouping. The string + * value should follow SQL syntax: comma separated list of fields. For + * example: + * "security_center_properties.resource_project,security_center_properties.project". + * The following fields are supported when compare_duration is not set: + * * security_center_properties.resource_project + * * security_center_properties.resource_project_display_name + * * security_center_properties.resource_type + * * security_center_properties.resource_parent + * * security_center_properties.resource_parent_display_name + * The following fields are supported when compare_duration is set: + * * security_center_properties.resource_type + * * security_center_properties.resource_project_display_name + * * security_center_properties.resource_parent_display_name + * + * Generated from protobuf field string group_by = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setGroupBy($var) + { + GPBUtil::checkString($var, True); + $this->group_by = $var; + + return $this; + } + + /** + * When compare_duration is set, the GroupResult's "state_change" property is + * updated to indicate whether the asset was added, removed, or remained + * present during the compare_duration period of time that precedes the + * read_time. This is the time between (read_time - compare_duration) and + * read_time. + * The state change value is derived based on the presence of the asset at the + * two points in time. Intermediate state changes between the two times don't + * affect the result. For example, the results aren't affected if the asset is + * removed and re-created again. + * Possible "state_change" values when compare_duration is specified: + * * "ADDED": indicates that the asset was not present at the start of + * compare_duration, but present at reference_time. + * * "REMOVED": indicates that the asset was present at the start of + * compare_duration, but not present at reference_time. + * * "ACTIVE": indicates that the asset was present at both the + * start and the end of the time period defined by + * compare_duration and reference_time. + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all assets present at + * read_time. + * If this field is set then `state_change` must be a specified field in + * `group_by`. + * + * Generated from protobuf field .google.protobuf.Duration compare_duration = 4; + * @return \Google\Protobuf\Duration|null + */ + public function getCompareDuration() + { + return $this->compare_duration; + } + + public function hasCompareDuration() + { + return isset($this->compare_duration); + } + + public function clearCompareDuration() + { + unset($this->compare_duration); + } + + /** + * When compare_duration is set, the GroupResult's "state_change" property is + * updated to indicate whether the asset was added, removed, or remained + * present during the compare_duration period of time that precedes the + * read_time. This is the time between (read_time - compare_duration) and + * read_time. + * The state change value is derived based on the presence of the asset at the + * two points in time. Intermediate state changes between the two times don't + * affect the result. For example, the results aren't affected if the asset is + * removed and re-created again. + * Possible "state_change" values when compare_duration is specified: + * * "ADDED": indicates that the asset was not present at the start of + * compare_duration, but present at reference_time. + * * "REMOVED": indicates that the asset was present at the start of + * compare_duration, but not present at reference_time. + * * "ACTIVE": indicates that the asset was present at both the + * start and the end of the time period defined by + * compare_duration and reference_time. + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all assets present at + * read_time. + * If this field is set then `state_change` must be a specified field in + * `group_by`. + * + * Generated from protobuf field .google.protobuf.Duration compare_duration = 4; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setCompareDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->compare_duration = $var; + + return $this; + } + + /** + * Time used as a reference point when filtering assets. The filter is limited + * to assets existing at the supplied time and their values are those at that + * specific time. Absence of this field will default to the API's version of + * NOW. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 5; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->read_time; + } + + public function hasReadTime() + { + return isset($this->read_time); + } + + public function clearReadTime() + { + unset($this->read_time); + } + + /** + * Time used as a reference point when filtering assets. The filter is limited + * to assets existing at the supplied time and their values are those at that + * specific time. Absence of this field will default to the API's version of + * NOW. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 5; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->read_time = $var; + + return $this; + } + + /** + * The value returned by the last `GroupAssetsResponse`; indicates + * that this is a continuation of a prior `GroupAssets` call, and that the + * system should return the next page of data. + * + * Generated from protobuf field string page_token = 7; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The value returned by the last `GroupAssetsResponse`; indicates + * that this is a continuation of a prior `GroupAssets` call, and that the + * system should return the next page of data. + * + * Generated from protobuf field string page_token = 7; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. + * + * Generated from protobuf field int32 page_size = 8; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. + * + * Generated from protobuf field int32 page_size = 8; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/GroupAssetsResponse.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/GroupAssetsResponse.php new file mode 100644 index 000000000000..e617f28d43a0 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/GroupAssetsResponse.php @@ -0,0 +1,191 @@ +google.cloud.securitycenter.v1p1beta1.GroupAssetsResponse + */ +class GroupAssetsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Group results. There exists an element for each existing unique + * combination of property/values. The element contains a count for the number + * of times those specific property/values appear. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1p1beta1.GroupResult group_by_results = 1; + */ + private $group_by_results; + /** + * Time used for executing the groupBy request. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 2; + */ + protected $read_time = null; + /** + * Token to retrieve the next page of results, or empty if there are no more + * results. + * + * Generated from protobuf field string next_page_token = 3; + */ + protected $next_page_token = ''; + /** + * The total number of results matching the query. + * + * Generated from protobuf field int32 total_size = 4; + */ + protected $total_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\SecurityCenter\V1p1beta1\GroupResult>|\Google\Protobuf\Internal\RepeatedField $group_by_results + * Group results. There exists an element for each existing unique + * combination of property/values. The element contains a count for the number + * of times those specific property/values appear. + * @type \Google\Protobuf\Timestamp $read_time + * Time used for executing the groupBy request. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no more + * results. + * @type int $total_size + * The total number of results matching the query. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Group results. There exists an element for each existing unique + * combination of property/values. The element contains a count for the number + * of times those specific property/values appear. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1p1beta1.GroupResult group_by_results = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getGroupByResults() + { + return $this->group_by_results; + } + + /** + * Group results. There exists an element for each existing unique + * combination of property/values. The element contains a count for the number + * of times those specific property/values appear. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1p1beta1.GroupResult group_by_results = 1; + * @param array<\Google\Cloud\SecurityCenter\V1p1beta1\GroupResult>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setGroupByResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1p1beta1\GroupResult::class); + $this->group_by_results = $arr; + + return $this; + } + + /** + * Time used for executing the groupBy request. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->read_time; + } + + public function hasReadTime() + { + return isset($this->read_time); + } + + public function clearReadTime() + { + unset($this->read_time); + } + + /** + * Time used for executing the groupBy request. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->read_time = $var; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results. + * + * Generated from protobuf field string next_page_token = 3; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results. + * + * Generated from protobuf field string next_page_token = 3; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * The total number of results matching the query. + * + * Generated from protobuf field int32 total_size = 4; + * @return int + */ + public function getTotalSize() + { + return $this->total_size; + } + + /** + * The total number of results matching the query. + * + * Generated from protobuf field int32 total_size = 4; + * @param int $var + * @return $this + */ + public function setTotalSize($var) + { + GPBUtil::checkInt32($var); + $this->total_size = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/GroupFindingsRequest.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/GroupFindingsRequest.php new file mode 100644 index 000000000000..1d1532312f30 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/GroupFindingsRequest.php @@ -0,0 +1,627 @@ +google.cloud.securitycenter.v1p1beta1.GroupFindingsRequest + */ +class GroupFindingsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the source to groupBy. Its format is + * "organizations/[organization_id]/sources/[source_id]", + * folders/[folder_id]/sources/[source_id], or + * projects/[project_id]/sources/[source_id]. To groupBy across all sources + * provide a source_id of `-`. For example: + * organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-, + * or projects/{project_id}/sources/- + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Expression that defines the filter to apply across findings. + * The expression is a list of one or more restrictions combined via logical + * operators `AND` and `OR`. + * Parentheses are supported, and `OR` has higher precedence than `AND`. + * Restrictions have the form ` ` and may have a `-` + * character in front of them to indicate negation. Examples include: + * * name + * * source_properties.a_property + * * security_marks.marks.marka + * The supported operators are: + * * `=` for all value types. + * * `>`, `<`, `>=`, `<=` for integer values. + * * `:`, meaning substring matching, for strings. + * The supported value types are: + * * string literals in quotes. + * * integer literals without quotes. + * * boolean literals `true` and `false` without quotes. + * The following field and operator combinations are supported: + * * name: `=` + * * parent: `=`, `:` + * * resource_name: `=`, `:` + * * state: `=`, `:` + * * category: `=`, `:` + * * external_uri: `=`, `:` + * * event_time: `=`, `>`, `<`, `>=`, `<=` + * * severity: `=`, `:` + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `event_time = "2019-06-10T16:07:18-07:00"` + * `event_time = 1560208038000` + * * security_marks.marks: `=`, `:` + * * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + * For example, `source_properties.size = 100` is a valid filter string. + * Use a partial match on the empty string to filter based on a property + * existing: `source_properties.my_property : ""` + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-source_properties.my_property : ""` + * + * Generated from protobuf field string filter = 2; + */ + protected $filter = ''; + /** + * Required. Expression that defines what assets fields to use for grouping (including + * `state_change`). The string value should follow SQL syntax: comma separated + * list of fields. For example: "parent,resource_name". + * The following fields are supported: + * * resource_name + * * category + * * state + * * parent + * * severity + * The following fields are supported when compare_duration is set: + * * state_change + * + * Generated from protobuf field string group_by = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $group_by = ''; + /** + * Time used as a reference point when filtering findings. The filter is + * limited to findings existing at the supplied time and their values are + * those at that specific time. Absence of this field will default to the + * API's version of NOW. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; + */ + protected $read_time = null; + /** + * When compare_duration is set, the GroupResult's "state_change" attribute is + * updated to indicate whether the finding had its state changed, the + * finding's state remained unchanged, or if the finding was added during the + * compare_duration period of time that precedes the read_time. This is the + * time between (read_time - compare_duration) and read_time. + * The state_change value is derived based on the presence and state of the + * finding at the two points in time. Intermediate state changes between the + * two times don't affect the result. For example, the results aren't affected + * if the finding is made inactive and then active again. + * Possible "state_change" values when compare_duration is specified: + * * "CHANGED": indicates that the finding was present and matched the given + * filter at the start of compare_duration, but changed its + * state at read_time. + * * "UNCHANGED": indicates that the finding was present and matched the given + * filter at the start of compare_duration and did not change + * state at read_time. + * * "ADDED": indicates that the finding did not match the given filter or + * was not present at the start of compare_duration, but was + * present at read_time. + * * "REMOVED": indicates that the finding was present and matched the + * filter at the start of compare_duration, but did not match + * the filter at read_time. + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all findings present + * at read_time. + * If this field is set then `state_change` must be a specified field in + * `group_by`. + * + * Generated from protobuf field .google.protobuf.Duration compare_duration = 5; + */ + protected $compare_duration = null; + /** + * The value returned by the last `GroupFindingsResponse`; indicates + * that this is a continuation of a prior `GroupFindings` call, and + * that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 7; + */ + protected $page_token = ''; + /** + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. + * + * Generated from protobuf field int32 page_size = 8; + */ + protected $page_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Name of the source to groupBy. Its format is + * "organizations/[organization_id]/sources/[source_id]", + * folders/[folder_id]/sources/[source_id], or + * projects/[project_id]/sources/[source_id]. To groupBy across all sources + * provide a source_id of `-`. For example: + * organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-, + * or projects/{project_id}/sources/- + * @type string $filter + * Expression that defines the filter to apply across findings. + * The expression is a list of one or more restrictions combined via logical + * operators `AND` and `OR`. + * Parentheses are supported, and `OR` has higher precedence than `AND`. + * Restrictions have the form ` ` and may have a `-` + * character in front of them to indicate negation. Examples include: + * * name + * * source_properties.a_property + * * security_marks.marks.marka + * The supported operators are: + * * `=` for all value types. + * * `>`, `<`, `>=`, `<=` for integer values. + * * `:`, meaning substring matching, for strings. + * The supported value types are: + * * string literals in quotes. + * * integer literals without quotes. + * * boolean literals `true` and `false` without quotes. + * The following field and operator combinations are supported: + * * name: `=` + * * parent: `=`, `:` + * * resource_name: `=`, `:` + * * state: `=`, `:` + * * category: `=`, `:` + * * external_uri: `=`, `:` + * * event_time: `=`, `>`, `<`, `>=`, `<=` + * * severity: `=`, `:` + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `event_time = "2019-06-10T16:07:18-07:00"` + * `event_time = 1560208038000` + * * security_marks.marks: `=`, `:` + * * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + * For example, `source_properties.size = 100` is a valid filter string. + * Use a partial match on the empty string to filter based on a property + * existing: `source_properties.my_property : ""` + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-source_properties.my_property : ""` + * @type string $group_by + * Required. Expression that defines what assets fields to use for grouping (including + * `state_change`). The string value should follow SQL syntax: comma separated + * list of fields. For example: "parent,resource_name". + * The following fields are supported: + * * resource_name + * * category + * * state + * * parent + * * severity + * The following fields are supported when compare_duration is set: + * * state_change + * @type \Google\Protobuf\Timestamp $read_time + * Time used as a reference point when filtering findings. The filter is + * limited to findings existing at the supplied time and their values are + * those at that specific time. Absence of this field will default to the + * API's version of NOW. + * @type \Google\Protobuf\Duration $compare_duration + * When compare_duration is set, the GroupResult's "state_change" attribute is + * updated to indicate whether the finding had its state changed, the + * finding's state remained unchanged, or if the finding was added during the + * compare_duration period of time that precedes the read_time. This is the + * time between (read_time - compare_duration) and read_time. + * The state_change value is derived based on the presence and state of the + * finding at the two points in time. Intermediate state changes between the + * two times don't affect the result. For example, the results aren't affected + * if the finding is made inactive and then active again. + * Possible "state_change" values when compare_duration is specified: + * * "CHANGED": indicates that the finding was present and matched the given + * filter at the start of compare_duration, but changed its + * state at read_time. + * * "UNCHANGED": indicates that the finding was present and matched the given + * filter at the start of compare_duration and did not change + * state at read_time. + * * "ADDED": indicates that the finding did not match the given filter or + * was not present at the start of compare_duration, but was + * present at read_time. + * * "REMOVED": indicates that the finding was present and matched the + * filter at the start of compare_duration, but did not match + * the filter at read_time. + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all findings present + * at read_time. + * If this field is set then `state_change` must be a specified field in + * `group_by`. + * @type string $page_token + * The value returned by the last `GroupFindingsResponse`; indicates + * that this is a continuation of a prior `GroupFindings` call, and + * that the system should return the next page of data. + * @type int $page_size + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the source to groupBy. Its format is + * "organizations/[organization_id]/sources/[source_id]", + * folders/[folder_id]/sources/[source_id], or + * projects/[project_id]/sources/[source_id]. To groupBy across all sources + * provide a source_id of `-`. For example: + * organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-, + * or projects/{project_id}/sources/- + * + * 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. Name of the source to groupBy. Its format is + * "organizations/[organization_id]/sources/[source_id]", + * folders/[folder_id]/sources/[source_id], or + * projects/[project_id]/sources/[source_id]. To groupBy across all sources + * provide a source_id of `-`. For example: + * organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-, + * or projects/{project_id}/sources/- + * + * 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; + } + + /** + * Expression that defines the filter to apply across findings. + * The expression is a list of one or more restrictions combined via logical + * operators `AND` and `OR`. + * Parentheses are supported, and `OR` has higher precedence than `AND`. + * Restrictions have the form ` ` and may have a `-` + * character in front of them to indicate negation. Examples include: + * * name + * * source_properties.a_property + * * security_marks.marks.marka + * The supported operators are: + * * `=` for all value types. + * * `>`, `<`, `>=`, `<=` for integer values. + * * `:`, meaning substring matching, for strings. + * The supported value types are: + * * string literals in quotes. + * * integer literals without quotes. + * * boolean literals `true` and `false` without quotes. + * The following field and operator combinations are supported: + * * name: `=` + * * parent: `=`, `:` + * * resource_name: `=`, `:` + * * state: `=`, `:` + * * category: `=`, `:` + * * external_uri: `=`, `:` + * * event_time: `=`, `>`, `<`, `>=`, `<=` + * * severity: `=`, `:` + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `event_time = "2019-06-10T16:07:18-07:00"` + * `event_time = 1560208038000` + * * security_marks.marks: `=`, `:` + * * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + * For example, `source_properties.size = 100` is a valid filter string. + * Use a partial match on the empty string to filter based on a property + * existing: `source_properties.my_property : ""` + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-source_properties.my_property : ""` + * + * Generated from protobuf field string filter = 2; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Expression that defines the filter to apply across findings. + * The expression is a list of one or more restrictions combined via logical + * operators `AND` and `OR`. + * Parentheses are supported, and `OR` has higher precedence than `AND`. + * Restrictions have the form ` ` and may have a `-` + * character in front of them to indicate negation. Examples include: + * * name + * * source_properties.a_property + * * security_marks.marks.marka + * The supported operators are: + * * `=` for all value types. + * * `>`, `<`, `>=`, `<=` for integer values. + * * `:`, meaning substring matching, for strings. + * The supported value types are: + * * string literals in quotes. + * * integer literals without quotes. + * * boolean literals `true` and `false` without quotes. + * The following field and operator combinations are supported: + * * name: `=` + * * parent: `=`, `:` + * * resource_name: `=`, `:` + * * state: `=`, `:` + * * category: `=`, `:` + * * external_uri: `=`, `:` + * * event_time: `=`, `>`, `<`, `>=`, `<=` + * * severity: `=`, `:` + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `event_time = "2019-06-10T16:07:18-07:00"` + * `event_time = 1560208038000` + * * security_marks.marks: `=`, `:` + * * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + * For example, `source_properties.size = 100` is a valid filter string. + * Use a partial match on the empty string to filter based on a property + * existing: `source_properties.my_property : ""` + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-source_properties.my_property : ""` + * + * Generated from protobuf field string filter = 2; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Required. Expression that defines what assets fields to use for grouping (including + * `state_change`). The string value should follow SQL syntax: comma separated + * list of fields. For example: "parent,resource_name". + * The following fields are supported: + * * resource_name + * * category + * * state + * * parent + * * severity + * The following fields are supported when compare_duration is set: + * * state_change + * + * Generated from protobuf field string group_by = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getGroupBy() + { + return $this->group_by; + } + + /** + * Required. Expression that defines what assets fields to use for grouping (including + * `state_change`). The string value should follow SQL syntax: comma separated + * list of fields. For example: "parent,resource_name". + * The following fields are supported: + * * resource_name + * * category + * * state + * * parent + * * severity + * The following fields are supported when compare_duration is set: + * * state_change + * + * Generated from protobuf field string group_by = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setGroupBy($var) + { + GPBUtil::checkString($var, True); + $this->group_by = $var; + + return $this; + } + + /** + * Time used as a reference point when filtering findings. The filter is + * limited to findings existing at the supplied time and their values are + * those at that specific time. Absence of this field will default to the + * API's version of NOW. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->read_time; + } + + public function hasReadTime() + { + return isset($this->read_time); + } + + public function clearReadTime() + { + unset($this->read_time); + } + + /** + * Time used as a reference point when filtering findings. The filter is + * limited to findings existing at the supplied time and their values are + * those at that specific time. Absence of this field will default to the + * API's version of NOW. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->read_time = $var; + + return $this; + } + + /** + * When compare_duration is set, the GroupResult's "state_change" attribute is + * updated to indicate whether the finding had its state changed, the + * finding's state remained unchanged, or if the finding was added during the + * compare_duration period of time that precedes the read_time. This is the + * time between (read_time - compare_duration) and read_time. + * The state_change value is derived based on the presence and state of the + * finding at the two points in time. Intermediate state changes between the + * two times don't affect the result. For example, the results aren't affected + * if the finding is made inactive and then active again. + * Possible "state_change" values when compare_duration is specified: + * * "CHANGED": indicates that the finding was present and matched the given + * filter at the start of compare_duration, but changed its + * state at read_time. + * * "UNCHANGED": indicates that the finding was present and matched the given + * filter at the start of compare_duration and did not change + * state at read_time. + * * "ADDED": indicates that the finding did not match the given filter or + * was not present at the start of compare_duration, but was + * present at read_time. + * * "REMOVED": indicates that the finding was present and matched the + * filter at the start of compare_duration, but did not match + * the filter at read_time. + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all findings present + * at read_time. + * If this field is set then `state_change` must be a specified field in + * `group_by`. + * + * Generated from protobuf field .google.protobuf.Duration compare_duration = 5; + * @return \Google\Protobuf\Duration|null + */ + public function getCompareDuration() + { + return $this->compare_duration; + } + + public function hasCompareDuration() + { + return isset($this->compare_duration); + } + + public function clearCompareDuration() + { + unset($this->compare_duration); + } + + /** + * When compare_duration is set, the GroupResult's "state_change" attribute is + * updated to indicate whether the finding had its state changed, the + * finding's state remained unchanged, or if the finding was added during the + * compare_duration period of time that precedes the read_time. This is the + * time between (read_time - compare_duration) and read_time. + * The state_change value is derived based on the presence and state of the + * finding at the two points in time. Intermediate state changes between the + * two times don't affect the result. For example, the results aren't affected + * if the finding is made inactive and then active again. + * Possible "state_change" values when compare_duration is specified: + * * "CHANGED": indicates that the finding was present and matched the given + * filter at the start of compare_duration, but changed its + * state at read_time. + * * "UNCHANGED": indicates that the finding was present and matched the given + * filter at the start of compare_duration and did not change + * state at read_time. + * * "ADDED": indicates that the finding did not match the given filter or + * was not present at the start of compare_duration, but was + * present at read_time. + * * "REMOVED": indicates that the finding was present and matched the + * filter at the start of compare_duration, but did not match + * the filter at read_time. + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all findings present + * at read_time. + * If this field is set then `state_change` must be a specified field in + * `group_by`. + * + * Generated from protobuf field .google.protobuf.Duration compare_duration = 5; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setCompareDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->compare_duration = $var; + + return $this; + } + + /** + * The value returned by the last `GroupFindingsResponse`; indicates + * that this is a continuation of a prior `GroupFindings` call, and + * that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 7; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The value returned by the last `GroupFindingsResponse`; indicates + * that this is a continuation of a prior `GroupFindings` call, and + * that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 7; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. + * + * Generated from protobuf field int32 page_size = 8; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. + * + * Generated from protobuf field int32 page_size = 8; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/GroupFindingsResponse.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/GroupFindingsResponse.php new file mode 100644 index 000000000000..08e112996742 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/GroupFindingsResponse.php @@ -0,0 +1,191 @@ +google.cloud.securitycenter.v1p1beta1.GroupFindingsResponse + */ +class GroupFindingsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Group results. There exists an element for each existing unique + * combination of property/values. The element contains a count for the number + * of times those specific property/values appear. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1p1beta1.GroupResult group_by_results = 1; + */ + private $group_by_results; + /** + * Time used for executing the groupBy request. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 2; + */ + protected $read_time = null; + /** + * Token to retrieve the next page of results, or empty if there are no more + * results. + * + * Generated from protobuf field string next_page_token = 3; + */ + protected $next_page_token = ''; + /** + * The total number of results matching the query. + * + * Generated from protobuf field int32 total_size = 4; + */ + protected $total_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\SecurityCenter\V1p1beta1\GroupResult>|\Google\Protobuf\Internal\RepeatedField $group_by_results + * Group results. There exists an element for each existing unique + * combination of property/values. The element contains a count for the number + * of times those specific property/values appear. + * @type \Google\Protobuf\Timestamp $read_time + * Time used for executing the groupBy request. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no more + * results. + * @type int $total_size + * The total number of results matching the query. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Group results. There exists an element for each existing unique + * combination of property/values. The element contains a count for the number + * of times those specific property/values appear. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1p1beta1.GroupResult group_by_results = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getGroupByResults() + { + return $this->group_by_results; + } + + /** + * Group results. There exists an element for each existing unique + * combination of property/values. The element contains a count for the number + * of times those specific property/values appear. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1p1beta1.GroupResult group_by_results = 1; + * @param array<\Google\Cloud\SecurityCenter\V1p1beta1\GroupResult>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setGroupByResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1p1beta1\GroupResult::class); + $this->group_by_results = $arr; + + return $this; + } + + /** + * Time used for executing the groupBy request. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->read_time; + } + + public function hasReadTime() + { + return isset($this->read_time); + } + + public function clearReadTime() + { + unset($this->read_time); + } + + /** + * Time used for executing the groupBy request. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->read_time = $var; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results. + * + * Generated from protobuf field string next_page_token = 3; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results. + * + * Generated from protobuf field string next_page_token = 3; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * The total number of results matching the query. + * + * Generated from protobuf field int32 total_size = 4; + * @return int + */ + public function getTotalSize() + { + return $this->total_size; + } + + /** + * The total number of results matching the query. + * + * Generated from protobuf field int32 total_size = 4; + * @param int $var + * @return $this + */ + public function setTotalSize($var) + { + GPBUtil::checkInt32($var); + $this->total_size = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/GroupResult.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/GroupResult.php new file mode 100644 index 000000000000..5abaf409e1ce --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/GroupResult.php @@ -0,0 +1,101 @@ +google.cloud.securitycenter.v1p1beta1.GroupResult + */ +class GroupResult extends \Google\Protobuf\Internal\Message +{ + /** + * Properties matching the groupBy fields in the request. + * + * Generated from protobuf field map properties = 1; + */ + private $properties; + /** + * Total count of resources for the given properties. + * + * Generated from protobuf field int64 count = 2; + */ + protected $count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\MapField $properties + * Properties matching the groupBy fields in the request. + * @type int|string $count + * Total count of resources for the given properties. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Properties matching the groupBy fields in the request. + * + * Generated from protobuf field map properties = 1; + * @return \Google\Protobuf\Internal\MapField + */ + public function getProperties() + { + return $this->properties; + } + + /** + * Properties matching the groupBy fields in the request. + * + * Generated from protobuf field map properties = 1; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setProperties($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Value::class); + $this->properties = $arr; + + return $this; + } + + /** + * Total count of resources for the given properties. + * + * Generated from protobuf field int64 count = 2; + * @return int|string + */ + public function getCount() + { + return $this->count; + } + + /** + * Total count of resources for the given properties. + * + * Generated from protobuf field int64 count = 2; + * @param int|string $var + * @return $this + */ + public function setCount($var) + { + GPBUtil::checkInt64($var); + $this->count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListAssetsRequest.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListAssetsRequest.php new file mode 100644 index 000000000000..a0a4531e7d95 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListAssetsRequest.php @@ -0,0 +1,711 @@ +google.cloud.securitycenter.v1p1beta1.ListAssetsRequest + */ +class ListAssetsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the organization assets should belong to. Its format is + * "organizations/[organization_id], folders/[folder_id], or + * projects/[project_id]". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Expression that defines the filter to apply across assets. + * The expression is a list of zero or more restrictions combined via logical + * operators `AND` and `OR`. + * Parentheses are supported, and `OR` has higher precedence than `AND`. + * Restrictions have the form ` ` and may have a `-` + * character in front of them to indicate negation. The fields map to those + * defined in the Asset resource. Examples include: + * * name + * * security_center_properties.resource_name + * * resource_properties.a_property + * * security_marks.marks.marka + * The supported operators are: + * * `=` for all value types. + * * `>`, `<`, `>=`, `<=` for integer values. + * * `:`, meaning substring matching, for strings. + * The supported value types are: + * * string literals in quotes. + * * integer literals without quotes. + * * boolean literals `true` and `false` without quotes. + * The following are the allowed field and operator combinations: + * * name: `=` + * * update_time: `=`, `>`, `<`, `>=`, `<=` + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `update_time = "2019-06-10T16:07:18-07:00"` + * `update_time = 1560208038000` + * * create_time: `=`, `>`, `<`, `>=`, `<=` + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `create_time = "2019-06-10T16:07:18-07:00"` + * `create_time = 1560208038000` + * * iam_policy.policy_blob: `=`, `:` + * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + * * security_marks.marks: `=`, `:` + * * security_center_properties.resource_name: `=`, `:` + * * security_center_properties.resource_display_name: `=`, `:` + * * security_center_properties.resource_type: `=`, `:` + * * security_center_properties.resource_parent: `=`, `:` + * * security_center_properties.resource_parent_display_name: `=`, `:` + * * security_center_properties.resource_project: `=`, `:` + * * security_center_properties.resource_project_display_name: `=`, `:` + * * security_center_properties.resource_owners: `=`, `:` + * For example, `resource_properties.size = 100` is a valid filter string. + * Use a partial match on the empty string to filter based on a property + * existing: `resource_properties.my_property : ""` + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-resource_properties.my_property : ""` + * + * Generated from protobuf field string filter = 2; + */ + protected $filter = ''; + /** + * Expression that defines what fields and order to use for sorting. The + * string value should follow SQL syntax: comma separated list of fields. For + * example: "name,resource_properties.a_property". The default sorting order + * is ascending. To specify descending order for a field, a suffix " desc" + * should be appended to the field name. For example: "name + * desc,resource_properties.a_property". Redundant space characters in the + * syntax are insignificant. "name desc,resource_properties.a_property" and " + * name desc , resource_properties.a_property " are equivalent. + * The following fields are supported: + * name + * update_time + * resource_properties + * security_marks.marks + * security_center_properties.resource_name + * security_center_properties.resource_display_name + * security_center_properties.resource_parent + * security_center_properties.resource_parent_display_name + * security_center_properties.resource_project + * security_center_properties.resource_project_display_name + * security_center_properties.resource_type + * + * Generated from protobuf field string order_by = 3; + */ + protected $order_by = ''; + /** + * Time used as a reference point when filtering assets. The filter is limited + * to assets existing at the supplied time and their values are those at that + * specific time. Absence of this field will default to the API's version of + * NOW. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; + */ + protected $read_time = null; + /** + * When compare_duration is set, the ListAssetsResult's "state_change" + * attribute is updated to indicate whether the asset was added, removed, or + * remained present during the compare_duration period of time that precedes + * the read_time. This is the time between (read_time - compare_duration) and + * read_time. + * The state_change value is derived based on the presence of the asset at the + * two points in time. Intermediate state changes between the two times don't + * affect the result. For example, the results aren't affected if the asset is + * removed and re-created again. + * Possible "state_change" values when compare_duration is specified: + * * "ADDED": indicates that the asset was not present at the start of + * compare_duration, but present at read_time. + * * "REMOVED": indicates that the asset was present at the start of + * compare_duration, but not present at read_time. + * * "ACTIVE": indicates that the asset was present at both the + * start and the end of the time period defined by + * compare_duration and read_time. + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all assets present at + * read_time. + * + * Generated from protobuf field .google.protobuf.Duration compare_duration = 5; + */ + protected $compare_duration = null; + /** + * A field mask to specify the ListAssetsResult fields to be listed in the + * response. + * An empty field mask will list all fields. + * + * Generated from protobuf field .google.protobuf.FieldMask field_mask = 7; + */ + protected $field_mask = null; + /** + * The value returned by the last `ListAssetsResponse`; indicates + * that this is a continuation of a prior `ListAssets` call, and + * that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 8; + */ + protected $page_token = ''; + /** + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. + * + * Generated from protobuf field int32 page_size = 9; + */ + protected $page_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Name of the organization assets should belong to. Its format is + * "organizations/[organization_id], folders/[folder_id], or + * projects/[project_id]". + * @type string $filter + * Expression that defines the filter to apply across assets. + * The expression is a list of zero or more restrictions combined via logical + * operators `AND` and `OR`. + * Parentheses are supported, and `OR` has higher precedence than `AND`. + * Restrictions have the form ` ` and may have a `-` + * character in front of them to indicate negation. The fields map to those + * defined in the Asset resource. Examples include: + * * name + * * security_center_properties.resource_name + * * resource_properties.a_property + * * security_marks.marks.marka + * The supported operators are: + * * `=` for all value types. + * * `>`, `<`, `>=`, `<=` for integer values. + * * `:`, meaning substring matching, for strings. + * The supported value types are: + * * string literals in quotes. + * * integer literals without quotes. + * * boolean literals `true` and `false` without quotes. + * The following are the allowed field and operator combinations: + * * name: `=` + * * update_time: `=`, `>`, `<`, `>=`, `<=` + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `update_time = "2019-06-10T16:07:18-07:00"` + * `update_time = 1560208038000` + * * create_time: `=`, `>`, `<`, `>=`, `<=` + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `create_time = "2019-06-10T16:07:18-07:00"` + * `create_time = 1560208038000` + * * iam_policy.policy_blob: `=`, `:` + * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + * * security_marks.marks: `=`, `:` + * * security_center_properties.resource_name: `=`, `:` + * * security_center_properties.resource_display_name: `=`, `:` + * * security_center_properties.resource_type: `=`, `:` + * * security_center_properties.resource_parent: `=`, `:` + * * security_center_properties.resource_parent_display_name: `=`, `:` + * * security_center_properties.resource_project: `=`, `:` + * * security_center_properties.resource_project_display_name: `=`, `:` + * * security_center_properties.resource_owners: `=`, `:` + * For example, `resource_properties.size = 100` is a valid filter string. + * Use a partial match on the empty string to filter based on a property + * existing: `resource_properties.my_property : ""` + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-resource_properties.my_property : ""` + * @type string $order_by + * Expression that defines what fields and order to use for sorting. The + * string value should follow SQL syntax: comma separated list of fields. For + * example: "name,resource_properties.a_property". The default sorting order + * is ascending. To specify descending order for a field, a suffix " desc" + * should be appended to the field name. For example: "name + * desc,resource_properties.a_property". Redundant space characters in the + * syntax are insignificant. "name desc,resource_properties.a_property" and " + * name desc , resource_properties.a_property " are equivalent. + * The following fields are supported: + * name + * update_time + * resource_properties + * security_marks.marks + * security_center_properties.resource_name + * security_center_properties.resource_display_name + * security_center_properties.resource_parent + * security_center_properties.resource_parent_display_name + * security_center_properties.resource_project + * security_center_properties.resource_project_display_name + * security_center_properties.resource_type + * @type \Google\Protobuf\Timestamp $read_time + * Time used as a reference point when filtering assets. The filter is limited + * to assets existing at the supplied time and their values are those at that + * specific time. Absence of this field will default to the API's version of + * NOW. + * @type \Google\Protobuf\Duration $compare_duration + * When compare_duration is set, the ListAssetsResult's "state_change" + * attribute is updated to indicate whether the asset was added, removed, or + * remained present during the compare_duration period of time that precedes + * the read_time. This is the time between (read_time - compare_duration) and + * read_time. + * The state_change value is derived based on the presence of the asset at the + * two points in time. Intermediate state changes between the two times don't + * affect the result. For example, the results aren't affected if the asset is + * removed and re-created again. + * Possible "state_change" values when compare_duration is specified: + * * "ADDED": indicates that the asset was not present at the start of + * compare_duration, but present at read_time. + * * "REMOVED": indicates that the asset was present at the start of + * compare_duration, but not present at read_time. + * * "ACTIVE": indicates that the asset was present at both the + * start and the end of the time period defined by + * compare_duration and read_time. + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all assets present at + * read_time. + * @type \Google\Protobuf\FieldMask $field_mask + * A field mask to specify the ListAssetsResult fields to be listed in the + * response. + * An empty field mask will list all fields. + * @type string $page_token + * The value returned by the last `ListAssetsResponse`; indicates + * that this is a continuation of a prior `ListAssets` call, and + * that the system should return the next page of data. + * @type int $page_size + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the organization assets should belong to. Its format is + * "organizations/[organization_id], folders/[folder_id], or + * projects/[project_id]". + * + * 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. Name of the organization assets should belong to. Its format is + * "organizations/[organization_id], folders/[folder_id], or + * projects/[project_id]". + * + * 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; + } + + /** + * Expression that defines the filter to apply across assets. + * The expression is a list of zero or more restrictions combined via logical + * operators `AND` and `OR`. + * Parentheses are supported, and `OR` has higher precedence than `AND`. + * Restrictions have the form ` ` and may have a `-` + * character in front of them to indicate negation. The fields map to those + * defined in the Asset resource. Examples include: + * * name + * * security_center_properties.resource_name + * * resource_properties.a_property + * * security_marks.marks.marka + * The supported operators are: + * * `=` for all value types. + * * `>`, `<`, `>=`, `<=` for integer values. + * * `:`, meaning substring matching, for strings. + * The supported value types are: + * * string literals in quotes. + * * integer literals without quotes. + * * boolean literals `true` and `false` without quotes. + * The following are the allowed field and operator combinations: + * * name: `=` + * * update_time: `=`, `>`, `<`, `>=`, `<=` + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `update_time = "2019-06-10T16:07:18-07:00"` + * `update_time = 1560208038000` + * * create_time: `=`, `>`, `<`, `>=`, `<=` + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `create_time = "2019-06-10T16:07:18-07:00"` + * `create_time = 1560208038000` + * * iam_policy.policy_blob: `=`, `:` + * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + * * security_marks.marks: `=`, `:` + * * security_center_properties.resource_name: `=`, `:` + * * security_center_properties.resource_display_name: `=`, `:` + * * security_center_properties.resource_type: `=`, `:` + * * security_center_properties.resource_parent: `=`, `:` + * * security_center_properties.resource_parent_display_name: `=`, `:` + * * security_center_properties.resource_project: `=`, `:` + * * security_center_properties.resource_project_display_name: `=`, `:` + * * security_center_properties.resource_owners: `=`, `:` + * For example, `resource_properties.size = 100` is a valid filter string. + * Use a partial match on the empty string to filter based on a property + * existing: `resource_properties.my_property : ""` + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-resource_properties.my_property : ""` + * + * Generated from protobuf field string filter = 2; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Expression that defines the filter to apply across assets. + * The expression is a list of zero or more restrictions combined via logical + * operators `AND` and `OR`. + * Parentheses are supported, and `OR` has higher precedence than `AND`. + * Restrictions have the form ` ` and may have a `-` + * character in front of them to indicate negation. The fields map to those + * defined in the Asset resource. Examples include: + * * name + * * security_center_properties.resource_name + * * resource_properties.a_property + * * security_marks.marks.marka + * The supported operators are: + * * `=` for all value types. + * * `>`, `<`, `>=`, `<=` for integer values. + * * `:`, meaning substring matching, for strings. + * The supported value types are: + * * string literals in quotes. + * * integer literals without quotes. + * * boolean literals `true` and `false` without quotes. + * The following are the allowed field and operator combinations: + * * name: `=` + * * update_time: `=`, `>`, `<`, `>=`, `<=` + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `update_time = "2019-06-10T16:07:18-07:00"` + * `update_time = 1560208038000` + * * create_time: `=`, `>`, `<`, `>=`, `<=` + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `create_time = "2019-06-10T16:07:18-07:00"` + * `create_time = 1560208038000` + * * iam_policy.policy_blob: `=`, `:` + * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + * * security_marks.marks: `=`, `:` + * * security_center_properties.resource_name: `=`, `:` + * * security_center_properties.resource_display_name: `=`, `:` + * * security_center_properties.resource_type: `=`, `:` + * * security_center_properties.resource_parent: `=`, `:` + * * security_center_properties.resource_parent_display_name: `=`, `:` + * * security_center_properties.resource_project: `=`, `:` + * * security_center_properties.resource_project_display_name: `=`, `:` + * * security_center_properties.resource_owners: `=`, `:` + * For example, `resource_properties.size = 100` is a valid filter string. + * Use a partial match on the empty string to filter based on a property + * existing: `resource_properties.my_property : ""` + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-resource_properties.my_property : ""` + * + * Generated from protobuf field string filter = 2; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Expression that defines what fields and order to use for sorting. The + * string value should follow SQL syntax: comma separated list of fields. For + * example: "name,resource_properties.a_property". The default sorting order + * is ascending. To specify descending order for a field, a suffix " desc" + * should be appended to the field name. For example: "name + * desc,resource_properties.a_property". Redundant space characters in the + * syntax are insignificant. "name desc,resource_properties.a_property" and " + * name desc , resource_properties.a_property " are equivalent. + * The following fields are supported: + * name + * update_time + * resource_properties + * security_marks.marks + * security_center_properties.resource_name + * security_center_properties.resource_display_name + * security_center_properties.resource_parent + * security_center_properties.resource_parent_display_name + * security_center_properties.resource_project + * security_center_properties.resource_project_display_name + * security_center_properties.resource_type + * + * Generated from protobuf field string order_by = 3; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Expression that defines what fields and order to use for sorting. The + * string value should follow SQL syntax: comma separated list of fields. For + * example: "name,resource_properties.a_property". The default sorting order + * is ascending. To specify descending order for a field, a suffix " desc" + * should be appended to the field name. For example: "name + * desc,resource_properties.a_property". Redundant space characters in the + * syntax are insignificant. "name desc,resource_properties.a_property" and " + * name desc , resource_properties.a_property " are equivalent. + * The following fields are supported: + * name + * update_time + * resource_properties + * security_marks.marks + * security_center_properties.resource_name + * security_center_properties.resource_display_name + * security_center_properties.resource_parent + * security_center_properties.resource_parent_display_name + * security_center_properties.resource_project + * security_center_properties.resource_project_display_name + * security_center_properties.resource_type + * + * Generated from protobuf field string order_by = 3; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Time used as a reference point when filtering assets. The filter is limited + * to assets existing at the supplied time and their values are those at that + * specific time. Absence of this field will default to the API's version of + * NOW. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->read_time; + } + + public function hasReadTime() + { + return isset($this->read_time); + } + + public function clearReadTime() + { + unset($this->read_time); + } + + /** + * Time used as a reference point when filtering assets. The filter is limited + * to assets existing at the supplied time and their values are those at that + * specific time. Absence of this field will default to the API's version of + * NOW. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->read_time = $var; + + return $this; + } + + /** + * When compare_duration is set, the ListAssetsResult's "state_change" + * attribute is updated to indicate whether the asset was added, removed, or + * remained present during the compare_duration period of time that precedes + * the read_time. This is the time between (read_time - compare_duration) and + * read_time. + * The state_change value is derived based on the presence of the asset at the + * two points in time. Intermediate state changes between the two times don't + * affect the result. For example, the results aren't affected if the asset is + * removed and re-created again. + * Possible "state_change" values when compare_duration is specified: + * * "ADDED": indicates that the asset was not present at the start of + * compare_duration, but present at read_time. + * * "REMOVED": indicates that the asset was present at the start of + * compare_duration, but not present at read_time. + * * "ACTIVE": indicates that the asset was present at both the + * start and the end of the time period defined by + * compare_duration and read_time. + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all assets present at + * read_time. + * + * Generated from protobuf field .google.protobuf.Duration compare_duration = 5; + * @return \Google\Protobuf\Duration|null + */ + public function getCompareDuration() + { + return $this->compare_duration; + } + + public function hasCompareDuration() + { + return isset($this->compare_duration); + } + + public function clearCompareDuration() + { + unset($this->compare_duration); + } + + /** + * When compare_duration is set, the ListAssetsResult's "state_change" + * attribute is updated to indicate whether the asset was added, removed, or + * remained present during the compare_duration period of time that precedes + * the read_time. This is the time between (read_time - compare_duration) and + * read_time. + * The state_change value is derived based on the presence of the asset at the + * two points in time. Intermediate state changes between the two times don't + * affect the result. For example, the results aren't affected if the asset is + * removed and re-created again. + * Possible "state_change" values when compare_duration is specified: + * * "ADDED": indicates that the asset was not present at the start of + * compare_duration, but present at read_time. + * * "REMOVED": indicates that the asset was present at the start of + * compare_duration, but not present at read_time. + * * "ACTIVE": indicates that the asset was present at both the + * start and the end of the time period defined by + * compare_duration and read_time. + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all assets present at + * read_time. + * + * Generated from protobuf field .google.protobuf.Duration compare_duration = 5; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setCompareDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->compare_duration = $var; + + return $this; + } + + /** + * A field mask to specify the ListAssetsResult fields to be listed in the + * response. + * An empty field mask will list all fields. + * + * Generated from protobuf field .google.protobuf.FieldMask field_mask = 7; + * @return \Google\Protobuf\FieldMask|null + */ + public function getFieldMask() + { + return $this->field_mask; + } + + public function hasFieldMask() + { + return isset($this->field_mask); + } + + public function clearFieldMask() + { + unset($this->field_mask); + } + + /** + * A field mask to specify the ListAssetsResult fields to be listed in the + * response. + * An empty field mask will list all fields. + * + * Generated from protobuf field .google.protobuf.FieldMask field_mask = 7; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setFieldMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->field_mask = $var; + + return $this; + } + + /** + * The value returned by the last `ListAssetsResponse`; indicates + * that this is a continuation of a prior `ListAssets` call, and + * that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 8; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The value returned by the last `ListAssetsResponse`; indicates + * that this is a continuation of a prior `ListAssets` call, and + * that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 8; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. + * + * Generated from protobuf field int32 page_size = 9; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. + * + * Generated from protobuf field int32 page_size = 9; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListAssetsResponse.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListAssetsResponse.php new file mode 100644 index 000000000000..c1c510821ecf --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListAssetsResponse.php @@ -0,0 +1,183 @@ +google.cloud.securitycenter.v1p1beta1.ListAssetsResponse + */ +class ListAssetsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Assets matching the list request. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1p1beta1.ListAssetsResponse.ListAssetsResult list_assets_results = 1; + */ + private $list_assets_results; + /** + * Time used for executing the list request. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 2; + */ + protected $read_time = null; + /** + * Token to retrieve the next page of results, or empty if there are no more + * results. + * + * Generated from protobuf field string next_page_token = 3; + */ + protected $next_page_token = ''; + /** + * The total number of assets matching the query. + * + * Generated from protobuf field int32 total_size = 4; + */ + protected $total_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\SecurityCenter\V1p1beta1\ListAssetsResponse\ListAssetsResult>|\Google\Protobuf\Internal\RepeatedField $list_assets_results + * Assets matching the list request. + * @type \Google\Protobuf\Timestamp $read_time + * Time used for executing the list request. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no more + * results. + * @type int $total_size + * The total number of assets matching the query. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Assets matching the list request. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1p1beta1.ListAssetsResponse.ListAssetsResult list_assets_results = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getListAssetsResults() + { + return $this->list_assets_results; + } + + /** + * Assets matching the list request. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1p1beta1.ListAssetsResponse.ListAssetsResult list_assets_results = 1; + * @param array<\Google\Cloud\SecurityCenter\V1p1beta1\ListAssetsResponse\ListAssetsResult>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setListAssetsResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1p1beta1\ListAssetsResponse\ListAssetsResult::class); + $this->list_assets_results = $arr; + + return $this; + } + + /** + * Time used for executing the list request. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->read_time; + } + + public function hasReadTime() + { + return isset($this->read_time); + } + + public function clearReadTime() + { + unset($this->read_time); + } + + /** + * Time used for executing the list request. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->read_time = $var; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results. + * + * Generated from protobuf field string next_page_token = 3; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results. + * + * Generated from protobuf field string next_page_token = 3; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * The total number of assets matching the query. + * + * Generated from protobuf field int32 total_size = 4; + * @return int + */ + public function getTotalSize() + { + return $this->total_size; + } + + /** + * The total number of assets matching the query. + * + * Generated from protobuf field int32 total_size = 4; + * @param int $var + * @return $this + */ + public function setTotalSize($var) + { + GPBUtil::checkInt32($var); + $this->total_size = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListAssetsResponse/ListAssetsResult.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListAssetsResponse/ListAssetsResult.php new file mode 100644 index 000000000000..4e9003862dd2 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListAssetsResponse/ListAssetsResult.php @@ -0,0 +1,114 @@ +google.cloud.securitycenter.v1p1beta1.ListAssetsResponse.ListAssetsResult + */ +class ListAssetsResult extends \Google\Protobuf\Internal\Message +{ + /** + * Asset matching the search request. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Asset asset = 1; + */ + protected $asset = null; + /** + * State change of the asset between the points in time. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.ListAssetsResponse.ListAssetsResult.StateChange state_change = 2; + */ + protected $state_change = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\SecurityCenter\V1p1beta1\Asset $asset + * Asset matching the search request. + * @type int $state_change + * State change of the asset between the points in time. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Asset matching the search request. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Asset asset = 1; + * @return \Google\Cloud\SecurityCenter\V1p1beta1\Asset|null + */ + public function getAsset() + { + return $this->asset; + } + + public function hasAsset() + { + return isset($this->asset); + } + + public function clearAsset() + { + unset($this->asset); + } + + /** + * Asset matching the search request. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Asset asset = 1; + * @param \Google\Cloud\SecurityCenter\V1p1beta1\Asset $var + * @return $this + */ + public function setAsset($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1p1beta1\Asset::class); + $this->asset = $var; + + return $this; + } + + /** + * State change of the asset between the points in time. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.ListAssetsResponse.ListAssetsResult.StateChange state_change = 2; + * @return int + */ + public function getStateChange() + { + return $this->state_change; + } + + /** + * State change of the asset between the points in time. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.ListAssetsResponse.ListAssetsResult.StateChange state_change = 2; + * @param int $var + * @return $this + */ + public function setStateChange($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1p1beta1\ListAssetsResponse\ListAssetsResult\StateChange::class); + $this->state_change = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ListAssetsResult::class, \Google\Cloud\SecurityCenter\V1p1beta1\ListAssetsResponse_ListAssetsResult::class); + diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListAssetsResponse/ListAssetsResult/StateChange.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListAssetsResponse/ListAssetsResult/StateChange.php new file mode 100644 index 000000000000..2ef0a7011948 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListAssetsResponse/ListAssetsResult/StateChange.php @@ -0,0 +1,75 @@ +google.cloud.securitycenter.v1p1beta1.ListAssetsResponse.ListAssetsResult.StateChange + */ +class StateChange +{ + /** + * State change is unused, this is the canonical default for this enum. + * + * Generated from protobuf enum UNUSED = 0; + */ + const UNUSED = 0; + /** + * Asset was added between the points in time. + * + * Generated from protobuf enum ADDED = 1; + */ + const ADDED = 1; + /** + * Asset was removed between the points in time. + * + * Generated from protobuf enum REMOVED = 2; + */ + const REMOVED = 2; + /** + * Asset was present at both point(s) in time. + * + * Generated from protobuf enum ACTIVE = 3; + */ + const ACTIVE = 3; + + private static $valueToName = [ + self::UNUSED => 'UNUSED', + self::ADDED => 'ADDED', + self::REMOVED => 'REMOVED', + self::ACTIVE => 'ACTIVE', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(StateChange::class, \Google\Cloud\SecurityCenter\V1p1beta1\ListAssetsResponse_ListAssetsResult_StateChange::class); + diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListAssetsResponse_ListAssetsResult.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListAssetsResponse_ListAssetsResult.php new file mode 100644 index 000000000000..4dbc0b0f898e --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListAssetsResponse_ListAssetsResult.php @@ -0,0 +1,16 @@ +google.cloud.securitycenter.v1p1beta1.ListFindingsRequest + */ +class ListFindingsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the source the findings belong to. Its format is + * "organizations/[organization_id]/sources/[source_id], + * folders/[folder_id]/sources/[source_id], or + * projects/[project_id]/sources/[source_id]". To list across all sources + * provide a source_id of `-`. For example: + * organizations/{organization_id}/sources/-, folders/{folder_id}/sources/- or + * projects/{projects_id}/sources/- + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Expression that defines the filter to apply across findings. + * The expression is a list of one or more restrictions combined via logical + * operators `AND` and `OR`. + * Parentheses are supported, and `OR` has higher precedence than `AND`. + * Restrictions have the form ` ` and may have a `-` + * character in front of them to indicate negation. Examples include: + * * name + * * source_properties.a_property + * * security_marks.marks.marka + * The supported operators are: + * * `=` for all value types. + * * `>`, `<`, `>=`, `<=` for integer values. + * * `:`, meaning substring matching, for strings. + * The supported value types are: + * * string literals in quotes. + * * integer literals without quotes. + * * boolean literals `true` and `false` without quotes. + * The following field and operator combinations are supported: + * * name: `=` + * * parent: `=`, `:` + * * resource_name: `=`, `:` + * * state: `=`, `:` + * * category: `=`, `:` + * * external_uri: `=`, `:` + * * event_time: `=`, `>`, `<`, `>=`, `<=` + * * severity: `=`, `:` + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `event_time = "2019-06-10T16:07:18-07:00"` + * `event_time = 1560208038000` + * security_marks.marks: `=`, `:` + * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + * For example, `source_properties.size = 100` is a valid filter string. + * Use a partial match on the empty string to filter based on a property + * existing: `source_properties.my_property : ""` + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-source_properties.my_property : ""` + * + * Generated from protobuf field string filter = 2; + */ + protected $filter = ''; + /** + * Expression that defines what fields and order to use for sorting. The + * string value should follow SQL syntax: comma separated list of fields. For + * example: "name,resource_properties.a_property". The default sorting order + * is ascending. To specify descending order for a field, a suffix " desc" + * should be appended to the field name. For example: "name + * desc,source_properties.a_property". Redundant space characters in the + * syntax are insignificant. "name desc,source_properties.a_property" and " + * name desc , source_properties.a_property " are equivalent. + * The following fields are supported: + * name + * parent + * state + * category + * resource_name + * event_time + * source_properties + * security_marks.marks + * + * Generated from protobuf field string order_by = 3; + */ + protected $order_by = ''; + /** + * Time used as a reference point when filtering findings. The filter is + * limited to findings existing at the supplied time and their values are + * those at that specific time. Absence of this field will default to the + * API's version of NOW. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; + */ + protected $read_time = null; + /** + * When compare_duration is set, the ListFindingsResult's "state_change" + * attribute is updated to indicate whether the finding had its state changed, + * the finding's state remained unchanged, or if the finding was added in any + * state during the compare_duration period of time that precedes the + * read_time. This is the time between (read_time - compare_duration) and + * read_time. + * The state_change value is derived based on the presence and state of the + * finding at the two points in time. Intermediate state changes between the + * two times don't affect the result. For example, the results aren't affected + * if the finding is made inactive and then active again. + * Possible "state_change" values when compare_duration is specified: + * * "CHANGED": indicates that the finding was present and matched the given + * filter at the start of compare_duration, but changed its + * state at read_time. + * * "UNCHANGED": indicates that the finding was present and matched the given + * filter at the start of compare_duration and did not change + * state at read_time. + * * "ADDED": indicates that the finding did not match the given filter or + * was not present at the start of compare_duration, but was + * present at read_time. + * * "REMOVED": indicates that the finding was present and matched the + * filter at the start of compare_duration, but did not match + * the filter at read_time. + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all findings present at + * read_time. + * + * Generated from protobuf field .google.protobuf.Duration compare_duration = 5; + */ + protected $compare_duration = null; + /** + * A field mask to specify the Finding fields to be listed in the response. + * An empty field mask will list all fields. + * + * Generated from protobuf field .google.protobuf.FieldMask field_mask = 7; + */ + protected $field_mask = null; + /** + * The value returned by the last `ListFindingsResponse`; indicates + * that this is a continuation of a prior `ListFindings` call, and + * that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 8; + */ + protected $page_token = ''; + /** + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. + * + * Generated from protobuf field int32 page_size = 9; + */ + protected $page_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Name of the source the findings belong to. Its format is + * "organizations/[organization_id]/sources/[source_id], + * folders/[folder_id]/sources/[source_id], or + * projects/[project_id]/sources/[source_id]". To list across all sources + * provide a source_id of `-`. For example: + * organizations/{organization_id}/sources/-, folders/{folder_id}/sources/- or + * projects/{projects_id}/sources/- + * @type string $filter + * Expression that defines the filter to apply across findings. + * The expression is a list of one or more restrictions combined via logical + * operators `AND` and `OR`. + * Parentheses are supported, and `OR` has higher precedence than `AND`. + * Restrictions have the form ` ` and may have a `-` + * character in front of them to indicate negation. Examples include: + * * name + * * source_properties.a_property + * * security_marks.marks.marka + * The supported operators are: + * * `=` for all value types. + * * `>`, `<`, `>=`, `<=` for integer values. + * * `:`, meaning substring matching, for strings. + * The supported value types are: + * * string literals in quotes. + * * integer literals without quotes. + * * boolean literals `true` and `false` without quotes. + * The following field and operator combinations are supported: + * * name: `=` + * * parent: `=`, `:` + * * resource_name: `=`, `:` + * * state: `=`, `:` + * * category: `=`, `:` + * * external_uri: `=`, `:` + * * event_time: `=`, `>`, `<`, `>=`, `<=` + * * severity: `=`, `:` + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `event_time = "2019-06-10T16:07:18-07:00"` + * `event_time = 1560208038000` + * security_marks.marks: `=`, `:` + * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + * For example, `source_properties.size = 100` is a valid filter string. + * Use a partial match on the empty string to filter based on a property + * existing: `source_properties.my_property : ""` + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-source_properties.my_property : ""` + * @type string $order_by + * Expression that defines what fields and order to use for sorting. The + * string value should follow SQL syntax: comma separated list of fields. For + * example: "name,resource_properties.a_property". The default sorting order + * is ascending. To specify descending order for a field, a suffix " desc" + * should be appended to the field name. For example: "name + * desc,source_properties.a_property". Redundant space characters in the + * syntax are insignificant. "name desc,source_properties.a_property" and " + * name desc , source_properties.a_property " are equivalent. + * The following fields are supported: + * name + * parent + * state + * category + * resource_name + * event_time + * source_properties + * security_marks.marks + * @type \Google\Protobuf\Timestamp $read_time + * Time used as a reference point when filtering findings. The filter is + * limited to findings existing at the supplied time and their values are + * those at that specific time. Absence of this field will default to the + * API's version of NOW. + * @type \Google\Protobuf\Duration $compare_duration + * When compare_duration is set, the ListFindingsResult's "state_change" + * attribute is updated to indicate whether the finding had its state changed, + * the finding's state remained unchanged, or if the finding was added in any + * state during the compare_duration period of time that precedes the + * read_time. This is the time between (read_time - compare_duration) and + * read_time. + * The state_change value is derived based on the presence and state of the + * finding at the two points in time. Intermediate state changes between the + * two times don't affect the result. For example, the results aren't affected + * if the finding is made inactive and then active again. + * Possible "state_change" values when compare_duration is specified: + * * "CHANGED": indicates that the finding was present and matched the given + * filter at the start of compare_duration, but changed its + * state at read_time. + * * "UNCHANGED": indicates that the finding was present and matched the given + * filter at the start of compare_duration and did not change + * state at read_time. + * * "ADDED": indicates that the finding did not match the given filter or + * was not present at the start of compare_duration, but was + * present at read_time. + * * "REMOVED": indicates that the finding was present and matched the + * filter at the start of compare_duration, but did not match + * the filter at read_time. + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all findings present at + * read_time. + * @type \Google\Protobuf\FieldMask $field_mask + * A field mask to specify the Finding fields to be listed in the response. + * An empty field mask will list all fields. + * @type string $page_token + * The value returned by the last `ListFindingsResponse`; indicates + * that this is a continuation of a prior `ListFindings` call, and + * that the system should return the next page of data. + * @type int $page_size + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the source the findings belong to. Its format is + * "organizations/[organization_id]/sources/[source_id], + * folders/[folder_id]/sources/[source_id], or + * projects/[project_id]/sources/[source_id]". To list across all sources + * provide a source_id of `-`. For example: + * organizations/{organization_id}/sources/-, folders/{folder_id}/sources/- or + * projects/{projects_id}/sources/- + * + * 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. Name of the source the findings belong to. Its format is + * "organizations/[organization_id]/sources/[source_id], + * folders/[folder_id]/sources/[source_id], or + * projects/[project_id]/sources/[source_id]". To list across all sources + * provide a source_id of `-`. For example: + * organizations/{organization_id}/sources/-, folders/{folder_id}/sources/- or + * projects/{projects_id}/sources/- + * + * 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; + } + + /** + * Expression that defines the filter to apply across findings. + * The expression is a list of one or more restrictions combined via logical + * operators `AND` and `OR`. + * Parentheses are supported, and `OR` has higher precedence than `AND`. + * Restrictions have the form ` ` and may have a `-` + * character in front of them to indicate negation. Examples include: + * * name + * * source_properties.a_property + * * security_marks.marks.marka + * The supported operators are: + * * `=` for all value types. + * * `>`, `<`, `>=`, `<=` for integer values. + * * `:`, meaning substring matching, for strings. + * The supported value types are: + * * string literals in quotes. + * * integer literals without quotes. + * * boolean literals `true` and `false` without quotes. + * The following field and operator combinations are supported: + * * name: `=` + * * parent: `=`, `:` + * * resource_name: `=`, `:` + * * state: `=`, `:` + * * category: `=`, `:` + * * external_uri: `=`, `:` + * * event_time: `=`, `>`, `<`, `>=`, `<=` + * * severity: `=`, `:` + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `event_time = "2019-06-10T16:07:18-07:00"` + * `event_time = 1560208038000` + * security_marks.marks: `=`, `:` + * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + * For example, `source_properties.size = 100` is a valid filter string. + * Use a partial match on the empty string to filter based on a property + * existing: `source_properties.my_property : ""` + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-source_properties.my_property : ""` + * + * Generated from protobuf field string filter = 2; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Expression that defines the filter to apply across findings. + * The expression is a list of one or more restrictions combined via logical + * operators `AND` and `OR`. + * Parentheses are supported, and `OR` has higher precedence than `AND`. + * Restrictions have the form ` ` and may have a `-` + * character in front of them to indicate negation. Examples include: + * * name + * * source_properties.a_property + * * security_marks.marks.marka + * The supported operators are: + * * `=` for all value types. + * * `>`, `<`, `>=`, `<=` for integer values. + * * `:`, meaning substring matching, for strings. + * The supported value types are: + * * string literals in quotes. + * * integer literals without quotes. + * * boolean literals `true` and `false` without quotes. + * The following field and operator combinations are supported: + * * name: `=` + * * parent: `=`, `:` + * * resource_name: `=`, `:` + * * state: `=`, `:` + * * category: `=`, `:` + * * external_uri: `=`, `:` + * * event_time: `=`, `>`, `<`, `>=`, `<=` + * * severity: `=`, `:` + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `event_time = "2019-06-10T16:07:18-07:00"` + * `event_time = 1560208038000` + * security_marks.marks: `=`, `:` + * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + * For example, `source_properties.size = 100` is a valid filter string. + * Use a partial match on the empty string to filter based on a property + * existing: `source_properties.my_property : ""` + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-source_properties.my_property : ""` + * + * Generated from protobuf field string filter = 2; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Expression that defines what fields and order to use for sorting. The + * string value should follow SQL syntax: comma separated list of fields. For + * example: "name,resource_properties.a_property". The default sorting order + * is ascending. To specify descending order for a field, a suffix " desc" + * should be appended to the field name. For example: "name + * desc,source_properties.a_property". Redundant space characters in the + * syntax are insignificant. "name desc,source_properties.a_property" and " + * name desc , source_properties.a_property " are equivalent. + * The following fields are supported: + * name + * parent + * state + * category + * resource_name + * event_time + * source_properties + * security_marks.marks + * + * Generated from protobuf field string order_by = 3; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Expression that defines what fields and order to use for sorting. The + * string value should follow SQL syntax: comma separated list of fields. For + * example: "name,resource_properties.a_property". The default sorting order + * is ascending. To specify descending order for a field, a suffix " desc" + * should be appended to the field name. For example: "name + * desc,source_properties.a_property". Redundant space characters in the + * syntax are insignificant. "name desc,source_properties.a_property" and " + * name desc , source_properties.a_property " are equivalent. + * The following fields are supported: + * name + * parent + * state + * category + * resource_name + * event_time + * source_properties + * security_marks.marks + * + * Generated from protobuf field string order_by = 3; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Time used as a reference point when filtering findings. The filter is + * limited to findings existing at the supplied time and their values are + * those at that specific time. Absence of this field will default to the + * API's version of NOW. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->read_time; + } + + public function hasReadTime() + { + return isset($this->read_time); + } + + public function clearReadTime() + { + unset($this->read_time); + } + + /** + * Time used as a reference point when filtering findings. The filter is + * limited to findings existing at the supplied time and their values are + * those at that specific time. Absence of this field will default to the + * API's version of NOW. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->read_time = $var; + + return $this; + } + + /** + * When compare_duration is set, the ListFindingsResult's "state_change" + * attribute is updated to indicate whether the finding had its state changed, + * the finding's state remained unchanged, or if the finding was added in any + * state during the compare_duration period of time that precedes the + * read_time. This is the time between (read_time - compare_duration) and + * read_time. + * The state_change value is derived based on the presence and state of the + * finding at the two points in time. Intermediate state changes between the + * two times don't affect the result. For example, the results aren't affected + * if the finding is made inactive and then active again. + * Possible "state_change" values when compare_duration is specified: + * * "CHANGED": indicates that the finding was present and matched the given + * filter at the start of compare_duration, but changed its + * state at read_time. + * * "UNCHANGED": indicates that the finding was present and matched the given + * filter at the start of compare_duration and did not change + * state at read_time. + * * "ADDED": indicates that the finding did not match the given filter or + * was not present at the start of compare_duration, but was + * present at read_time. + * * "REMOVED": indicates that the finding was present and matched the + * filter at the start of compare_duration, but did not match + * the filter at read_time. + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all findings present at + * read_time. + * + * Generated from protobuf field .google.protobuf.Duration compare_duration = 5; + * @return \Google\Protobuf\Duration|null + */ + public function getCompareDuration() + { + return $this->compare_duration; + } + + public function hasCompareDuration() + { + return isset($this->compare_duration); + } + + public function clearCompareDuration() + { + unset($this->compare_duration); + } + + /** + * When compare_duration is set, the ListFindingsResult's "state_change" + * attribute is updated to indicate whether the finding had its state changed, + * the finding's state remained unchanged, or if the finding was added in any + * state during the compare_duration period of time that precedes the + * read_time. This is the time between (read_time - compare_duration) and + * read_time. + * The state_change value is derived based on the presence and state of the + * finding at the two points in time. Intermediate state changes between the + * two times don't affect the result. For example, the results aren't affected + * if the finding is made inactive and then active again. + * Possible "state_change" values when compare_duration is specified: + * * "CHANGED": indicates that the finding was present and matched the given + * filter at the start of compare_duration, but changed its + * state at read_time. + * * "UNCHANGED": indicates that the finding was present and matched the given + * filter at the start of compare_duration and did not change + * state at read_time. + * * "ADDED": indicates that the finding did not match the given filter or + * was not present at the start of compare_duration, but was + * present at read_time. + * * "REMOVED": indicates that the finding was present and matched the + * filter at the start of compare_duration, but did not match + * the filter at read_time. + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all findings present at + * read_time. + * + * Generated from protobuf field .google.protobuf.Duration compare_duration = 5; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setCompareDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->compare_duration = $var; + + return $this; + } + + /** + * A field mask to specify the Finding fields to be listed in the response. + * An empty field mask will list all fields. + * + * Generated from protobuf field .google.protobuf.FieldMask field_mask = 7; + * @return \Google\Protobuf\FieldMask|null + */ + public function getFieldMask() + { + return $this->field_mask; + } + + public function hasFieldMask() + { + return isset($this->field_mask); + } + + public function clearFieldMask() + { + unset($this->field_mask); + } + + /** + * A field mask to specify the Finding fields to be listed in the response. + * An empty field mask will list all fields. + * + * Generated from protobuf field .google.protobuf.FieldMask field_mask = 7; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setFieldMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->field_mask = $var; + + return $this; + } + + /** + * The value returned by the last `ListFindingsResponse`; indicates + * that this is a continuation of a prior `ListFindings` call, and + * that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 8; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The value returned by the last `ListFindingsResponse`; indicates + * that this is a continuation of a prior `ListFindings` call, and + * that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 8; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. + * + * Generated from protobuf field int32 page_size = 9; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. + * + * Generated from protobuf field int32 page_size = 9; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListFindingsResponse.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListFindingsResponse.php new file mode 100644 index 000000000000..d9166aab0298 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListFindingsResponse.php @@ -0,0 +1,183 @@ +google.cloud.securitycenter.v1p1beta1.ListFindingsResponse + */ +class ListFindingsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Findings matching the list request. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1p1beta1.ListFindingsResponse.ListFindingsResult list_findings_results = 1; + */ + private $list_findings_results; + /** + * Time used for executing the list request. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 2; + */ + protected $read_time = null; + /** + * Token to retrieve the next page of results, or empty if there are no more + * results. + * + * Generated from protobuf field string next_page_token = 3; + */ + protected $next_page_token = ''; + /** + * The total number of findings matching the query. + * + * Generated from protobuf field int32 total_size = 4; + */ + protected $total_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\SecurityCenter\V1p1beta1\ListFindingsResponse\ListFindingsResult>|\Google\Protobuf\Internal\RepeatedField $list_findings_results + * Findings matching the list request. + * @type \Google\Protobuf\Timestamp $read_time + * Time used for executing the list request. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no more + * results. + * @type int $total_size + * The total number of findings matching the query. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Findings matching the list request. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1p1beta1.ListFindingsResponse.ListFindingsResult list_findings_results = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getListFindingsResults() + { + return $this->list_findings_results; + } + + /** + * Findings matching the list request. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1p1beta1.ListFindingsResponse.ListFindingsResult list_findings_results = 1; + * @param array<\Google\Cloud\SecurityCenter\V1p1beta1\ListFindingsResponse\ListFindingsResult>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setListFindingsResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1p1beta1\ListFindingsResponse\ListFindingsResult::class); + $this->list_findings_results = $arr; + + return $this; + } + + /** + * Time used for executing the list request. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->read_time; + } + + public function hasReadTime() + { + return isset($this->read_time); + } + + public function clearReadTime() + { + unset($this->read_time); + } + + /** + * Time used for executing the list request. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->read_time = $var; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results. + * + * Generated from protobuf field string next_page_token = 3; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results. + * + * Generated from protobuf field string next_page_token = 3; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * The total number of findings matching the query. + * + * Generated from protobuf field int32 total_size = 4; + * @return int + */ + public function getTotalSize() + { + return $this->total_size; + } + + /** + * The total number of findings matching the query. + * + * Generated from protobuf field int32 total_size = 4; + * @param int $var + * @return $this + */ + public function setTotalSize($var) + { + GPBUtil::checkInt32($var); + $this->total_size = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListFindingsResponse/ListFindingsResult.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListFindingsResponse/ListFindingsResult.php new file mode 100644 index 000000000000..af44be50fcb1 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListFindingsResponse/ListFindingsResult.php @@ -0,0 +1,158 @@ +google.cloud.securitycenter.v1p1beta1.ListFindingsResponse.ListFindingsResult + */ +class ListFindingsResult extends \Google\Protobuf\Internal\Message +{ + /** + * Finding matching the search request. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Finding finding = 1; + */ + protected $finding = null; + /** + * State change of the finding between the points in time. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.ListFindingsResponse.ListFindingsResult.StateChange state_change = 2; + */ + protected $state_change = 0; + /** + * Output only. Resource that is associated with this finding. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.ListFindingsResponse.ListFindingsResult.Resource resource = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $resource = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\SecurityCenter\V1p1beta1\Finding $finding + * Finding matching the search request. + * @type int $state_change + * State change of the finding between the points in time. + * @type \Google\Cloud\SecurityCenter\V1p1beta1\ListFindingsResponse\ListFindingsResult\Resource $resource + * Output only. Resource that is associated with this finding. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Finding matching the search request. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Finding finding = 1; + * @return \Google\Cloud\SecurityCenter\V1p1beta1\Finding|null + */ + public function getFinding() + { + return $this->finding; + } + + public function hasFinding() + { + return isset($this->finding); + } + + public function clearFinding() + { + unset($this->finding); + } + + /** + * Finding matching the search request. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Finding finding = 1; + * @param \Google\Cloud\SecurityCenter\V1p1beta1\Finding $var + * @return $this + */ + public function setFinding($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1p1beta1\Finding::class); + $this->finding = $var; + + return $this; + } + + /** + * State change of the finding between the points in time. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.ListFindingsResponse.ListFindingsResult.StateChange state_change = 2; + * @return int + */ + public function getStateChange() + { + return $this->state_change; + } + + /** + * State change of the finding between the points in time. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.ListFindingsResponse.ListFindingsResult.StateChange state_change = 2; + * @param int $var + * @return $this + */ + public function setStateChange($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1p1beta1\ListFindingsResponse\ListFindingsResult\StateChange::class); + $this->state_change = $var; + + return $this; + } + + /** + * Output only. Resource that is associated with this finding. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.ListFindingsResponse.ListFindingsResult.Resource resource = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\SecurityCenter\V1p1beta1\ListFindingsResponse\ListFindingsResult\Resource|null + */ + public function getResource() + { + return $this->resource; + } + + public function hasResource() + { + return isset($this->resource); + } + + public function clearResource() + { + unset($this->resource); + } + + /** + * Output only. Resource that is associated with this finding. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.ListFindingsResponse.ListFindingsResult.Resource resource = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\SecurityCenter\V1p1beta1\ListFindingsResponse\ListFindingsResult\Resource $var + * @return $this + */ + public function setResource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1p1beta1\ListFindingsResponse\ListFindingsResult\Resource::class); + $this->resource = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ListFindingsResult::class, \Google\Cloud\SecurityCenter\V1p1beta1\ListFindingsResponse_ListFindingsResult::class); + diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListFindingsResponse/ListFindingsResult/Resource.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListFindingsResponse/ListFindingsResult/Resource.php new file mode 100644 index 000000000000..64280eb4f994 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListFindingsResponse/ListFindingsResult/Resource.php @@ -0,0 +1,253 @@ +google.cloud.securitycenter.v1p1beta1.ListFindingsResponse.ListFindingsResult.Resource + */ +class Resource extends \Google\Protobuf\Internal\Message +{ + /** + * The full resource name of the resource. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The full resource name of project that the resource belongs to. + * + * Generated from protobuf field string project_name = 2; + */ + protected $project_name = ''; + /** + * The human readable name of project that the resource belongs to. + * + * Generated from protobuf field string project_display_name = 3; + */ + protected $project_display_name = ''; + /** + * The full resource name of resource's parent. + * + * Generated from protobuf field string parent_name = 4; + */ + protected $parent_name = ''; + /** + * The human readable name of resource's parent. + * + * Generated from protobuf field string parent_display_name = 5; + */ + protected $parent_display_name = ''; + /** + * Contains a Folder message for each folder in the assets ancestry. + * The first folder is the deepest nested folder, and the last folder is + * the folder directly under the Organization. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1p1beta1.Folder folders = 10; + */ + private $folders; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The full resource name of the resource. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + * @type string $project_name + * The full resource name of project that the resource belongs to. + * @type string $project_display_name + * The human readable name of project that the resource belongs to. + * @type string $parent_name + * The full resource name of resource's parent. + * @type string $parent_display_name + * The human readable name of resource's parent. + * @type array<\Google\Cloud\SecurityCenter\V1p1beta1\Folder>|\Google\Protobuf\Internal\RepeatedField $folders + * Contains a Folder message for each folder in the assets ancestry. + * The first folder is the deepest nested folder, and the last folder is + * the folder directly under the Organization. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * The full resource name of the resource. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The full resource name of the resource. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The full resource name of project that the resource belongs to. + * + * Generated from protobuf field string project_name = 2; + * @return string + */ + public function getProjectName() + { + return $this->project_name; + } + + /** + * The full resource name of project that the resource belongs to. + * + * Generated from protobuf field string project_name = 2; + * @param string $var + * @return $this + */ + public function setProjectName($var) + { + GPBUtil::checkString($var, True); + $this->project_name = $var; + + return $this; + } + + /** + * The human readable name of project that the resource belongs to. + * + * Generated from protobuf field string project_display_name = 3; + * @return string + */ + public function getProjectDisplayName() + { + return $this->project_display_name; + } + + /** + * The human readable name of project that the resource belongs to. + * + * Generated from protobuf field string project_display_name = 3; + * @param string $var + * @return $this + */ + public function setProjectDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->project_display_name = $var; + + return $this; + } + + /** + * The full resource name of resource's parent. + * + * Generated from protobuf field string parent_name = 4; + * @return string + */ + public function getParentName() + { + return $this->parent_name; + } + + /** + * The full resource name of resource's parent. + * + * Generated from protobuf field string parent_name = 4; + * @param string $var + * @return $this + */ + public function setParentName($var) + { + GPBUtil::checkString($var, True); + $this->parent_name = $var; + + return $this; + } + + /** + * The human readable name of resource's parent. + * + * Generated from protobuf field string parent_display_name = 5; + * @return string + */ + public function getParentDisplayName() + { + return $this->parent_display_name; + } + + /** + * The human readable name of resource's parent. + * + * Generated from protobuf field string parent_display_name = 5; + * @param string $var + * @return $this + */ + public function setParentDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->parent_display_name = $var; + + return $this; + } + + /** + * Contains a Folder message for each folder in the assets ancestry. + * The first folder is the deepest nested folder, and the last folder is + * the folder directly under the Organization. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1p1beta1.Folder folders = 10; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFolders() + { + return $this->folders; + } + + /** + * Contains a Folder message for each folder in the assets ancestry. + * The first folder is the deepest nested folder, and the last folder is + * the folder directly under the Organization. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1p1beta1.Folder folders = 10; + * @param array<\Google\Cloud\SecurityCenter\V1p1beta1\Folder>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFolders($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1p1beta1\Folder::class); + $this->folders = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Resource::class, \Google\Cloud\SecurityCenter\V1p1beta1\ListFindingsResponse_ListFindingsResult_Resource::class); + diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListFindingsResponse/ListFindingsResult/StateChange.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListFindingsResponse/ListFindingsResult/StateChange.php new file mode 100644 index 000000000000..4f8ad2507ab2 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListFindingsResponse/ListFindingsResult/StateChange.php @@ -0,0 +1,87 @@ +google.cloud.securitycenter.v1p1beta1.ListFindingsResponse.ListFindingsResult.StateChange + */ +class StateChange +{ + /** + * State change is unused, this is the canonical default for this enum. + * + * Generated from protobuf enum UNUSED = 0; + */ + const UNUSED = 0; + /** + * The finding has changed state in some way between the points in time + * and existed at both points. + * + * Generated from protobuf enum CHANGED = 1; + */ + const CHANGED = 1; + /** + * The finding has not changed state between the points in time and + * existed at both points. + * + * Generated from protobuf enum UNCHANGED = 2; + */ + const UNCHANGED = 2; + /** + * The finding was created between the points in time. + * + * Generated from protobuf enum ADDED = 3; + */ + const ADDED = 3; + /** + * The finding at timestamp does not match the filter specified, but it + * did at timestamp - compare_duration. + * + * Generated from protobuf enum REMOVED = 4; + */ + const REMOVED = 4; + + private static $valueToName = [ + self::UNUSED => 'UNUSED', + self::CHANGED => 'CHANGED', + self::UNCHANGED => 'UNCHANGED', + self::ADDED => 'ADDED', + self::REMOVED => 'REMOVED', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(StateChange::class, \Google\Cloud\SecurityCenter\V1p1beta1\ListFindingsResponse_ListFindingsResult_StateChange::class); + diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListFindingsResponse_ListFindingsResult.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListFindingsResponse_ListFindingsResult.php new file mode 100644 index 000000000000..ff39857548e4 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListFindingsResponse_ListFindingsResult.php @@ -0,0 +1,16 @@ +google.cloud.securitycenter.v1p1beta1.ListNotificationConfigsRequest + */ +class ListNotificationConfigsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the organization to list notification configs. + * Its format is "organizations/[organization_id]". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The value returned by the last `ListNotificationConfigsResponse`; indicates + * that this is a continuation of a prior `ListNotificationConfigs` call, and + * that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 2; + */ + protected $page_token = ''; + /** + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. + * + * Generated from protobuf field int32 page_size = 3; + */ + protected $page_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Name of the organization to list notification configs. + * Its format is "organizations/[organization_id]". + * @type string $page_token + * The value returned by the last `ListNotificationConfigsResponse`; indicates + * that this is a continuation of a prior `ListNotificationConfigs` call, and + * that the system should return the next page of data. + * @type int $page_size + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the organization to list notification configs. + * Its format is "organizations/[organization_id]". + * + * 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. Name of the organization to list notification configs. + * Its format is "organizations/[organization_id]". + * + * 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; + } + + /** + * The value returned by the last `ListNotificationConfigsResponse`; indicates + * that this is a continuation of a prior `ListNotificationConfigs` call, and + * that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 2; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The value returned by the last `ListNotificationConfigsResponse`; indicates + * that this is a continuation of a prior `ListNotificationConfigs` call, and + * that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 2; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. + * + * Generated from protobuf field int32 page_size = 3; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. + * + * Generated from protobuf field int32 page_size = 3; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListNotificationConfigsResponse.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListNotificationConfigsResponse.php new file mode 100644 index 000000000000..89c6439423d1 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListNotificationConfigsResponse.php @@ -0,0 +1,105 @@ +google.cloud.securitycenter.v1p1beta1.ListNotificationConfigsResponse + */ +class ListNotificationConfigsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Notification configs belonging to the requested parent. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1p1beta1.NotificationConfig notification_configs = 1; + */ + private $notification_configs; + /** + * Token to retrieve the next page of results, or empty if there are no more + * results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\SecurityCenter\V1p1beta1\NotificationConfig>|\Google\Protobuf\Internal\RepeatedField $notification_configs + * Notification configs belonging to the requested parent. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no more + * results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Notification configs belonging to the requested parent. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1p1beta1.NotificationConfig notification_configs = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNotificationConfigs() + { + return $this->notification_configs; + } + + /** + * Notification configs belonging to the requested parent. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1p1beta1.NotificationConfig notification_configs = 1; + * @param array<\Google\Cloud\SecurityCenter\V1p1beta1\NotificationConfig>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNotificationConfigs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1p1beta1\NotificationConfig::class); + $this->notification_configs = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results. + * + * Generated from protobuf field string next_page_token = 2; + * @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/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListSourcesRequest.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListSourcesRequest.php new file mode 100644 index 000000000000..9a7274d12191 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListSourcesRequest.php @@ -0,0 +1,155 @@ +google.cloud.securitycenter.v1p1beta1.ListSourcesRequest + */ +class ListSourcesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the parent of sources to list. Its format should be + * "organizations/[organization_id], folders/[folder_id], or + * projects/[project_id]". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The value returned by the last `ListSourcesResponse`; indicates + * that this is a continuation of a prior `ListSources` call, and + * that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 2; + */ + protected $page_token = ''; + /** + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. + * + * Generated from protobuf field int32 page_size = 7; + */ + protected $page_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Resource name of the parent of sources to list. Its format should be + * "organizations/[organization_id], folders/[folder_id], or + * projects/[project_id]". + * @type string $page_token + * The value returned by the last `ListSourcesResponse`; indicates + * that this is a continuation of a prior `ListSources` call, and + * that the system should return the next page of data. + * @type int $page_size + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the parent of sources to list. Its format should be + * "organizations/[organization_id], folders/[folder_id], or + * projects/[project_id]". + * + * 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. Resource name of the parent of sources to list. Its format should be + * "organizations/[organization_id], folders/[folder_id], or + * projects/[project_id]". + * + * 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; + } + + /** + * The value returned by the last `ListSourcesResponse`; indicates + * that this is a continuation of a prior `ListSources` call, and + * that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 2; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The value returned by the last `ListSourcesResponse`; indicates + * that this is a continuation of a prior `ListSources` call, and + * that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 2; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. + * + * Generated from protobuf field int32 page_size = 7; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of results to return in a single response. Default is + * 10, minimum is 1, maximum is 1000. + * + * Generated from protobuf field int32 page_size = 7; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListSourcesResponse.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListSourcesResponse.php new file mode 100644 index 000000000000..da561e81ec42 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListSourcesResponse.php @@ -0,0 +1,105 @@ +google.cloud.securitycenter.v1p1beta1.ListSourcesResponse + */ +class ListSourcesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Sources belonging to the requested parent. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1p1beta1.Source sources = 1; + */ + private $sources; + /** + * Token to retrieve the next page of results, or empty if there are no more + * results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\SecurityCenter\V1p1beta1\Source>|\Google\Protobuf\Internal\RepeatedField $sources + * Sources belonging to the requested parent. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no more + * results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Sources belonging to the requested parent. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1p1beta1.Source sources = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSources() + { + return $this->sources; + } + + /** + * Sources belonging to the requested parent. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1p1beta1.Source sources = 1; + * @param array<\Google\Cloud\SecurityCenter\V1p1beta1\Source>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSources($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1p1beta1\Source::class); + $this->sources = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results. + * + * Generated from protobuf field string next_page_token = 2; + * @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/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/NotificationConfig.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/NotificationConfig.php new file mode 100644 index 000000000000..4c365622d5b1 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/NotificationConfig.php @@ -0,0 +1,268 @@ +google.cloud.securitycenter.v1p1beta1.NotificationConfig + */ +class NotificationConfig extends \Google\Protobuf\Internal\Message +{ + /** + * The relative resource name of this notification config. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Example: + * "organizations/{organization_id}/notificationConfigs/notify_public_bucket". + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The description of the notification config (max of 1024 characters). + * + * Generated from protobuf field string description = 2; + */ + protected $description = ''; + /** + * The type of events the config is for, e.g. FINDING. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.NotificationConfig.EventType event_type = 3; + */ + protected $event_type = 0; + /** + * The Pub/Sub topic to send notifications to. Its format is + * "projects/[project_id]/topics/[topic]". + * + * Generated from protobuf field string pubsub_topic = 4 [(.google.api.resource_reference) = { + */ + protected $pubsub_topic = ''; + /** + * Output only. The service account that needs "pubsub.topics.publish" + * permission to publish to the Pub/Sub topic. + * + * Generated from protobuf field string service_account = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $service_account = ''; + protected $notify_config; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The relative resource name of this notification config. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Example: + * "organizations/{organization_id}/notificationConfigs/notify_public_bucket". + * @type string $description + * The description of the notification config (max of 1024 characters). + * @type int $event_type + * The type of events the config is for, e.g. FINDING. + * @type string $pubsub_topic + * The Pub/Sub topic to send notifications to. Its format is + * "projects/[project_id]/topics/[topic]". + * @type string $service_account + * Output only. The service account that needs "pubsub.topics.publish" + * permission to publish to the Pub/Sub topic. + * @type \Google\Cloud\SecurityCenter\V1p1beta1\NotificationConfig\StreamingConfig $streaming_config + * The config for triggering streaming-based notifications. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\NotificationConfig::initOnce(); + parent::__construct($data); + } + + /** + * The relative resource name of this notification config. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Example: + * "organizations/{organization_id}/notificationConfigs/notify_public_bucket". + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The relative resource name of this notification config. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Example: + * "organizations/{organization_id}/notificationConfigs/notify_public_bucket". + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The description of the notification config (max of 1024 characters). + * + * Generated from protobuf field string description = 2; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * The description of the notification config (max of 1024 characters). + * + * Generated from protobuf field string description = 2; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * The type of events the config is for, e.g. FINDING. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.NotificationConfig.EventType event_type = 3; + * @return int + */ + public function getEventType() + { + return $this->event_type; + } + + /** + * The type of events the config is for, e.g. FINDING. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.NotificationConfig.EventType event_type = 3; + * @param int $var + * @return $this + */ + public function setEventType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1p1beta1\NotificationConfig\EventType::class); + $this->event_type = $var; + + return $this; + } + + /** + * The Pub/Sub topic to send notifications to. Its format is + * "projects/[project_id]/topics/[topic]". + * + * Generated from protobuf field string pubsub_topic = 4 [(.google.api.resource_reference) = { + * @return string + */ + public function getPubsubTopic() + { + return $this->pubsub_topic; + } + + /** + * The Pub/Sub topic to send notifications to. Its format is + * "projects/[project_id]/topics/[topic]". + * + * Generated from protobuf field string pubsub_topic = 4 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setPubsubTopic($var) + { + GPBUtil::checkString($var, True); + $this->pubsub_topic = $var; + + return $this; + } + + /** + * Output only. The service account that needs "pubsub.topics.publish" + * permission to publish to the Pub/Sub topic. + * + * Generated from protobuf field string service_account = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getServiceAccount() + { + return $this->service_account; + } + + /** + * Output only. The service account that needs "pubsub.topics.publish" + * permission to publish to the Pub/Sub topic. + * + * Generated from protobuf field string service_account = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setServiceAccount($var) + { + GPBUtil::checkString($var, True); + $this->service_account = $var; + + return $this; + } + + /** + * The config for triggering streaming-based notifications. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig streaming_config = 6; + * @return \Google\Cloud\SecurityCenter\V1p1beta1\NotificationConfig\StreamingConfig|null + */ + public function getStreamingConfig() + { + return $this->readOneof(6); + } + + public function hasStreamingConfig() + { + return $this->hasOneof(6); + } + + /** + * The config for triggering streaming-based notifications. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig streaming_config = 6; + * @param \Google\Cloud\SecurityCenter\V1p1beta1\NotificationConfig\StreamingConfig $var + * @return $this + */ + public function setStreamingConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1p1beta1\NotificationConfig\StreamingConfig::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * @return string + */ + public function getNotifyConfig() + { + return $this->whichOneof("notify_config"); + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/NotificationConfig/EventType.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/NotificationConfig/EventType.php new file mode 100644 index 000000000000..0b27a01f5961 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/NotificationConfig/EventType.php @@ -0,0 +1,57 @@ +google.cloud.securitycenter.v1p1beta1.NotificationConfig.EventType + */ +class EventType +{ + /** + * Unspecified event type. + * + * Generated from protobuf enum EVENT_TYPE_UNSPECIFIED = 0; + */ + const EVENT_TYPE_UNSPECIFIED = 0; + /** + * Events for findings. + * + * Generated from protobuf enum FINDING = 1; + */ + const FINDING = 1; + + private static $valueToName = [ + self::EVENT_TYPE_UNSPECIFIED => 'EVENT_TYPE_UNSPECIFIED', + self::FINDING => 'FINDING', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(EventType::class, \Google\Cloud\SecurityCenter\V1p1beta1\NotificationConfig_EventType::class); + diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/NotificationConfig/StreamingConfig.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/NotificationConfig/StreamingConfig.php new file mode 100644 index 000000000000..448267a7d500 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/NotificationConfig/StreamingConfig.php @@ -0,0 +1,131 @@ +google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig + */ +class StreamingConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Expression that defines the filter to apply across create/update events + * of assets or findings as specified by the event type. The expression is a + * list of zero or more restrictions combined via logical operators `AND` + * and `OR`. Parentheses are supported, and `OR` has higher precedence than + * `AND`. + * Restrictions have the form ` ` and may have a + * `-` character in front of them to indicate negation. The fields map to + * those defined in the corresponding resource. + * The supported operators are: + * * `=` for all value types. + * * `>`, `<`, `>=`, `<=` for integer values. + * * `:`, meaning substring matching, for strings. + * The supported value types are: + * * string literals in quotes. + * * integer literals without quotes. + * * boolean literals `true` and `false` without quotes. + * + * Generated from protobuf field string filter = 1; + */ + protected $filter = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $filter + * Expression that defines the filter to apply across create/update events + * of assets or findings as specified by the event type. The expression is a + * list of zero or more restrictions combined via logical operators `AND` + * and `OR`. Parentheses are supported, and `OR` has higher precedence than + * `AND`. + * Restrictions have the form ` ` and may have a + * `-` character in front of them to indicate negation. The fields map to + * those defined in the corresponding resource. + * The supported operators are: + * * `=` for all value types. + * * `>`, `<`, `>=`, `<=` for integer values. + * * `:`, meaning substring matching, for strings. + * The supported value types are: + * * string literals in quotes. + * * integer literals without quotes. + * * boolean literals `true` and `false` without quotes. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\NotificationConfig::initOnce(); + parent::__construct($data); + } + + /** + * Expression that defines the filter to apply across create/update events + * of assets or findings as specified by the event type. The expression is a + * list of zero or more restrictions combined via logical operators `AND` + * and `OR`. Parentheses are supported, and `OR` has higher precedence than + * `AND`. + * Restrictions have the form ` ` and may have a + * `-` character in front of them to indicate negation. The fields map to + * those defined in the corresponding resource. + * The supported operators are: + * * `=` for all value types. + * * `>`, `<`, `>=`, `<=` for integer values. + * * `:`, meaning substring matching, for strings. + * The supported value types are: + * * string literals in quotes. + * * integer literals without quotes. + * * boolean literals `true` and `false` without quotes. + * + * Generated from protobuf field string filter = 1; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Expression that defines the filter to apply across create/update events + * of assets or findings as specified by the event type. The expression is a + * list of zero or more restrictions combined via logical operators `AND` + * and `OR`. Parentheses are supported, and `OR` has higher precedence than + * `AND`. + * Restrictions have the form ` ` and may have a + * `-` character in front of them to indicate negation. The fields map to + * those defined in the corresponding resource. + * The supported operators are: + * * `=` for all value types. + * * `>`, `<`, `>=`, `<=` for integer values. + * * `:`, meaning substring matching, for strings. + * The supported value types are: + * * string literals in quotes. + * * integer literals without quotes. + * * boolean literals `true` and `false` without quotes. + * + * Generated from protobuf field string filter = 1; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(StreamingConfig::class, \Google\Cloud\SecurityCenter\V1p1beta1\NotificationConfig_StreamingConfig::class); + diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/NotificationConfig_EventType.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/NotificationConfig_EventType.php new file mode 100644 index 000000000000..d30e8b76aedb --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/NotificationConfig_EventType.php @@ -0,0 +1,16 @@ +google.cloud.securitycenter.v1p1beta1.NotificationMessage + */ +class NotificationMessage extends \Google\Protobuf\Internal\Message +{ + /** + * Name of the notification config that generated current notification. + * + * Generated from protobuf field string notification_config_name = 1; + */ + protected $notification_config_name = ''; + /** + * The Cloud resource tied to the notification. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Resource resource = 3; + */ + protected $resource = null; + protected $event; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $notification_config_name + * Name of the notification config that generated current notification. + * @type \Google\Cloud\SecurityCenter\V1p1beta1\Finding $finding + * If it's a Finding based notification config, this field will be + * populated. + * @type \Google\Cloud\SecurityCenter\V1p1beta1\Resource $resource + * The Cloud resource tied to the notification. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\NotificationMessage::initOnce(); + parent::__construct($data); + } + + /** + * Name of the notification config that generated current notification. + * + * Generated from protobuf field string notification_config_name = 1; + * @return string + */ + public function getNotificationConfigName() + { + return $this->notification_config_name; + } + + /** + * Name of the notification config that generated current notification. + * + * Generated from protobuf field string notification_config_name = 1; + * @param string $var + * @return $this + */ + public function setNotificationConfigName($var) + { + GPBUtil::checkString($var, True); + $this->notification_config_name = $var; + + return $this; + } + + /** + * If it's a Finding based notification config, this field will be + * populated. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Finding finding = 2; + * @return \Google\Cloud\SecurityCenter\V1p1beta1\Finding|null + */ + public function getFinding() + { + return $this->readOneof(2); + } + + public function hasFinding() + { + return $this->hasOneof(2); + } + + /** + * If it's a Finding based notification config, this field will be + * populated. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Finding finding = 2; + * @param \Google\Cloud\SecurityCenter\V1p1beta1\Finding $var + * @return $this + */ + public function setFinding($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1p1beta1\Finding::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * The Cloud resource tied to the notification. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Resource resource = 3; + * @return \Google\Cloud\SecurityCenter\V1p1beta1\Resource|null + */ + public function getResource() + { + return $this->resource; + } + + public function hasResource() + { + return isset($this->resource); + } + + public function clearResource() + { + unset($this->resource); + } + + /** + * The Cloud resource tied to the notification. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Resource resource = 3; + * @param \Google\Cloud\SecurityCenter\V1p1beta1\Resource $var + * @return $this + */ + public function setResource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1p1beta1\Resource::class); + $this->resource = $var; + + return $this; + } + + /** + * @return string + */ + public function getEvent() + { + return $this->whichOneof("event"); + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/OrganizationSettings.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/OrganizationSettings.php new file mode 100644 index 000000000000..ad4b7cd0210c --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/OrganizationSettings.php @@ -0,0 +1,170 @@ +google.cloud.securitycenter.v1p1beta1.OrganizationSettings + */ +class OrganizationSettings extends \Google\Protobuf\Internal\Message +{ + /** + * The relative resource name of the settings. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Example: + * "organizations/{organization_id}/organizationSettings". + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * A flag that indicates if Asset Discovery should be enabled. If the flag is + * set to `true`, then discovery of assets will occur. If it is set to `false, + * all historical assets will remain, but discovery of future assets will not + * occur. + * + * Generated from protobuf field bool enable_asset_discovery = 2; + */ + protected $enable_asset_discovery = false; + /** + * The configuration used for Asset Discovery runs. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.OrganizationSettings.AssetDiscoveryConfig asset_discovery_config = 3; + */ + protected $asset_discovery_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The relative resource name of the settings. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Example: + * "organizations/{organization_id}/organizationSettings". + * @type bool $enable_asset_discovery + * A flag that indicates if Asset Discovery should be enabled. If the flag is + * set to `true`, then discovery of assets will occur. If it is set to `false, + * all historical assets will remain, but discovery of future assets will not + * occur. + * @type \Google\Cloud\SecurityCenter\V1p1beta1\OrganizationSettings\AssetDiscoveryConfig $asset_discovery_config + * The configuration used for Asset Discovery runs. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\OrganizationSettings::initOnce(); + parent::__construct($data); + } + + /** + * The relative resource name of the settings. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Example: + * "organizations/{organization_id}/organizationSettings". + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The relative resource name of the settings. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Example: + * "organizations/{organization_id}/organizationSettings". + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * A flag that indicates if Asset Discovery should be enabled. If the flag is + * set to `true`, then discovery of assets will occur. If it is set to `false, + * all historical assets will remain, but discovery of future assets will not + * occur. + * + * Generated from protobuf field bool enable_asset_discovery = 2; + * @return bool + */ + public function getEnableAssetDiscovery() + { + return $this->enable_asset_discovery; + } + + /** + * A flag that indicates if Asset Discovery should be enabled. If the flag is + * set to `true`, then discovery of assets will occur. If it is set to `false, + * all historical assets will remain, but discovery of future assets will not + * occur. + * + * Generated from protobuf field bool enable_asset_discovery = 2; + * @param bool $var + * @return $this + */ + public function setEnableAssetDiscovery($var) + { + GPBUtil::checkBool($var); + $this->enable_asset_discovery = $var; + + return $this; + } + + /** + * The configuration used for Asset Discovery runs. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.OrganizationSettings.AssetDiscoveryConfig asset_discovery_config = 3; + * @return \Google\Cloud\SecurityCenter\V1p1beta1\OrganizationSettings\AssetDiscoveryConfig|null + */ + public function getAssetDiscoveryConfig() + { + return $this->asset_discovery_config; + } + + public function hasAssetDiscoveryConfig() + { + return isset($this->asset_discovery_config); + } + + public function clearAssetDiscoveryConfig() + { + unset($this->asset_discovery_config); + } + + /** + * The configuration used for Asset Discovery runs. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.OrganizationSettings.AssetDiscoveryConfig asset_discovery_config = 3; + * @param \Google\Cloud\SecurityCenter\V1p1beta1\OrganizationSettings\AssetDiscoveryConfig $var + * @return $this + */ + public function setAssetDiscoveryConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1p1beta1\OrganizationSettings\AssetDiscoveryConfig::class); + $this->asset_discovery_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/OrganizationSettings/AssetDiscoveryConfig.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/OrganizationSettings/AssetDiscoveryConfig.php new file mode 100644 index 000000000000..c6eb1dfedea0 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/OrganizationSettings/AssetDiscoveryConfig.php @@ -0,0 +1,142 @@ +google.cloud.securitycenter.v1p1beta1.OrganizationSettings.AssetDiscoveryConfig + */ +class AssetDiscoveryConfig extends \Google\Protobuf\Internal\Message +{ + /** + * The project ids to use for filtering asset discovery. + * + * Generated from protobuf field repeated string project_ids = 1; + */ + private $project_ids; + /** + * The mode to use for filtering asset discovery. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.OrganizationSettings.AssetDiscoveryConfig.InclusionMode inclusion_mode = 2; + */ + protected $inclusion_mode = 0; + /** + * The folder ids to use for filtering asset discovery. + * It consists of only digits, e.g., 756619654966. + * + * Generated from protobuf field repeated string folder_ids = 3; + */ + private $folder_ids; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $project_ids + * The project ids to use for filtering asset discovery. + * @type int $inclusion_mode + * The mode to use for filtering asset discovery. + * @type array|\Google\Protobuf\Internal\RepeatedField $folder_ids + * The folder ids to use for filtering asset discovery. + * It consists of only digits, e.g., 756619654966. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\OrganizationSettings::initOnce(); + parent::__construct($data); + } + + /** + * The project ids to use for filtering asset discovery. + * + * Generated from protobuf field repeated string project_ids = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getProjectIds() + { + return $this->project_ids; + } + + /** + * The project ids to use for filtering asset discovery. + * + * Generated from protobuf field repeated string project_ids = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setProjectIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->project_ids = $arr; + + return $this; + } + + /** + * The mode to use for filtering asset discovery. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.OrganizationSettings.AssetDiscoveryConfig.InclusionMode inclusion_mode = 2; + * @return int + */ + public function getInclusionMode() + { + return $this->inclusion_mode; + } + + /** + * The mode to use for filtering asset discovery. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.OrganizationSettings.AssetDiscoveryConfig.InclusionMode inclusion_mode = 2; + * @param int $var + * @return $this + */ + public function setInclusionMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1p1beta1\OrganizationSettings\AssetDiscoveryConfig\InclusionMode::class); + $this->inclusion_mode = $var; + + return $this; + } + + /** + * The folder ids to use for filtering asset discovery. + * It consists of only digits, e.g., 756619654966. + * + * Generated from protobuf field repeated string folder_ids = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFolderIds() + { + return $this->folder_ids; + } + + /** + * The folder ids to use for filtering asset discovery. + * It consists of only digits, e.g., 756619654966. + * + * Generated from protobuf field repeated string folder_ids = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFolderIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->folder_ids = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AssetDiscoveryConfig::class, \Google\Cloud\SecurityCenter\V1p1beta1\OrganizationSettings_AssetDiscoveryConfig::class); + diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/OrganizationSettings/AssetDiscoveryConfig/InclusionMode.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/OrganizationSettings/AssetDiscoveryConfig/InclusionMode.php new file mode 100644 index 000000000000..2e218d0692dc --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/OrganizationSettings/AssetDiscoveryConfig/InclusionMode.php @@ -0,0 +1,74 @@ +google.cloud.securitycenter.v1p1beta1.OrganizationSettings.AssetDiscoveryConfig.InclusionMode + */ +class InclusionMode +{ + /** + * Unspecified. Setting the mode with this value will disable + * inclusion/exclusion filtering for Asset Discovery. + * + * Generated from protobuf enum INCLUSION_MODE_UNSPECIFIED = 0; + */ + const INCLUSION_MODE_UNSPECIFIED = 0; + /** + * Asset Discovery will capture only the resources within the projects + * specified. All other resources will be ignored. + * + * Generated from protobuf enum INCLUDE_ONLY = 1; + */ + const INCLUDE_ONLY = 1; + /** + * Asset Discovery will ignore all resources under the projects specified. + * All other resources will be retrieved. + * + * Generated from protobuf enum EXCLUDE = 2; + */ + const EXCLUDE = 2; + + private static $valueToName = [ + self::INCLUSION_MODE_UNSPECIFIED => 'INCLUSION_MODE_UNSPECIFIED', + self::INCLUDE_ONLY => 'INCLUDE_ONLY', + self::EXCLUDE => 'EXCLUDE', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(InclusionMode::class, \Google\Cloud\SecurityCenter\V1p1beta1\OrganizationSettings_AssetDiscoveryConfig_InclusionMode::class); + diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/OrganizationSettings_AssetDiscoveryConfig.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/OrganizationSettings_AssetDiscoveryConfig.php new file mode 100644 index 000000000000..b2a35ea72cbf --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/OrganizationSettings_AssetDiscoveryConfig.php @@ -0,0 +1,16 @@ +google.cloud.securitycenter.v1p1beta1.Resource + */ +class Resource extends \Google\Protobuf\Internal\Message +{ + /** + * The full resource name of the resource. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The full resource name of project that the resource belongs to. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * The human readable name of project that the resource belongs to. + * + * Generated from protobuf field string project_display_name = 3; + */ + protected $project_display_name = ''; + /** + * The full resource name of resource's parent. + * + * Generated from protobuf field string parent = 4; + */ + protected $parent = ''; + /** + * The human readable name of resource's parent. + * + * Generated from protobuf field string parent_display_name = 5; + */ + protected $parent_display_name = ''; + /** + * Output only. Contains a Folder message for each folder in the assets ancestry. + * The first folder is the deepest nested folder, and the last folder is the + * folder directly under the Organization. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1p1beta1.Folder folders = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $folders; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The full resource name of the resource. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + * @type string $project + * The full resource name of project that the resource belongs to. + * @type string $project_display_name + * The human readable name of project that the resource belongs to. + * @type string $parent + * The full resource name of resource's parent. + * @type string $parent_display_name + * The human readable name of resource's parent. + * @type array<\Google\Cloud\SecurityCenter\V1p1beta1\Folder>|\Google\Protobuf\Internal\RepeatedField $folders + * Output only. Contains a Folder message for each folder in the assets ancestry. + * The first folder is the deepest nested folder, and the last folder is the + * folder directly under the Organization. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\Resource::initOnce(); + parent::__construct($data); + } + + /** + * The full resource name of the resource. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The full resource name of the resource. See: + * https://cloud.google.com/apis/design/resource_names#full_resource_name + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The full resource name of project that the resource belongs to. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * The full resource name of project that the resource belongs to. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * The human readable name of project that the resource belongs to. + * + * Generated from protobuf field string project_display_name = 3; + * @return string + */ + public function getProjectDisplayName() + { + return $this->project_display_name; + } + + /** + * The human readable name of project that the resource belongs to. + * + * Generated from protobuf field string project_display_name = 3; + * @param string $var + * @return $this + */ + public function setProjectDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->project_display_name = $var; + + return $this; + } + + /** + * The full resource name of resource's parent. + * + * Generated from protobuf field string parent = 4; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * The full resource name of resource's parent. + * + * Generated from protobuf field string parent = 4; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The human readable name of resource's parent. + * + * Generated from protobuf field string parent_display_name = 5; + * @return string + */ + public function getParentDisplayName() + { + return $this->parent_display_name; + } + + /** + * The human readable name of resource's parent. + * + * Generated from protobuf field string parent_display_name = 5; + * @param string $var + * @return $this + */ + public function setParentDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->parent_display_name = $var; + + return $this; + } + + /** + * Output only. Contains a Folder message for each folder in the assets ancestry. + * The first folder is the deepest nested folder, and the last folder is the + * folder directly under the Organization. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1p1beta1.Folder folders = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFolders() + { + return $this->folders; + } + + /** + * Output only. Contains a Folder message for each folder in the assets ancestry. + * The first folder is the deepest nested folder, and the last folder is the + * folder directly under the Organization. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1p1beta1.Folder folders = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\SecurityCenter\V1p1beta1\Folder>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFolders($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1p1beta1\Folder::class); + $this->folders = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/RunAssetDiscoveryRequest.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/RunAssetDiscoveryRequest.php new file mode 100644 index 000000000000..7cf38c3e5319 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/RunAssetDiscoveryRequest.php @@ -0,0 +1,71 @@ +google.cloud.securitycenter.v1p1beta1.RunAssetDiscoveryRequest + */ +class RunAssetDiscoveryRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the organization to run asset discovery for. Its format is + * "organizations/[organization_id]". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Name of the organization to run asset discovery for. Its format is + * "organizations/[organization_id]". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the organization to run asset discovery for. Its format is + * "organizations/[organization_id]". + * + * 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. Name of the organization to run asset discovery for. Its format is + * "organizations/[organization_id]". + * + * 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; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/RunAssetDiscoveryResponse.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/RunAssetDiscoveryResponse.php new file mode 100644 index 000000000000..3e04eb554e2a --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/RunAssetDiscoveryResponse.php @@ -0,0 +1,111 @@ +google.cloud.securitycenter.v1p1beta1.RunAssetDiscoveryResponse + */ +class RunAssetDiscoveryResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The state of an asset discovery run. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.RunAssetDiscoveryResponse.State state = 1; + */ + protected $state = 0; + /** + * The duration between asset discovery run start and end + * + * Generated from protobuf field .google.protobuf.Duration duration = 2; + */ + protected $duration = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $state + * The state of an asset discovery run. + * @type \Google\Protobuf\Duration $duration + * The duration between asset discovery run start and end + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\RunAssetDiscoveryResponse::initOnce(); + parent::__construct($data); + } + + /** + * The state of an asset discovery run. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.RunAssetDiscoveryResponse.State state = 1; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * The state of an asset discovery run. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.RunAssetDiscoveryResponse.State state = 1; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1p1beta1\RunAssetDiscoveryResponse\State::class); + $this->state = $var; + + return $this; + } + + /** + * The duration between asset discovery run start and end + * + * Generated from protobuf field .google.protobuf.Duration duration = 2; + * @return \Google\Protobuf\Duration|null + */ + public function getDuration() + { + return $this->duration; + } + + public function hasDuration() + { + return isset($this->duration); + } + + public function clearDuration() + { + unset($this->duration); + } + + /** + * The duration between asset discovery run start and end + * + * Generated from protobuf field .google.protobuf.Duration duration = 2; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->duration = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/RunAssetDiscoveryResponse/State.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/RunAssetDiscoveryResponse/State.php new file mode 100644 index 000000000000..ca26f2bcbecd --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/RunAssetDiscoveryResponse/State.php @@ -0,0 +1,72 @@ +google.cloud.securitycenter.v1p1beta1.RunAssetDiscoveryResponse.State + */ +class State +{ + /** + * Asset discovery run state was unspecified. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Asset discovery run completed successfully. + * + * Generated from protobuf enum COMPLETED = 1; + */ + const COMPLETED = 1; + /** + * Asset discovery run was cancelled with tasks still pending, as another + * run for the same organization was started with a higher priority. + * + * Generated from protobuf enum SUPERSEDED = 2; + */ + const SUPERSEDED = 2; + /** + * Asset discovery run was killed and terminated. + * + * Generated from protobuf enum TERMINATED = 3; + */ + const TERMINATED = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::COMPLETED => 'COMPLETED', + self::SUPERSEDED => 'SUPERSEDED', + self::TERMINATED => 'TERMINATED', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\SecurityCenter\V1p1beta1\RunAssetDiscoveryResponse_State::class); + diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/RunAssetDiscoveryResponse_State.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/RunAssetDiscoveryResponse_State.php new file mode 100644 index 000000000000..742ab00f3ac1 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/RunAssetDiscoveryResponse_State.php @@ -0,0 +1,16 @@ +_simpleRequest('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/CreateSource', + $argument, + ['\Google\Cloud\SecurityCenter\V1p1beta1\Source', 'decode'], + $metadata, $options); + } + + /** + * Creates a finding. The corresponding source must exist for finding + * creation to succeed. + * @param \Google\Cloud\SecurityCenter\V1p1beta1\CreateFindingRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateFinding(\Google\Cloud\SecurityCenter\V1p1beta1\CreateFindingRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/CreateFinding', + $argument, + ['\Google\Cloud\SecurityCenter\V1p1beta1\Finding', 'decode'], + $metadata, $options); + } + + /** + * Creates a notification config. + * @param \Google\Cloud\SecurityCenter\V1p1beta1\CreateNotificationConfigRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateNotificationConfig(\Google\Cloud\SecurityCenter\V1p1beta1\CreateNotificationConfigRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/CreateNotificationConfig', + $argument, + ['\Google\Cloud\SecurityCenter\V1p1beta1\NotificationConfig', 'decode'], + $metadata, $options); + } + + /** + * Deletes a notification config. + * @param \Google\Cloud\SecurityCenter\V1p1beta1\DeleteNotificationConfigRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteNotificationConfig(\Google\Cloud\SecurityCenter\V1p1beta1\DeleteNotificationConfigRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/DeleteNotificationConfig', + $argument, + ['\Google\Protobuf\GPBEmpty', 'decode'], + $metadata, $options); + } + + /** + * Gets the access control policy on the specified Source. + * @param \Google\Cloud\Iam\V1\GetIamPolicyRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetIamPolicy(\Google\Cloud\Iam\V1\GetIamPolicyRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/GetIamPolicy', + $argument, + ['\Google\Cloud\Iam\V1\Policy', 'decode'], + $metadata, $options); + } + + /** + * Gets a notification config. + * @param \Google\Cloud\SecurityCenter\V1p1beta1\GetNotificationConfigRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetNotificationConfig(\Google\Cloud\SecurityCenter\V1p1beta1\GetNotificationConfigRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/GetNotificationConfig', + $argument, + ['\Google\Cloud\SecurityCenter\V1p1beta1\NotificationConfig', 'decode'], + $metadata, $options); + } + + /** + * Gets the settings for an organization. + * @param \Google\Cloud\SecurityCenter\V1p1beta1\GetOrganizationSettingsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetOrganizationSettings(\Google\Cloud\SecurityCenter\V1p1beta1\GetOrganizationSettingsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/GetOrganizationSettings', + $argument, + ['\Google\Cloud\SecurityCenter\V1p1beta1\OrganizationSettings', 'decode'], + $metadata, $options); + } + + /** + * Gets a source. + * @param \Google\Cloud\SecurityCenter\V1p1beta1\GetSourceRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetSource(\Google\Cloud\SecurityCenter\V1p1beta1\GetSourceRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/GetSource', + $argument, + ['\Google\Cloud\SecurityCenter\V1p1beta1\Source', 'decode'], + $metadata, $options); + } + + /** + * Filters an organization's assets and groups them by their specified + * properties. + * @param \Google\Cloud\SecurityCenter\V1p1beta1\GroupAssetsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GroupAssets(\Google\Cloud\SecurityCenter\V1p1beta1\GroupAssetsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/GroupAssets', + $argument, + ['\Google\Cloud\SecurityCenter\V1p1beta1\GroupAssetsResponse', 'decode'], + $metadata, $options); + } + + /** + * Filters an organization or source's findings and groups them by their + * specified properties. + * + * To group across all sources provide a `-` as the source id. + * Example: /v1/organizations/{organization_id}/sources/-/findings, + * /v1/folders/{folder_id}/sources/-/findings, + * /v1/projects/{project_id}/sources/-/findings + * @param \Google\Cloud\SecurityCenter\V1p1beta1\GroupFindingsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GroupFindings(\Google\Cloud\SecurityCenter\V1p1beta1\GroupFindingsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/GroupFindings', + $argument, + ['\Google\Cloud\SecurityCenter\V1p1beta1\GroupFindingsResponse', 'decode'], + $metadata, $options); + } + + /** + * Lists an organization's assets. + * @param \Google\Cloud\SecurityCenter\V1p1beta1\ListAssetsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListAssets(\Google\Cloud\SecurityCenter\V1p1beta1\ListAssetsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/ListAssets', + $argument, + ['\Google\Cloud\SecurityCenter\V1p1beta1\ListAssetsResponse', 'decode'], + $metadata, $options); + } + + /** + * Lists an organization or source's findings. + * + * To list across all sources provide a `-` as the source id. + * Example: /v1p1beta1/organizations/{organization_id}/sources/-/findings + * @param \Google\Cloud\SecurityCenter\V1p1beta1\ListFindingsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListFindings(\Google\Cloud\SecurityCenter\V1p1beta1\ListFindingsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/ListFindings', + $argument, + ['\Google\Cloud\SecurityCenter\V1p1beta1\ListFindingsResponse', 'decode'], + $metadata, $options); + } + + /** + * Lists notification configs. + * @param \Google\Cloud\SecurityCenter\V1p1beta1\ListNotificationConfigsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListNotificationConfigs(\Google\Cloud\SecurityCenter\V1p1beta1\ListNotificationConfigsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/ListNotificationConfigs', + $argument, + ['\Google\Cloud\SecurityCenter\V1p1beta1\ListNotificationConfigsResponse', 'decode'], + $metadata, $options); + } + + /** + * Lists all sources belonging to an organization. + * @param \Google\Cloud\SecurityCenter\V1p1beta1\ListSourcesRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListSources(\Google\Cloud\SecurityCenter\V1p1beta1\ListSourcesRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/ListSources', + $argument, + ['\Google\Cloud\SecurityCenter\V1p1beta1\ListSourcesResponse', 'decode'], + $metadata, $options); + } + + /** + * Runs asset discovery. The discovery is tracked with a long-running + * operation. + * + * This API can only be called with limited frequency for an organization. If + * it is called too frequently the caller will receive a TOO_MANY_REQUESTS + * error. + * @param \Google\Cloud\SecurityCenter\V1p1beta1\RunAssetDiscoveryRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function RunAssetDiscovery(\Google\Cloud\SecurityCenter\V1p1beta1\RunAssetDiscoveryRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/RunAssetDiscovery', + $argument, + ['\Google\LongRunning\Operation', 'decode'], + $metadata, $options); + } + + /** + * Updates the state of a finding. + * @param \Google\Cloud\SecurityCenter\V1p1beta1\SetFindingStateRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function SetFindingState(\Google\Cloud\SecurityCenter\V1p1beta1\SetFindingStateRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/SetFindingState', + $argument, + ['\Google\Cloud\SecurityCenter\V1p1beta1\Finding', 'decode'], + $metadata, $options); + } + + /** + * Sets the access control policy on the specified Source. + * @param \Google\Cloud\Iam\V1\SetIamPolicyRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function SetIamPolicy(\Google\Cloud\Iam\V1\SetIamPolicyRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/SetIamPolicy', + $argument, + ['\Google\Cloud\Iam\V1\Policy', 'decode'], + $metadata, $options); + } + + /** + * Returns the permissions that a caller has on the specified source. + * @param \Google\Cloud\Iam\V1\TestIamPermissionsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function TestIamPermissions(\Google\Cloud\Iam\V1\TestIamPermissionsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/TestIamPermissions', + $argument, + ['\Google\Cloud\Iam\V1\TestIamPermissionsResponse', 'decode'], + $metadata, $options); + } + + /** + * Creates or updates a finding. The corresponding source must exist for a + * finding creation to succeed. + * @param \Google\Cloud\SecurityCenter\V1p1beta1\UpdateFindingRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateFinding(\Google\Cloud\SecurityCenter\V1p1beta1\UpdateFindingRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/UpdateFinding', + $argument, + ['\Google\Cloud\SecurityCenter\V1p1beta1\Finding', 'decode'], + $metadata, $options); + } + + /** + * Updates a notification config. The following update + * fields are allowed: description, pubsub_topic, streaming_config.filter + * @param \Google\Cloud\SecurityCenter\V1p1beta1\UpdateNotificationConfigRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateNotificationConfig(\Google\Cloud\SecurityCenter\V1p1beta1\UpdateNotificationConfigRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/UpdateNotificationConfig', + $argument, + ['\Google\Cloud\SecurityCenter\V1p1beta1\NotificationConfig', 'decode'], + $metadata, $options); + } + + /** + * Updates an organization's settings. + * @param \Google\Cloud\SecurityCenter\V1p1beta1\UpdateOrganizationSettingsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateOrganizationSettings(\Google\Cloud\SecurityCenter\V1p1beta1\UpdateOrganizationSettingsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/UpdateOrganizationSettings', + $argument, + ['\Google\Cloud\SecurityCenter\V1p1beta1\OrganizationSettings', 'decode'], + $metadata, $options); + } + + /** + * Updates a source. + * @param \Google\Cloud\SecurityCenter\V1p1beta1\UpdateSourceRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateSource(\Google\Cloud\SecurityCenter\V1p1beta1\UpdateSourceRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/UpdateSource', + $argument, + ['\Google\Cloud\SecurityCenter\V1p1beta1\Source', 'decode'], + $metadata, $options); + } + + /** + * Updates security marks. + * @param \Google\Cloud\SecurityCenter\V1p1beta1\UpdateSecurityMarksRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateSecurityMarks(\Google\Cloud\SecurityCenter\V1p1beta1\UpdateSecurityMarksRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/UpdateSecurityMarks', + $argument, + ['\Google\Cloud\SecurityCenter\V1p1beta1\SecurityMarks', 'decode'], + $metadata, $options); + } + +} diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/SecurityMarks.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/SecurityMarks.php new file mode 100644 index 000000000000..764bcfd68bb2 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/SecurityMarks.php @@ -0,0 +1,206 @@ +google.cloud.securitycenter.v1p1beta1.SecurityMarks + */ +class SecurityMarks extends \Google\Protobuf\Internal\Message +{ + /** + * The relative resource name of the SecurityMarks. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Examples: + * "organizations/{organization_id}/assets/{asset_id}/securityMarks" + * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks". + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Mutable user specified security marks belonging to the parent resource. + * Constraints are as follows: + * * Keys and values are treated as case insensitive + * * Keys must be between 1 - 256 characters (inclusive) + * * Keys must be letters, numbers, underscores, or dashes + * * Values have leading and trailing whitespace trimmed, remaining + * characters must be between 1 - 4096 characters (inclusive) + * + * Generated from protobuf field map marks = 2; + */ + private $marks; + /** + * The canonical name of the marks. + * Examples: + * "organizations/{organization_id}/assets/{asset_id}/securityMarks" + * "folders/{folder_id}/assets/{asset_id}/securityMarks" + * "projects/{project_number}/assets/{asset_id}/securityMarks" + * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks" + * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks" + * "projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks" + * + * Generated from protobuf field string canonical_name = 3; + */ + protected $canonical_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The relative resource name of the SecurityMarks. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Examples: + * "organizations/{organization_id}/assets/{asset_id}/securityMarks" + * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks". + * @type array|\Google\Protobuf\Internal\MapField $marks + * Mutable user specified security marks belonging to the parent resource. + * Constraints are as follows: + * * Keys and values are treated as case insensitive + * * Keys must be between 1 - 256 characters (inclusive) + * * Keys must be letters, numbers, underscores, or dashes + * * Values have leading and trailing whitespace trimmed, remaining + * characters must be between 1 - 4096 characters (inclusive) + * @type string $canonical_name + * The canonical name of the marks. + * Examples: + * "organizations/{organization_id}/assets/{asset_id}/securityMarks" + * "folders/{folder_id}/assets/{asset_id}/securityMarks" + * "projects/{project_number}/assets/{asset_id}/securityMarks" + * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks" + * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks" + * "projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks" + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\SecurityMarks::initOnce(); + parent::__construct($data); + } + + /** + * The relative resource name of the SecurityMarks. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Examples: + * "organizations/{organization_id}/assets/{asset_id}/securityMarks" + * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks". + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The relative resource name of the SecurityMarks. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Examples: + * "organizations/{organization_id}/assets/{asset_id}/securityMarks" + * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks". + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Mutable user specified security marks belonging to the parent resource. + * Constraints are as follows: + * * Keys and values are treated as case insensitive + * * Keys must be between 1 - 256 characters (inclusive) + * * Keys must be letters, numbers, underscores, or dashes + * * Values have leading and trailing whitespace trimmed, remaining + * characters must be between 1 - 4096 characters (inclusive) + * + * Generated from protobuf field map marks = 2; + * @return \Google\Protobuf\Internal\MapField + */ + public function getMarks() + { + return $this->marks; + } + + /** + * Mutable user specified security marks belonging to the parent resource. + * Constraints are as follows: + * * Keys and values are treated as case insensitive + * * Keys must be between 1 - 256 characters (inclusive) + * * Keys must be letters, numbers, underscores, or dashes + * * Values have leading and trailing whitespace trimmed, remaining + * characters must be between 1 - 4096 characters (inclusive) + * + * Generated from protobuf field map marks = 2; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setMarks($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->marks = $arr; + + return $this; + } + + /** + * The canonical name of the marks. + * Examples: + * "organizations/{organization_id}/assets/{asset_id}/securityMarks" + * "folders/{folder_id}/assets/{asset_id}/securityMarks" + * "projects/{project_number}/assets/{asset_id}/securityMarks" + * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks" + * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks" + * "projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks" + * + * Generated from protobuf field string canonical_name = 3; + * @return string + */ + public function getCanonicalName() + { + return $this->canonical_name; + } + + /** + * The canonical name of the marks. + * Examples: + * "organizations/{organization_id}/assets/{asset_id}/securityMarks" + * "folders/{folder_id}/assets/{asset_id}/securityMarks" + * "projects/{project_number}/assets/{asset_id}/securityMarks" + * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks" + * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks" + * "projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks" + * + * Generated from protobuf field string canonical_name = 3; + * @param string $var + * @return $this + */ + public function setCanonicalName($var) + { + GPBUtil::checkString($var, True); + $this->canonical_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/SetFindingStateRequest.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/SetFindingStateRequest.php new file mode 100644 index 000000000000..b4da815ef956 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/SetFindingStateRequest.php @@ -0,0 +1,157 @@ +google.cloud.securitycenter.v1p1beta1.SetFindingStateRequest + */ +class SetFindingStateRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The relative resource name of the finding. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Example: + * "organizations/{organization_id}/sources/{source_id}/finding/{finding_id}". + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The desired State of the finding. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Finding.State state = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $state = 0; + /** + * Required. The time at which the updated state takes effect. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $start_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The relative resource name of the finding. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Example: + * "organizations/{organization_id}/sources/{source_id}/finding/{finding_id}". + * @type int $state + * Required. The desired State of the finding. + * @type \Google\Protobuf\Timestamp $start_time + * Required. The time at which the updated state takes effect. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The relative resource name of the finding. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Example: + * "organizations/{organization_id}/sources/{source_id}/finding/{finding_id}". + * + * 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. The relative resource name of the finding. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Example: + * "organizations/{organization_id}/sources/{source_id}/finding/{finding_id}". + * + * 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; + } + + /** + * Required. The desired State of the finding. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Finding.State state = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Required. The desired State of the finding. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Finding.State state = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1p1beta1\Finding\State::class); + $this->state = $var; + + return $this; + } + + /** + * Required. The time at which the updated state takes effect. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * Required. The time at which the updated state takes effect. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Source.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Source.php new file mode 100644 index 000000000000..494d5ccd87d0 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Source.php @@ -0,0 +1,243 @@ +google.cloud.securitycenter.v1p1beta1.Source + */ +class Source extends \Google\Protobuf\Internal\Message +{ + /** + * The relative resource name of this source. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Example: + * "organizations/{organization_id}/sources/{source_id}" + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The source's display name. + * A source's display name must be unique amongst its siblings, for example, + * two sources with the same parent can't share the same display name. + * The display name must have a length between 1 and 64 characters + * (inclusive). + * + * Generated from protobuf field string display_name = 2; + */ + protected $display_name = ''; + /** + * The description of the source (max of 1024 characters). + * Example: + * "Web Security Scanner is a web security scanner for common + * vulnerabilities in App Engine applications. It can automatically + * scan and detect four common vulnerabilities, including cross-site-scripting + * (XSS), Flash injection, mixed content (HTTP in HTTPS), and + * outdated/insecure libraries." + * + * Generated from protobuf field string description = 3; + */ + protected $description = ''; + /** + * The canonical name of the finding. It's either + * "organizations/{organization_id}/sources/{source_id}", + * "folders/{folder_id}/sources/{source_id}" or + * "projects/{project_number}/sources/{source_id}", + * depending on the closest CRM ancestor of the resource associated with the + * finding. + * + * Generated from protobuf field string canonical_name = 14; + */ + protected $canonical_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The relative resource name of this source. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Example: + * "organizations/{organization_id}/sources/{source_id}" + * @type string $display_name + * The source's display name. + * A source's display name must be unique amongst its siblings, for example, + * two sources with the same parent can't share the same display name. + * The display name must have a length between 1 and 64 characters + * (inclusive). + * @type string $description + * The description of the source (max of 1024 characters). + * Example: + * "Web Security Scanner is a web security scanner for common + * vulnerabilities in App Engine applications. It can automatically + * scan and detect four common vulnerabilities, including cross-site-scripting + * (XSS), Flash injection, mixed content (HTTP in HTTPS), and + * outdated/insecure libraries." + * @type string $canonical_name + * The canonical name of the finding. It's either + * "organizations/{organization_id}/sources/{source_id}", + * "folders/{folder_id}/sources/{source_id}" or + * "projects/{project_number}/sources/{source_id}", + * depending on the closest CRM ancestor of the resource associated with the + * finding. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\Source::initOnce(); + parent::__construct($data); + } + + /** + * The relative resource name of this source. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Example: + * "organizations/{organization_id}/sources/{source_id}" + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The relative resource name of this source. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Example: + * "organizations/{organization_id}/sources/{source_id}" + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The source's display name. + * A source's display name must be unique amongst its siblings, for example, + * two sources with the same parent can't share the same display name. + * The display name must have a length between 1 and 64 characters + * (inclusive). + * + * Generated from protobuf field string display_name = 2; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The source's display name. + * A source's display name must be unique amongst its siblings, for example, + * two sources with the same parent can't share the same display name. + * The display name must have a length between 1 and 64 characters + * (inclusive). + * + * 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; + } + + /** + * The description of the source (max of 1024 characters). + * Example: + * "Web Security Scanner is a web security scanner for common + * vulnerabilities in App Engine applications. It can automatically + * scan and detect four common vulnerabilities, including cross-site-scripting + * (XSS), Flash injection, mixed content (HTTP in HTTPS), and + * outdated/insecure libraries." + * + * Generated from protobuf field string description = 3; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * The description of the source (max of 1024 characters). + * Example: + * "Web Security Scanner is a web security scanner for common + * vulnerabilities in App Engine applications. It can automatically + * scan and detect four common vulnerabilities, including cross-site-scripting + * (XSS), Flash injection, mixed content (HTTP in HTTPS), and + * outdated/insecure libraries." + * + * Generated from protobuf field string description = 3; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * The canonical name of the finding. It's either + * "organizations/{organization_id}/sources/{source_id}", + * "folders/{folder_id}/sources/{source_id}" or + * "projects/{project_number}/sources/{source_id}", + * depending on the closest CRM ancestor of the resource associated with the + * finding. + * + * Generated from protobuf field string canonical_name = 14; + * @return string + */ + public function getCanonicalName() + { + return $this->canonical_name; + } + + /** + * The canonical name of the finding. It's either + * "organizations/{organization_id}/sources/{source_id}", + * "folders/{folder_id}/sources/{source_id}" or + * "projects/{project_number}/sources/{source_id}", + * depending on the closest CRM ancestor of the resource associated with the + * finding. + * + * Generated from protobuf field string canonical_name = 14; + * @param string $var + * @return $this + */ + public function setCanonicalName($var) + { + GPBUtil::checkString($var, True); + $this->canonical_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/UpdateFindingRequest.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/UpdateFindingRequest.php new file mode 100644 index 000000000000..f56a1a74b304 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/UpdateFindingRequest.php @@ -0,0 +1,157 @@ +google.cloud.securitycenter.v1p1beta1.UpdateFindingRequest + */ +class UpdateFindingRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The finding resource to update or create if it does not already exist. + * parent, security_marks, and update_time will be ignored. + * In the case of creation, the finding id portion of the name must be + * alphanumeric and less than or equal to 32 characters and greater than 0 + * characters in length. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Finding finding = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $finding = null; + /** + * The FieldMask to use when updating the finding resource. This field should + * not be specified when creating a finding. + * When updating a finding, an empty mask is treated as updating all mutable + * fields and replacing source_properties. Individual source_properties can + * be added/updated by using "source_properties." in the field + * mask. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\SecurityCenter\V1p1beta1\Finding $finding + * Required. The finding resource to update or create if it does not already exist. + * parent, security_marks, and update_time will be ignored. + * In the case of creation, the finding id portion of the name must be + * alphanumeric and less than or equal to 32 characters and greater than 0 + * characters in length. + * @type \Google\Protobuf\FieldMask $update_mask + * The FieldMask to use when updating the finding resource. This field should + * not be specified when creating a finding. + * When updating a finding, an empty mask is treated as updating all mutable + * fields and replacing source_properties. Individual source_properties can + * be added/updated by using "source_properties." in the field + * mask. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The finding resource to update or create if it does not already exist. + * parent, security_marks, and update_time will be ignored. + * In the case of creation, the finding id portion of the name must be + * alphanumeric and less than or equal to 32 characters and greater than 0 + * characters in length. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Finding finding = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\SecurityCenter\V1p1beta1\Finding|null + */ + public function getFinding() + { + return $this->finding; + } + + public function hasFinding() + { + return isset($this->finding); + } + + public function clearFinding() + { + unset($this->finding); + } + + /** + * Required. The finding resource to update or create if it does not already exist. + * parent, security_marks, and update_time will be ignored. + * In the case of creation, the finding id portion of the name must be + * alphanumeric and less than or equal to 32 characters and greater than 0 + * characters in length. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Finding finding = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\SecurityCenter\V1p1beta1\Finding $var + * @return $this + */ + public function setFinding($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1p1beta1\Finding::class); + $this->finding = $var; + + return $this; + } + + /** + * The FieldMask to use when updating the finding resource. This field should + * not be specified when creating a finding. + * When updating a finding, an empty mask is treated as updating all mutable + * fields and replacing source_properties. Individual source_properties can + * be added/updated by using "source_properties." in the field + * mask. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * The FieldMask to use when updating the finding resource. This field should + * not be specified when creating a finding. + * When updating a finding, an empty mask is treated as updating all mutable + * fields and replacing source_properties. Individual source_properties can + * be added/updated by using "source_properties." in the field + * mask. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/UpdateNotificationConfigRequest.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/UpdateNotificationConfigRequest.php new file mode 100644 index 000000000000..bbd8b7c55d97 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/UpdateNotificationConfigRequest.php @@ -0,0 +1,125 @@ +google.cloud.securitycenter.v1p1beta1.UpdateNotificationConfigRequest + */ +class UpdateNotificationConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The notification config to update. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.NotificationConfig notification_config = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $notification_config = null; + /** + * The FieldMask to use when updating the notification config. + * If empty all mutable fields will be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\SecurityCenter\V1p1beta1\NotificationConfig $notification_config + * Required. The notification config to update. + * @type \Google\Protobuf\FieldMask $update_mask + * The FieldMask to use when updating the notification config. + * If empty all mutable fields will be updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The notification config to update. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.NotificationConfig notification_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\SecurityCenter\V1p1beta1\NotificationConfig|null + */ + public function getNotificationConfig() + { + return $this->notification_config; + } + + public function hasNotificationConfig() + { + return isset($this->notification_config); + } + + public function clearNotificationConfig() + { + unset($this->notification_config); + } + + /** + * Required. The notification config to update. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.NotificationConfig notification_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\SecurityCenter\V1p1beta1\NotificationConfig $var + * @return $this + */ + public function setNotificationConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1p1beta1\NotificationConfig::class); + $this->notification_config = $var; + + return $this; + } + + /** + * The FieldMask to use when updating the notification config. + * If empty all mutable fields will be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * The FieldMask to use when updating the notification config. + * If empty all mutable fields will be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/UpdateOrganizationSettingsRequest.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/UpdateOrganizationSettingsRequest.php new file mode 100644 index 000000000000..ab2d90e1566d --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/UpdateOrganizationSettingsRequest.php @@ -0,0 +1,125 @@ +google.cloud.securitycenter.v1p1beta1.UpdateOrganizationSettingsRequest + */ +class UpdateOrganizationSettingsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The organization settings resource to update. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.OrganizationSettings organization_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $organization_settings = null; + /** + * The FieldMask to use when updating the settings resource. + * If empty all mutable fields will be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\SecurityCenter\V1p1beta1\OrganizationSettings $organization_settings + * Required. The organization settings resource to update. + * @type \Google\Protobuf\FieldMask $update_mask + * The FieldMask to use when updating the settings resource. + * If empty all mutable fields will be updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The organization settings resource to update. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.OrganizationSettings organization_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\SecurityCenter\V1p1beta1\OrganizationSettings|null + */ + public function getOrganizationSettings() + { + return $this->organization_settings; + } + + public function hasOrganizationSettings() + { + return isset($this->organization_settings); + } + + public function clearOrganizationSettings() + { + unset($this->organization_settings); + } + + /** + * Required. The organization settings resource to update. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.OrganizationSettings organization_settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\SecurityCenter\V1p1beta1\OrganizationSettings $var + * @return $this + */ + public function setOrganizationSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1p1beta1\OrganizationSettings::class); + $this->organization_settings = $var; + + return $this; + } + + /** + * The FieldMask to use when updating the settings resource. + * If empty all mutable fields will be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * The FieldMask to use when updating the settings resource. + * If empty all mutable fields will be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/UpdateSecurityMarksRequest.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/UpdateSecurityMarksRequest.php new file mode 100644 index 000000000000..eb9d37881735 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/UpdateSecurityMarksRequest.php @@ -0,0 +1,185 @@ +google.cloud.securitycenter.v1p1beta1.UpdateSecurityMarksRequest + */ +class UpdateSecurityMarksRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The security marks resource to update. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.SecurityMarks security_marks = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $security_marks = null; + /** + * The FieldMask to use when updating the security marks resource. + * The field mask must not contain duplicate fields. + * If empty or set to "marks", all marks will be replaced. Individual + * marks can be updated using "marks.". + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + /** + * The time at which the updated SecurityMarks take effect. + * If not set uses current server time. Updates will be applied to the + * SecurityMarks that are active immediately preceding this time. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 3; + */ + protected $start_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\SecurityCenter\V1p1beta1\SecurityMarks $security_marks + * Required. The security marks resource to update. + * @type \Google\Protobuf\FieldMask $update_mask + * The FieldMask to use when updating the security marks resource. + * The field mask must not contain duplicate fields. + * If empty or set to "marks", all marks will be replaced. Individual + * marks can be updated using "marks.". + * @type \Google\Protobuf\Timestamp $start_time + * The time at which the updated SecurityMarks take effect. + * If not set uses current server time. Updates will be applied to the + * SecurityMarks that are active immediately preceding this time. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The security marks resource to update. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.SecurityMarks security_marks = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\SecurityCenter\V1p1beta1\SecurityMarks|null + */ + public function getSecurityMarks() + { + return $this->security_marks; + } + + public function hasSecurityMarks() + { + return isset($this->security_marks); + } + + public function clearSecurityMarks() + { + unset($this->security_marks); + } + + /** + * Required. The security marks resource to update. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.SecurityMarks security_marks = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\SecurityCenter\V1p1beta1\SecurityMarks $var + * @return $this + */ + public function setSecurityMarks($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1p1beta1\SecurityMarks::class); + $this->security_marks = $var; + + return $this; + } + + /** + * The FieldMask to use when updating the security marks resource. + * The field mask must not contain duplicate fields. + * If empty or set to "marks", all marks will be replaced. Individual + * marks can be updated using "marks.". + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * The FieldMask to use when updating the security marks resource. + * The field mask must not contain duplicate fields. + * If empty or set to "marks", all marks will be replaced. Individual + * marks can be updated using "marks.". + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * The time at which the updated SecurityMarks take effect. + * If not set uses current server time. Updates will be applied to the + * SecurityMarks that are active immediately preceding this time. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * The time at which the updated SecurityMarks take effect. + * If not set uses current server time. Updates will be applied to the + * SecurityMarks that are active immediately preceding this time. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/UpdateSourceRequest.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/UpdateSourceRequest.php new file mode 100644 index 000000000000..ba5092d0370b --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/UpdateSourceRequest.php @@ -0,0 +1,125 @@ +google.cloud.securitycenter.v1p1beta1.UpdateSourceRequest + */ +class UpdateSourceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The source resource to update. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Source source = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $source = null; + /** + * The FieldMask to use when updating the source resource. + * If empty all mutable fields will be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\SecurityCenter\V1p1beta1\Source $source + * Required. The source resource to update. + * @type \Google\Protobuf\FieldMask $update_mask + * The FieldMask to use when updating the source resource. + * If empty all mutable fields will be updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\SecuritycenterService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The source resource to update. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Source source = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\SecurityCenter\V1p1beta1\Source|null + */ + public function getSource() + { + return $this->source; + } + + public function hasSource() + { + return isset($this->source); + } + + public function clearSource() + { + unset($this->source); + } + + /** + * Required. The source resource to update. + * + * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Source source = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\SecurityCenter\V1p1beta1\Source $var + * @return $this + */ + public function setSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1p1beta1\Source::class); + $this->source = $var; + + return $this; + } + + /** + * The FieldMask to use when updating the source resource. + * If empty all mutable fields will be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * The FieldMask to use when updating the source resource. + * If empty all mutable fields will be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/create_finding.php b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/create_finding.php new file mode 100644 index 000000000000..0cff5a2094a8 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/create_finding.php @@ -0,0 +1,73 @@ +createFinding($formattedParent, $findingId, $finding); + 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 +{ + $formattedParent = SecurityCenterClient::sourceName('[ORGANIZATION]', '[SOURCE]'); + $findingId = '[FINDING_ID]'; + + create_finding_sample($formattedParent, $findingId); +} +// [END securitycenter_v1p1beta1_generated_SecurityCenter_CreateFinding_sync] diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/create_notification_config.php b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/create_notification_config.php new file mode 100644 index 000000000000..bbb4920611b1 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/create_notification_config.php @@ -0,0 +1,78 @@ +createNotificationConfig( + $formattedParent, + $configId, + $notificationConfig + ); + 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 +{ + $formattedParent = SecurityCenterClient::organizationName('[ORGANIZATION]'); + $configId = '[CONFIG_ID]'; + + create_notification_config_sample($formattedParent, $configId); +} +// [END securitycenter_v1p1beta1_generated_SecurityCenter_CreateNotificationConfig_sync] diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/create_source.php b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/create_source.php new file mode 100644 index 000000000000..8d5e68ef26f8 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/create_source.php @@ -0,0 +1,70 @@ +createSource($formattedParent, $source); + 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 +{ + $formattedParent = SecurityCenterClient::organizationName('[ORGANIZATION]'); + + create_source_sample($formattedParent); +} +// [END securitycenter_v1p1beta1_generated_SecurityCenter_CreateSource_sync] diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/delete_notification_config.php b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/delete_notification_config.php new file mode 100644 index 000000000000..956d07faea1b --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/delete_notification_config.php @@ -0,0 +1,68 @@ +deleteNotificationConfig($formattedName); + printf('Call completed successfully.' . PHP_EOL); + } 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 = SecurityCenterClient::notificationConfigName( + '[ORGANIZATION]', + '[NOTIFICATION_CONFIG]' + ); + + delete_notification_config_sample($formattedName); +} +// [END securitycenter_v1p1beta1_generated_SecurityCenter_DeleteNotificationConfig_sync] diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/get_iam_policy.php b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/get_iam_policy.php new file mode 100644 index 000000000000..a0ffd5ba3043 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/get_iam_policy.php @@ -0,0 +1,66 @@ +getIamPolicy($resource); + 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 +{ + $resource = '[RESOURCE]'; + + get_iam_policy_sample($resource); +} +// [END securitycenter_v1p1beta1_generated_SecurityCenter_GetIamPolicy_sync] diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/get_notification_config.php b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/get_notification_config.php new file mode 100644 index 000000000000..df55ee248c5d --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/get_notification_config.php @@ -0,0 +1,70 @@ +getNotificationConfig($formattedName); + 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 = SecurityCenterClient::notificationConfigName( + '[ORGANIZATION]', + '[NOTIFICATION_CONFIG]' + ); + + get_notification_config_sample($formattedName); +} +// [END securitycenter_v1p1beta1_generated_SecurityCenter_GetNotificationConfig_sync] diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/get_organization_settings.php b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/get_organization_settings.php new file mode 100644 index 000000000000..6110a3304879 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/get_organization_settings.php @@ -0,0 +1,67 @@ +getOrganizationSettings($formattedName); + 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 = SecurityCenterClient::organizationSettingsName('[ORGANIZATION]'); + + get_organization_settings_sample($formattedName); +} +// [END securitycenter_v1p1beta1_generated_SecurityCenter_GetOrganizationSettings_sync] diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/get_source.php b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/get_source.php new file mode 100644 index 000000000000..275a677ab8ac --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/get_source.php @@ -0,0 +1,67 @@ +getSource($formattedName); + 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 = SecurityCenterClient::sourceName('[ORGANIZATION]', '[SOURCE]'); + + get_source_sample($formattedName); +} +// [END securitycenter_v1p1beta1_generated_SecurityCenter_GetSource_sync] diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/group_assets.php b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/group_assets.php new file mode 100644 index 000000000000..46fee29f1e52 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/group_assets.php @@ -0,0 +1,93 @@ +groupAssets($formattedParent, $groupBy); + + /** @var GroupResult $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 = SecurityCenterClient::projectName('[PROJECT]'); + $groupBy = '[GROUP_BY]'; + + group_assets_sample($formattedParent, $groupBy); +} +// [END securitycenter_v1p1beta1_generated_SecurityCenter_GroupAssets_sync] diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/group_findings.php b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/group_findings.php new file mode 100644 index 000000000000..c55257b8e672 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/group_findings.php @@ -0,0 +1,99 @@ +groupFindings($formattedParent, $groupBy); + + /** @var GroupResult $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 = SecurityCenterClient::sourceName('[ORGANIZATION]', '[SOURCE]'); + $groupBy = '[GROUP_BY]'; + + group_findings_sample($formattedParent, $groupBy); +} +// [END securitycenter_v1p1beta1_generated_SecurityCenter_GroupFindings_sync] diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/list_assets.php b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/list_assets.php new file mode 100644 index 000000000000..268cf4fa4c5a --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/list_assets.php @@ -0,0 +1,73 @@ +listAssets($formattedParent); + + /** @var ListAssetsResult $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 = SecurityCenterClient::projectName('[PROJECT]'); + + list_assets_sample($formattedParent); +} +// [END securitycenter_v1p1beta1_generated_SecurityCenter_ListAssets_sync] diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/list_findings.php b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/list_findings.php new file mode 100644 index 000000000000..56fd573fa7c6 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/list_findings.php @@ -0,0 +1,80 @@ +listFindings($formattedParent); + + /** @var ListFindingsResult $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 = SecurityCenterClient::sourceName('[ORGANIZATION]', '[SOURCE]'); + + list_findings_sample($formattedParent); +} +// [END securitycenter_v1p1beta1_generated_SecurityCenter_ListFindings_sync] diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/list_notification_configs.php b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/list_notification_configs.php new file mode 100644 index 000000000000..7335c11f6ba1 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/list_notification_configs.php @@ -0,0 +1,72 @@ +listNotificationConfigs($formattedParent); + + /** @var NotificationConfig $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 = SecurityCenterClient::organizationName('[ORGANIZATION]'); + + list_notification_configs_sample($formattedParent); +} +// [END securitycenter_v1p1beta1_generated_SecurityCenter_ListNotificationConfigs_sync] diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/list_sources.php b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/list_sources.php new file mode 100644 index 000000000000..382bcf45583c --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/list_sources.php @@ -0,0 +1,73 @@ +listSources($formattedParent); + + /** @var Source $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 = SecurityCenterClient::projectName('[PROJECT]'); + + list_sources_sample($formattedParent); +} +// [END securitycenter_v1p1beta1_generated_SecurityCenter_ListSources_sync] diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/run_asset_discovery.php b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/run_asset_discovery.php new file mode 100644 index 000000000000..4eea12d8f3e3 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/run_asset_discovery.php @@ -0,0 +1,84 @@ +runAssetDiscovery($formattedParent); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var RunAssetDiscoveryResponse $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 +{ + $formattedParent = SecurityCenterClient::organizationName('[ORGANIZATION]'); + + run_asset_discovery_sample($formattedParent); +} +// [END securitycenter_v1p1beta1_generated_SecurityCenter_RunAssetDiscovery_sync] diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/set_finding_state.php b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/set_finding_state.php new file mode 100644 index 000000000000..642360d869f3 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/set_finding_state.php @@ -0,0 +1,76 @@ +setFindingState($formattedName, $state, $startTime); + 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 = SecurityCenterClient::findingName('[ORGANIZATION]', '[SOURCE]', '[FINDING]'); + $state = State::STATE_UNSPECIFIED; + + set_finding_state_sample($formattedName, $state); +} +// [END securitycenter_v1p1beta1_generated_SecurityCenter_SetFindingState_sync] diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/set_iam_policy.php b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/set_iam_policy.php new file mode 100644 index 000000000000..3834e7c78cb2 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/set_iam_policy.php @@ -0,0 +1,69 @@ +setIamPolicy($resource, $policy); + 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 +{ + $resource = '[RESOURCE]'; + + set_iam_policy_sample($resource); +} +// [END securitycenter_v1p1beta1_generated_SecurityCenter_SetIamPolicy_sync] diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/test_iam_permissions.php b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/test_iam_permissions.php new file mode 100644 index 000000000000..fabfa4d120da --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/test_iam_permissions.php @@ -0,0 +1,74 @@ +testIamPermissions($resource, $permissions); + 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 +{ + $resource = '[RESOURCE]'; + $permissionsElement = '[PERMISSIONS]'; + + test_iam_permissions_sample($resource, $permissionsElement); +} +// [END securitycenter_v1p1beta1_generated_SecurityCenter_TestIamPermissions_sync] diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/update_finding.php b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/update_finding.php new file mode 100644 index 000000000000..ce626d9e8231 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/update_finding.php @@ -0,0 +1,57 @@ +updateFinding($finding); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END securitycenter_v1p1beta1_generated_SecurityCenter_UpdateFinding_sync] diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/update_notification_config.php b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/update_notification_config.php new file mode 100644 index 000000000000..9a018595b632 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/update_notification_config.php @@ -0,0 +1,57 @@ +updateNotificationConfig($notificationConfig); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END securitycenter_v1p1beta1_generated_SecurityCenter_UpdateNotificationConfig_sync] diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/update_organization_settings.php b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/update_organization_settings.php new file mode 100644 index 000000000000..051eebbbec8b --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/update_organization_settings.php @@ -0,0 +1,56 @@ +updateOrganizationSettings($organizationSettings); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END securitycenter_v1p1beta1_generated_SecurityCenter_UpdateOrganizationSettings_sync] diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/update_security_marks.php b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/update_security_marks.php new file mode 100644 index 000000000000..d34a80d26599 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/update_security_marks.php @@ -0,0 +1,56 @@ +updateSecurityMarks($securityMarks); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END securitycenter_v1p1beta1_generated_SecurityCenter_UpdateSecurityMarks_sync] diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/update_source.php b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/update_source.php new file mode 100644 index 000000000000..70237f1302f4 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/update_source.php @@ -0,0 +1,56 @@ +updateSource($source); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END securitycenter_v1p1beta1_generated_SecurityCenter_UpdateSource_sync] diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/src/V1p1beta1/Gapic/SecurityCenterGapicClient.php b/owl-bot-staging/SecurityCenter/v1p1beta1/src/V1p1beta1/Gapic/SecurityCenterGapicClient.php new file mode 100644 index 000000000000..732c61a77095 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/src/V1p1beta1/Gapic/SecurityCenterGapicClient.php @@ -0,0 +1,2798 @@ +sourceName('[ORGANIZATION]', '[SOURCE]'); + * $findingId = 'finding_id'; + * $finding = new Finding(); + * $response = $securityCenterClient->createFinding($formattedParent, $findingId, $finding); + * } finally { + * $securityCenterClient->close(); + * } + * ``` + * + * Many parameters require resource names to be formatted in a particular way. To + * assist with these names, this class includes a format method for each type of + * name, and additionally a parseName method to extract the individual identifiers + * contained within formatted names that are returned by the API. + * + * @experimental + */ +class SecurityCenterGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.securitycenter.v1p1beta1.SecurityCenter'; + + /** The default address of the service. */ + const SERVICE_ADDRESS = 'securitycenter.googleapis.com'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static $findingNameTemplate; + + private static $folderNameTemplate; + + private static $folderAssetSecurityMarksNameTemplate; + + private static $folderSourceNameTemplate; + + private static $folderSourceFindingNameTemplate; + + private static $folderSourceFindingSecurityMarksNameTemplate; + + private static $notificationConfigNameTemplate; + + private static $organizationNameTemplate; + + private static $organizationAssetSecurityMarksNameTemplate; + + private static $organizationSettingsNameTemplate; + + private static $organizationSourceNameTemplate; + + private static $organizationSourceFindingNameTemplate; + + private static $organizationSourceFindingSecurityMarksNameTemplate; + + private static $projectNameTemplate; + + private static $projectAssetSecurityMarksNameTemplate; + + private static $projectSourceNameTemplate; + + private static $projectSourceFindingNameTemplate; + + private static $projectSourceFindingSecurityMarksNameTemplate; + + private static $securityMarksNameTemplate; + + private static $sourceNameTemplate; + + private static $topicNameTemplate; + + private static $pathTemplateMap; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/security_center_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/security_center_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/security_center_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/security_center_rest_client_config.php', + ], + ], + ]; + } + + private static function getFindingNameTemplate() + { + if (self::$findingNameTemplate == null) { + self::$findingNameTemplate = new PathTemplate('organizations/{organization}/sources/{source}/findings/{finding}'); + } + + return self::$findingNameTemplate; + } + + private static function getFolderNameTemplate() + { + if (self::$folderNameTemplate == null) { + self::$folderNameTemplate = new PathTemplate('folders/{folder}'); + } + + return self::$folderNameTemplate; + } + + private static function getFolderAssetSecurityMarksNameTemplate() + { + if (self::$folderAssetSecurityMarksNameTemplate == null) { + self::$folderAssetSecurityMarksNameTemplate = new PathTemplate('folders/{folder}/assets/{asset}/securityMarks'); + } + + return self::$folderAssetSecurityMarksNameTemplate; + } + + private static function getFolderSourceNameTemplate() + { + if (self::$folderSourceNameTemplate == null) { + self::$folderSourceNameTemplate = new PathTemplate('folders/{folder}/sources/{source}'); + } + + return self::$folderSourceNameTemplate; + } + + private static function getFolderSourceFindingNameTemplate() + { + if (self::$folderSourceFindingNameTemplate == null) { + self::$folderSourceFindingNameTemplate = new PathTemplate('folders/{folder}/sources/{source}/findings/{finding}'); + } + + return self::$folderSourceFindingNameTemplate; + } + + private static function getFolderSourceFindingSecurityMarksNameTemplate() + { + if (self::$folderSourceFindingSecurityMarksNameTemplate == null) { + self::$folderSourceFindingSecurityMarksNameTemplate = new PathTemplate('folders/{folder}/sources/{source}/findings/{finding}/securityMarks'); + } + + return self::$folderSourceFindingSecurityMarksNameTemplate; + } + + private static function getNotificationConfigNameTemplate() + { + if (self::$notificationConfigNameTemplate == null) { + self::$notificationConfigNameTemplate = new PathTemplate('organizations/{organization}/notificationConfigs/{notification_config}'); + } + + return self::$notificationConfigNameTemplate; + } + + private static function getOrganizationNameTemplate() + { + if (self::$organizationNameTemplate == null) { + self::$organizationNameTemplate = new PathTemplate('organizations/{organization}'); + } + + return self::$organizationNameTemplate; + } + + private static function getOrganizationAssetSecurityMarksNameTemplate() + { + if (self::$organizationAssetSecurityMarksNameTemplate == null) { + self::$organizationAssetSecurityMarksNameTemplate = new PathTemplate('organizations/{organization}/assets/{asset}/securityMarks'); + } + + return self::$organizationAssetSecurityMarksNameTemplate; + } + + private static function getOrganizationSettingsNameTemplate() + { + if (self::$organizationSettingsNameTemplate == null) { + self::$organizationSettingsNameTemplate = new PathTemplate('organizations/{organization}/organizationSettings'); + } + + return self::$organizationSettingsNameTemplate; + } + + private static function getOrganizationSourceNameTemplate() + { + if (self::$organizationSourceNameTemplate == null) { + self::$organizationSourceNameTemplate = new PathTemplate('organizations/{organization}/sources/{source}'); + } + + return self::$organizationSourceNameTemplate; + } + + private static function getOrganizationSourceFindingNameTemplate() + { + if (self::$organizationSourceFindingNameTemplate == null) { + self::$organizationSourceFindingNameTemplate = new PathTemplate('organizations/{organization}/sources/{source}/findings/{finding}'); + } + + return self::$organizationSourceFindingNameTemplate; + } + + private static function getOrganizationSourceFindingSecurityMarksNameTemplate() + { + if (self::$organizationSourceFindingSecurityMarksNameTemplate == null) { + self::$organizationSourceFindingSecurityMarksNameTemplate = new PathTemplate('organizations/{organization}/sources/{source}/findings/{finding}/securityMarks'); + } + + return self::$organizationSourceFindingSecurityMarksNameTemplate; + } + + private static function getProjectNameTemplate() + { + if (self::$projectNameTemplate == null) { + self::$projectNameTemplate = new PathTemplate('projects/{project}'); + } + + return self::$projectNameTemplate; + } + + private static function getProjectAssetSecurityMarksNameTemplate() + { + if (self::$projectAssetSecurityMarksNameTemplate == null) { + self::$projectAssetSecurityMarksNameTemplate = new PathTemplate('projects/{project}/assets/{asset}/securityMarks'); + } + + return self::$projectAssetSecurityMarksNameTemplate; + } + + private static function getProjectSourceNameTemplate() + { + if (self::$projectSourceNameTemplate == null) { + self::$projectSourceNameTemplate = new PathTemplate('projects/{project}/sources/{source}'); + } + + return self::$projectSourceNameTemplate; + } + + private static function getProjectSourceFindingNameTemplate() + { + if (self::$projectSourceFindingNameTemplate == null) { + self::$projectSourceFindingNameTemplate = new PathTemplate('projects/{project}/sources/{source}/findings/{finding}'); + } + + return self::$projectSourceFindingNameTemplate; + } + + private static function getProjectSourceFindingSecurityMarksNameTemplate() + { + if (self::$projectSourceFindingSecurityMarksNameTemplate == null) { + self::$projectSourceFindingSecurityMarksNameTemplate = new PathTemplate('projects/{project}/sources/{source}/findings/{finding}/securityMarks'); + } + + return self::$projectSourceFindingSecurityMarksNameTemplate; + } + + private static function getSecurityMarksNameTemplate() + { + if (self::$securityMarksNameTemplate == null) { + self::$securityMarksNameTemplate = new PathTemplate('organizations/{organization}/assets/{asset}/securityMarks'); + } + + return self::$securityMarksNameTemplate; + } + + private static function getSourceNameTemplate() + { + if (self::$sourceNameTemplate == null) { + self::$sourceNameTemplate = new PathTemplate('organizations/{organization}/sources/{source}'); + } + + return self::$sourceNameTemplate; + } + + private static function getTopicNameTemplate() + { + if (self::$topicNameTemplate == null) { + self::$topicNameTemplate = new PathTemplate('projects/{project}/topics/{topic}'); + } + + return self::$topicNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'finding' => self::getFindingNameTemplate(), + 'folder' => self::getFolderNameTemplate(), + 'folderAssetSecurityMarks' => self::getFolderAssetSecurityMarksNameTemplate(), + 'folderSource' => self::getFolderSourceNameTemplate(), + 'folderSourceFinding' => self::getFolderSourceFindingNameTemplate(), + 'folderSourceFindingSecurityMarks' => self::getFolderSourceFindingSecurityMarksNameTemplate(), + 'notificationConfig' => self::getNotificationConfigNameTemplate(), + 'organization' => self::getOrganizationNameTemplate(), + 'organizationAssetSecurityMarks' => self::getOrganizationAssetSecurityMarksNameTemplate(), + 'organizationSettings' => self::getOrganizationSettingsNameTemplate(), + 'organizationSource' => self::getOrganizationSourceNameTemplate(), + 'organizationSourceFinding' => self::getOrganizationSourceFindingNameTemplate(), + 'organizationSourceFindingSecurityMarks' => self::getOrganizationSourceFindingSecurityMarksNameTemplate(), + 'project' => self::getProjectNameTemplate(), + 'projectAssetSecurityMarks' => self::getProjectAssetSecurityMarksNameTemplate(), + 'projectSource' => self::getProjectSourceNameTemplate(), + 'projectSourceFinding' => self::getProjectSourceFindingNameTemplate(), + 'projectSourceFindingSecurityMarks' => self::getProjectSourceFindingSecurityMarksNameTemplate(), + 'securityMarks' => self::getSecurityMarksNameTemplate(), + 'source' => self::getSourceNameTemplate(), + 'topic' => self::getTopicNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a finding + * resource. + * + * @param string $organization + * @param string $source + * @param string $finding + * + * @return string The formatted finding resource. + * + * @experimental + */ + public static function findingName($organization, $source, $finding) + { + return self::getFindingNameTemplate()->render([ + 'organization' => $organization, + 'source' => $source, + 'finding' => $finding, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a folder + * resource. + * + * @param string $folder + * + * @return string The formatted folder resource. + * + * @experimental + */ + public static function folderName($folder) + { + return self::getFolderNameTemplate()->render([ + 'folder' => $folder, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * folder_asset_securityMarks resource. + * + * @param string $folder + * @param string $asset + * + * @return string The formatted folder_asset_securityMarks resource. + * + * @experimental + */ + public static function folderAssetSecurityMarksName($folder, $asset) + { + return self::getFolderAssetSecurityMarksNameTemplate()->render([ + 'folder' => $folder, + 'asset' => $asset, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * folder_source resource. + * + * @param string $folder + * @param string $source + * + * @return string The formatted folder_source resource. + * + * @experimental + */ + public static function folderSourceName($folder, $source) + { + return self::getFolderSourceNameTemplate()->render([ + 'folder' => $folder, + 'source' => $source, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * folder_source_finding resource. + * + * @param string $folder + * @param string $source + * @param string $finding + * + * @return string The formatted folder_source_finding resource. + * + * @experimental + */ + public static function folderSourceFindingName($folder, $source, $finding) + { + return self::getFolderSourceFindingNameTemplate()->render([ + 'folder' => $folder, + 'source' => $source, + 'finding' => $finding, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * folder_source_finding_securityMarks resource. + * + * @param string $folder + * @param string $source + * @param string $finding + * + * @return string The formatted folder_source_finding_securityMarks resource. + * + * @experimental + */ + public static function folderSourceFindingSecurityMarksName($folder, $source, $finding) + { + return self::getFolderSourceFindingSecurityMarksNameTemplate()->render([ + 'folder' => $folder, + 'source' => $source, + 'finding' => $finding, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * notification_config resource. + * + * @param string $organization + * @param string $notificationConfig + * + * @return string The formatted notification_config resource. + * + * @experimental + */ + public static function notificationConfigName($organization, $notificationConfig) + { + return self::getNotificationConfigNameTemplate()->render([ + 'organization' => $organization, + 'notification_config' => $notificationConfig, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a organization + * resource. + * + * @param string $organization + * + * @return string The formatted organization resource. + * + * @experimental + */ + public static function organizationName($organization) + { + return self::getOrganizationNameTemplate()->render([ + 'organization' => $organization, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_asset_securityMarks resource. + * + * @param string $organization + * @param string $asset + * + * @return string The formatted organization_asset_securityMarks resource. + * + * @experimental + */ + public static function organizationAssetSecurityMarksName($organization, $asset) + { + return self::getOrganizationAssetSecurityMarksNameTemplate()->render([ + 'organization' => $organization, + 'asset' => $asset, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_settings resource. + * + * @param string $organization + * + * @return string The formatted organization_settings resource. + * + * @experimental + */ + public static function organizationSettingsName($organization) + { + return self::getOrganizationSettingsNameTemplate()->render([ + 'organization' => $organization, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_source resource. + * + * @param string $organization + * @param string $source + * + * @return string The formatted organization_source resource. + * + * @experimental + */ + public static function organizationSourceName($organization, $source) + { + return self::getOrganizationSourceNameTemplate()->render([ + 'organization' => $organization, + 'source' => $source, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_source_finding resource. + * + * @param string $organization + * @param string $source + * @param string $finding + * + * @return string The formatted organization_source_finding resource. + * + * @experimental + */ + public static function organizationSourceFindingName($organization, $source, $finding) + { + return self::getOrganizationSourceFindingNameTemplate()->render([ + 'organization' => $organization, + 'source' => $source, + 'finding' => $finding, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_source_finding_securityMarks resource. + * + * @param string $organization + * @param string $source + * @param string $finding + * + * @return string The formatted organization_source_finding_securityMarks resource. + * + * @experimental + */ + public static function organizationSourceFindingSecurityMarksName($organization, $source, $finding) + { + return self::getOrganizationSourceFindingSecurityMarksNameTemplate()->render([ + 'organization' => $organization, + 'source' => $source, + 'finding' => $finding, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a project + * resource. + * + * @param string $project + * + * @return string The formatted project resource. + * + * @experimental + */ + public static function projectName($project) + { + return self::getProjectNameTemplate()->render([ + 'project' => $project, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_asset_securityMarks resource. + * + * @param string $project + * @param string $asset + * + * @return string The formatted project_asset_securityMarks resource. + * + * @experimental + */ + public static function projectAssetSecurityMarksName($project, $asset) + { + return self::getProjectAssetSecurityMarksNameTemplate()->render([ + 'project' => $project, + 'asset' => $asset, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_source resource. + * + * @param string $project + * @param string $source + * + * @return string The formatted project_source resource. + * + * @experimental + */ + public static function projectSourceName($project, $source) + { + return self::getProjectSourceNameTemplate()->render([ + 'project' => $project, + 'source' => $source, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_source_finding resource. + * + * @param string $project + * @param string $source + * @param string $finding + * + * @return string The formatted project_source_finding resource. + * + * @experimental + */ + public static function projectSourceFindingName($project, $source, $finding) + { + return self::getProjectSourceFindingNameTemplate()->render([ + 'project' => $project, + 'source' => $source, + 'finding' => $finding, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_source_finding_securityMarks resource. + * + * @param string $project + * @param string $source + * @param string $finding + * + * @return string The formatted project_source_finding_securityMarks resource. + * + * @experimental + */ + public static function projectSourceFindingSecurityMarksName($project, $source, $finding) + { + return self::getProjectSourceFindingSecurityMarksNameTemplate()->render([ + 'project' => $project, + 'source' => $source, + 'finding' => $finding, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * security_marks resource. + * + * @param string $organization + * @param string $asset + * + * @return string The formatted security_marks resource. + * + * @experimental + */ + public static function securityMarksName($organization, $asset) + { + return self::getSecurityMarksNameTemplate()->render([ + 'organization' => $organization, + 'asset' => $asset, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a source + * resource. + * + * @param string $organization + * @param string $source + * + * @return string The formatted source resource. + * + * @experimental + */ + public static function sourceName($organization, $source) + { + return self::getSourceNameTemplate()->render([ + 'organization' => $organization, + 'source' => $source, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a topic + * resource. + * + * @param string $project + * @param string $topic + * + * @return string The formatted topic resource. + * + * @experimental + */ + public static function topicName($project, $topic) + { + return self::getTopicNameTemplate()->render([ + 'project' => $project, + 'topic' => $topic, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - finding: organizations/{organization}/sources/{source}/findings/{finding} + * - folder: folders/{folder} + * - folderAssetSecurityMarks: folders/{folder}/assets/{asset}/securityMarks + * - folderSource: folders/{folder}/sources/{source} + * - folderSourceFinding: folders/{folder}/sources/{source}/findings/{finding} + * - folderSourceFindingSecurityMarks: folders/{folder}/sources/{source}/findings/{finding}/securityMarks + * - notificationConfig: organizations/{organization}/notificationConfigs/{notification_config} + * - organization: organizations/{organization} + * - organizationAssetSecurityMarks: organizations/{organization}/assets/{asset}/securityMarks + * - organizationSettings: organizations/{organization}/organizationSettings + * - organizationSource: organizations/{organization}/sources/{source} + * - organizationSourceFinding: organizations/{organization}/sources/{source}/findings/{finding} + * - organizationSourceFindingSecurityMarks: organizations/{organization}/sources/{source}/findings/{finding}/securityMarks + * - project: projects/{project} + * - projectAssetSecurityMarks: projects/{project}/assets/{asset}/securityMarks + * - projectSource: projects/{project}/sources/{source} + * - projectSourceFinding: projects/{project}/sources/{source}/findings/{finding} + * - projectSourceFindingSecurityMarks: projects/{project}/sources/{source}/findings/{finding}/securityMarks + * - securityMarks: organizations/{organization}/assets/{asset}/securityMarks + * - source: organizations/{organization}/sources/{source} + * - topic: projects/{project}/topics/{topic} + * + * 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. + * + * @experimental + */ + public static function parseName($formattedName, $template = null) + { + $templateMap = self::getPathTemplateMap(); + if ($template) { + if (!isset($templateMap[$template])) { + throw new ValidationException("Template name $template does not exist"); + } + + return $templateMap[$template]->match($formattedName); + } + + foreach ($templateMap as $templateName => $pathTemplate) { + try { + return $pathTemplate->match($formattedName); + } catch (ValidationException $ex) { + // Swallow the exception to continue trying other path templates + } + } + + throw new ValidationException("Input did not match any known format. Input: $formattedName"); + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + * + * @experimental + */ + 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 + * + * @experimental + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Constructor. + * + * @param array $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 'securitycenter.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @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. + * } + * + * @throws ValidationException + * + * @experimental + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** + * Creates a finding. The corresponding source must exist for finding + * creation to succeed. + * + * Sample code: + * ``` + * $securityCenterClient = new SecurityCenterClient(); + * try { + * $formattedParent = $securityCenterClient->sourceName('[ORGANIZATION]', '[SOURCE]'); + * $findingId = 'finding_id'; + * $finding = new Finding(); + * $response = $securityCenterClient->createFinding($formattedParent, $findingId, $finding); + * } finally { + * $securityCenterClient->close(); + * } + * ``` + * + * @param string $parent Required. Resource name of the new finding's parent. Its format should be + * "organizations/[organization_id]/sources/[source_id]". + * @param string $findingId Required. Unique identifier provided by the client within the parent scope. + * @param Finding $finding Required. The Finding being created. The name and security_marks will be ignored as + * they are both output only fields on this resource. + * @param array $optionalArgs { + * 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 \Google\Cloud\SecurityCenter\V1p1beta1\Finding + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function createFinding($parent, $findingId, $finding, array $optionalArgs = []) + { + $request = new CreateFindingRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setFindingId($findingId); + $request->setFinding($finding); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateFinding', Finding::class, $optionalArgs, $request)->wait(); + } + + /** + * Creates a notification config. + * + * Sample code: + * ``` + * $securityCenterClient = new SecurityCenterClient(); + * try { + * $formattedParent = $securityCenterClient->organizationName('[ORGANIZATION]'); + * $configId = 'config_id'; + * $notificationConfig = new NotificationConfig(); + * $response = $securityCenterClient->createNotificationConfig($formattedParent, $configId, $notificationConfig); + * } finally { + * $securityCenterClient->close(); + * } + * ``` + * + * @param string $parent Required. Resource name of the new notification config's parent. Its format is + * "organizations/[organization_id]". + * @param string $configId Required. Unique identifier provided by the client within the parent scope. + * It must be between 1 and 128 characters, and contains alphanumeric + * characters, underscores or hyphens only. + * @param NotificationConfig $notificationConfig Required. The notification config being created. The name and the service account + * will be ignored as they are both output only fields on this resource. + * @param array $optionalArgs { + * 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 \Google\Cloud\SecurityCenter\V1p1beta1\NotificationConfig + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function createNotificationConfig($parent, $configId, $notificationConfig, array $optionalArgs = []) + { + $request = new CreateNotificationConfigRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setConfigId($configId); + $request->setNotificationConfig($notificationConfig); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateNotificationConfig', NotificationConfig::class, $optionalArgs, $request)->wait(); + } + + /** + * Creates a source. + * + * Sample code: + * ``` + * $securityCenterClient = new SecurityCenterClient(); + * try { + * $formattedParent = $securityCenterClient->organizationName('[ORGANIZATION]'); + * $source = new Source(); + * $response = $securityCenterClient->createSource($formattedParent, $source); + * } finally { + * $securityCenterClient->close(); + * } + * ``` + * + * @param string $parent Required. Resource name of the new source's parent. Its format should be + * "organizations/[organization_id]". + * @param Source $source Required. The Source being created, only the display_name and description will be + * used. All other fields will be ignored. + * @param array $optionalArgs { + * 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 \Google\Cloud\SecurityCenter\V1p1beta1\Source + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function createSource($parent, $source, array $optionalArgs = []) + { + $request = new CreateSourceRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setSource($source); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateSource', Source::class, $optionalArgs, $request)->wait(); + } + + /** + * Deletes a notification config. + * + * Sample code: + * ``` + * $securityCenterClient = new SecurityCenterClient(); + * try { + * $formattedName = $securityCenterClient->notificationConfigName('[ORGANIZATION]', '[NOTIFICATION_CONFIG]'); + * $securityCenterClient->deleteNotificationConfig($formattedName); + * } finally { + * $securityCenterClient->close(); + * } + * ``` + * + * @param string $name Required. Name of the notification config to delete. Its format is + * "organizations/[organization_id]/notificationConfigs/[config_id]". + * @param array $optionalArgs { + * 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. + * } + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function deleteNotificationConfig($name, array $optionalArgs = []) + { + $request = new DeleteNotificationConfigRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('DeleteNotificationConfig', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets the access control policy on the specified Source. + * + * Sample code: + * ``` + * $securityCenterClient = new SecurityCenterClient(); + * try { + * $resource = 'resource'; + * $response = $securityCenterClient->getIamPolicy($resource); + * } finally { + * $securityCenterClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param array $optionalArgs { + * Optional. + * + * @type GetPolicyOptions $options + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. + * @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 \Google\Cloud\Iam\V1\Policy + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function getIamPolicy($resource, array $optionalArgs = []) + { + $request = new GetIamPolicyRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $requestParamHeaders['resource'] = $resource; + if (isset($optionalArgs['options'])) { + $request->setOptions($optionalArgs['options']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets a notification config. + * + * Sample code: + * ``` + * $securityCenterClient = new SecurityCenterClient(); + * try { + * $formattedName = $securityCenterClient->notificationConfigName('[ORGANIZATION]', '[NOTIFICATION_CONFIG]'); + * $response = $securityCenterClient->getNotificationConfig($formattedName); + * } finally { + * $securityCenterClient->close(); + * } + * ``` + * + * @param string $name Required. Name of the notification config to get. Its format is + * "organizations/[organization_id]/notificationConfigs/[config_id]". + * @param array $optionalArgs { + * 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 \Google\Cloud\SecurityCenter\V1p1beta1\NotificationConfig + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function getNotificationConfig($name, array $optionalArgs = []) + { + $request = new GetNotificationConfigRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetNotificationConfig', NotificationConfig::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets the settings for an organization. + * + * Sample code: + * ``` + * $securityCenterClient = new SecurityCenterClient(); + * try { + * $formattedName = $securityCenterClient->organizationSettingsName('[ORGANIZATION]'); + * $response = $securityCenterClient->getOrganizationSettings($formattedName); + * } finally { + * $securityCenterClient->close(); + * } + * ``` + * + * @param string $name Required. Name of the organization to get organization settings for. Its format is + * "organizations/[organization_id]/organizationSettings". + * @param array $optionalArgs { + * 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 \Google\Cloud\SecurityCenter\V1p1beta1\OrganizationSettings + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function getOrganizationSettings($name, array $optionalArgs = []) + { + $request = new GetOrganizationSettingsRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetOrganizationSettings', OrganizationSettings::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets a source. + * + * Sample code: + * ``` + * $securityCenterClient = new SecurityCenterClient(); + * try { + * $formattedName = $securityCenterClient->sourceName('[ORGANIZATION]', '[SOURCE]'); + * $response = $securityCenterClient->getSource($formattedName); + * } finally { + * $securityCenterClient->close(); + * } + * ``` + * + * @param string $name Required. Relative resource name of the source. Its format is + * "organizations/[organization_id]/source/[source_id]". + * @param array $optionalArgs { + * 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 \Google\Cloud\SecurityCenter\V1p1beta1\Source + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function getSource($name, array $optionalArgs = []) + { + $request = new GetSourceRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetSource', Source::class, $optionalArgs, $request)->wait(); + } + + /** + * Filters an organization's assets and groups them by their specified + * properties. + * + * Sample code: + * ``` + * $securityCenterClient = new SecurityCenterClient(); + * try { + * $formattedParent = $securityCenterClient->projectName('[PROJECT]'); + * $groupBy = 'group_by'; + * // Iterate over pages of elements + * $pagedResponse = $securityCenterClient->groupAssets($formattedParent, $groupBy); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $securityCenterClient->groupAssets($formattedParent, $groupBy); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $securityCenterClient->close(); + * } + * ``` + * + * @param string $parent Required. Name of the organization to groupBy. Its format is + * "organizations/[organization_id], folders/[folder_id], or + * projects/[project_id]". + * @param string $groupBy Required. Expression that defines what assets fields to use for grouping. The string + * value should follow SQL syntax: comma separated list of fields. For + * example: + * "security_center_properties.resource_project,security_center_properties.project". + * + * The following fields are supported when compare_duration is not set: + * + * * security_center_properties.resource_project + * * security_center_properties.resource_project_display_name + * * security_center_properties.resource_type + * * security_center_properties.resource_parent + * * security_center_properties.resource_parent_display_name + * + * The following fields are supported when compare_duration is set: + * + * * security_center_properties.resource_type + * * security_center_properties.resource_project_display_name + * * security_center_properties.resource_parent_display_name + * @param array $optionalArgs { + * Optional. + * + * @type string $filter + * Expression that defines the filter to apply across assets. + * The expression is a list of zero or more restrictions combined via logical + * operators `AND` and `OR`. + * Parentheses are supported, and `OR` has higher precedence than `AND`. + * + * Restrictions have the form ` ` and may have a `-` + * character in front of them to indicate negation. The fields map to those + * defined in the Asset resource. Examples include: + * + * * name + * * security_center_properties.resource_name + * * resource_properties.a_property + * * security_marks.marks.marka + * + * The supported operators are: + * + * * `=` for all value types. + * * `>`, `<`, `>=`, `<=` for integer values. + * * `:`, meaning substring matching, for strings. + * + * The supported value types are: + * + * * string literals in quotes. + * * integer literals without quotes. + * * boolean literals `true` and `false` without quotes. + * + * The following field and operator combinations are supported: + * + * * name: `=` + * * update_time: `=`, `>`, `<`, `>=`, `<=` + * + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `update_time = "2019-06-10T16:07:18-07:00"` + * `update_time = 1560208038000` + * + * * create_time: `=`, `>`, `<`, `>=`, `<=` + * + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `create_time = "2019-06-10T16:07:18-07:00"` + * `create_time = 1560208038000` + * + * * iam_policy.policy_blob: `=`, `:` + * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + * * security_marks.marks: `=`, `:` + * * security_center_properties.resource_name: `=`, `:` + * * security_center_properties.resource_name_display_name: `=`, `:` + * * security_center_properties.resource_type: `=`, `:` + * * security_center_properties.resource_parent: `=`, `:` + * * security_center_properties.resource_parent_display_name: `=`, `:` + * * security_center_properties.resource_project: `=`, `:` + * * security_center_properties.resource_project_display_name: `=`, `:` + * * security_center_properties.resource_owners: `=`, `:` + * + * For example, `resource_properties.size = 100` is a valid filter string. + * + * Use a partial match on the empty string to filter based on a property + * existing: `resource_properties.my_property : ""` + * + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-resource_properties.my_property : ""` + * @type Duration $compareDuration + * When compare_duration is set, the GroupResult's "state_change" property is + * updated to indicate whether the asset was added, removed, or remained + * present during the compare_duration period of time that precedes the + * read_time. This is the time between (read_time - compare_duration) and + * read_time. + * + * The state change value is derived based on the presence of the asset at the + * two points in time. Intermediate state changes between the two times don't + * affect the result. For example, the results aren't affected if the asset is + * removed and re-created again. + * + * Possible "state_change" values when compare_duration is specified: + * + * * "ADDED": indicates that the asset was not present at the start of + * compare_duration, but present at reference_time. + * * "REMOVED": indicates that the asset was present at the start of + * compare_duration, but not present at reference_time. + * * "ACTIVE": indicates that the asset was present at both the + * start and the end of the time period defined by + * compare_duration and reference_time. + * + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all assets present at + * read_time. + * + * If this field is set then `state_change` must be a specified field in + * `group_by`. + * @type Timestamp $readTime + * Time used as a reference point when filtering assets. The filter is limited + * to assets existing at the supplied time and their values are those at that + * specific time. Absence of this field will default to the API's version of + * NOW. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @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 \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function groupAssets($parent, $groupBy, array $optionalArgs = []) + { + $request = new GroupAssetsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setGroupBy($groupBy); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['compareDuration'])) { + $request->setCompareDuration($optionalArgs['compareDuration']); + } + + if (isset($optionalArgs['readTime'])) { + $request->setReadTime($optionalArgs['readTime']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('GroupAssets', $optionalArgs, GroupAssetsResponse::class, $request); + } + + /** + * Filters an organization or source's findings and groups them by their + * specified properties. + * + * To group across all sources provide a `-` as the source id. + * Example: /v1/organizations/{organization_id}/sources/-/findings, + * /v1/folders/{folder_id}/sources/-/findings, + * /v1/projects/{project_id}/sources/-/findings + * + * Sample code: + * ``` + * $securityCenterClient = new SecurityCenterClient(); + * try { + * $formattedParent = $securityCenterClient->sourceName('[ORGANIZATION]', '[SOURCE]'); + * $groupBy = 'group_by'; + * // Iterate over pages of elements + * $pagedResponse = $securityCenterClient->groupFindings($formattedParent, $groupBy); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $securityCenterClient->groupFindings($formattedParent, $groupBy); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $securityCenterClient->close(); + * } + * ``` + * + * @param string $parent Required. Name of the source to groupBy. Its format is + * "organizations/[organization_id]/sources/[source_id]", + * folders/[folder_id]/sources/[source_id], or + * projects/[project_id]/sources/[source_id]. To groupBy across all sources + * provide a source_id of `-`. For example: + * organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-, + * or projects/{project_id}/sources/- + * @param string $groupBy Required. Expression that defines what assets fields to use for grouping (including + * `state_change`). The string value should follow SQL syntax: comma separated + * list of fields. For example: "parent,resource_name". + * + * The following fields are supported: + * + * * resource_name + * * category + * * state + * * parent + * * severity + * + * The following fields are supported when compare_duration is set: + * + * * state_change + * @param array $optionalArgs { + * Optional. + * + * @type string $filter + * Expression that defines the filter to apply across findings. + * The expression is a list of one or more restrictions combined via logical + * operators `AND` and `OR`. + * Parentheses are supported, and `OR` has higher precedence than `AND`. + * + * Restrictions have the form ` ` and may have a `-` + * character in front of them to indicate negation. Examples include: + * + * * name + * * source_properties.a_property + * * security_marks.marks.marka + * + * The supported operators are: + * + * * `=` for all value types. + * * `>`, `<`, `>=`, `<=` for integer values. + * * `:`, meaning substring matching, for strings. + * + * The supported value types are: + * + * * string literals in quotes. + * * integer literals without quotes. + * * boolean literals `true` and `false` without quotes. + * + * The following field and operator combinations are supported: + * + * * name: `=` + * * parent: `=`, `:` + * * resource_name: `=`, `:` + * * state: `=`, `:` + * * category: `=`, `:` + * * external_uri: `=`, `:` + * * event_time: `=`, `>`, `<`, `>=`, `<=` + * * severity: `=`, `:` + * + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `event_time = "2019-06-10T16:07:18-07:00"` + * `event_time = 1560208038000` + * + * * security_marks.marks: `=`, `:` + * * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + * + * For example, `source_properties.size = 100` is a valid filter string. + * + * Use a partial match on the empty string to filter based on a property + * existing: `source_properties.my_property : ""` + * + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-source_properties.my_property : ""` + * @type Timestamp $readTime + * Time used as a reference point when filtering findings. The filter is + * limited to findings existing at the supplied time and their values are + * those at that specific time. Absence of this field will default to the + * API's version of NOW. + * @type Duration $compareDuration + * When compare_duration is set, the GroupResult's "state_change" attribute is + * updated to indicate whether the finding had its state changed, the + * finding's state remained unchanged, or if the finding was added during the + * compare_duration period of time that precedes the read_time. This is the + * time between (read_time - compare_duration) and read_time. + * + * The state_change value is derived based on the presence and state of the + * finding at the two points in time. Intermediate state changes between the + * two times don't affect the result. For example, the results aren't affected + * if the finding is made inactive and then active again. + * + * Possible "state_change" values when compare_duration is specified: + * + * * "CHANGED": indicates that the finding was present and matched the given + * filter at the start of compare_duration, but changed its + * state at read_time. + * * "UNCHANGED": indicates that the finding was present and matched the given + * filter at the start of compare_duration and did not change + * state at read_time. + * * "ADDED": indicates that the finding did not match the given filter or + * was not present at the start of compare_duration, but was + * present at read_time. + * * "REMOVED": indicates that the finding was present and matched the + * filter at the start of compare_duration, but did not match + * the filter at read_time. + * + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all findings present + * at read_time. + * + * If this field is set then `state_change` must be a specified field in + * `group_by`. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @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 \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function groupFindings($parent, $groupBy, array $optionalArgs = []) + { + $request = new GroupFindingsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setGroupBy($groupBy); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['readTime'])) { + $request->setReadTime($optionalArgs['readTime']); + } + + if (isset($optionalArgs['compareDuration'])) { + $request->setCompareDuration($optionalArgs['compareDuration']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('GroupFindings', $optionalArgs, GroupFindingsResponse::class, $request); + } + + /** + * Lists an organization's assets. + * + * Sample code: + * ``` + * $securityCenterClient = new SecurityCenterClient(); + * try { + * $formattedParent = $securityCenterClient->projectName('[PROJECT]'); + * // Iterate over pages of elements + * $pagedResponse = $securityCenterClient->listAssets($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $securityCenterClient->listAssets($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $securityCenterClient->close(); + * } + * ``` + * + * @param string $parent Required. Name of the organization assets should belong to. Its format is + * "organizations/[organization_id], folders/[folder_id], or + * projects/[project_id]". + * @param array $optionalArgs { + * Optional. + * + * @type string $filter + * Expression that defines the filter to apply across assets. + * The expression is a list of zero or more restrictions combined via logical + * operators `AND` and `OR`. + * Parentheses are supported, and `OR` has higher precedence than `AND`. + * + * Restrictions have the form ` ` and may have a `-` + * character in front of them to indicate negation. The fields map to those + * defined in the Asset resource. Examples include: + * + * * name + * * security_center_properties.resource_name + * * resource_properties.a_property + * * security_marks.marks.marka + * + * The supported operators are: + * + * * `=` for all value types. + * * `>`, `<`, `>=`, `<=` for integer values. + * * `:`, meaning substring matching, for strings. + * + * The supported value types are: + * + * * string literals in quotes. + * * integer literals without quotes. + * * boolean literals `true` and `false` without quotes. + * + * The following are the allowed field and operator combinations: + * + * * name: `=` + * * update_time: `=`, `>`, `<`, `>=`, `<=` + * + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `update_time = "2019-06-10T16:07:18-07:00"` + * `update_time = 1560208038000` + * + * * create_time: `=`, `>`, `<`, `>=`, `<=` + * + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `create_time = "2019-06-10T16:07:18-07:00"` + * `create_time = 1560208038000` + * + * * iam_policy.policy_blob: `=`, `:` + * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + * * security_marks.marks: `=`, `:` + * * security_center_properties.resource_name: `=`, `:` + * * security_center_properties.resource_display_name: `=`, `:` + * * security_center_properties.resource_type: `=`, `:` + * * security_center_properties.resource_parent: `=`, `:` + * * security_center_properties.resource_parent_display_name: `=`, `:` + * * security_center_properties.resource_project: `=`, `:` + * * security_center_properties.resource_project_display_name: `=`, `:` + * * security_center_properties.resource_owners: `=`, `:` + * + * For example, `resource_properties.size = 100` is a valid filter string. + * + * Use a partial match on the empty string to filter based on a property + * existing: `resource_properties.my_property : ""` + * + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-resource_properties.my_property : ""` + * @type string $orderBy + * Expression that defines what fields and order to use for sorting. The + * string value should follow SQL syntax: comma separated list of fields. For + * example: "name,resource_properties.a_property". The default sorting order + * is ascending. To specify descending order for a field, a suffix " desc" + * should be appended to the field name. For example: "name + * desc,resource_properties.a_property". Redundant space characters in the + * syntax are insignificant. "name desc,resource_properties.a_property" and " + * name desc , resource_properties.a_property " are equivalent. + * + * The following fields are supported: + * name + * update_time + * resource_properties + * security_marks.marks + * security_center_properties.resource_name + * security_center_properties.resource_display_name + * security_center_properties.resource_parent + * security_center_properties.resource_parent_display_name + * security_center_properties.resource_project + * security_center_properties.resource_project_display_name + * security_center_properties.resource_type + * @type Timestamp $readTime + * Time used as a reference point when filtering assets. The filter is limited + * to assets existing at the supplied time and their values are those at that + * specific time. Absence of this field will default to the API's version of + * NOW. + * @type Duration $compareDuration + * When compare_duration is set, the ListAssetsResult's "state_change" + * attribute is updated to indicate whether the asset was added, removed, or + * remained present during the compare_duration period of time that precedes + * the read_time. This is the time between (read_time - compare_duration) and + * read_time. + * + * The state_change value is derived based on the presence of the asset at the + * two points in time. Intermediate state changes between the two times don't + * affect the result. For example, the results aren't affected if the asset is + * removed and re-created again. + * + * Possible "state_change" values when compare_duration is specified: + * + * * "ADDED": indicates that the asset was not present at the start of + * compare_duration, but present at read_time. + * * "REMOVED": indicates that the asset was present at the start of + * compare_duration, but not present at read_time. + * * "ACTIVE": indicates that the asset was present at both the + * start and the end of the time period defined by + * compare_duration and read_time. + * + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all assets present at + * read_time. + * @type FieldMask $fieldMask + * A field mask to specify the ListAssetsResult fields to be listed in the + * response. + * An empty field mask will list all fields. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @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 \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function listAssets($parent, array $optionalArgs = []) + { + $request = new ListAssetsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + if (isset($optionalArgs['readTime'])) { + $request->setReadTime($optionalArgs['readTime']); + } + + if (isset($optionalArgs['compareDuration'])) { + $request->setCompareDuration($optionalArgs['compareDuration']); + } + + if (isset($optionalArgs['fieldMask'])) { + $request->setFieldMask($optionalArgs['fieldMask']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListAssets', $optionalArgs, ListAssetsResponse::class, $request); + } + + /** + * Lists an organization or source's findings. + * + * To list across all sources provide a `-` as the source id. + * Example: /v1p1beta1/organizations/{organization_id}/sources/-/findings + * + * Sample code: + * ``` + * $securityCenterClient = new SecurityCenterClient(); + * try { + * $formattedParent = $securityCenterClient->sourceName('[ORGANIZATION]', '[SOURCE]'); + * // Iterate over pages of elements + * $pagedResponse = $securityCenterClient->listFindings($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $securityCenterClient->listFindings($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $securityCenterClient->close(); + * } + * ``` + * + * @param string $parent Required. Name of the source the findings belong to. Its format is + * "organizations/[organization_id]/sources/[source_id], + * folders/[folder_id]/sources/[source_id], or + * projects/[project_id]/sources/[source_id]". To list across all sources + * provide a source_id of `-`. For example: + * organizations/{organization_id}/sources/-, folders/{folder_id}/sources/- or + * projects/{projects_id}/sources/- + * @param array $optionalArgs { + * Optional. + * + * @type string $filter + * Expression that defines the filter to apply across findings. + * The expression is a list of one or more restrictions combined via logical + * operators `AND` and `OR`. + * Parentheses are supported, and `OR` has higher precedence than `AND`. + * + * Restrictions have the form ` ` and may have a `-` + * character in front of them to indicate negation. Examples include: + * + * * name + * * source_properties.a_property + * * security_marks.marks.marka + * + * The supported operators are: + * + * * `=` for all value types. + * * `>`, `<`, `>=`, `<=` for integer values. + * * `:`, meaning substring matching, for strings. + * + * The supported value types are: + * + * * string literals in quotes. + * * integer literals without quotes. + * * boolean literals `true` and `false` without quotes. + * + * The following field and operator combinations are supported: + * + * * name: `=` + * * parent: `=`, `:` + * * resource_name: `=`, `:` + * * state: `=`, `:` + * * category: `=`, `:` + * * external_uri: `=`, `:` + * * event_time: `=`, `>`, `<`, `>=`, `<=` + * * severity: `=`, `:` + * + * Usage: This should be milliseconds since epoch or an RFC3339 string. + * Examples: + * `event_time = "2019-06-10T16:07:18-07:00"` + * `event_time = 1560208038000` + * + * security_marks.marks: `=`, `:` + * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` + * + * For example, `source_properties.size = 100` is a valid filter string. + * + * Use a partial match on the empty string to filter based on a property + * existing: `source_properties.my_property : ""` + * + * Use a negated partial match on the empty string to filter based on a + * property not existing: `-source_properties.my_property : ""` + * @type string $orderBy + * Expression that defines what fields and order to use for sorting. The + * string value should follow SQL syntax: comma separated list of fields. For + * example: "name,resource_properties.a_property". The default sorting order + * is ascending. To specify descending order for a field, a suffix " desc" + * should be appended to the field name. For example: "name + * desc,source_properties.a_property". Redundant space characters in the + * syntax are insignificant. "name desc,source_properties.a_property" and " + * name desc , source_properties.a_property " are equivalent. + * + * The following fields are supported: + * name + * parent + * state + * category + * resource_name + * event_time + * source_properties + * security_marks.marks + * @type Timestamp $readTime + * Time used as a reference point when filtering findings. The filter is + * limited to findings existing at the supplied time and their values are + * those at that specific time. Absence of this field will default to the + * API's version of NOW. + * @type Duration $compareDuration + * When compare_duration is set, the ListFindingsResult's "state_change" + * attribute is updated to indicate whether the finding had its state changed, + * the finding's state remained unchanged, or if the finding was added in any + * state during the compare_duration period of time that precedes the + * read_time. This is the time between (read_time - compare_duration) and + * read_time. + * + * The state_change value is derived based on the presence and state of the + * finding at the two points in time. Intermediate state changes between the + * two times don't affect the result. For example, the results aren't affected + * if the finding is made inactive and then active again. + * + * Possible "state_change" values when compare_duration is specified: + * + * * "CHANGED": indicates that the finding was present and matched the given + * filter at the start of compare_duration, but changed its + * state at read_time. + * * "UNCHANGED": indicates that the finding was present and matched the given + * filter at the start of compare_duration and did not change + * state at read_time. + * * "ADDED": indicates that the finding did not match the given filter or + * was not present at the start of compare_duration, but was + * present at read_time. + * * "REMOVED": indicates that the finding was present and matched the + * filter at the start of compare_duration, but did not match + * the filter at read_time. + * + * If compare_duration is not specified, then the only possible state_change + * is "UNUSED", which will be the state_change set for all findings present at + * read_time. + * @type FieldMask $fieldMask + * A field mask to specify the Finding fields to be listed in the response. + * An empty field mask will list all fields. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @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 \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function listFindings($parent, array $optionalArgs = []) + { + $request = new ListFindingsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + if (isset($optionalArgs['readTime'])) { + $request->setReadTime($optionalArgs['readTime']); + } + + if (isset($optionalArgs['compareDuration'])) { + $request->setCompareDuration($optionalArgs['compareDuration']); + } + + if (isset($optionalArgs['fieldMask'])) { + $request->setFieldMask($optionalArgs['fieldMask']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListFindings', $optionalArgs, ListFindingsResponse::class, $request); + } + + /** + * Lists notification configs. + * + * Sample code: + * ``` + * $securityCenterClient = new SecurityCenterClient(); + * try { + * $formattedParent = $securityCenterClient->organizationName('[ORGANIZATION]'); + * // Iterate over pages of elements + * $pagedResponse = $securityCenterClient->listNotificationConfigs($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $securityCenterClient->listNotificationConfigs($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $securityCenterClient->close(); + * } + * ``` + * + * @param string $parent Required. Name of the organization to list notification configs. + * Its format is "organizations/[organization_id]". + * @param array $optionalArgs { + * Optional. + * + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @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 \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function listNotificationConfigs($parent, array $optionalArgs = []) + { + $request = new ListNotificationConfigsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListNotificationConfigs', $optionalArgs, ListNotificationConfigsResponse::class, $request); + } + + /** + * Lists all sources belonging to an organization. + * + * Sample code: + * ``` + * $securityCenterClient = new SecurityCenterClient(); + * try { + * $formattedParent = $securityCenterClient->projectName('[PROJECT]'); + * // Iterate over pages of elements + * $pagedResponse = $securityCenterClient->listSources($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $securityCenterClient->listSources($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $securityCenterClient->close(); + * } + * ``` + * + * @param string $parent Required. Resource name of the parent of sources to list. Its format should be + * "organizations/[organization_id], folders/[folder_id], or + * projects/[project_id]". + * @param array $optionalArgs { + * Optional. + * + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @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 \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function listSources($parent, array $optionalArgs = []) + { + $request = new ListSourcesRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListSources', $optionalArgs, ListSourcesResponse::class, $request); + } + + /** + * Runs asset discovery. The discovery is tracked with a long-running + * operation. + * + * This API can only be called with limited frequency for an organization. If + * it is called too frequently the caller will receive a TOO_MANY_REQUESTS + * error. + * + * Sample code: + * ``` + * $securityCenterClient = new SecurityCenterClient(); + * try { + * $formattedParent = $securityCenterClient->organizationName('[ORGANIZATION]'); + * $operationResponse = $securityCenterClient->runAssetDiscovery($formattedParent); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $securityCenterClient->runAssetDiscovery($formattedParent); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $securityCenterClient->resumeOperation($operationName, 'runAssetDiscovery'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $securityCenterClient->close(); + * } + * ``` + * + * @param string $parent Required. Name of the organization to run asset discovery for. Its format is + * "organizations/[organization_id]". + * @param array $optionalArgs { + * 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 \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function runAssetDiscovery($parent, array $optionalArgs = []) + { + $request = new RunAssetDiscoveryRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('RunAssetDiscovery', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Updates the state of a finding. + * + * Sample code: + * ``` + * $securityCenterClient = new SecurityCenterClient(); + * try { + * $formattedName = $securityCenterClient->findingName('[ORGANIZATION]', '[SOURCE]', '[FINDING]'); + * $state = State::STATE_UNSPECIFIED; + * $startTime = new Timestamp(); + * $response = $securityCenterClient->setFindingState($formattedName, $state, $startTime); + * } finally { + * $securityCenterClient->close(); + * } + * ``` + * + * @param string $name Required. The relative resource name of the finding. See: + * https://cloud.google.com/apis/design/resource_names#relative_resource_name + * Example: + * "organizations/{organization_id}/sources/{source_id}/finding/{finding_id}". + * @param int $state Required. The desired State of the finding. + * For allowed values, use constants defined on {@see \Google\Cloud\SecurityCenter\V1p1beta1\Finding\State} + * @param Timestamp $startTime Required. The time at which the updated state takes effect. + * @param array $optionalArgs { + * 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 \Google\Cloud\SecurityCenter\V1p1beta1\Finding + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function setFindingState($name, $state, $startTime, array $optionalArgs = []) + { + $request = new SetFindingStateRequest(); + $requestParamHeaders = []; + $request->setName($name); + $request->setState($state); + $request->setStartTime($startTime); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('SetFindingState', Finding::class, $optionalArgs, $request)->wait(); + } + + /** + * Sets the access control policy on the specified Source. + * + * Sample code: + * ``` + * $securityCenterClient = new SecurityCenterClient(); + * try { + * $resource = 'resource'; + * $policy = new Policy(); + * $response = $securityCenterClient->setIamPolicy($resource, $policy); + * } finally { + * $securityCenterClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy is being specified. + * See the operation documentation for the appropriate value for this field. + * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of + * the policy is limited to a few 10s of KB. An empty policy is a + * valid policy but certain Cloud Platform services (such as Projects) + * might reject them. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + * the fields in the mask will be modified. If no mask is provided, the + * following default mask is used: + * + * `paths: "bindings, etag"` + * @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 \Google\Cloud\Iam\V1\Policy + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function setIamPolicy($resource, $policy, array $optionalArgs = []) + { + $request = new SetIamPolicyRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $request->setPolicy($policy); + $requestParamHeaders['resource'] = $resource; + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('SetIamPolicy', Policy::class, $optionalArgs, $request)->wait(); + } + + /** + * Returns the permissions that a caller has on the specified source. + * + * Sample code: + * ``` + * $securityCenterClient = new SecurityCenterClient(); + * try { + * $resource = 'resource'; + * $permissions = []; + * $response = $securityCenterClient->testIamPermissions($resource, $permissions); + * } finally { + * $securityCenterClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param array $optionalArgs { + * 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 \Google\Cloud\Iam\V1\TestIamPermissionsResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function testIamPermissions($resource, $permissions, array $optionalArgs = []) + { + $request = new TestIamPermissionsRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $request->setPermissions($permissions); + $requestParamHeaders['resource'] = $resource; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Creates or updates a finding. The corresponding source must exist for a + * finding creation to succeed. + * + * Sample code: + * ``` + * $securityCenterClient = new SecurityCenterClient(); + * try { + * $finding = new Finding(); + * $response = $securityCenterClient->updateFinding($finding); + * } finally { + * $securityCenterClient->close(); + * } + * ``` + * + * @param Finding $finding Required. The finding resource to update or create if it does not already exist. + * parent, security_marks, and update_time will be ignored. + * + * In the case of creation, the finding id portion of the name must be + * alphanumeric and less than or equal to 32 characters and greater than 0 + * characters in length. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * The FieldMask to use when updating the finding resource. This field should + * not be specified when creating a finding. + * + * When updating a finding, an empty mask is treated as updating all mutable + * fields and replacing source_properties. Individual source_properties can + * be added/updated by using "source_properties." in the field + * mask. + * @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 \Google\Cloud\SecurityCenter\V1p1beta1\Finding + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function updateFinding($finding, array $optionalArgs = []) + { + $request = new UpdateFindingRequest(); + $requestParamHeaders = []; + $request->setFinding($finding); + $requestParamHeaders['finding.name'] = $finding->getName(); + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UpdateFinding', Finding::class, $optionalArgs, $request)->wait(); + } + + /** + * Updates a notification config. The following update + * fields are allowed: description, pubsub_topic, streaming_config.filter + * + * Sample code: + * ``` + * $securityCenterClient = new SecurityCenterClient(); + * try { + * $notificationConfig = new NotificationConfig(); + * $response = $securityCenterClient->updateNotificationConfig($notificationConfig); + * } finally { + * $securityCenterClient->close(); + * } + * ``` + * + * @param NotificationConfig $notificationConfig Required. The notification config to update. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * The FieldMask to use when updating the notification config. + * + * If empty all mutable fields will be updated. + * @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 \Google\Cloud\SecurityCenter\V1p1beta1\NotificationConfig + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function updateNotificationConfig($notificationConfig, array $optionalArgs = []) + { + $request = new UpdateNotificationConfigRequest(); + $requestParamHeaders = []; + $request->setNotificationConfig($notificationConfig); + $requestParamHeaders['notification_config.name'] = $notificationConfig->getName(); + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UpdateNotificationConfig', NotificationConfig::class, $optionalArgs, $request)->wait(); + } + + /** + * Updates an organization's settings. + * + * Sample code: + * ``` + * $securityCenterClient = new SecurityCenterClient(); + * try { + * $organizationSettings = new OrganizationSettings(); + * $response = $securityCenterClient->updateOrganizationSettings($organizationSettings); + * } finally { + * $securityCenterClient->close(); + * } + * ``` + * + * @param OrganizationSettings $organizationSettings Required. The organization settings resource to update. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * The FieldMask to use when updating the settings resource. + * + * If empty all mutable fields will be updated. + * @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 \Google\Cloud\SecurityCenter\V1p1beta1\OrganizationSettings + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function updateOrganizationSettings($organizationSettings, array $optionalArgs = []) + { + $request = new UpdateOrganizationSettingsRequest(); + $requestParamHeaders = []; + $request->setOrganizationSettings($organizationSettings); + $requestParamHeaders['organization_settings.name'] = $organizationSettings->getName(); + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UpdateOrganizationSettings', OrganizationSettings::class, $optionalArgs, $request)->wait(); + } + + /** + * Updates security marks. + * + * Sample code: + * ``` + * $securityCenterClient = new SecurityCenterClient(); + * try { + * $securityMarks = new SecurityMarks(); + * $response = $securityCenterClient->updateSecurityMarks($securityMarks); + * } finally { + * $securityCenterClient->close(); + * } + * ``` + * + * @param SecurityMarks $securityMarks Required. The security marks resource to update. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * The FieldMask to use when updating the security marks resource. + * + * The field mask must not contain duplicate fields. + * If empty or set to "marks", all marks will be replaced. Individual + * marks can be updated using "marks.". + * @type Timestamp $startTime + * The time at which the updated SecurityMarks take effect. + * If not set uses current server time. Updates will be applied to the + * SecurityMarks that are active immediately preceding this time. + * @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 \Google\Cloud\SecurityCenter\V1p1beta1\SecurityMarks + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function updateSecurityMarks($securityMarks, array $optionalArgs = []) + { + $request = new UpdateSecurityMarksRequest(); + $requestParamHeaders = []; + $request->setSecurityMarks($securityMarks); + $requestParamHeaders['security_marks.name'] = $securityMarks->getName(); + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + if (isset($optionalArgs['startTime'])) { + $request->setStartTime($optionalArgs['startTime']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UpdateSecurityMarks', SecurityMarks::class, $optionalArgs, $request)->wait(); + } + + /** + * Updates a source. + * + * Sample code: + * ``` + * $securityCenterClient = new SecurityCenterClient(); + * try { + * $source = new Source(); + * $response = $securityCenterClient->updateSource($source); + * } finally { + * $securityCenterClient->close(); + * } + * ``` + * + * @param Source $source Required. The source resource to update. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * The FieldMask to use when updating the source resource. + * + * If empty all mutable fields will be updated. + * @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 \Google\Cloud\SecurityCenter\V1p1beta1\Source + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function updateSource($source, array $optionalArgs = []) + { + $request = new UpdateSourceRequest(); + $requestParamHeaders = []; + $request->setSource($source); + $requestParamHeaders['source.name'] = $source->getName(); + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UpdateSource', Source::class, $optionalArgs, $request)->wait(); + } +} diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/src/V1p1beta1/SecurityCenterClient.php b/owl-bot-staging/SecurityCenter/v1p1beta1/src/V1p1beta1/SecurityCenterClient.php new file mode 100644 index 000000000000..6cd84e56cabc --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/src/V1p1beta1/SecurityCenterClient.php @@ -0,0 +1,36 @@ + [ + 'google.cloud.securitycenter.v1p1beta1.SecurityCenter' => [ + 'RunAssetDiscovery' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\SecurityCenter\V1p1beta1\RunAssetDiscoveryResponse', + 'metadataReturnType' => '\Google\Protobuf\GPBEmpty', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'GroupAssets' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getGroupByResults', + ], + ], + 'GroupFindings' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getGroupByResults', + ], + ], + 'ListAssets' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getListAssetsResults', + ], + ], + 'ListFindings' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getListFindingsResults', + ], + ], + 'ListNotificationConfigs' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getNotificationConfigs', + ], + ], + 'ListSources' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getSources', + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/src/V1p1beta1/resources/security_center_rest_client_config.php b/owl-bot-staging/SecurityCenter/v1p1beta1/src/V1p1beta1/resources/security_center_rest_client_config.php new file mode 100644 index 000000000000..f6c1499e95f3 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/src/V1p1beta1/resources/security_center_rest_client_config.php @@ -0,0 +1,440 @@ + [ + 'google.cloud.securitycenter.v1p1beta1.SecurityCenter' => [ + 'CreateFinding' => [ + 'method' => 'post', + 'uriTemplate' => '/v1p1beta1/{parent=organizations/*/sources/*}/findings', + 'body' => 'finding', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'finding_id', + ], + ], + 'CreateNotificationConfig' => [ + 'method' => 'post', + 'uriTemplate' => '/v1p1beta1/{parent=organizations/*}/notificationConfigs', + 'body' => 'notification_config', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'config_id', + ], + ], + 'CreateSource' => [ + 'method' => 'post', + 'uriTemplate' => '/v1p1beta1/{parent=organizations/*}/sources', + 'body' => 'source', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteNotificationConfig' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1p1beta1/{name=organizations/*/notificationConfigs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1p1beta1/{resource=organizations/*/sources/*}:getIamPolicy', + 'body' => '*', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'GetNotificationConfig' => [ + 'method' => 'get', + 'uriTemplate' => '/v1p1beta1/{name=organizations/*/notificationConfigs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOrganizationSettings' => [ + 'method' => 'get', + 'uriTemplate' => '/v1p1beta1/{name=organizations/*/organizationSettings}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetSource' => [ + 'method' => 'get', + 'uriTemplate' => '/v1p1beta1/{name=organizations/*/sources/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GroupAssets' => [ + 'method' => 'post', + 'uriTemplate' => '/v1p1beta1/{parent=organizations/*}/assets:group', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1p1beta1/{parent=folders/*}/assets:group', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1p1beta1/{parent=projects/*}/assets:group', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'GroupFindings' => [ + 'method' => 'post', + 'uriTemplate' => '/v1p1beta1/{parent=organizations/*/sources/*}/findings:group', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1p1beta1/{parent=folders/*/sources/*}/findings:group', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1p1beta1/{parent=projects/*/sources/*}/findings:group', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListAssets' => [ + 'method' => 'get', + 'uriTemplate' => '/v1p1beta1/{parent=organizations/*}/assets', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1p1beta1/{parent=folders/*}/assets', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1p1beta1/{parent=projects/*}/assets', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListFindings' => [ + 'method' => 'get', + 'uriTemplate' => '/v1p1beta1/{parent=organizations/*/sources/*}/findings', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1p1beta1/{parent=folders/*/sources/*}/findings', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1p1beta1/{parent=projects/*/sources/*}/findings', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListNotificationConfigs' => [ + 'method' => 'get', + 'uriTemplate' => '/v1p1beta1/{parent=organizations/*}/notificationConfigs', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListSources' => [ + 'method' => 'get', + 'uriTemplate' => '/v1p1beta1/{parent=organizations/*}/sources', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1p1beta1/{parent=folders/*}/sources', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1p1beta1/{parent=projects/*}/sources', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'RunAssetDiscovery' => [ + 'method' => 'post', + 'uriTemplate' => '/v1p1beta1/{parent=organizations/*}/assets:runDiscovery', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'SetFindingState' => [ + 'method' => 'post', + 'uriTemplate' => '/v1p1beta1/{name=organizations/*/sources/*/findings/*}:setState', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1p1beta1/{name=folders/*/sources/*/findings/*}:setState', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1p1beta1/{name=projects/*/sources/*/findings/*}:setState', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1p1beta1/{resource=organizations/*/sources/*}:setIamPolicy', + 'body' => '*', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1p1beta1/{resource=organizations/*/sources/*}:testIamPermissions', + 'body' => '*', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'UpdateFinding' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1p1beta1/{finding.name=organizations/*/sources/*/findings/*}', + 'body' => 'finding', + 'additionalBindings' => [ + [ + 'method' => 'patch', + 'uriTemplate' => '/v1p1beta1/{finding.name=folders/*/sources/*/findings/*}', + 'body' => 'finding', + ], + [ + 'method' => 'patch', + 'uriTemplate' => '/v1p1beta1/{finding.name=projects/*/sources/*/findings/*}', + 'body' => 'finding', + ], + ], + 'placeholders' => [ + 'finding.name' => [ + 'getters' => [ + 'getFinding', + 'getName', + ], + ], + ], + ], + 'UpdateNotificationConfig' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1p1beta1/{notification_config.name=organizations/*/notificationConfigs/*}', + 'body' => 'notification_config', + 'placeholders' => [ + 'notification_config.name' => [ + 'getters' => [ + 'getNotificationConfig', + 'getName', + ], + ], + ], + ], + 'UpdateOrganizationSettings' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1p1beta1/{organization_settings.name=organizations/*/organizationSettings}', + 'body' => 'organization_settings', + 'placeholders' => [ + 'organization_settings.name' => [ + 'getters' => [ + 'getOrganizationSettings', + 'getName', + ], + ], + ], + ], + 'UpdateSecurityMarks' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1p1beta1/{security_marks.name=organizations/*/assets/*/securityMarks}', + 'body' => 'security_marks', + 'additionalBindings' => [ + [ + 'method' => 'patch', + 'uriTemplate' => '/v1p1beta1/{security_marks.name=folders/*/assets/*/securityMarks}', + 'body' => 'security_marks', + ], + [ + 'method' => 'patch', + 'uriTemplate' => '/v1p1beta1/{security_marks.name=projects/*/assets/*/securityMarks}', + 'body' => 'security_marks', + ], + [ + 'method' => 'patch', + 'uriTemplate' => '/v1p1beta1/{security_marks.name=organizations/*/sources/*/findings/*/securityMarks}', + 'body' => 'security_marks', + ], + [ + 'method' => 'patch', + 'uriTemplate' => '/v1p1beta1/{security_marks.name=folders/*/sources/*/findings/*/securityMarks}', + 'body' => 'security_marks', + ], + [ + 'method' => 'patch', + 'uriTemplate' => '/v1p1beta1/{security_marks.name=projects/*/sources/*/findings/*/securityMarks}', + 'body' => 'security_marks', + ], + ], + 'placeholders' => [ + 'security_marks.name' => [ + 'getters' => [ + 'getSecurityMarks', + 'getName', + ], + ], + ], + ], + 'UpdateSource' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1p1beta1/{source.name=organizations/*/sources/*}', + 'body' => 'source', + 'placeholders' => [ + 'source.name' => [ + 'getters' => [ + 'getSource', + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1p1beta1/{name=organizations/*/operations/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1p1beta1/{name=organizations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1p1beta1/{name=organizations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1p1beta1/{name=organizations/*/operations}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/tests/Unit/V1p1beta1/SecurityCenterClientTest.php b/owl-bot-staging/SecurityCenter/v1p1beta1/tests/Unit/V1p1beta1/SecurityCenterClientTest.php new file mode 100644 index 000000000000..ed4dc410ed08 --- /dev/null +++ b/owl-bot-staging/SecurityCenter/v1p1beta1/tests/Unit/V1p1beta1/SecurityCenterClientTest.php @@ -0,0 +1,1692 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return SecurityCenterClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new SecurityCenterClient($options); + } + + /** @test */ + public function createFindingTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $parent2 = 'parent21175163357'; + $resourceName = 'resourceName979421212'; + $category = 'category50511102'; + $externalUri = 'externalUri-1385596168'; + $canonicalName = 'canonicalName1385400054'; + $expectedResponse = new Finding(); + $expectedResponse->setName($name); + $expectedResponse->setParent($parent2); + $expectedResponse->setResourceName($resourceName); + $expectedResponse->setCategory($category); + $expectedResponse->setExternalUri($externalUri); + $expectedResponse->setCanonicalName($canonicalName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->sourceName('[ORGANIZATION]', '[SOURCE]'); + $findingId = 'findingId728776081'; + $finding = new Finding(); + $response = $gapicClient->createFinding($formattedParent, $findingId, $finding); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/CreateFinding', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getFindingId(); + $this->assertProtobufEquals($findingId, $actualValue); + $actualValue = $actualRequestObject->getFinding(); + $this->assertProtobufEquals($finding, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createFindingExceptionTest() + { + $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->sourceName('[ORGANIZATION]', '[SOURCE]'); + $findingId = 'findingId728776081'; + $finding = new Finding(); + try { + $gapicClient->createFinding($formattedParent, $findingId, $finding); + // 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 createNotificationConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $description = 'description-1724546052'; + $pubsubTopic = 'pubsubTopic-338126829'; + $serviceAccount = 'serviceAccount-1948028253'; + $expectedResponse = new NotificationConfig(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setPubsubTopic($pubsubTopic); + $expectedResponse->setServiceAccount($serviceAccount); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->organizationName('[ORGANIZATION]'); + $configId = 'configId-804450504'; + $notificationConfig = new NotificationConfig(); + $response = $gapicClient->createNotificationConfig($formattedParent, $configId, $notificationConfig); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/CreateNotificationConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getConfigId(); + $this->assertProtobufEquals($configId, $actualValue); + $actualValue = $actualRequestObject->getNotificationConfig(); + $this->assertProtobufEquals($notificationConfig, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createNotificationConfigExceptionTest() + { + $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->organizationName('[ORGANIZATION]'); + $configId = 'configId-804450504'; + $notificationConfig = new NotificationConfig(); + try { + $gapicClient->createNotificationConfig($formattedParent, $configId, $notificationConfig); + // 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 createSourceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $canonicalName = 'canonicalName1385400054'; + $expectedResponse = new Source(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setCanonicalName($canonicalName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->organizationName('[ORGANIZATION]'); + $source = new Source(); + $response = $gapicClient->createSource($formattedParent, $source); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/CreateSource', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getSource(); + $this->assertProtobufEquals($source, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createSourceExceptionTest() + { + $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->organizationName('[ORGANIZATION]'); + $source = new Source(); + try { + $gapicClient->createSource($formattedParent, $source); + // 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 deleteNotificationConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->notificationConfigName('[ORGANIZATION]', '[NOTIFICATION_CONFIG]'); + $gapicClient->deleteNotificationConfig($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/DeleteNotificationConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteNotificationConfigExceptionTest() + { + $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->notificationConfigName('[ORGANIZATION]', '[NOTIFICATION_CONFIG]'); + try { + $gapicClient->deleteNotificationConfig($formattedName); + // 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 getIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $response = $gapicClient->getIamPolicy($resource); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/GetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyExceptionTest() + { + $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 + $resource = 'resource-341064690'; + try { + $gapicClient->getIamPolicy($resource); + // 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 getNotificationConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $pubsubTopic = 'pubsubTopic-338126829'; + $serviceAccount = 'serviceAccount-1948028253'; + $expectedResponse = new NotificationConfig(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setPubsubTopic($pubsubTopic); + $expectedResponse->setServiceAccount($serviceAccount); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->notificationConfigName('[ORGANIZATION]', '[NOTIFICATION_CONFIG]'); + $response = $gapicClient->getNotificationConfig($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/GetNotificationConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getNotificationConfigExceptionTest() + { + $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->notificationConfigName('[ORGANIZATION]', '[NOTIFICATION_CONFIG]'); + try { + $gapicClient->getNotificationConfig($formattedName); + // 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 getOrganizationSettingsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $enableAssetDiscovery = false; + $expectedResponse = new OrganizationSettings(); + $expectedResponse->setName($name2); + $expectedResponse->setEnableAssetDiscovery($enableAssetDiscovery); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->organizationSettingsName('[ORGANIZATION]'); + $response = $gapicClient->getOrganizationSettings($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/GetOrganizationSettings', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getOrganizationSettingsExceptionTest() + { + $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->organizationSettingsName('[ORGANIZATION]'); + try { + $gapicClient->getOrganizationSettings($formattedName); + // 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 getSourceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $canonicalName = 'canonicalName1385400054'; + $expectedResponse = new Source(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setCanonicalName($canonicalName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->sourceName('[ORGANIZATION]', '[SOURCE]'); + $response = $gapicClient->getSource($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/GetSource', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSourceExceptionTest() + { + $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->sourceName('[ORGANIZATION]', '[SOURCE]'); + try { + $gapicClient->getSource($formattedName); + // 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 groupAssetsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $totalSize = 705419236; + $groupByResultsElement = new GroupResult(); + $groupByResults = [ + $groupByResultsElement, + ]; + $expectedResponse = new GroupAssetsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setGroupByResults($groupByResults); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $groupBy = 'groupBy506361367'; + $response = $gapicClient->groupAssets($formattedParent, $groupBy); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getGroupByResults()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/GroupAssets', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getGroupBy(); + $this->assertProtobufEquals($groupBy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function groupAssetsExceptionTest() + { + $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->projectName('[PROJECT]'); + $groupBy = 'groupBy506361367'; + try { + $gapicClient->groupAssets($formattedParent, $groupBy); + // 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 groupFindingsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $totalSize = 705419236; + $groupByResultsElement = new GroupResult(); + $groupByResults = [ + $groupByResultsElement, + ]; + $expectedResponse = new GroupFindingsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setGroupByResults($groupByResults); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->sourceName('[ORGANIZATION]', '[SOURCE]'); + $groupBy = 'groupBy506361367'; + $response = $gapicClient->groupFindings($formattedParent, $groupBy); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getGroupByResults()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/GroupFindings', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getGroupBy(); + $this->assertProtobufEquals($groupBy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function groupFindingsExceptionTest() + { + $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->sourceName('[ORGANIZATION]', '[SOURCE]'); + $groupBy = 'groupBy506361367'; + try { + $gapicClient->groupFindings($formattedParent, $groupBy); + // 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 listAssetsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $totalSize = 705419236; + $listAssetsResultsElement = new ListAssetsResult(); + $listAssetsResults = [ + $listAssetsResultsElement, + ]; + $expectedResponse = new ListAssetsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setListAssetsResults($listAssetsResults); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $response = $gapicClient->listAssets($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getListAssetsResults()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/ListAssets', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAssetsExceptionTest() + { + $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->projectName('[PROJECT]'); + try { + $gapicClient->listAssets($formattedParent); + // 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 listFindingsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $totalSize = 705419236; + $listFindingsResultsElement = new ListFindingsResult(); + $listFindingsResults = [ + $listFindingsResultsElement, + ]; + $expectedResponse = new ListFindingsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setListFindingsResults($listFindingsResults); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->sourceName('[ORGANIZATION]', '[SOURCE]'); + $response = $gapicClient->listFindings($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getListFindingsResults()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/ListFindings', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listFindingsExceptionTest() + { + $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->sourceName('[ORGANIZATION]', '[SOURCE]'); + try { + $gapicClient->listFindings($formattedParent); + // 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 listNotificationConfigsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $notificationConfigsElement = new NotificationConfig(); + $notificationConfigs = [ + $notificationConfigsElement, + ]; + $expectedResponse = new ListNotificationConfigsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setNotificationConfigs($notificationConfigs); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->organizationName('[ORGANIZATION]'); + $response = $gapicClient->listNotificationConfigs($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getNotificationConfigs()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/ListNotificationConfigs', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listNotificationConfigsExceptionTest() + { + $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->organizationName('[ORGANIZATION]'); + try { + $gapicClient->listNotificationConfigs($formattedParent); + // 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 listSourcesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $sourcesElement = new Source(); + $sources = [ + $sourcesElement, + ]; + $expectedResponse = new ListSourcesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSources($sources); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $response = $gapicClient->listSources($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getSources()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/ListSources', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSourcesExceptionTest() + { + $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->projectName('[PROJECT]'); + try { + $gapicClient->listSources($formattedParent); + // 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 runAssetDiscoveryTest() + { + $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/runAssetDiscoveryTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new RunAssetDiscoveryResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/runAssetDiscoveryTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->organizationName('[ORGANIZATION]'); + $response = $gapicClient->runAssetDiscovery($formattedParent); + $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.securitycenter.v1p1beta1.SecurityCenter/RunAssetDiscovery', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/runAssetDiscoveryTest'); + $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 runAssetDiscoveryExceptionTest() + { + $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/runAssetDiscoveryTest'); + $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 + $formattedParent = $gapicClient->organizationName('[ORGANIZATION]'); + $response = $gapicClient->runAssetDiscovery($formattedParent); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/runAssetDiscoveryTest'); + 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 setFindingStateTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $parent = 'parent-995424086'; + $resourceName = 'resourceName979421212'; + $category = 'category50511102'; + $externalUri = 'externalUri-1385596168'; + $canonicalName = 'canonicalName1385400054'; + $expectedResponse = new Finding(); + $expectedResponse->setName($name2); + $expectedResponse->setParent($parent); + $expectedResponse->setResourceName($resourceName); + $expectedResponse->setCategory($category); + $expectedResponse->setExternalUri($externalUri); + $expectedResponse->setCanonicalName($canonicalName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->findingName('[ORGANIZATION]', '[SOURCE]', '[FINDING]'); + $state = State::STATE_UNSPECIFIED; + $startTime = new Timestamp(); + $response = $gapicClient->setFindingState($formattedName, $state, $startTime); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/SetFindingState', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getState(); + $this->assertProtobufEquals($state, $actualValue); + $actualValue = $actualRequestObject->getStartTime(); + $this->assertProtobufEquals($startTime, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setFindingStateExceptionTest() + { + $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->findingName('[ORGANIZATION]', '[SOURCE]', '[FINDING]'); + $state = State::STATE_UNSPECIFIED; + $startTime = new Timestamp(); + try { + $gapicClient->setFindingState($formattedName, $state, $startTime); + // 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 setIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $response = $gapicClient->setIamPolicy($resource, $policy); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/SetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPolicy(); + $this->assertProtobufEquals($policy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyExceptionTest() + { + $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 + $resource = 'resource-341064690'; + $policy = new Policy(); + try { + $gapicClient->setIamPolicy($resource, $policy); + // 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 testIamPermissionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new TestIamPermissionsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $response = $gapicClient->testIamPermissions($resource, $permissions); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/TestIamPermissions', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPermissions(); + $this->assertProtobufEquals($permissions, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsExceptionTest() + { + $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 + $resource = 'resource-341064690'; + $permissions = []; + try { + $gapicClient->testIamPermissions($resource, $permissions); + // 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 updateFindingTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $parent = 'parent-995424086'; + $resourceName = 'resourceName979421212'; + $category = 'category50511102'; + $externalUri = 'externalUri-1385596168'; + $canonicalName = 'canonicalName1385400054'; + $expectedResponse = new Finding(); + $expectedResponse->setName($name); + $expectedResponse->setParent($parent); + $expectedResponse->setResourceName($resourceName); + $expectedResponse->setCategory($category); + $expectedResponse->setExternalUri($externalUri); + $expectedResponse->setCanonicalName($canonicalName); + $transport->addResponse($expectedResponse); + // Mock request + $finding = new Finding(); + $response = $gapicClient->updateFinding($finding); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/UpdateFinding', $actualFuncCall); + $actualValue = $actualRequestObject->getFinding(); + $this->assertProtobufEquals($finding, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateFindingExceptionTest() + { + $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 + $finding = new Finding(); + try { + $gapicClient->updateFinding($finding); + // 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 updateNotificationConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $description = 'description-1724546052'; + $pubsubTopic = 'pubsubTopic-338126829'; + $serviceAccount = 'serviceAccount-1948028253'; + $expectedResponse = new NotificationConfig(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setPubsubTopic($pubsubTopic); + $expectedResponse->setServiceAccount($serviceAccount); + $transport->addResponse($expectedResponse); + // Mock request + $notificationConfig = new NotificationConfig(); + $response = $gapicClient->updateNotificationConfig($notificationConfig); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/UpdateNotificationConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getNotificationConfig(); + $this->assertProtobufEquals($notificationConfig, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateNotificationConfigExceptionTest() + { + $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 + $notificationConfig = new NotificationConfig(); + try { + $gapicClient->updateNotificationConfig($notificationConfig); + // 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 updateOrganizationSettingsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $enableAssetDiscovery = false; + $expectedResponse = new OrganizationSettings(); + $expectedResponse->setName($name); + $expectedResponse->setEnableAssetDiscovery($enableAssetDiscovery); + $transport->addResponse($expectedResponse); + // Mock request + $organizationSettings = new OrganizationSettings(); + $response = $gapicClient->updateOrganizationSettings($organizationSettings); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/UpdateOrganizationSettings', $actualFuncCall); + $actualValue = $actualRequestObject->getOrganizationSettings(); + $this->assertProtobufEquals($organizationSettings, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateOrganizationSettingsExceptionTest() + { + $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 + $organizationSettings = new OrganizationSettings(); + try { + $gapicClient->updateOrganizationSettings($organizationSettings); + // 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 updateSecurityMarksTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $canonicalName = 'canonicalName1385400054'; + $expectedResponse = new SecurityMarks(); + $expectedResponse->setName($name); + $expectedResponse->setCanonicalName($canonicalName); + $transport->addResponse($expectedResponse); + // Mock request + $securityMarks = new SecurityMarks(); + $response = $gapicClient->updateSecurityMarks($securityMarks); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/UpdateSecurityMarks', $actualFuncCall); + $actualValue = $actualRequestObject->getSecurityMarks(); + $this->assertProtobufEquals($securityMarks, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateSecurityMarksExceptionTest() + { + $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 + $securityMarks = new SecurityMarks(); + try { + $gapicClient->updateSecurityMarks($securityMarks); + // 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 updateSourceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $canonicalName = 'canonicalName1385400054'; + $expectedResponse = new Source(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setCanonicalName($canonicalName); + $transport->addResponse($expectedResponse); + // Mock request + $source = new Source(); + $response = $gapicClient->updateSource($source); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/UpdateSource', $actualFuncCall); + $actualValue = $actualRequestObject->getSource(); + $this->assertProtobufEquals($source, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateSourceExceptionTest() + { + $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 + $source = new Source(); + try { + $gapicClient->updateSource($source); + // 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()); + } +} From 1f99e164d5a943755b5842384b9ffeb848714814 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 12 Jan 2023 21:56:33 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .../V1/SecurityCenterClient/group_assets.php | 4 +- .../V1/SecurityCenterClient/list_assets.php | 8 +- .../V1/SecurityCenterClient/list_sources.php | 4 +- .../V1/Gapic/SecurityCenterGapicClient.php | 16 +- SecurityCenter/src/V1/GroupAssetsRequest.php | 16 +- SecurityCenter/src/V1/ListAssetsRequest.php | 32 +- SecurityCenter/src/V1/ListSourcesRequest.php | 16 +- .../Google/Cloud/Securitycenter/V1/Access.php | 43 - .../Google/Cloud/Securitycenter/V1/Asset.php | 60 - .../Securitycenter/V1/BigqueryExport.php | 40 - .../Cloud/Securitycenter/V1/Compliance.php | 32 - .../Cloud/Securitycenter/V1/Connection.php | Bin 1152 -> 0 bytes .../Securitycenter/V1/ContactDetails.php | 31 - .../Cloud/Securitycenter/V1/Container.php | 33 - .../Cloud/Securitycenter/V1/Database.php | 33 - .../Cloud/Securitycenter/V1/Exfiltration.php | 34 - .../Securitycenter/V1/ExternalSystem.php | 36 - .../Google/Cloud/Securitycenter/V1/File.php | 34 - .../Cloud/Securitycenter/V1/Finding.php | Bin 6050 -> 0 bytes .../Google/Cloud/Securitycenter/V1/Folder.php | 30 - .../Cloud/Securitycenter/V1/IamBinding.php | Bin 1061 -> 0 bytes .../Cloud/Securitycenter/V1/Indicator.php | Bin 1548 -> 0 bytes .../Cloud/Securitycenter/V1/KernelRootkit.php | 37 - .../Cloud/Securitycenter/V1/Kubernetes.php | Bin 2427 -> 0 bytes .../Google/Cloud/Securitycenter/V1/Label.php | 31 - .../Cloud/Securitycenter/V1/MitreAttack.php | Bin 2542 -> 0 bytes .../Cloud/Securitycenter/V1/MuteConfig.php | 40 - .../Securitycenter/V1/NotificationConfig.php | Bin 1676 -> 0 bytes .../Securitycenter/V1/NotificationMessage.php | Bin 1312 -> 0 bytes .../V1/OrganizationSettings.php | Bin 1506 -> 0 bytes .../Cloud/Securitycenter/V1/Process.php | 44 - .../Cloud/Securitycenter/V1/Resource.php | 38 - .../V1/RunAssetDiscoveryResponse.php | Bin 1219 -> 0 bytes .../Cloud/Securitycenter/V1/SecurityMarks.php | 37 - .../V1/SecuritycenterService.php | Bin 21732 -> 0 bytes .../Google/Cloud/Securitycenter/V1/Source.php | 34 - .../Cloud/Securitycenter/V1/Vulnerability.php | Bin 2516 -> 0 bytes .../Google/Cloud/SecurityCenter/V1/Access.php | 491 -- .../Google/Cloud/SecurityCenter/V1/Asset.php | 412 -- .../SecurityCenter/V1/Asset/IamPolicy.php | 81 - .../V1/Asset/SecurityCenterProperties.php | 379 -- .../SecurityCenter/V1/Asset_IamPolicy.php | 16 - .../V1/Asset_SecurityCenterProperties.php | 16 - .../SecurityCenter/V1/BigQueryExport.php | 449 -- .../V1/BulkMuteFindingsRequest.php | 212 - .../V1/BulkMuteFindingsResponse.php | 33 - .../Cloud/SecurityCenter/V1/Compliance.php | 140 - .../Cloud/SecurityCenter/V1/Connection.php | 211 - .../SecurityCenter/V1/Connection/Protocol.php | 85 - .../SecurityCenter/V1/Connection_Protocol.php | 16 - .../Cloud/SecurityCenter/V1/Contact.php | 67 - .../SecurityCenter/V1/ContactDetails.php | 67 - .../Cloud/SecurityCenter/V1/Container.php | 181 - .../V1/CreateBigQueryExportRequest.php | 165 - .../V1/CreateFindingRequest.php | 161 - .../V1/CreateMuteConfigRequest.php | 165 - .../V1/CreateNotificationConfigRequest.php | 173 - .../SecurityCenter/V1/CreateSourceRequest.php | 119 - .../Google/Cloud/SecurityCenter/V1/Cve.php | 188 - .../Google/Cloud/SecurityCenter/V1/Cvssv3.php | 391 -- .../V1/Cvssv3/AttackComplexity.php | 71 - .../SecurityCenter/V1/Cvssv3/AttackVector.php | 84 - .../Cloud/SecurityCenter/V1/Cvssv3/Impact.php | 73 - .../V1/Cvssv3/PrivilegesRequired.php | 79 - .../Cloud/SecurityCenter/V1/Cvssv3/Scope.php | 67 - .../V1/Cvssv3/UserInteraction.php | 67 - .../V1/Cvssv3_AttackComplexity.php | 16 - .../SecurityCenter/V1/Cvssv3_AttackVector.php | 16 - .../Cloud/SecurityCenter/V1/Cvssv3_Impact.php | 16 - .../V1/Cvssv3_PrivilegesRequired.php | 16 - .../Cloud/SecurityCenter/V1/Cvssv3_Scope.php | 16 - .../V1/Cvssv3_UserInteraction.php | 16 - .../Cloud/SecurityCenter/V1/Database.php | 221 - .../V1/DeleteBigQueryExportRequest.php | 79 - .../V1/DeleteMuteConfigRequest.php | 79 - .../V1/DeleteNotificationConfigRequest.php | 79 - .../SecurityCenter/V1/EnvironmentVariable.php | 102 - .../Cloud/SecurityCenter/V1/ExfilResource.php | 113 - .../Cloud/SecurityCenter/V1/Exfiltration.php | 116 - .../SecurityCenter/V1/ExternalSystem.php | 233 - .../Google/Cloud/SecurityCenter/V1/File.php | 258 -- .../Cloud/SecurityCenter/V1/Finding.php | 1608 ------- .../V1/Finding/FindingClass.php | 87 - .../Cloud/SecurityCenter/V1/Finding/Mute.php | 71 - .../SecurityCenter/V1/Finding/Severity.php | 115 - .../Cloud/SecurityCenter/V1/Finding/State.php | 65 - .../V1/Finding_FindingClass.php | 16 - .../Cloud/SecurityCenter/V1/Finding_Mute.php | 16 - .../SecurityCenter/V1/Finding_Severity.php | 16 - .../Cloud/SecurityCenter/V1/Finding_State.php | 16 - .../Google/Cloud/SecurityCenter/V1/Folder.php | 106 - .../Cloud/SecurityCenter/V1/Geolocation.php | 67 - .../V1/GetBigQueryExportRequest.php | 79 - .../V1/GetMuteConfigRequest.php | 79 - .../V1/GetNotificationConfigRequest.php | 79 - .../V1/GetOrganizationSettingsRequest.php | 71 - .../SecurityCenter/V1/GetSourceRequest.php | 71 - .../SecurityCenter/V1/GroupAssetsRequest.php | 643 --- .../SecurityCenter/V1/GroupAssetsResponse.php | 191 - .../V1/GroupFindingsRequest.php | 659 --- .../V1/GroupFindingsResponse.php | 191 - .../Cloud/SecurityCenter/V1/GroupResult.php | 101 - .../Cloud/SecurityCenter/V1/IamBinding.php | 144 - .../SecurityCenter/V1/IamBinding/Action.php | 64 - .../SecurityCenter/V1/IamBinding_Action.php | 16 - .../Cloud/SecurityCenter/V1/Indicator.php | 176 - .../V1/Indicator/ProcessSignature.php | 111 - .../ProcessSignature/MemoryHashSignature.php | 108 - .../MemoryHashSignature/Detection.php | 112 - .../ProcessSignature/YaraRuleSignature.php | 70 - .../V1/Indicator_ProcessSignature.php | 16 - ...r_ProcessSignature_MemoryHashSignature.php | 16 - ...ignature_MemoryHashSignature_Detection.php | 16 - ...tor_ProcessSignature_YaraRuleSignature.php | 16 - .../Cloud/SecurityCenter/V1/KernelRootkit.php | 367 -- .../Cloud/SecurityCenter/V1/Kubernetes.php | 257 -- .../V1/Kubernetes/AccessReview.php | 287 -- .../SecurityCenter/V1/Kubernetes/Binding.php | 186 - .../SecurityCenter/V1/Kubernetes/Node.php | 74 - .../SecurityCenter/V1/Kubernetes/NodePool.php | 104 - .../SecurityCenter/V1/Kubernetes/Pod.php | 176 - .../SecurityCenter/V1/Kubernetes/Role.php | 138 - .../V1/Kubernetes/Role/Kind.php | 64 - .../SecurityCenter/V1/Kubernetes/Subject.php | 138 - .../V1/Kubernetes/Subject/AuthType.php | 71 - .../V1/Kubernetes_AccessReview.php | 16 - .../SecurityCenter/V1/Kubernetes_Binding.php | 16 - .../SecurityCenter/V1/Kubernetes_Node.php | 16 - .../SecurityCenter/V1/Kubernetes_NodePool.php | 16 - .../SecurityCenter/V1/Kubernetes_Pod.php | 16 - .../SecurityCenter/V1/Kubernetes_Role.php | 16 - .../V1/Kubernetes_Role_Kind.php | 16 - .../SecurityCenter/V1/Kubernetes_Subject.php | 16 - .../V1/Kubernetes_Subject_AuthType.php | 16 - .../Google/Cloud/SecurityCenter/V1/Label.php | 102 - .../SecurityCenter/V1/ListAssetsRequest.php | 719 --- .../SecurityCenter/V1/ListAssetsResponse.php | 183 - .../ListAssetsResponse/ListAssetsResult.php | 114 - .../ListAssetsResult/StateChange.php | 75 - .../ListAssetsResponse_ListAssetsResult.php | 16 - ...sResponse_ListAssetsResult_StateChange.php | 16 - .../V1/ListBigQueryExportsRequest.php | 168 - .../V1/ListBigQueryExportsResponse.php | 105 - .../SecurityCenter/V1/ListFindingsRequest.php | 735 --- .../V1/ListFindingsResponse.php | 183 - .../ListFindingsResult.php | 158 - .../ListFindingsResult/Resource.php | 321 -- .../ListFindingsResult/StateChange.php | 87 - ...istFindingsResponse_ListFindingsResult.php | 16 - ...gsResponse_ListFindingsResult_Resource.php | 16 - ...esponse_ListFindingsResult_StateChange.php | 16 - .../V1/ListMuteConfigsRequest.php | 168 - .../V1/ListMuteConfigsResponse.php | 105 - .../V1/ListNotificationConfigsRequest.php | 155 - .../V1/ListNotificationConfigsResponse.php | 105 - .../SecurityCenter/V1/ListSourcesRequest.php | 155 - .../SecurityCenter/V1/ListSourcesResponse.php | 105 - .../Cloud/SecurityCenter/V1/MitreAttack.php | 228 - .../SecurityCenter/V1/MitreAttack/Tactic.php | 149 - .../V1/MitreAttack/Technique.php | 296 -- .../SecurityCenter/V1/MitreAttack_Tactic.php | 16 - .../V1/MitreAttack_Technique.php | 16 - .../Cloud/SecurityCenter/V1/MuteConfig.php | 401 -- .../SecurityCenter/V1/NotificationConfig.php | 241 - .../V1/NotificationConfig/StreamingConfig.php | 131 - .../V1/NotificationConfig_StreamingConfig.php | 16 - .../SecurityCenter/V1/NotificationMessage.php | 156 - .../V1/OrganizationSettings.php | 170 - .../AssetDiscoveryConfig.php | 142 - .../AssetDiscoveryConfig/InclusionMode.php | 74 - ...anizationSettings_AssetDiscoveryConfig.php | 16 - ...ngs_AssetDiscoveryConfig_InclusionMode.php | 16 - .../Cloud/SecurityCenter/V1/Process.php | 409 -- .../Cloud/SecurityCenter/V1/Reference.php | 105 - .../Cloud/SecurityCenter/V1/Resource.php | 317 -- .../V1/RunAssetDiscoveryRequest.php | 71 - .../V1/RunAssetDiscoveryResponse.php | 111 - .../V1/RunAssetDiscoveryResponse/State.php | 72 - .../V1/RunAssetDiscoveryResponse_State.php | 16 - .../V1/SecurityCenterGrpcClient.php | 600 --- .../Cloud/SecurityCenter/V1/SecurityMarks.php | 206 - .../V1/ServiceAccountDelegationInfo.php | 125 - .../V1/SetFindingStateRequest.php | 165 - .../SecurityCenter/V1/SetMuteRequest.php | 121 - .../Google/Cloud/SecurityCenter/V1/Source.php | 244 - .../V1/UpdateBigQueryExportRequest.php | 125 - .../V1/UpdateExternalSystemRequest.php | 125 - .../V1/UpdateFindingRequest.php | 157 - .../V1/UpdateMuteConfigRequest.php | 125 - .../V1/UpdateNotificationConfigRequest.php | 125 - .../V1/UpdateOrganizationSettingsRequest.php | 125 - .../V1/UpdateSecurityMarksRequest.php | 189 - .../SecurityCenter/V1/UpdateSourceRequest.php | 125 - .../Cloud/SecurityCenter/V1/Vulnerability.php | 81 - .../bulk_mute_findings.php | 81 - .../create_big_query_export.php | 80 - .../SecurityCenterClient/create_finding.php | 75 - .../create_mute_config.php | 101 - .../create_notification_config.php | 80 - .../V1/SecurityCenterClient/create_source.php | 70 - .../delete_big_query_export.php | 67 - .../delete_mute_config.php | 67 - .../delete_notification_config.php | 70 - .../get_big_query_export.php | 69 - .../SecurityCenterClient/get_iam_policy.php | 66 - .../SecurityCenterClient/get_mute_config.php | 69 - .../get_notification_config.php | 72 - .../get_organization_settings.php | 67 - .../V1/SecurityCenterClient/get_source.php | 67 - .../V1/SecurityCenterClient/group_assets.php | 93 - .../SecurityCenterClient/group_findings.php | 99 - .../V1/SecurityCenterClient/list_assets.php | 75 - .../list_big_query_exports.php | 77 - .../V1/SecurityCenterClient/list_findings.php | 80 - .../list_mute_configs.php | 73 - .../list_notification_configs.php | 73 - .../V1/SecurityCenterClient/list_sources.php | 73 - .../run_asset_discovery.php | 84 - .../set_finding_state.php | 78 - .../SecurityCenterClient/set_iam_policy.php | 69 - .../V1/SecurityCenterClient/set_mute.php | 74 - .../test_iam_permissions.php | 74 - .../update_big_query_export.php | 56 - .../update_external_system.php | 56 - .../SecurityCenterClient/update_finding.php | 57 - .../update_mute_config.php | 88 - .../update_notification_config.php | 58 - .../update_organization_settings.php | 56 - .../update_security_marks.php | 56 - .../V1/SecurityCenterClient/update_source.php | 56 - .../V1/Gapic/SecurityCenterGapicClient.php | 3937 ----------------- .../v1/src/V1/SecurityCenterClient.php | 34 - .../v1/src/V1/gapic_metadata.json | 198 - .../security_center_client_config.json | 248 -- .../security_center_descriptor_config.php | 108 - .../security_center_rest_client_config.php | 814 ---- .../Unit/V1/SecurityCenterClientTest.php | 2674 ----------- .../Cloud/Securitycenter/V1P1Beta1/Asset.php | 60 - .../Securitycenter/V1P1Beta1/Finding.php | Bin 2389 -> 0 bytes .../Cloud/Securitycenter/V1P1Beta1/Folder.php | 30 - .../V1P1Beta1/NotificationConfig.php | Bin 1740 -> 0 bytes .../V1P1Beta1/NotificationMessage.php | Bin 1383 -> 0 bytes .../V1P1Beta1/OrganizationSettings.php | Bin 1583 -> 0 bytes .../Securitycenter/V1P1Beta1/Resource.php | 36 - .../V1P1Beta1/RunAssetDiscoveryResponse.php | Bin 1289 -> 0 bytes .../V1P1Beta1/SecurityMarks.php | 37 - .../V1P1Beta1/SecuritycenterService.php | Bin 15638 -> 0 bytes .../Cloud/Securitycenter/V1P1Beta1/Source.php | 34 - .../Cloud/SecurityCenter/V1p1beta1/Asset.php | 412 -- .../V1p1beta1/Asset/IamPolicy.php | 81 - .../Asset/SecurityCenterProperties.php | 379 -- .../V1p1beta1/Asset_IamPolicy.php | 16 - .../Asset_SecurityCenterProperties.php | 16 - .../V1p1beta1/CreateFindingRequest.php | 153 - .../CreateNotificationConfigRequest.php | 161 - .../V1p1beta1/CreateSourceRequest.php | 119 - .../DeleteNotificationConfigRequest.php | 71 - .../SecurityCenter/V1p1beta1/Finding.php | 603 --- .../V1p1beta1/Finding/Severity.php | 79 - .../V1p1beta1/Finding/State.php | 65 - .../V1p1beta1/Finding_Severity.php | 16 - .../V1p1beta1/Finding_State.php | 16 - .../Cloud/SecurityCenter/V1p1beta1/Folder.php | 106 - .../GetNotificationConfigRequest.php | 71 - .../GetOrganizationSettingsRequest.php | 71 - .../V1p1beta1/GetSourceRequest.php | 71 - .../V1p1beta1/GroupAssetsRequest.php | 643 --- .../V1p1beta1/GroupAssetsResponse.php | 191 - .../V1p1beta1/GroupFindingsRequest.php | 627 --- .../V1p1beta1/GroupFindingsResponse.php | 191 - .../SecurityCenter/V1p1beta1/GroupResult.php | 101 - .../V1p1beta1/ListAssetsRequest.php | 711 --- .../V1p1beta1/ListAssetsResponse.php | 183 - .../ListAssetsResponse/ListAssetsResult.php | 114 - .../ListAssetsResult/StateChange.php | 75 - .../ListAssetsResponse_ListAssetsResult.php | 16 - ...sResponse_ListAssetsResult_StateChange.php | 16 - .../V1p1beta1/ListFindingsRequest.php | 695 --- .../V1p1beta1/ListFindingsResponse.php | 183 - .../ListFindingsResult.php | 158 - .../ListFindingsResult/Resource.php | 253 -- .../ListFindingsResult/StateChange.php | 87 - ...istFindingsResponse_ListFindingsResult.php | 16 - ...gsResponse_ListFindingsResult_Resource.php | 16 - ...esponse_ListFindingsResult_StateChange.php | 16 - .../ListNotificationConfigsRequest.php | 151 - .../ListNotificationConfigsResponse.php | 105 - .../V1p1beta1/ListSourcesRequest.php | 155 - .../V1p1beta1/ListSourcesResponse.php | 105 - .../V1p1beta1/NotificationConfig.php | 268 -- .../NotificationConfig/EventType.php | 57 - .../NotificationConfig/StreamingConfig.php | 131 - .../NotificationConfig_EventType.php | 16 - .../NotificationConfig_StreamingConfig.php | 16 - .../V1p1beta1/NotificationMessage.php | 156 - .../V1p1beta1/OrganizationSettings.php | 170 - .../AssetDiscoveryConfig.php | 142 - .../AssetDiscoveryConfig/InclusionMode.php | 74 - ...anizationSettings_AssetDiscoveryConfig.php | 16 - ...ngs_AssetDiscoveryConfig_InclusionMode.php | 16 - .../SecurityCenter/V1p1beta1/Resource.php | 249 -- .../V1p1beta1/RunAssetDiscoveryRequest.php | 71 - .../V1p1beta1/RunAssetDiscoveryResponse.php | 111 - .../RunAssetDiscoveryResponse/State.php | 72 - .../RunAssetDiscoveryResponse_State.php | 16 - .../V1p1beta1/SecurityCenterGrpcClient.php | 398 -- .../V1p1beta1/SecurityMarks.php | 206 - .../V1p1beta1/SetFindingStateRequest.php | 157 - .../Cloud/SecurityCenter/V1p1beta1/Source.php | 243 - .../V1p1beta1/UpdateFindingRequest.php | 157 - .../UpdateNotificationConfigRequest.php | 125 - .../UpdateOrganizationSettingsRequest.php | 125 - .../V1p1beta1/UpdateSecurityMarksRequest.php | 185 - .../V1p1beta1/UpdateSourceRequest.php | 125 - .../SecurityCenterClient/create_finding.php | 73 - .../create_notification_config.php | 78 - .../SecurityCenterClient/create_source.php | 70 - .../delete_notification_config.php | 68 - .../SecurityCenterClient/get_iam_policy.php | 66 - .../get_notification_config.php | 70 - .../get_organization_settings.php | 67 - .../SecurityCenterClient/get_source.php | 67 - .../SecurityCenterClient/group_assets.php | 93 - .../SecurityCenterClient/group_findings.php | 99 - .../SecurityCenterClient/list_assets.php | 73 - .../SecurityCenterClient/list_findings.php | 80 - .../list_notification_configs.php | 72 - .../SecurityCenterClient/list_sources.php | 73 - .../run_asset_discovery.php | 84 - .../set_finding_state.php | 76 - .../SecurityCenterClient/set_iam_policy.php | 69 - .../test_iam_permissions.php | 74 - .../SecurityCenterClient/update_finding.php | 57 - .../update_notification_config.php | 57 - .../update_organization_settings.php | 56 - .../update_security_marks.php | 56 - .../SecurityCenterClient/update_source.php | 56 - .../Gapic/SecurityCenterGapicClient.php | 2798 ------------ .../src/V1p1beta1/SecurityCenterClient.php | 36 - .../src/V1p1beta1/gapic_metadata.json | 133 - .../security_center_client_config.json | 183 - .../security_center_descriptor_config.php | 78 - .../security_center_rest_client_config.php | 440 -- .../V1p1beta1/SecurityCenterClientTest.php | 1692 ------- 344 files changed, 54 insertions(+), 52018 deletions(-) delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Access.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Asset.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/BigqueryExport.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Compliance.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Connection.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/ContactDetails.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Container.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Database.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Exfiltration.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/ExternalSystem.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/File.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Finding.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Folder.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/IamBinding.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Indicator.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/KernelRootkit.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Kubernetes.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Label.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/MitreAttack.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/MuteConfig.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/NotificationConfig.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/NotificationMessage.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/OrganizationSettings.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Process.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Resource.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/RunAssetDiscoveryResponse.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/SecurityMarks.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/SecuritycenterService.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Source.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Vulnerability.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Access.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Asset.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Asset/IamPolicy.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Asset/SecurityCenterProperties.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Asset_IamPolicy.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Asset_SecurityCenterProperties.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/BigQueryExport.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/BulkMuteFindingsRequest.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/BulkMuteFindingsResponse.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Compliance.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Connection.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Connection/Protocol.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Connection_Protocol.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Contact.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ContactDetails.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Container.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/CreateBigQueryExportRequest.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/CreateFindingRequest.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/CreateMuteConfigRequest.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/CreateNotificationConfigRequest.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/CreateSourceRequest.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cve.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3/AttackComplexity.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3/AttackVector.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3/Impact.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3/PrivilegesRequired.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3/Scope.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3/UserInteraction.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3_AttackComplexity.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3_AttackVector.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3_Impact.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3_PrivilegesRequired.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3_Scope.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3_UserInteraction.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Database.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/DeleteBigQueryExportRequest.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/DeleteMuteConfigRequest.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/DeleteNotificationConfigRequest.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/EnvironmentVariable.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ExfilResource.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Exfiltration.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ExternalSystem.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/File.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Finding.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Finding/FindingClass.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Finding/Mute.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Finding/Severity.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Finding/State.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Finding_FindingClass.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Finding_Mute.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Finding_Severity.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Finding_State.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Folder.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Geolocation.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GetBigQueryExportRequest.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GetMuteConfigRequest.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GetNotificationConfigRequest.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GetOrganizationSettingsRequest.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GetSourceRequest.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GroupAssetsRequest.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GroupAssetsResponse.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GroupFindingsRequest.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GroupFindingsResponse.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GroupResult.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/IamBinding.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/IamBinding/Action.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/IamBinding_Action.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Indicator.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Indicator/ProcessSignature.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Indicator/ProcessSignature/MemoryHashSignature.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Indicator/ProcessSignature/MemoryHashSignature/Detection.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Indicator/ProcessSignature/YaraRuleSignature.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Indicator_ProcessSignature.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Indicator_ProcessSignature_MemoryHashSignature.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Indicator_ProcessSignature_MemoryHashSignature_Detection.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Indicator_ProcessSignature_YaraRuleSignature.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/KernelRootkit.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/AccessReview.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/Binding.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/Node.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/NodePool.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/Pod.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/Role.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/Role/Kind.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/Subject.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/Subject/AuthType.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes_AccessReview.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes_Binding.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes_Node.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes_NodePool.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes_Pod.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes_Role.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes_Role_Kind.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes_Subject.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes_Subject_AuthType.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Label.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListAssetsRequest.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListAssetsResponse.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListAssetsResponse/ListAssetsResult.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListAssetsResponse/ListAssetsResult/StateChange.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListAssetsResponse_ListAssetsResult.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListAssetsResponse_ListAssetsResult_StateChange.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListBigQueryExportsRequest.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListBigQueryExportsResponse.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListFindingsRequest.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListFindingsResponse.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListFindingsResponse/ListFindingsResult.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListFindingsResponse/ListFindingsResult/Resource.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListFindingsResponse/ListFindingsResult/StateChange.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListFindingsResponse_ListFindingsResult.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListFindingsResponse_ListFindingsResult_Resource.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListFindingsResponse_ListFindingsResult_StateChange.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListMuteConfigsRequest.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListMuteConfigsResponse.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListNotificationConfigsRequest.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListNotificationConfigsResponse.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListSourcesRequest.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListSourcesResponse.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/MitreAttack.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/MitreAttack/Tactic.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/MitreAttack/Technique.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/MitreAttack_Tactic.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/MitreAttack_Technique.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/MuteConfig.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/NotificationConfig.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/NotificationConfig/StreamingConfig.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/NotificationConfig_StreamingConfig.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/NotificationMessage.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/OrganizationSettings.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/OrganizationSettings/AssetDiscoveryConfig.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/OrganizationSettings/AssetDiscoveryConfig/InclusionMode.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/OrganizationSettings_AssetDiscoveryConfig.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/OrganizationSettings_AssetDiscoveryConfig_InclusionMode.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Process.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Reference.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Resource.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/RunAssetDiscoveryRequest.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/RunAssetDiscoveryResponse.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/RunAssetDiscoveryResponse/State.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/RunAssetDiscoveryResponse_State.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/SecurityCenterGrpcClient.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/SecurityMarks.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ServiceAccountDelegationInfo.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/SetFindingStateRequest.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/SetMuteRequest.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Source.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/UpdateBigQueryExportRequest.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/UpdateExternalSystemRequest.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/UpdateFindingRequest.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/UpdateMuteConfigRequest.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/UpdateNotificationConfigRequest.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/UpdateOrganizationSettingsRequest.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/UpdateSecurityMarksRequest.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/UpdateSourceRequest.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Vulnerability.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/bulk_mute_findings.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/create_big_query_export.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/create_finding.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/create_mute_config.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/create_notification_config.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/create_source.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/delete_big_query_export.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/delete_mute_config.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/delete_notification_config.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/get_big_query_export.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/get_iam_policy.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/get_mute_config.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/get_notification_config.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/get_organization_settings.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/get_source.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/group_assets.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/group_findings.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/list_assets.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/list_big_query_exports.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/list_findings.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/list_mute_configs.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/list_notification_configs.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/list_sources.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/run_asset_discovery.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/set_finding_state.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/set_iam_policy.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/set_mute.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/update_big_query_export.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/update_external_system.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/update_finding.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/update_mute_config.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/update_notification_config.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/update_organization_settings.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/update_security_marks.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/update_source.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/src/V1/Gapic/SecurityCenterGapicClient.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/src/V1/SecurityCenterClient.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/SecurityCenter/v1/src/V1/resources/security_center_client_config.json delete mode 100644 owl-bot-staging/SecurityCenter/v1/src/V1/resources/security_center_descriptor_config.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/src/V1/resources/security_center_rest_client_config.php delete mode 100644 owl-bot-staging/SecurityCenter/v1/tests/Unit/V1/SecurityCenterClientTest.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/Asset.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/Finding.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/Folder.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/NotificationConfig.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/NotificationMessage.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/OrganizationSettings.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/Resource.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/RunAssetDiscoveryResponse.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/SecurityMarks.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/SecuritycenterService.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/Source.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Asset.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Asset/IamPolicy.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Asset/SecurityCenterProperties.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Asset_IamPolicy.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Asset_SecurityCenterProperties.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/CreateFindingRequest.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/CreateNotificationConfigRequest.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/CreateSourceRequest.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/DeleteNotificationConfigRequest.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Finding.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Finding/Severity.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Finding/State.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Finding_Severity.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Finding_State.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Folder.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/GetNotificationConfigRequest.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/GetOrganizationSettingsRequest.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/GetSourceRequest.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/GroupAssetsRequest.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/GroupAssetsResponse.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/GroupFindingsRequest.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/GroupFindingsResponse.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/GroupResult.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListAssetsRequest.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListAssetsResponse.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListAssetsResponse/ListAssetsResult.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListAssetsResponse/ListAssetsResult/StateChange.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListAssetsResponse_ListAssetsResult.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListAssetsResponse_ListAssetsResult_StateChange.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListFindingsRequest.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListFindingsResponse.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListFindingsResponse/ListFindingsResult.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListFindingsResponse/ListFindingsResult/Resource.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListFindingsResponse/ListFindingsResult/StateChange.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListFindingsResponse_ListFindingsResult.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListFindingsResponse_ListFindingsResult_Resource.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListFindingsResponse_ListFindingsResult_StateChange.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListNotificationConfigsRequest.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListNotificationConfigsResponse.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListSourcesRequest.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListSourcesResponse.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/NotificationConfig.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/NotificationConfig/EventType.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/NotificationConfig/StreamingConfig.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/NotificationConfig_EventType.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/NotificationConfig_StreamingConfig.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/NotificationMessage.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/OrganizationSettings.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/OrganizationSettings/AssetDiscoveryConfig.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/OrganizationSettings/AssetDiscoveryConfig/InclusionMode.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/OrganizationSettings_AssetDiscoveryConfig.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/OrganizationSettings_AssetDiscoveryConfig_InclusionMode.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Resource.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/RunAssetDiscoveryRequest.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/RunAssetDiscoveryResponse.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/RunAssetDiscoveryResponse/State.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/RunAssetDiscoveryResponse_State.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/SecurityCenterGrpcClient.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/SecurityMarks.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/SetFindingStateRequest.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Source.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/UpdateFindingRequest.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/UpdateNotificationConfigRequest.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/UpdateOrganizationSettingsRequest.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/UpdateSecurityMarksRequest.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/UpdateSourceRequest.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/create_finding.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/create_notification_config.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/create_source.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/delete_notification_config.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/get_iam_policy.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/get_notification_config.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/get_organization_settings.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/get_source.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/group_assets.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/group_findings.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/list_assets.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/list_findings.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/list_notification_configs.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/list_sources.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/run_asset_discovery.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/set_finding_state.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/set_iam_policy.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/update_finding.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/update_notification_config.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/update_organization_settings.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/update_security_marks.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/update_source.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/src/V1p1beta1/Gapic/SecurityCenterGapicClient.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/src/V1p1beta1/SecurityCenterClient.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/src/V1p1beta1/gapic_metadata.json delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/src/V1p1beta1/resources/security_center_client_config.json delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/src/V1p1beta1/resources/security_center_descriptor_config.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/src/V1p1beta1/resources/security_center_rest_client_config.php delete mode 100644 owl-bot-staging/SecurityCenter/v1p1beta1/tests/Unit/V1p1beta1/SecurityCenterClientTest.php diff --git a/SecurityCenter/samples/V1/SecurityCenterClient/group_assets.php b/SecurityCenter/samples/V1/SecurityCenterClient/group_assets.php index d44458e04521..2225a43a92e4 100644 --- a/SecurityCenter/samples/V1/SecurityCenterClient/group_assets.php +++ b/SecurityCenter/samples/V1/SecurityCenterClient/group_assets.php @@ -33,8 +33,8 @@ * properties. * * @param string $formattedParent The name of the parent to group the assets by. Its format is - * "organizations/[organization_id], folders/[folder_id], or - * projects/[project_id]". Please see + * "organizations/[organization_id]", "folders/[folder_id]", or + * "projects/[project_id]". Please see * {@see SecurityCenterClient::projectName()} for help formatting this field. * @param string $groupBy Expression that defines what assets fields to use for grouping. * The string value should follow SQL syntax: comma separated list of fields. diff --git a/SecurityCenter/samples/V1/SecurityCenterClient/list_assets.php b/SecurityCenter/samples/V1/SecurityCenterClient/list_assets.php index 17a99ffb04b0..4a4686c2423f 100644 --- a/SecurityCenter/samples/V1/SecurityCenterClient/list_assets.php +++ b/SecurityCenter/samples/V1/SecurityCenterClient/list_assets.php @@ -31,9 +31,11 @@ /** * Lists an organization's assets. * - * @param string $formattedParent The name of the parent that the listed assets belong to. Its - * format is "organizations/[organization_id], folders/[folder_id], or - * projects/[project_id]". Please see + * @param string $formattedParent The name of the parent resource that contains the assets. The + * value that you can specify on parent depends on the method in which you + * specify parent. You can specify one of the following values: + * "organizations/[organization_id]", "folders/[folder_id]", or + * "projects/[project_id]". Please see * {@see SecurityCenterClient::projectName()} for help formatting this field. */ function list_assets_sample(string $formattedParent): void diff --git a/SecurityCenter/samples/V1/SecurityCenterClient/list_sources.php b/SecurityCenter/samples/V1/SecurityCenterClient/list_sources.php index 8b5fd03599e6..9a0a53ce732f 100644 --- a/SecurityCenter/samples/V1/SecurityCenterClient/list_sources.php +++ b/SecurityCenter/samples/V1/SecurityCenterClient/list_sources.php @@ -32,8 +32,8 @@ * Lists all sources belonging to an organization. * * @param string $formattedParent Resource name of the parent of sources to list. Its format should - * be "organizations/[organization_id], folders/[folder_id], or - * projects/[project_id]". Please see + * be "organizations/[organization_id]", "folders/[folder_id]", or + * "projects/[project_id]". Please see * {@see SecurityCenterClient::projectName()} for help formatting this field. */ function list_sources_sample(string $formattedParent): void diff --git a/SecurityCenter/src/V1/Gapic/SecurityCenterGapicClient.php b/SecurityCenter/src/V1/Gapic/SecurityCenterGapicClient.php index 65ac662fd7d4..7fd1dd1af4e4 100644 --- a/SecurityCenter/src/V1/Gapic/SecurityCenterGapicClient.php +++ b/SecurityCenter/src/V1/Gapic/SecurityCenterGapicClient.php @@ -2178,8 +2178,8 @@ public function getSource($name, array $optionalArgs = []) * ``` * * @param string $parent Required. The name of the parent to group the assets by. Its format is - * "organizations/[organization_id], folders/[folder_id], or - * projects/[project_id]". + * "organizations/[organization_id]", "folders/[folder_id]", or + * "projects/[project_id]". * @param string $groupBy Required. Expression that defines what assets fields to use for grouping. * The string value should follow SQL syntax: comma separated list of fields. * For example: @@ -2581,9 +2581,11 @@ public function groupFindings($parent, $groupBy, array $optionalArgs = []) * } * ``` * - * @param string $parent Required. The name of the parent that the listed assets belong to. Its - * format is "organizations/[organization_id], folders/[folder_id], or - * projects/[project_id]". + * @param string $parent Required. The name of the parent resource that contains the assets. The + * value that you can specify on parent depends on the method in which you + * specify parent. You can specify one of the following values: + * "organizations/[organization_id]", "folders/[folder_id]", or + * "projects/[project_id]". * @param array $optionalArgs { * Optional. * @@ -3222,8 +3224,8 @@ public function listNotificationConfigs($parent, array $optionalArgs = []) * ``` * * @param string $parent Required. Resource name of the parent of sources to list. Its format should - * be "organizations/[organization_id], folders/[folder_id], or - * projects/[project_id]". + * be "organizations/[organization_id]", "folders/[folder_id]", or + * "projects/[project_id]". * @param array $optionalArgs { * Optional. * diff --git a/SecurityCenter/src/V1/GroupAssetsRequest.php b/SecurityCenter/src/V1/GroupAssetsRequest.php index 6c96e4e56a0a..8c882d162e7f 100644 --- a/SecurityCenter/src/V1/GroupAssetsRequest.php +++ b/SecurityCenter/src/V1/GroupAssetsRequest.php @@ -17,8 +17,8 @@ class GroupAssetsRequest extends \Google\Protobuf\Internal\Message { /** * Required. The name of the parent to group the assets by. Its format is - * "organizations/[organization_id], folders/[folder_id], or - * projects/[project_id]". + * "organizations/[organization_id]", "folders/[folder_id]", or + * "projects/[project_id]". * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ @@ -154,8 +154,8 @@ class GroupAssetsRequest extends \Google\Protobuf\Internal\Message * * @type string $parent * Required. The name of the parent to group the assets by. Its format is - * "organizations/[organization_id], folders/[folder_id], or - * projects/[project_id]". + * "organizations/[organization_id]", "folders/[folder_id]", or + * "projects/[project_id]". * @type string $filter * Expression that defines the filter to apply across assets. * The expression is a list of zero or more restrictions combined via logical @@ -263,8 +263,8 @@ public function __construct($data = NULL) { /** * Required. The name of the parent to group the assets by. Its format is - * "organizations/[organization_id], folders/[folder_id], or - * projects/[project_id]". + * "organizations/[organization_id]", "folders/[folder_id]", or + * "projects/[project_id]". * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string @@ -276,8 +276,8 @@ public function getParent() /** * Required. The name of the parent to group the assets by. Its format is - * "organizations/[organization_id], folders/[folder_id], or - * projects/[project_id]". + * "organizations/[organization_id]", "folders/[folder_id]", or + * "projects/[project_id]". * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var diff --git a/SecurityCenter/src/V1/ListAssetsRequest.php b/SecurityCenter/src/V1/ListAssetsRequest.php index 520095ec4f87..b119e49260f2 100644 --- a/SecurityCenter/src/V1/ListAssetsRequest.php +++ b/SecurityCenter/src/V1/ListAssetsRequest.php @@ -16,9 +16,11 @@ class ListAssetsRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The name of the parent that the listed assets belong to. Its - * format is "organizations/[organization_id], folders/[folder_id], or - * projects/[project_id]". + * Required. The name of the parent resource that contains the assets. The + * value that you can specify on parent depends on the method in which you + * specify parent. You can specify one of the following values: + * "organizations/[organization_id]", "folders/[folder_id]", or + * "projects/[project_id]". * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ @@ -165,9 +167,11 @@ class ListAssetsRequest extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $parent - * Required. The name of the parent that the listed assets belong to. Its - * format is "organizations/[organization_id], folders/[folder_id], or - * projects/[project_id]". + * Required. The name of the parent resource that contains the assets. The + * value that you can specify on parent depends on the method in which you + * specify parent. You can specify one of the following values: + * "organizations/[organization_id]", "folders/[folder_id]", or + * "projects/[project_id]". * @type string $filter * Expression that defines the filter to apply across assets. * The expression is a list of zero or more restrictions combined via logical @@ -282,9 +286,11 @@ public function __construct($data = NULL) { } /** - * Required. The name of the parent that the listed assets belong to. Its - * format is "organizations/[organization_id], folders/[folder_id], or - * projects/[project_id]". + * Required. The name of the parent resource that contains the assets. The + * value that you can specify on parent depends on the method in which you + * specify parent. You can specify one of the following values: + * "organizations/[organization_id]", "folders/[folder_id]", or + * "projects/[project_id]". * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string @@ -295,9 +301,11 @@ public function getParent() } /** - * Required. The name of the parent that the listed assets belong to. Its - * format is "organizations/[organization_id], folders/[folder_id], or - * projects/[project_id]". + * Required. The name of the parent resource that contains the assets. The + * value that you can specify on parent depends on the method in which you + * specify parent. You can specify one of the following values: + * "organizations/[organization_id]", "folders/[folder_id]", or + * "projects/[project_id]". * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var diff --git a/SecurityCenter/src/V1/ListSourcesRequest.php b/SecurityCenter/src/V1/ListSourcesRequest.php index 757e97a0f545..375cd276a3b0 100644 --- a/SecurityCenter/src/V1/ListSourcesRequest.php +++ b/SecurityCenter/src/V1/ListSourcesRequest.php @@ -17,8 +17,8 @@ class ListSourcesRequest extends \Google\Protobuf\Internal\Message { /** * Required. Resource name of the parent of sources to list. Its format should - * be "organizations/[organization_id], folders/[folder_id], or - * projects/[project_id]". + * be "organizations/[organization_id]", "folders/[folder_id]", or + * "projects/[project_id]". * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ @@ -47,8 +47,8 @@ class ListSourcesRequest extends \Google\Protobuf\Internal\Message * * @type string $parent * Required. Resource name of the parent of sources to list. Its format should - * be "organizations/[organization_id], folders/[folder_id], or - * projects/[project_id]". + * be "organizations/[organization_id]", "folders/[folder_id]", or + * "projects/[project_id]". * @type string $page_token * The value returned by the last `ListSourcesResponse`; indicates * that this is a continuation of a prior `ListSources` call, and @@ -65,8 +65,8 @@ public function __construct($data = NULL) { /** * Required. Resource name of the parent of sources to list. Its format should - * be "organizations/[organization_id], folders/[folder_id], or - * projects/[project_id]". + * be "organizations/[organization_id]", "folders/[folder_id]", or + * "projects/[project_id]". * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string @@ -78,8 +78,8 @@ public function getParent() /** * Required. Resource name of the parent of sources to list. Its format should - * be "organizations/[organization_id], folders/[folder_id], or - * projects/[project_id]". + * be "organizations/[organization_id]", "folders/[folder_id]", or + * "projects/[project_id]". * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Access.php b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Access.php deleted file mode 100644 index ddbb4a280787..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Access.php +++ /dev/null @@ -1,43 +0,0 @@ -internalAddGeneratedFile( - ' - -+google/cloud/securitycenter/v1/access.protogoogle.cloud.securitycenter.v1" -Access -principal_email (  - caller_ip ( B - caller_ip_geo ( 2+.google.cloud.securitycenter.v1.Geolocation -user_agent_family (  - service_name (  - method_name (  -principal_subject (  -service_account_key_name ( e -service_account_delegation_info ( 2<.google.cloud.securitycenter.v1.ServiceAccountDelegationInfo - user_name ( "R -ServiceAccountDelegationInfo -principal_email (  -principal_subject ( "" - Geolocation - region_code ( B -"com.google.cloud.securitycenter.v1B AccessProtoPZLgoogle.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenterGoogle.Cloud.SecurityCenter.V1Google\\Cloud\\SecurityCenter\\V1!Google::Cloud::SecurityCenter::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Asset.php b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Asset.php deleted file mode 100644 index 7bf2e73ed036..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Asset.php +++ /dev/null @@ -1,60 +0,0 @@ -internalAddGeneratedFile( - ' - -*google/cloud/securitycenter/v1/asset.protogoogle.cloud.securitycenter.v1+google/cloud/securitycenter/v1/folder.proto3google/cloud/securitycenter/v1/security_marks.protogoogle/protobuf/struct.protogoogle/protobuf/timestamp.proto" -Asset -name ( b -security_center_properties ( 2>.google.cloud.securitycenter.v1.Asset.SecurityCenterPropertiesZ -resource_properties ( 2=.google.cloud.securitycenter.v1.Asset.ResourcePropertiesEntryE -security_marks ( 2-.google.cloud.securitycenter.v1.SecurityMarks/ - create_time ( 2.google.protobuf.Timestamp/ - update_time - ( 2.google.protobuf.TimestampC - -iam_policy ( 2/.google.cloud.securitycenter.v1.Asset.IamPolicy -canonical_name (  -SecurityCenterProperties - resource_name (  - resource_type (  -resource_parent (  -resource_project (  -resource_owners (  -resource_display_name ( $ -resource_parent_display_name ( % -resource_project_display_name ( 7 -folders - ( 2&.google.cloud.securitycenter.v1.Folder - IamPolicy - policy_blob ( Q -ResourcePropertiesEntry -key ( % -value ( 2.google.protobuf.Value:8:A -#securitycenter.googleapis.com/Asset+organizations/{organization}/assets/{asset}folders/{folder}/assets/{asset}!projects/{project}/assets/{asset}B -"com.google.cloud.securitycenter.v1PZLgoogle.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenterGoogle.Cloud.SecurityCenter.V1Google\\Cloud\\SecurityCenter\\V1!Google::Cloud::SecurityCenter::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/BigqueryExport.php b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/BigqueryExport.php deleted file mode 100644 index 7951072d27ca..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/BigqueryExport.php +++ /dev/null @@ -1,40 +0,0 @@ -internalAddGeneratedFile( - ' - -4google/cloud/securitycenter/v1/bigquery_export.protogoogle.cloud.securitycenter.v1google/api/resource.protogoogle/protobuf/timestamp.proto" -BigQueryExport -name (  - description (  -filter (  -dataset ( 4 - create_time ( 2.google.protobuf.TimestampBA4 - update_time ( 2.google.protobuf.TimestampBA -most_recent_editor ( BA - principal ( BA:A -,securitycenter.googleapis.com/BigQueryExport5organizations/{organization}/bigQueryExports/{export})folders/{folder}/bigQueryExports/{export}+projects/{project}/bigQueryExports/{export}B -"com.google.cloud.securitycenter.v1BBigQueryExportProtoPZLgoogle.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenterGoogle.Cloud.SecurityCenter.V1Google\\Cloud\\SecurityCenter\\V1!Google::Cloud::SecurityCenter::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Compliance.php b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Compliance.php deleted file mode 100644 index 42ec5d7e7c7f..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Compliance.php +++ /dev/null @@ -1,32 +0,0 @@ -internalAddGeneratedFile( - ' - -/google/cloud/securitycenter/v1/compliance.protogoogle.cloud.securitycenter.v1"< - -Compliance -standard (  -version (  -ids ( B -"com.google.cloud.securitycenter.v1BComplianceProtoPZLgoogle.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenterGoogle.Cloud.SecurityCenter.V1Google\\Cloud\\SecurityCenter\\V1!Google::Cloud::SecurityCenter::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Connection.php b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Connection.php deleted file mode 100644 index 9f4b2e9a8880baffceb1f3b8bb62fa103ab76255..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1152 zcmb7D(N5bi6kSVU;7KfW)6^$q7!pMqi3)FF-89lrRRS78;bDqYxsDqw1v_#aBsTG| z-`S^Zf3p3=Y^P0IAvUcqy}CK~_}J&3_aD=n6ugC9!iYeUL~wKu@HJb5UVB*4<^Ee?6PIw+U8Ns=r@*Wc=iE!>(4(5yz zEGcKU;Rb-ATau*+6W9%o&xk}3k|^vNn$XiU;pGBNc-=Yz04FHRpjXm?uK=oFnvW8S zVJ4AOe>*fAQbr|33H_pO)rMn~WJHZW#*TAlbU{7PXP7kiV8N-eJ1JMM(1ufCfqoeE zC}B_EjG-j#kPHi&N-hEgb={cA@;P;jh)6p?(78+gmk;pcbA}8~wLnw&M1v@gj zHNit!8D;w)=tRe-C@POVQC2lepdQ-=KWo7GPmk)G#ei*0wHHmb?^@g6ssPNKsJ{X0 z5y>QF$^*`ZG;LI1rMXsb0BgRVav>X4^<}xf0oIEB(cmQmeg$4kS_W4$I3KJ|H?py; zI_n3A_TRPHGhMdvOfB>F1z4TdO4RG%qCe<+{nO#q`DNgHy_25bv7XgeL9OSV1y-g0 z94rmIz*^D8RVT1EbkV)=Ek_srWndi~|E_>-m5zVNIet0QV|c#5_SPwz-I% zm@sqCiBl-0*;9!+TD0SPb+c=tW1HyM)9836f%bLl#}p7w!d0fLfP^Yuzp7gWiR&5` j*IlG>-Rst9#V9=7E%)nPv9@zt{^W)mWUinternalAddGeneratedFile( - ' - -4google/cloud/securitycenter/v1/contact_details.protogoogle.cloud.securitycenter.v1"K -ContactDetails9 -contacts ( 2\'.google.cloud.securitycenter.v1.Contact" -Contact -email ( B -"com.google.cloud.securitycenter.v1BContactDetailsProtoPZLgoogle.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenterGoogle.Cloud.SecurityCenter.V1Google\\Cloud\\SecurityCenter\\V1!Google::Cloud::SecurityCenter::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Container.php b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Container.php deleted file mode 100644 index 31e94cdeba41..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Container.php +++ /dev/null @@ -1,33 +0,0 @@ -internalAddGeneratedFile( - ' - -.google/cloud/securitycenter/v1/container.protogoogle.cloud.securitycenter.v1"o - Container -name (  -uri (  -image_id ( 5 -labels ( 2%.google.cloud.securitycenter.v1.LabelB -"com.google.cloud.securitycenter.v1BContainerProtoPZLgoogle.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenterGoogle.Cloud.SecurityCenter.V1Google\\Cloud\\SecurityCenter\\V1!Google::Cloud::SecurityCenter::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Database.php b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Database.php deleted file mode 100644 index e6c9a943e7e9..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Database.php +++ /dev/null @@ -1,33 +0,0 @@ -internalAddGeneratedFile( - ' - --google/cloud/securitycenter/v1/database.protogoogle.cloud.securitycenter.v1"b -Database -name (  - display_name (  - user_name (  -query (  -grantees ( B -"com.google.cloud.securitycenter.v1B DatabaseProtoPZLgoogle.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenterGoogle.Cloud.SecurityCenter.V1Google\\Cloud\\SecurityCenter\\V1!Google::Cloud::SecurityCenter::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Exfiltration.php b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Exfiltration.php deleted file mode 100644 index c0ed5cd54aac..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Exfiltration.php +++ /dev/null @@ -1,34 +0,0 @@ -internalAddGeneratedFile( - ' - -1google/cloud/securitycenter/v1/exfiltration.protogoogle.cloud.securitycenter.v1" - Exfiltration> -sources ( 2-.google.cloud.securitycenter.v1.ExfilResource> -targets ( 2-.google.cloud.securitycenter.v1.ExfilResource"1 - ExfilResource -name (  - -components ( B -"com.google.cloud.securitycenter.v1BExfiltrationProtoPZLgoogle.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenterGoogle.Cloud.SecurityCenter.V1Google\\Cloud\\SecurityCenter\\V1!Google::Cloud::SecurityCenter::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/ExternalSystem.php b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/ExternalSystem.php deleted file mode 100644 index bdc034c5945e..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/ExternalSystem.php +++ /dev/null @@ -1,36 +0,0 @@ -internalAddGeneratedFile( - ' - -4google/cloud/securitycenter/v1/external_system.protogoogle.cloud.securitycenter.v1google/protobuf/timestamp.proto" -ExternalSystem -name (  - assignees (  - external_uid (  -status ( ? -external_system_update_time ( 2.google.protobuf.Timestamp:A -,securitycenter.googleapis.com/ExternalSystemaorganizations/{organization}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}Ufolders/{folder}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}Wprojects/{project}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}B -"com.google.cloud.securitycenter.v1BExternalSystemProtoPZLgoogle.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenterGoogle.Cloud.SecurityCenter.V1Google\\Cloud\\SecurityCenter\\V1!Google::Cloud::SecurityCenter::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/File.php b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/File.php deleted file mode 100644 index 9ce1ffa30d33..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/File.php +++ /dev/null @@ -1,34 +0,0 @@ -internalAddGeneratedFile( - ' - -)google/cloud/securitycenter/v1/file.protogoogle.cloud.securitycenter.v1"s -File -path (  -size ( -sha256 (  - hashed_size ( -partially_hashed ( -contents ( B -"com.google.cloud.securitycenter.v1B FileProtoPZLgoogle.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenterGoogle.Cloud.SecurityCenter.V1Google\\Cloud\\SecurityCenter\\V1!Google::Cloud::SecurityCenter::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Finding.php b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Finding.php deleted file mode 100644 index 369d305a698c97ef38acc2839a7a67c530a37b7c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6050 zcmb_gTT|Oc6t2PC)<7HuG76Itg_2+rA_tOYQU{XwB8VEWscqbwXEd_BCMvR|kz^($ z!%KfkANy1K2RhTf^f|ww4?TO4u@k7A!MtEed%itq_nhxsHea}JT=bQ+gKg~T0d7i- z6DfFuCD(HT$8apE(P_1?CmBxLH7)GPl2j;3#ZpyL3TpK>i26>)GjK*abeuyArwz;L zG}AsdI-VJv7}yT5mp)!kw@kZf+J`a)M#$FN*mrdUOFR3yJsjvwJ<#hr6r-Le81+gY zM!mNF3?akPeP7yUSm-^H;Lq(eEYpzuKo8*GvgvE4Z3d=pneV`!EvcnjJ_gxO*S0#g z5txoG5rL9z;MA(bFv;3w*8%&tq)@AUawKpZb(Pp;>sGyheZw=|!14BBX(n@sgYH3+ zH>p*=ErByzQi|!A$$X;ZmK1m$+`GFZc{u2J_A{zC0XXgcs-JUaS=X#@o7igR@EiTu zbi7RF%&Iexi$u$q-{Zhi7hF<3YZ%z~2jBf7oIH4(W$JJ%!@#m_Os{$7C|3RX=>iGkjB&)<}$qX*ATo_w;+W;fT6ct~}# z1IZOD=-)-O_Bkn8SY)eZn!x4$1TG)1FWlg0x@)FAo-J55U$`H!kxo+rU!0CuOezh= z`vVJvhLB2ls7GIko!j4)cXHsK&Hv=L$ZaWBzunVVb&wx_jb+NW&7zux-zYYrFI9YE&%7;c<530l)8y zNI~YC$rU0bB+(>XK0b836LE~<&7tY8mqJ4zj?=e4psTFf)WA*`dx434aY7nRB{sGO z-jTK)K%QJ)u>}LWfQXq#Web|BYN#ZoDp51sju=QL{xQ=EG-F9q7A{5X} zUzmt<6d}?t`;xfu4N8*3&^j)VGQXaA3iLns$(-P4lH`m0}` zIw}LtqUm005^qqQ?neRllwraXG|sZCxIl&PMhUa_On3p#>V$dI7jIFM?nMdbyCTH# z=$W!!8!BJ%CMZB0Z;Ep##PlMCt*=DkLKu@;P}l_macFY(#oJW&>nPFiltDF;)O(MY z+87oSzPL1~jiHDjp=*pZwWjI2mVUw_Y?&C!ZtxmPH2Dw!IwkQAJ%St|y|eyFyi0E; zG6s8lF5xAb?#aHsSYH`T`?ID-5MaszzNCqAi z;Wb9yBl3#!ij%V{#wWcIvP?1ckMgBCh^c|Y4gjq~Pa}}kgl-25wAIXDE9$u^Y>@FZo zqWCLy=T&lq;O@Z$@?bAHDomi!-O~5T_);FlX#$%=$-RS5RGC6!%)?`A8Nk2C~Ls;|mQwhFjc(M;`Nx2Tk} zIdvC|0Y!-}Y9(JPZmT;7vtu06H*VhBhh9)f8Sj-l1-r@94P3PrvVdJWaDw3tqDyr{O3T-n3Y8e=0m~ zIaU)W0bbD`gGoIB&;AAGY9Pjc4J4QQD~6Up{|JBHkNvdE3SL-f=`cG6yV8f)rt!p^ z1acM^&77b0pWg2yi#v3_EYp#r9F}}}sPUkytF8YLE~xVfbaw>JmegSe{bA%b1Ic74 rN+#0}lgZT98{<^NM=RZye2tBFd#1sp$~KL2Cc$(io7bMAQ-uBlBqa0T diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Folder.php b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Folder.php deleted file mode 100644 index 4fab2c7121a3..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Folder.php +++ /dev/null @@ -1,30 +0,0 @@ -internalAddGeneratedFile( - ' - -+google/cloud/securitycenter/v1/folder.protogoogle.cloud.securitycenter.v1"G -Folder -resource_folder ( $ -resource_folder_display_name ( B -"com.google.cloud.securitycenter.v1B FolderProtoPZLgoogle.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenterGoogle.Cloud.SecurityCenter.V1Google\\Cloud\\SecurityCenter\\V1!Google::Cloud::SecurityCenter::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/IamBinding.php b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/IamBinding.php deleted file mode 100644 index 0f0557ac30d771423d48add52ed02714533353ea..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1061 zcmb7D-HOvd7&Wa_9AquIkX|jbbz!@piCOU`wMyG`OTcZ5TYDjaGMP-X14$-KCJU?d zZM^bPd=$O#6`V}kbjz}exyj!-=R5O#=X?7;y-LAzI3@|a2*S;4%cLk? z`ZNh>5*kVzfCR-POA#h;JR4jPfdV9uH&!~{u+Z@?_jJ64)dc`YD9fOW;z20~z5*z( zH1{KlVJ47}w_}5&a^M)q^V(Wkk~NVpn;B1!V~=2-5_U&M7Q43+!>qWE*;L zYiw3@Ms~$>i=!nd@*I+3PE*17OhRotB%b@im2y?jSEKKemWl|7fU>Qumjb^?Ca!K?orl73h+3^i6`f2_u})&8ad zup5Qm2Mwfp+0vlaIXJV7zw?b9*XS#v{scVaEF!I%6nLy3fJRJWpYT?_cyGS}jScP@ z(EG!=JDn^)O)h7np?mI*oaO`l5vcbar>W@xG(L_lri)RtHu$B1wv6yU+zg)X?5Hu% zw9g+l2MAe&WONx1&5$H2!Djgjr8K)Q_TBxCeXkvkRlE%qZ(|$pp;{ATVg1+wyv+hs w8&E<#xdK0HN2Q2uD;3+`m$B`IuM807o?B>il=ex{#`8w{#@B}poBLXWDpmrarEj>xbv-`l#fI@QI5;&cldQ{D>z(MG`*|RP}wr6cLrn zYK5|Z`dD${7-|59dql?AC#cb^9TSBEtgzQGEZ%;~;+>7Lco)@O06)S~qQfB@dckEFs%e{E9PqKqnvBl<53E68I-Z2w(#wY4rRyV%Q zLLr}n{RkFm+`>U1h?GPYEi_#&*biVn;5|&4EKZphCjgR$4C}HqXj;Ep*l`EWZc}n{ z6-W2q*ZgNg3VRV|^rFe)Ov+yRJq-^hARJbEq{l_S)y1;g%H@l5$kOU3|F7;G8{Pv= zn>#wVXMcv3J{Gtol8B7R%^SI+JIH<1tnW4Hh*;^T1uHk$uvg)Jn=-7c?%*Dc`g$Oi z9!LZb5Jk+&XI)#^`EUnIH%L46p+L!nLjGVc!CdA@uR?0&F|5W!M+Z}_7>7i*dRX~g z66me4%2w$qEKk&HFGC@3ZE-fGsVzVuA8GB{f(;#2e<`T8ly8)|&`s;p(O}s_9$^+b zT!fX7usFT$mFzDZQ+Zpu?T+7$?^A0HlVgs_F=v=#`z8&Yi|UUdz#Al89(5VS(^+>t qwVsiTAaT?dXsJ7>f!xvlmZGV=9$Vlegnl}cSMavaj0sH}69tUFp diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/KernelRootkit.php b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/KernelRootkit.php deleted file mode 100644 index 34333fe677f6..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/KernelRootkit.php +++ /dev/null @@ -1,37 +0,0 @@ -internalAddGeneratedFile( - ' - -3google/cloud/securitycenter/v1/kernel_rootkit.protogoogle.cloud.securitycenter.v1" - KernelRootkit -name ( $ -unexpected_code_modification (. -&unexpected_read_only_data_modification (! -unexpected_ftrace_handler (! -unexpected_kprobe_handler ($ -unexpected_kernel_code_pages (& -unexpected_system_call_handler ($ -unexpected_interrupt_handler (( - unexpected_processes_in_runqueue (B -"com.google.cloud.securitycenter.v1BKernelRootkitProtoPZLgoogle.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenterGoogle.Cloud.SecurityCenter.V1Google\\Cloud\\SecurityCenter\\V1!Google::Cloud::SecurityCenter::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Kubernetes.php b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Kubernetes.php deleted file mode 100644 index c2e6618f21c6e459353890a77f1bda1b7c9eb6db..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2427 zcmbtW+iu%N5Up;uGI1P%O#xL8!NyGyxo9cKY0-j?Qs@>{uqz3=7)?Mxps1D1hT#&s zOBZh8&**EPi$3=`AJ9)}f11R0%~IeEeTn=xMI5`m{%CK z1M2Wg8+#nn%0;#EI+$VVVUC%uumL>l4Q9S&W7HWmzQ^2}Tih}`3dU?o7<04%W1dxy z0c_V|44uSq@CzXE^Mje|*obk9i^pS!O&!nSj^#Q(i&NFm!g3iF?l)~0foF4vct|?* zJsXz~QHUvRANxeGP(x8*14)b^#q7$Hd6sLoFte%Sb3zBg)G(Hq$8^e-^5JS*3FjXT?l?K97lbA;eRTLzf460)O6vN#1(;L69+OBep(CiGsl}d-jWq_3gRe17>&?X>%+cf+nBK_#TO3#i4}Jg z*4GKJ>Iz_}{7b*4AR~DONP99zsq!6d53=$S5tPfXuV6=IH)8M8ZCfcNYc+ADMAZ?I zcDT(ouBXxi$g2EBv8c#OKR{lts)TI(^M7?x`Yi=nm8S+|UkkDo75hhDZj1PuT&25y zB79e5hV(^YW+a&h-#}JbJb=PUx7V6ZdZR(R*?rM%w+bI|)rQcJq8>!&-WYr)mRVsv@62+FJS|X9MVD=-nd6cpwA{~XUrMDu~)w|Z+pz}BZ zoht;r9`N(=rH|jkY7g?U)yMEreKP)TI(|85-=udkY7Ygy8tjXgvu?9pZ#Mgr-nfv~ z?m(_H>`w-TOz8^tt`~`R4{}RN0)JH>A^q=2uSi>-;;?gzdqP&vhj3Rg8ZYM5qR_+z zrZZ8y(&RquiZ3QwWpP(7H2z7!ffx+7aMifK)}HE~gVd|j)#bV*uH`LtLYI{#_S9go zY6+I_u-k@-internalAddGeneratedFile( - ' - -*google/cloud/securitycenter/v1/label.protogoogle.cloud.securitycenter.v1"$ -Label -name (  -value ( B -"com.google.cloud.securitycenter.v1B -LabelProtoPZLgoogle.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenterGoogle.Cloud.SecurityCenter.V1Google\\Cloud\\SecurityCenter\\V1!Google::Cloud::SecurityCenter::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/MitreAttack.php b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/MitreAttack.php deleted file mode 100644 index 03f31d5e520b14d501b2b2e3a8756e39170af3d8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2542 zcmbtWVQOSxgz-sgSJ_kR8D_|+Kg>8)rKr9mF`^^-Sx z{wmVPX_6;lGSp8dr>9Y>hsoJE9!63 z+>~Kfxllm<7m6O*TEv^}lT|MMAC{Zw^6MzgfMn$osJFWN^DvSYFN@RO(KML z313C4*3j;7zpV5LZy)5rwv*&>WX`s6|>t5@8yaQG{N>*U@H!Gzk;1-Z6yA zzl^ugHPa;x*l%H%Rkcfl3X^w;+tm=hfi!?2E)cO{t)RDtHxM$pWf7LXeeyT) zpa7+5he#-kG0Iw?9wmmHTLcePcu8##t-24a?LNVUfHEsx4JcczPL3aim&h7BfCm{!^HbyXRd3M`-) zziXb*t}5(~VNuZEG`Y__p>3!&(4@3bxwfg+OpE&qaT>mdZZqP&;O-H)kSRCtrWC~O zQ1I0?d>`EfquF3vXtr#*+;@b0=Mk)$Tw<2bwCi{W-CJzCRBna7 zu{ial8h!s!FGLimy6v<)b;HPt_@F7@h(0m-y;b-NW1HPJ`P9 zWzyk**DVX00dFhssG~$($SY2_(C#lbbK1g%Ug_#_`9guSaYWd8VRuwXM%`EM2@Bp7 z>U7Tzv$WxCLKlRs?G}7V(*WbX^V?qi&n2`AqsYI!`Rm%kRZ`s6&eBV3dixBLVK5q0 zlXP$}h(^UEa!@`B#&Pzc`Q^#^d+(>^?N%|SREsgCIvZ2WV&18C4u72m^rnN%e3B_c zdN9iTvAk1))M^Dvt#%%!R_h#|tP~8td^o?#KQAYQg@NLO!$c8T&JAzTTZH}sNyp~l diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/MuteConfig.php b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/MuteConfig.php deleted file mode 100644 index 7dfffabaf04f..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/MuteConfig.php +++ /dev/null @@ -1,40 +0,0 @@ -internalAddGeneratedFile( - ' - -0google/cloud/securitycenter/v1/mute_config.protogoogle.cloud.securitycenter.v1google/api/resource.protogoogle/protobuf/timestamp.proto" - -MuteConfig -name (  - display_name ( B - description (  -filter ( BA4 - create_time ( 2.google.protobuf.TimestampBA4 - update_time ( 2.google.protobuf.TimestampBA -most_recent_editor ( BA:A -(securitycenter.googleapis.com/MuteConfig6organizations/{organization}/muteConfigs/{mute_config}*folders/{folder}/muteConfigs/{mute_config},projects/{project}/muteConfigs/{mute_config}B -"com.google.cloud.securitycenter.v1BMuteConfigProtoPZLgoogle.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenterGoogle.Cloud.SecurityCenter.V1Google\\Cloud\\SecurityCenter\\V1!Google::Cloud::SecurityCenter::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/NotificationConfig.php b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/NotificationConfig.php deleted file mode 100644 index 4d6cac7b0d4e42b5f35a4411d8a8e1a5dfa57d29..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1676 zcmbVMK~EDw6t)F14k%_lSW(FoO(==(T1|`@Ky5)Pi9#cUgW1?jXJ?l&%gknWwh55_ z6Mum}z#rk=yJyZGj3;Mjx22_2gS~Wj_Py_Y@0<6&m6y?e1n$EI>Tsc$&j?mb@D>r=XMt^s0KoA9jU!AbY&7fdsKOpr*lid*cP+(pcZTrXz3MUm zB*bwHw+3+63@kVXQ2(N&9WnxArArd{fWzkfbmh!SG9P?o% zYo6Edb3+eHrOzzoxd^^r0nh(;O04-T(>C*E56_p~sm|Tbk#WQvnX}FY zY~k}HutvwkngNsPMRWKJ%;+(SlXgpqh>_AndRm9SYxlsN z?1P<^)m39#?})RT##wj4Y)oZ`5!%9ph=i-sq)DClQJb(nf*Y}t6dy1i>Llic88WcqoYIkz=r1Sb}i(K(4$g+&K@q3yP|#L6D3L~=T8^NuFryNhS6cp zrT(=D7WCEqL;CuyQ8mo!Hwz!$=Cc`y5c9y+nm7UFnwt{Nsifnqae4R>z7*#h#`MwMi~UW1m^s#f!HqRH6Pa017jyym1M~z$NdN!< diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/NotificationMessage.php b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/NotificationMessage.php deleted file mode 100644 index 212c8852228cf5f937a839692e5b34f628abb349..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1312 zcmbVM%Wl&^6eZzN7+b2Gw1l_>*PE^Phh|VQ$(`>rk9}486-+-No5Sv zEDV_fDlZZqGvxyGhj2PPgSY+TvmMi#%1lv)A(AqRnMY%p1zyT%rntVOOlYROS=$p* z^N>@bxfGKNmZl_PuAPFAAm$(;l)+%sJ7JmxL=%5t0sX@q(Eqps=#SeSglJ6C6i%0b zPYPW01%Y{zY#MV4sWw9??D2HM1=pO!{IglK3n7V9W^k_8hMAx_QOFyHf-+|x3e3EA zFOf!=E-V<1a;=O`{&BvnAhF+PDOEhtQjJV0#u3w%!ug4_UyjY;cnD6x5#wtlyP#FZ zmZt+KrZXivmUj*?uipH>*UvxVBH$vz_-e;1$bSL)z)B0OMY3WYyyB%aZ-Ssw;>Z}v zskrBxw9xlE=*53Ksj*$Oy4Hm5stMg$`|-gBXjQIK7<2bq4Lw?8uLhvzik+zxA&(}x zjhi*7IS(2bZH0xt&AK^w_{?v)f9B?v_wnwQX}-T8(!6cEolVV)JLqkpyKH7c*ZWmN zyC$?78hgz(`&mDaYMvj5={?Kvd8=~P(;`Dlk-IT&wz7!9 I9L*8>4atwc5dZ)H diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/OrganizationSettings.php b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/OrganizationSettings.php deleted file mode 100644 index 339e4411a1bc7e7f79c96a13ea8c553b77ba5611..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1506 zcmb_c-A>yu6kZErn_;NR5JFs3h9Oa;Em7HB7@JC4sz}gQE3h#|ic-f7M!}A32MJK6 zJ;@$mkFrPDWGsxZg(8*&mcS_CL|!3GCFa&; z*NEgQ{{oBHM;JERdxu#1fiHcxp%L9`is*JG5Z#mV4ge_f zg@COw6x(UHRHs}gEtmR{Tf+iz5=+M0%GI_*EJr;~|CF`{X;V1TgQbk4 zZ9gEn3nfqRcyrmW;(uJqg}f@MtoZiGFx z1z36k5r|!4ezlTU_GbnG%l8Z(VzfuXl^JE9-*(JD^Dw7zFe_=U+AvjB1Fn9}gQaN( z<0Y6^D}IiV^hh8S@fk&&fki@5l!){cE?9sy;l=Gw|BaC84Dk;YykP*)V^M&)CNYze zSZ{(ClTJmj>NKkd#~r8D^bT9Kx_8{{wCh!8->KIMPmBUs&~{~LH4jb;Ib$9?t$$V# zwR$0MpWjwOuzhcsS%dwU2vZ4&HLamWnT_4Aux`db`xCM;Jnp@pIk2wq{?e{??#sbo z!Xb-%8k!2)3Nh89W8HCkOtW?-tNETUHnbv{T9M45B2~4@@!I diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Process.php b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Process.php deleted file mode 100644 index 9909a447e174..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Process.php +++ /dev/null @@ -1,44 +0,0 @@ -internalAddGeneratedFile( - ' - -,google/cloud/securitycenter/v1/process.protogoogle.cloud.securitycenter.v1" -Process -name ( 4 -binary ( 2$.google.cloud.securitycenter.v1.File7 - libraries ( 2$.google.cloud.securitycenter.v1.File4 -script ( 2$.google.cloud.securitycenter.v1.File -args (  -arguments_truncated (J - env_variables ( 23.google.cloud.securitycenter.v1.EnvironmentVariable -env_variables_truncated ( -pid - ( - -parent_pid ("0 -EnvironmentVariable -name (  -val ( B -"com.google.cloud.securitycenter.v1B ProcessProtoPZLgoogle.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenterGoogle.Cloud.SecurityCenter.V1Google\\Cloud\\SecurityCenter\\V1!Google::Cloud::SecurityCenter::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Resource.php b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Resource.php deleted file mode 100644 index c5861850e85d..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Resource.php +++ /dev/null @@ -1,38 +0,0 @@ -internalAddGeneratedFile( - ' - --google/cloud/securitycenter/v1/resource.protogoogle.cloud.securitycenter.v1+google/cloud/securitycenter/v1/folder.proto" -Resource -name (  - display_name (  -type (  -project (  -project_display_name (  -parent (  -parent_display_name ( < -folders ( 2&.google.cloud.securitycenter.v1.FolderBAB -"com.google.cloud.securitycenter.v1B ResourceProtoPZLgoogle.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenterGoogle.Cloud.SecurityCenter.V1Google\\Cloud\\SecurityCenter\\V1!Google::Cloud::SecurityCenter::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/RunAssetDiscoveryResponse.php b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/RunAssetDiscoveryResponse.php deleted file mode 100644 index 74eae81f50d4e9ff1df52316774f045a9a60f7cc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1219 zcmbu8(Q4Z;6o!{<9h=5V7Z|iRMePbr*`|>0PFYvd*bRXuF-h8sVF-$?xB^!)vRvp! zUuc(mj6K3$V6dl{B*$(;m)*=aw&bJlob&7aACHsE1iXP=%BduZhH!QR)g^_A6iNgl zhO=xwrxFI@Dq%5|2tsEF2g3<;o!(?eA5BFj1BziJL=@9T5Q{8qq%_DRQ#S$Sips`y zvmrA+C2304G-PQYuBp74N}48urxe+20B~}pcSt~C*E{J`MM9#8-?d=BW5E7+3G81q zTL1*H2E$Rt+lKEH_|bw6z5=M9B%8%7fTjyArn%KQWXqk>+QKx5=)2jJB(>f=y@6a@mEKx#wIuzrGs#0&WQ$JXw zH8?hh^}I%m9~5~6mCWe<><~(-GRa%EZUeY2zx=NS%zqXwtkR2hkJVNNYx%;aEwpQM9Z2;DcZgjH(EA{om zWAtwtT1i4j*&%%X9n^lc`aky0=?YQbIMumvGeXy3FdJSHUC+&$lJs*rcx6?cA zxz5I;+Dq`fGwge3?nEyuwRHf-=bk$nyN+I0&3fXF`n`cZ>1;ec`B?$G+Hpm`6@qw` z&u5D!BM}oGAt9qiM7gc6k^dqIOIMk)wXE^C>UP(94Oy?D!fPFCVsz2`Q3Uu4H3h7JxsQz?XFZ diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/SecurityMarks.php b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/SecurityMarks.php deleted file mode 100644 index 86d57e07c844..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/SecurityMarks.php +++ /dev/null @@ -1,37 +0,0 @@ -internalAddGeneratedFile( - ' - -3google/cloud/securitycenter/v1/security_marks.protogoogle.cloud.securitycenter.v1" - SecurityMarks -name ( G -marks ( 28.google.cloud.securitycenter.v1.SecurityMarks.MarksEntry -canonical_name ( , - -MarksEntry -key (  -value ( :8:A -+securitycenter.googleapis.com/SecurityMarks9organizations/{organization}/assets/{asset}/securityMarksNorganizations/{organization}/sources/{source}/findings/{finding}/securityMarks-folders/{folder}/assets/{asset}/securityMarks/projects/{project}/assets/{asset}/securityMarksBfolders/{folder}/sources/{source}/findings/{finding}/securityMarksDprojects/{project}/sources/{source}/findings/{finding}/securityMarksB -"com.google.cloud.securitycenter.v1PZLgoogle.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenterGoogle.Cloud.SecurityCenter.V1Google\\Cloud\\SecurityCenter\\V1!Google::Cloud::SecurityCenter::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/SecuritycenterService.php b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/SecuritycenterService.php deleted file mode 100644 index e84a55478e324a889220e58dabd4d054946af188..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 21732 zcmds9U2GiJb6N!M^nCEs+Q4tWY&!wABT`;ZPT#YwYrgAT$x=m?Alt*u2mMf z$jTfOSy}antlXQLCZyh|SytBjWECZoPmwJA*Y4hLnDwk>*KGLXv}sk%rfHkChWQpu zb|$-CYgh(I3ev83n|0f4HM5Lixmh>H&t*|2qdnbj0XQ>RspAU63$Uu(U=wcE8kKp& zs&~w`-Ri6WX|cFr*bd6o#r&xn+e!< z{#HqjVC8nVS+Xp{o;R&}>ygpfx(%z)YFb9I=+4?5BusRvZB|OnW{Uv~oaq?n8YUP> zI-cvM(O8=`9@HM0txh^tm>n8x;@L%*UWKEUeDEkSv*yOnb^-Qnmr_+zC7&U7oeIS9_QY&ToYjZU}O z1oSG)Z5Ei)xfaJ6&v%hGxyBAFc+rK;ww+?K4lDOiOEv4^4u)L?S6@%z37kRim=Hnj z+Gaa^P#&)?Tr)*HVBuwZhQ{M&mPnf?$Fot{AET%E=4oHrfFJ(?PO zP6)5H&3w%bAD9n}9aEmxd5jPbPAU)9Ss$I#vvj=O4b&z+FV5bn8ZasMp1CS%50M<*<(&&N@7Pb-Ko#t?6UJFV8aKNTET zV>lqtJ5JNfS&ZRqDXtOHKlF`a)JrkE(tfI&%mXGw0%N@(7WSAoYnyDX;g4#YJ2UZo zOlTmUd!D@@o;6&zly5n1$u~e-B!c-h;d{jM<3fn@++f~CJe0|^^AK%&6MTrEko(1< zu(+cTPvy37p4!qIAc0;Z$7Z{Yhb(-Gm~P!RAoZ|p`YhSou5};{8`ZMf_|WXoKbA88 zRT?1L1U*RhuA2==DMmBw5j{>0af@*`?C1dJ$&70H7#R%?f!U<~ZH*k6>lkpr5Tnb% zU-k_?$p?RtoR%w&2Z$Vk2hPIE!AT^)$|D#(Mu^xPRdWq>oE-oObcXB`54eKEh00kW zBFZ7|o^!K8-Q$R2jk6&p<$4oPe{x=Bu==pZz5i0hsq#FCQKORB#~Mi&hm&L?lU=My=` ztY?hN+-!1WvcK7QMd|m*5s<(85UrEvK<<;r=M&@vjH6nOO!p;9uX#`^a+EHULVuLP z1nRfQ2#n=5_M%66Dz~Y>ogs9w)9SYQDb@)DVD+9raGtAthQ82WWiBKTDvpx<8*GT` z{Vl~W(Mx26RgxgyRAqb|-2)+HxbUppV={*2Wb#fgkRga2YgHE1Mh7|dSb*Bee<>xT z4O_fww;meJ(S1B}JxzxAZx)n&M)$){gZl4)8}Xokv5GE`5vh30k1G|TzD}t7@ zgdZ-P`on$18hVxk7q8#U!j>EtvConxT*Kef$Wb2<|94gq3~*Srm}Rir4$CWT(~u@N zox5*rzGSvrtTbgeS-6qEZDu~5@l^jq~BZ*~-3=1;L zz;@&*u>N_CoM6KSBaDNrXPz0bMu4x2082*T1@^5*@yX@oNvN}E_#mN$&jbnNKY_=j*$JW z4irtD2!Gq@`c+u>42ibt-1gxFz5N{35VgapJ-$xFyLh}$Y;Zy>Tuyq+$1<6)F1~~ z`v;0K4{FT~bioG;%W=$}(Rt%0fIx1Q$(`e3^%*j({1Z0S-n+N%t}e`ve1r~>!P5LZ z{8gjFWZ&(DrR96@j|`(J&E2_iZ((FW|855N*ON^<{$CmXxA&4GY?WNdgz2x7qYY;I z>sa0M8~)lUsy>gMfHW6q5EKUm%vc>0^K0{Wlca- zBvy877&rp(0u?I=42=CyBm3nq^niM9qesYrHPdQ0YFkxa7(o9CH1<~87~RXgDbPR$ z_6ehIBMqhj&ygeYSC0fdG#nwt+NFRWnR~5tYmqyZr^wLVTk@Y7*WC=L?q-kv7m!)PNm^JGcUJO1J*`4Fdx4)$ zD`&}>{>M`xiI&J9_pm&>Jy^I9x7LCWO$IA&mk0q79UBj#4C%1g=p00`9P}$1IS3PC zm5$w+$SY(IOK!zHCX>#CDS#TSkag_e3LrQ?*&YloWrD%6@$6ShRy zh?dIuD#fT!igU~kRr)#{C{U%~F-NKvQQJiocW|EAp{l>7kyEH@Sm{hE`!RB~71n+d zCU-f`kiYNW6ZE9F$%aTW$iV zSg*ONO52%k6pkQi+^qgL;AyZQ;H@#s$;|uenxbG$Qx&Y~5*dM}ZYzL(Y$!Sv_h_6b1$;j8=StdlcR#sDS7fMK=ijY zazO1k(n}JjsM3T=Ex}Fb(e-%_a!x<3&Od;$C}ADJuV)~IR1^oq;MK%8@o?eLx^caP>oYO0v z3jR2$5CFvVTLWYifePk(^p#|`9^{lz?;sh}znI~+^p~1`QH3D@xmwef(1+bQD3|mJ zRgkg-iABun=T#Bvk|dSUE1edr;oO&)RC%368xv$959yDg?C8H?5Wf-p9CCGnZ65CP z^iQMFKb}CZ&B_ygN1skV?`Fto)SZWT z(~RPboBUUB^6zL9XnvuySJy_^9z$Vr0xivlLIm}N2{bA{8sX#;mCr-_0j>miGYxt* zZl?xVBn~N)An1be?fJGwC;65L#RoDj;g(3d6fQ7Kd?n}lK~ zF~!-`bO)Q7rrOkWC!6{MC{h zVyR&4Il#k%hYbC*(s_DMI4Y9-n8VwMR&j$}^kE06ac@fKxX*38xvo&2^PU}C?-?Ma z-^+k+Qm+yv@J%YYMB=5`#r1LtEdCI&_)SemPm5_!A3y7!Egf7gdk-8AE}=&ahwCM8 zX6a(om#tSiBr-ED2zvAMM;all_8`n?Dh>#jR$>=xc`AzluE|aQfpEs*u*uafpQO+8 zI3~y(gdBn_J)sh~U`Pu3PKF#{YKX(66@LU)spU*#-H?|_%=KL~lFwl(GcOL5e3FS1z+OpddK?`AA>|8dBN@j1mwG#ewD9T z|HR3Oyl{{!T9DPTdqpfSxuO?bcE==KpBc$`RlnpihI!j4&R*##({++J^x6MKPo91) zL-qkI%)`>yGp!&@kDEwZzN6_^T>X7^6g_>W9E0tn`jpF^05-|zfjbFmg0WW`;-GCZ zaG<$#0Os$USOaHe^`S&4;;ej|yO5&D;F6q`EoEfBw+>0JNqq5+{+UMT9e6v9DQI*y zP0M0$0Ml_9U&V<&NFsGTmw-~Zz@O&&zp793<&c{6$w7;DKr=pzBa(L#E^#|L|6oAg zH1J+rps{zmu|ezQlJkqTZZDhuJ{DBJmMOf!r)l_JMNPc-^O6(4F~CkLMgL8X@|%U% zqetm)>xtx73pb=+)dadP{wkre4xx>nyM=50 zg}dvLM(n-9EB(bP>y<)ouM{?kUg@MNLtx`sUFeI53p~qV^}>=2e^J#{T;DKWxx%q$ z^)P1r=XfxEv#`L?Qj;S0o&V51rjkPP!M~icT@1gr1^J&!?nvg1dYl;^q~fa-Dz%(> z(y}8q>R&2gu@{dwF&=r_?bnOOJ^kvSb0JKZigg$QaA1ho>FnMt>hA~7?<-@7Q5QO#Pg~dq83J^OG-7EQ)kp4ToZi?3fd=1Cg z3^t5Q?y}en);pN~6O7uwtLfNtjH*@m8id8bwY_pt$1Y^B0v69Zt&6^7NQEbsyH`4o zY?DChxk?!LfnCe^AGo889qd_8D>eS)5XL2Ok81ckJ>7|vJ>7}KJ>7}aJ>B=5!&6!a z(6M{DBm`+q?+ci?{EJqY;hWCCdf^@tsC@nJ5L9ivZXt=Z zUg~LP7`OTuO*_2W96{Lj2}; zs+?nQykB}=#+T5q+5A;0_rSK>RxzJ{{P?km`p&0rYF+yQepK@UyeDL@w>q1%J&ow_ z8HJbxVMQz76!#f7S`B!uFb5$mzhN}N5bRdo{QyeTH#?`jYJW3xVv&E4GdIUS>b2^* ziJH4N^}Zyih);Gp-|WQ8sulQ(+>bM-P)M=Jr4)-^F~#D&sg;l1-^+Epbk_MS*(81g ZQ~6{jEB=}Fkk4guO8jW$HrXcRe*x*!^`rm* diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Source.php b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Source.php deleted file mode 100644 index b87fb0221a87..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Source.php +++ /dev/null @@ -1,34 +0,0 @@ -internalAddGeneratedFile( - ' - -+google/cloud/securitycenter/v1/source.protogoogle.cloud.securitycenter.v1" -Source -name (  - display_name (  - description (  -canonical_name ( :A -$securitycenter.googleapis.com/Source-organizations/{organization}/sources/{source}!folders/{folder}/sources/{source}#projects/{project}/sources/{source}B -"com.google.cloud.securitycenter.v1PZLgoogle.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenterGoogle.Cloud.SecurityCenter.V1Google\\Cloud\\SecurityCenter\\V1!Google::Cloud::SecurityCenter::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Vulnerability.php b/owl-bot-staging/SecurityCenter/v1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1/Vulnerability.php deleted file mode 100644 index f1da8e1c96b7814c7945b83f158a2b2c8cf13d26..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2516 zcmbW3-EP}96vrpK@tTt+aTGLFw>D#(Vs(I4UJ{_glx2e>D~?jf(qzY72LpmE)2=W@ z()3|88}bsn>l+Na+iUDmcClv|Maiy}kHxKTWRU0oUOsG08HBm0@Rr%!f$}c&x?AtWuhQ7Lh^ZH1-j)}p=H?CuVilfXkgd@CWNc8gUB&M z%XLsJP#hDNw@|{2W1n~~S&Mx%_NK04gt`YH((gdq+miyF6- zx6)x_oHan@#G@cwF}aUIKf=?aBjn>S@|`{EI|f`#{!wSozq3*w)qa06>>=5(@+2^p zJ%xA6u=C+N#jYnBp6)K6-CcgPU8=%jW;@ugAa9N^#~`M>u(Qekznm9Gxbz1DdGcie za#o)T=h=M#ACvUMWIqBfhw=orbsJ0@E7%uMFh@Z!+U4@p$CtNBMHA8p^uF- zePF%Sjgev5M$g9F9m2U=D#QHyL6)G99D&sH0^~{R6SGWtzVsJBA%&8O^^5@Pf$93m z!Z7SHEE-{Gm_O?yY?9RB=7?%(XLmNAe3fcDRLW|wlCt8nYU8)$oN)!p`}%`;;zZ7N zVAb=j5y_(=4s;*?5?Ma(bDvV`H#1Vz2|-H%tO~^_z&<&g(OQzEBl zFHy65Fh>^F!`wW@Jev{IiZ$#BteLJeu=?b-itmc>T({21wG?tdY0qb*$yCJFp%_nW z7+-*6(89-nj$t)TJ$h@7S@%AIReHz3y-dD5hKJR5yDGlaJCfK|H2t*MQYBG7l%-nn z6ZRq8&vrMZ_A5nuS!CGHU@hBKtsPfIso5^(*axth?Q1AvwNcDp6{$zBTXNiYr({Dh zu{M=@8}K*=HoQkgUu50BSvd@Gk=;a)sS;<__4*gF_!=mHDZW zzBEJEHk={v`oqc)JG9)WBwdDQ1vgbGd)b%m&)j;Q)*?KuMfhtO1R;wNgwA%aKppNroxIl1k|JQLX1K9lppi*wZ~+$p{{dFk B6vY4l diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Access.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Access.php deleted file mode 100644 index ee88a6669389..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Access.php +++ /dev/null @@ -1,491 +0,0 @@ -google.cloud.securitycenter.v1.Access - */ -class Access extends \Google\Protobuf\Internal\Message -{ - /** - * Associated email, such as "foo@google.com". - * The email address of the authenticated user (or service account on behalf - * of third party principal) making the request. For third party identity - * callers, the `principal_subject` field is populated instead of this field. - * For privacy reasons, the principal email address is sometimes redacted. - * For more information, see [Caller identities in audit - * logs](https://cloud.google.com/logging/docs/audit#user-id). - * - * Generated from protobuf field string principal_email = 1; - */ - protected $principal_email = ''; - /** - * Caller's IP address, such as "1.1.1.1". - * - * Generated from protobuf field string caller_ip = 2; - */ - protected $caller_ip = ''; - /** - * The caller IP's geolocation, which identifies where the call came from. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Geolocation caller_ip_geo = 3; - */ - protected $caller_ip_geo = null; - /** - * What kind of user agent is associated, for example operating system shells, - * embedded or stand-alone applications, etc. - * - * Generated from protobuf field string user_agent_family = 4; - */ - protected $user_agent_family = ''; - /** - * This is the API service that the service account made a call to, e.g. - * "iam.googleapis.com" - * - * Generated from protobuf field string service_name = 5; - */ - protected $service_name = ''; - /** - * The method that the service account called, e.g. "SetIamPolicy". - * - * Generated from protobuf field string method_name = 6; - */ - protected $method_name = ''; - /** - * A string representing the principal_subject associated with the identity. - * As compared to `principal_email`, supports principals that aren't - * associated with email addresses, such as third party principals. For most - * identities, the format will be `principal://iam.googleapis.com/{identity - * pool name}/subjects/{subject}` except for some GKE identities - * (GKE_WORKLOAD, FREEFORM, GKE_HUB_WORKLOAD) that are still in the legacy - * format `serviceAccount:{identity pool name}[{subject}]` - * - * Generated from protobuf field string principal_subject = 7; - */ - protected $principal_subject = ''; - /** - * The name of the service account key used to create or exchange - * credentials for authenticating the service account making the request. - * This is a scheme-less URI full resource name. For example: - * "//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}" - * - * Generated from protobuf field string service_account_key_name = 8; - */ - protected $service_account_key_name = ''; - /** - * Identity delegation history of an authenticated service account that makes - * the request. It contains information on the real authorities that try to - * access GCP resources by delegating on a service account. When multiple - * authorities are present, they are guaranteed to be sorted based on the - * original ordering of the identity delegation events. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.ServiceAccountDelegationInfo service_account_delegation_info = 9; - */ - private $service_account_delegation_info; - /** - * A string that represents the username of a user, user account, or other - * entity involved in the access event. What the entity is and what its role - * in the access event is depends on the finding that this field appears in. - * The entity is likely not an IAM principal, but could be a user that is - * logged into an operating system, if the finding is VM-related, or a user - * that is logged into some type of application that is involved in the - * access event. - * - * Generated from protobuf field string user_name = 11; - */ - protected $user_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $principal_email - * Associated email, such as "foo@google.com". - * The email address of the authenticated user (or service account on behalf - * of third party principal) making the request. For third party identity - * callers, the `principal_subject` field is populated instead of this field. - * For privacy reasons, the principal email address is sometimes redacted. - * For more information, see [Caller identities in audit - * logs](https://cloud.google.com/logging/docs/audit#user-id). - * @type string $caller_ip - * Caller's IP address, such as "1.1.1.1". - * @type \Google\Cloud\SecurityCenter\V1\Geolocation $caller_ip_geo - * The caller IP's geolocation, which identifies where the call came from. - * @type string $user_agent_family - * What kind of user agent is associated, for example operating system shells, - * embedded or stand-alone applications, etc. - * @type string $service_name - * This is the API service that the service account made a call to, e.g. - * "iam.googleapis.com" - * @type string $method_name - * The method that the service account called, e.g. "SetIamPolicy". - * @type string $principal_subject - * A string representing the principal_subject associated with the identity. - * As compared to `principal_email`, supports principals that aren't - * associated with email addresses, such as third party principals. For most - * identities, the format will be `principal://iam.googleapis.com/{identity - * pool name}/subjects/{subject}` except for some GKE identities - * (GKE_WORKLOAD, FREEFORM, GKE_HUB_WORKLOAD) that are still in the legacy - * format `serviceAccount:{identity pool name}[{subject}]` - * @type string $service_account_key_name - * The name of the service account key used to create or exchange - * credentials for authenticating the service account making the request. - * This is a scheme-less URI full resource name. For example: - * "//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}" - * @type array<\Google\Cloud\SecurityCenter\V1\ServiceAccountDelegationInfo>|\Google\Protobuf\Internal\RepeatedField $service_account_delegation_info - * Identity delegation history of an authenticated service account that makes - * the request. It contains information on the real authorities that try to - * access GCP resources by delegating on a service account. When multiple - * authorities are present, they are guaranteed to be sorted based on the - * original ordering of the identity delegation events. - * @type string $user_name - * A string that represents the username of a user, user account, or other - * entity involved in the access event. What the entity is and what its role - * in the access event is depends on the finding that this field appears in. - * The entity is likely not an IAM principal, but could be a user that is - * logged into an operating system, if the finding is VM-related, or a user - * that is logged into some type of application that is involved in the - * access event. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\Access::initOnce(); - parent::__construct($data); - } - - /** - * Associated email, such as "foo@google.com". - * The email address of the authenticated user (or service account on behalf - * of third party principal) making the request. For third party identity - * callers, the `principal_subject` field is populated instead of this field. - * For privacy reasons, the principal email address is sometimes redacted. - * For more information, see [Caller identities in audit - * logs](https://cloud.google.com/logging/docs/audit#user-id). - * - * Generated from protobuf field string principal_email = 1; - * @return string - */ - public function getPrincipalEmail() - { - return $this->principal_email; - } - - /** - * Associated email, such as "foo@google.com". - * The email address of the authenticated user (or service account on behalf - * of third party principal) making the request. For third party identity - * callers, the `principal_subject` field is populated instead of this field. - * For privacy reasons, the principal email address is sometimes redacted. - * For more information, see [Caller identities in audit - * logs](https://cloud.google.com/logging/docs/audit#user-id). - * - * Generated from protobuf field string principal_email = 1; - * @param string $var - * @return $this - */ - public function setPrincipalEmail($var) - { - GPBUtil::checkString($var, True); - $this->principal_email = $var; - - return $this; - } - - /** - * Caller's IP address, such as "1.1.1.1". - * - * Generated from protobuf field string caller_ip = 2; - * @return string - */ - public function getCallerIp() - { - return $this->caller_ip; - } - - /** - * Caller's IP address, such as "1.1.1.1". - * - * Generated from protobuf field string caller_ip = 2; - * @param string $var - * @return $this - */ - public function setCallerIp($var) - { - GPBUtil::checkString($var, True); - $this->caller_ip = $var; - - return $this; - } - - /** - * The caller IP's geolocation, which identifies where the call came from. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Geolocation caller_ip_geo = 3; - * @return \Google\Cloud\SecurityCenter\V1\Geolocation|null - */ - public function getCallerIpGeo() - { - return $this->caller_ip_geo; - } - - public function hasCallerIpGeo() - { - return isset($this->caller_ip_geo); - } - - public function clearCallerIpGeo() - { - unset($this->caller_ip_geo); - } - - /** - * The caller IP's geolocation, which identifies where the call came from. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Geolocation caller_ip_geo = 3; - * @param \Google\Cloud\SecurityCenter\V1\Geolocation $var - * @return $this - */ - public function setCallerIpGeo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\Geolocation::class); - $this->caller_ip_geo = $var; - - return $this; - } - - /** - * What kind of user agent is associated, for example operating system shells, - * embedded or stand-alone applications, etc. - * - * Generated from protobuf field string user_agent_family = 4; - * @return string - */ - public function getUserAgentFamily() - { - return $this->user_agent_family; - } - - /** - * What kind of user agent is associated, for example operating system shells, - * embedded or stand-alone applications, etc. - * - * Generated from protobuf field string user_agent_family = 4; - * @param string $var - * @return $this - */ - public function setUserAgentFamily($var) - { - GPBUtil::checkString($var, True); - $this->user_agent_family = $var; - - return $this; - } - - /** - * This is the API service that the service account made a call to, e.g. - * "iam.googleapis.com" - * - * Generated from protobuf field string service_name = 5; - * @return string - */ - public function getServiceName() - { - return $this->service_name; - } - - /** - * This is the API service that the service account made a call to, e.g. - * "iam.googleapis.com" - * - * Generated from protobuf field string service_name = 5; - * @param string $var - * @return $this - */ - public function setServiceName($var) - { - GPBUtil::checkString($var, True); - $this->service_name = $var; - - return $this; - } - - /** - * The method that the service account called, e.g. "SetIamPolicy". - * - * Generated from protobuf field string method_name = 6; - * @return string - */ - public function getMethodName() - { - return $this->method_name; - } - - /** - * The method that the service account called, e.g. "SetIamPolicy". - * - * Generated from protobuf field string method_name = 6; - * @param string $var - * @return $this - */ - public function setMethodName($var) - { - GPBUtil::checkString($var, True); - $this->method_name = $var; - - return $this; - } - - /** - * A string representing the principal_subject associated with the identity. - * As compared to `principal_email`, supports principals that aren't - * associated with email addresses, such as third party principals. For most - * identities, the format will be `principal://iam.googleapis.com/{identity - * pool name}/subjects/{subject}` except for some GKE identities - * (GKE_WORKLOAD, FREEFORM, GKE_HUB_WORKLOAD) that are still in the legacy - * format `serviceAccount:{identity pool name}[{subject}]` - * - * Generated from protobuf field string principal_subject = 7; - * @return string - */ - public function getPrincipalSubject() - { - return $this->principal_subject; - } - - /** - * A string representing the principal_subject associated with the identity. - * As compared to `principal_email`, supports principals that aren't - * associated with email addresses, such as third party principals. For most - * identities, the format will be `principal://iam.googleapis.com/{identity - * pool name}/subjects/{subject}` except for some GKE identities - * (GKE_WORKLOAD, FREEFORM, GKE_HUB_WORKLOAD) that are still in the legacy - * format `serviceAccount:{identity pool name}[{subject}]` - * - * Generated from protobuf field string principal_subject = 7; - * @param string $var - * @return $this - */ - public function setPrincipalSubject($var) - { - GPBUtil::checkString($var, True); - $this->principal_subject = $var; - - return $this; - } - - /** - * The name of the service account key used to create or exchange - * credentials for authenticating the service account making the request. - * This is a scheme-less URI full resource name. For example: - * "//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}" - * - * Generated from protobuf field string service_account_key_name = 8; - * @return string - */ - public function getServiceAccountKeyName() - { - return $this->service_account_key_name; - } - - /** - * The name of the service account key used to create or exchange - * credentials for authenticating the service account making the request. - * This is a scheme-less URI full resource name. For example: - * "//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}" - * - * Generated from protobuf field string service_account_key_name = 8; - * @param string $var - * @return $this - */ - public function setServiceAccountKeyName($var) - { - GPBUtil::checkString($var, True); - $this->service_account_key_name = $var; - - return $this; - } - - /** - * Identity delegation history of an authenticated service account that makes - * the request. It contains information on the real authorities that try to - * access GCP resources by delegating on a service account. When multiple - * authorities are present, they are guaranteed to be sorted based on the - * original ordering of the identity delegation events. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.ServiceAccountDelegationInfo service_account_delegation_info = 9; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getServiceAccountDelegationInfo() - { - return $this->service_account_delegation_info; - } - - /** - * Identity delegation history of an authenticated service account that makes - * the request. It contains information on the real authorities that try to - * access GCP resources by delegating on a service account. When multiple - * authorities are present, they are guaranteed to be sorted based on the - * original ordering of the identity delegation events. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.ServiceAccountDelegationInfo service_account_delegation_info = 9; - * @param array<\Google\Cloud\SecurityCenter\V1\ServiceAccountDelegationInfo>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setServiceAccountDelegationInfo($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\ServiceAccountDelegationInfo::class); - $this->service_account_delegation_info = $arr; - - return $this; - } - - /** - * A string that represents the username of a user, user account, or other - * entity involved in the access event. What the entity is and what its role - * in the access event is depends on the finding that this field appears in. - * The entity is likely not an IAM principal, but could be a user that is - * logged into an operating system, if the finding is VM-related, or a user - * that is logged into some type of application that is involved in the - * access event. - * - * Generated from protobuf field string user_name = 11; - * @return string - */ - public function getUserName() - { - return $this->user_name; - } - - /** - * A string that represents the username of a user, user account, or other - * entity involved in the access event. What the entity is and what its role - * in the access event is depends on the finding that this field appears in. - * The entity is likely not an IAM principal, but could be a user that is - * logged into an operating system, if the finding is VM-related, or a user - * that is logged into some type of application that is involved in the - * access event. - * - * Generated from protobuf field string user_name = 11; - * @param string $var - * @return $this - */ - public function setUserName($var) - { - GPBUtil::checkString($var, True); - $this->user_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Asset.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Asset.php deleted file mode 100644 index 9a5c7fa0c831..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Asset.php +++ /dev/null @@ -1,412 +0,0 @@ -google.cloud.securitycenter.v1.Asset - */ -class Asset extends \Google\Protobuf\Internal\Message -{ - /** - * The relative resource name of this asset. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name - * Example: - * "organizations/{organization_id}/assets/{asset_id}". - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Security Command Center managed properties. These properties are managed by - * Security Command Center and cannot be modified by the user. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Asset.SecurityCenterProperties security_center_properties = 2; - */ - protected $security_center_properties = null; - /** - * Resource managed properties. These properties are managed and defined by - * the Google Cloud resource and cannot be modified by the user. - * - * Generated from protobuf field map resource_properties = 7; - */ - private $resource_properties; - /** - * User specified security marks. These marks are entirely managed by the user - * and come from the SecurityMarks resource that belongs to the asset. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.SecurityMarks security_marks = 8; - */ - protected $security_marks = null; - /** - * The time at which the asset was created in Security Command Center. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 9; - */ - protected $create_time = null; - /** - * The time at which the asset was last updated or added in Cloud SCC. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 10; - */ - protected $update_time = null; - /** - * Cloud IAM Policy information associated with the Google Cloud resource - * described by the Security Command Center asset. This information is managed - * and defined by the Google Cloud resource and cannot be modified by the - * user. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Asset.IamPolicy iam_policy = 11; - */ - protected $iam_policy = null; - /** - * The canonical name of the resource. It's either - * "organizations/{organization_id}/assets/{asset_id}", - * "folders/{folder_id}/assets/{asset_id}" or - * "projects/{project_number}/assets/{asset_id}", depending on the closest CRM - * ancestor of the resource. - * - * Generated from protobuf field string canonical_name = 13; - */ - protected $canonical_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The relative resource name of this asset. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name - * Example: - * "organizations/{organization_id}/assets/{asset_id}". - * @type \Google\Cloud\SecurityCenter\V1\Asset\SecurityCenterProperties $security_center_properties - * Security Command Center managed properties. These properties are managed by - * Security Command Center and cannot be modified by the user. - * @type array|\Google\Protobuf\Internal\MapField $resource_properties - * Resource managed properties. These properties are managed and defined by - * the Google Cloud resource and cannot be modified by the user. - * @type \Google\Cloud\SecurityCenter\V1\SecurityMarks $security_marks - * User specified security marks. These marks are entirely managed by the user - * and come from the SecurityMarks resource that belongs to the asset. - * @type \Google\Protobuf\Timestamp $create_time - * The time at which the asset was created in Security Command Center. - * @type \Google\Protobuf\Timestamp $update_time - * The time at which the asset was last updated or added in Cloud SCC. - * @type \Google\Cloud\SecurityCenter\V1\Asset\IamPolicy $iam_policy - * Cloud IAM Policy information associated with the Google Cloud resource - * described by the Security Command Center asset. This information is managed - * and defined by the Google Cloud resource and cannot be modified by the - * user. - * @type string $canonical_name - * The canonical name of the resource. It's either - * "organizations/{organization_id}/assets/{asset_id}", - * "folders/{folder_id}/assets/{asset_id}" or - * "projects/{project_number}/assets/{asset_id}", depending on the closest CRM - * ancestor of the resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\Asset::initOnce(); - parent::__construct($data); - } - - /** - * The relative resource name of this asset. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name - * Example: - * "organizations/{organization_id}/assets/{asset_id}". - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The relative resource name of this asset. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name - * Example: - * "organizations/{organization_id}/assets/{asset_id}". - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Security Command Center managed properties. These properties are managed by - * Security Command Center and cannot be modified by the user. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Asset.SecurityCenterProperties security_center_properties = 2; - * @return \Google\Cloud\SecurityCenter\V1\Asset\SecurityCenterProperties|null - */ - public function getSecurityCenterProperties() - { - return $this->security_center_properties; - } - - public function hasSecurityCenterProperties() - { - return isset($this->security_center_properties); - } - - public function clearSecurityCenterProperties() - { - unset($this->security_center_properties); - } - - /** - * Security Command Center managed properties. These properties are managed by - * Security Command Center and cannot be modified by the user. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Asset.SecurityCenterProperties security_center_properties = 2; - * @param \Google\Cloud\SecurityCenter\V1\Asset\SecurityCenterProperties $var - * @return $this - */ - public function setSecurityCenterProperties($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\Asset\SecurityCenterProperties::class); - $this->security_center_properties = $var; - - return $this; - } - - /** - * Resource managed properties. These properties are managed and defined by - * the Google Cloud resource and cannot be modified by the user. - * - * Generated from protobuf field map resource_properties = 7; - * @return \Google\Protobuf\Internal\MapField - */ - public function getResourceProperties() - { - return $this->resource_properties; - } - - /** - * Resource managed properties. These properties are managed and defined by - * the Google Cloud resource and cannot be modified by the user. - * - * Generated from protobuf field map resource_properties = 7; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setResourceProperties($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Value::class); - $this->resource_properties = $arr; - - return $this; - } - - /** - * User specified security marks. These marks are entirely managed by the user - * and come from the SecurityMarks resource that belongs to the asset. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.SecurityMarks security_marks = 8; - * @return \Google\Cloud\SecurityCenter\V1\SecurityMarks|null - */ - public function getSecurityMarks() - { - return $this->security_marks; - } - - public function hasSecurityMarks() - { - return isset($this->security_marks); - } - - public function clearSecurityMarks() - { - unset($this->security_marks); - } - - /** - * User specified security marks. These marks are entirely managed by the user - * and come from the SecurityMarks resource that belongs to the asset. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.SecurityMarks security_marks = 8; - * @param \Google\Cloud\SecurityCenter\V1\SecurityMarks $var - * @return $this - */ - public function setSecurityMarks($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\SecurityMarks::class); - $this->security_marks = $var; - - return $this; - } - - /** - * The time at which the asset was created in Security Command Center. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 9; - * @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); - } - - /** - * The time at which the asset was created in Security Command Center. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 9; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * The time at which the asset was last updated or added in Cloud SCC. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 10; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * The time at which the asset was last updated or added in Cloud SCC. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 10; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Cloud IAM Policy information associated with the Google Cloud resource - * described by the Security Command Center asset. This information is managed - * and defined by the Google Cloud resource and cannot be modified by the - * user. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Asset.IamPolicy iam_policy = 11; - * @return \Google\Cloud\SecurityCenter\V1\Asset\IamPolicy|null - */ - public function getIamPolicy() - { - return $this->iam_policy; - } - - public function hasIamPolicy() - { - return isset($this->iam_policy); - } - - public function clearIamPolicy() - { - unset($this->iam_policy); - } - - /** - * Cloud IAM Policy information associated with the Google Cloud resource - * described by the Security Command Center asset. This information is managed - * and defined by the Google Cloud resource and cannot be modified by the - * user. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Asset.IamPolicy iam_policy = 11; - * @param \Google\Cloud\SecurityCenter\V1\Asset\IamPolicy $var - * @return $this - */ - public function setIamPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\Asset\IamPolicy::class); - $this->iam_policy = $var; - - return $this; - } - - /** - * The canonical name of the resource. It's either - * "organizations/{organization_id}/assets/{asset_id}", - * "folders/{folder_id}/assets/{asset_id}" or - * "projects/{project_number}/assets/{asset_id}", depending on the closest CRM - * ancestor of the resource. - * - * Generated from protobuf field string canonical_name = 13; - * @return string - */ - public function getCanonicalName() - { - return $this->canonical_name; - } - - /** - * The canonical name of the resource. It's either - * "organizations/{organization_id}/assets/{asset_id}", - * "folders/{folder_id}/assets/{asset_id}" or - * "projects/{project_number}/assets/{asset_id}", depending on the closest CRM - * ancestor of the resource. - * - * Generated from protobuf field string canonical_name = 13; - * @param string $var - * @return $this - */ - public function setCanonicalName($var) - { - GPBUtil::checkString($var, True); - $this->canonical_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Asset/IamPolicy.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Asset/IamPolicy.php deleted file mode 100644 index 6df487a6cfce..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Asset/IamPolicy.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.securitycenter.v1.Asset.IamPolicy - */ -class IamPolicy extends \Google\Protobuf\Internal\Message -{ - /** - * The JSON representation of the Policy associated with the asset. - * See https://cloud.google.com/iam/reference/rest/v1/Policy for format - * details. - * - * Generated from protobuf field string policy_blob = 1; - */ - protected $policy_blob = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $policy_blob - * The JSON representation of the Policy associated with the asset. - * See https://cloud.google.com/iam/reference/rest/v1/Policy for format - * details. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\Asset::initOnce(); - parent::__construct($data); - } - - /** - * The JSON representation of the Policy associated with the asset. - * See https://cloud.google.com/iam/reference/rest/v1/Policy for format - * details. - * - * Generated from protobuf field string policy_blob = 1; - * @return string - */ - public function getPolicyBlob() - { - return $this->policy_blob; - } - - /** - * The JSON representation of the Policy associated with the asset. - * See https://cloud.google.com/iam/reference/rest/v1/Policy for format - * details. - * - * Generated from protobuf field string policy_blob = 1; - * @param string $var - * @return $this - */ - public function setPolicyBlob($var) - { - GPBUtil::checkString($var, True); - $this->policy_blob = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(IamPolicy::class, \Google\Cloud\SecurityCenter\V1\Asset_IamPolicy::class); - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Asset/SecurityCenterProperties.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Asset/SecurityCenterProperties.php deleted file mode 100644 index e52bfc4be7db..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Asset/SecurityCenterProperties.php +++ /dev/null @@ -1,379 +0,0 @@ -google.cloud.securitycenter.v1.Asset.SecurityCenterProperties - */ -class SecurityCenterProperties extends \Google\Protobuf\Internal\Message -{ - /** - * The full resource name of the Google Cloud resource this asset - * represents. This field is immutable after create time. See: - * https://cloud.google.com/apis/design/resource_names#full_resource_name - * - * Generated from protobuf field string resource_name = 1; - */ - protected $resource_name = ''; - /** - * The type of the Google Cloud resource. Examples include: APPLICATION, - * PROJECT, and ORGANIZATION. This is a case insensitive field defined by - * Security Command Center and/or the producer of the resource and is - * immutable after create time. - * - * Generated from protobuf field string resource_type = 2; - */ - protected $resource_type = ''; - /** - * The full resource name of the immediate parent of the resource. See: - * https://cloud.google.com/apis/design/resource_names#full_resource_name - * - * Generated from protobuf field string resource_parent = 3; - */ - protected $resource_parent = ''; - /** - * The full resource name of the project the resource belongs to. See: - * https://cloud.google.com/apis/design/resource_names#full_resource_name - * - * Generated from protobuf field string resource_project = 4; - */ - protected $resource_project = ''; - /** - * Owners of the Google Cloud resource. - * - * Generated from protobuf field repeated string resource_owners = 5; - */ - private $resource_owners; - /** - * The user defined display name for this resource. - * - * Generated from protobuf field string resource_display_name = 6; - */ - protected $resource_display_name = ''; - /** - * The user defined display name for the parent of this resource. - * - * Generated from protobuf field string resource_parent_display_name = 7; - */ - protected $resource_parent_display_name = ''; - /** - * The user defined display name for the project of this resource. - * - * Generated from protobuf field string resource_project_display_name = 8; - */ - protected $resource_project_display_name = ''; - /** - * Contains a Folder message for each folder in the assets ancestry. - * The first folder is the deepest nested folder, and the last folder is the - * folder directly under the Organization. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Folder folders = 10; - */ - private $folders; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $resource_name - * The full resource name of the Google Cloud resource this asset - * represents. This field is immutable after create time. See: - * https://cloud.google.com/apis/design/resource_names#full_resource_name - * @type string $resource_type - * The type of the Google Cloud resource. Examples include: APPLICATION, - * PROJECT, and ORGANIZATION. This is a case insensitive field defined by - * Security Command Center and/or the producer of the resource and is - * immutable after create time. - * @type string $resource_parent - * The full resource name of the immediate parent of the resource. See: - * https://cloud.google.com/apis/design/resource_names#full_resource_name - * @type string $resource_project - * The full resource name of the project the resource belongs to. See: - * https://cloud.google.com/apis/design/resource_names#full_resource_name - * @type array|\Google\Protobuf\Internal\RepeatedField $resource_owners - * Owners of the Google Cloud resource. - * @type string $resource_display_name - * The user defined display name for this resource. - * @type string $resource_parent_display_name - * The user defined display name for the parent of this resource. - * @type string $resource_project_display_name - * The user defined display name for the project of this resource. - * @type array<\Google\Cloud\SecurityCenter\V1\Folder>|\Google\Protobuf\Internal\RepeatedField $folders - * Contains a Folder message for each folder in the assets ancestry. - * The first folder is the deepest nested folder, and the last folder is the - * folder directly under the Organization. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\Asset::initOnce(); - parent::__construct($data); - } - - /** - * The full resource name of the Google Cloud resource this asset - * represents. This field is immutable after create time. See: - * https://cloud.google.com/apis/design/resource_names#full_resource_name - * - * Generated from protobuf field string resource_name = 1; - * @return string - */ - public function getResourceName() - { - return $this->resource_name; - } - - /** - * The full resource name of the Google Cloud resource this asset - * represents. This field is immutable after create time. See: - * https://cloud.google.com/apis/design/resource_names#full_resource_name - * - * Generated from protobuf field string resource_name = 1; - * @param string $var - * @return $this - */ - public function setResourceName($var) - { - GPBUtil::checkString($var, True); - $this->resource_name = $var; - - return $this; - } - - /** - * The type of the Google Cloud resource. Examples include: APPLICATION, - * PROJECT, and ORGANIZATION. This is a case insensitive field defined by - * Security Command Center and/or the producer of the resource and is - * immutable after create time. - * - * Generated from protobuf field string resource_type = 2; - * @return string - */ - public function getResourceType() - { - return $this->resource_type; - } - - /** - * The type of the Google Cloud resource. Examples include: APPLICATION, - * PROJECT, and ORGANIZATION. This is a case insensitive field defined by - * Security Command Center and/or the producer of the resource and is - * immutable after create time. - * - * Generated from protobuf field string resource_type = 2; - * @param string $var - * @return $this - */ - public function setResourceType($var) - { - GPBUtil::checkString($var, True); - $this->resource_type = $var; - - return $this; - } - - /** - * The full resource name of the immediate parent of the resource. See: - * https://cloud.google.com/apis/design/resource_names#full_resource_name - * - * Generated from protobuf field string resource_parent = 3; - * @return string - */ - public function getResourceParent() - { - return $this->resource_parent; - } - - /** - * The full resource name of the immediate parent of the resource. See: - * https://cloud.google.com/apis/design/resource_names#full_resource_name - * - * Generated from protobuf field string resource_parent = 3; - * @param string $var - * @return $this - */ - public function setResourceParent($var) - { - GPBUtil::checkString($var, True); - $this->resource_parent = $var; - - return $this; - } - - /** - * The full resource name of the project the resource belongs to. See: - * https://cloud.google.com/apis/design/resource_names#full_resource_name - * - * Generated from protobuf field string resource_project = 4; - * @return string - */ - public function getResourceProject() - { - return $this->resource_project; - } - - /** - * The full resource name of the project the resource belongs to. See: - * https://cloud.google.com/apis/design/resource_names#full_resource_name - * - * Generated from protobuf field string resource_project = 4; - * @param string $var - * @return $this - */ - public function setResourceProject($var) - { - GPBUtil::checkString($var, True); - $this->resource_project = $var; - - return $this; - } - - /** - * Owners of the Google Cloud resource. - * - * Generated from protobuf field repeated string resource_owners = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getResourceOwners() - { - return $this->resource_owners; - } - - /** - * Owners of the Google Cloud resource. - * - * Generated from protobuf field repeated string resource_owners = 5; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setResourceOwners($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->resource_owners = $arr; - - return $this; - } - - /** - * The user defined display name for this resource. - * - * Generated from protobuf field string resource_display_name = 6; - * @return string - */ - public function getResourceDisplayName() - { - return $this->resource_display_name; - } - - /** - * The user defined display name for this resource. - * - * Generated from protobuf field string resource_display_name = 6; - * @param string $var - * @return $this - */ - public function setResourceDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->resource_display_name = $var; - - return $this; - } - - /** - * The user defined display name for the parent of this resource. - * - * Generated from protobuf field string resource_parent_display_name = 7; - * @return string - */ - public function getResourceParentDisplayName() - { - return $this->resource_parent_display_name; - } - - /** - * The user defined display name for the parent of this resource. - * - * Generated from protobuf field string resource_parent_display_name = 7; - * @param string $var - * @return $this - */ - public function setResourceParentDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->resource_parent_display_name = $var; - - return $this; - } - - /** - * The user defined display name for the project of this resource. - * - * Generated from protobuf field string resource_project_display_name = 8; - * @return string - */ - public function getResourceProjectDisplayName() - { - return $this->resource_project_display_name; - } - - /** - * The user defined display name for the project of this resource. - * - * Generated from protobuf field string resource_project_display_name = 8; - * @param string $var - * @return $this - */ - public function setResourceProjectDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->resource_project_display_name = $var; - - return $this; - } - - /** - * Contains a Folder message for each folder in the assets ancestry. - * The first folder is the deepest nested folder, and the last folder is the - * folder directly under the Organization. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Folder folders = 10; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFolders() - { - return $this->folders; - } - - /** - * Contains a Folder message for each folder in the assets ancestry. - * The first folder is the deepest nested folder, and the last folder is the - * folder directly under the Organization. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Folder folders = 10; - * @param array<\Google\Cloud\SecurityCenter\V1\Folder>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFolders($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\Folder::class); - $this->folders = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SecurityCenterProperties::class, \Google\Cloud\SecurityCenter\V1\Asset_SecurityCenterProperties::class); - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Asset_IamPolicy.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Asset_IamPolicy.php deleted file mode 100644 index d830dc97c3a4..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Asset_IamPolicy.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.securitycenter.v1.BigQueryExport - */ -class BigQueryExport extends \Google\Protobuf\Internal\Message -{ - /** - * The relative resource name of this export. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name. - * Example format: - * "organizations/{organization_id}/bigQueryExports/{export_id}" Example - * format: "folders/{folder_id}/bigQueryExports/{export_id}" Example format: - * "projects/{project_id}/bigQueryExports/{export_id}" - * This field is provided in responses, and is ignored when provided in create - * requests. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The description of the export (max of 1024 characters). - * - * Generated from protobuf field string description = 2; - */ - protected $description = ''; - /** - * Expression that defines the filter to apply across create/update events - * of findings. The expression is a list of zero or more restrictions combined - * via logical operators `AND` and `OR`. Parentheses are supported, and `OR` - * has higher precedence than `AND`. - * Restrictions have the form ` ` and may have a - * `-` character in front of them to indicate negation. The fields map to - * those defined in the corresponding resource. - * The supported operators are: - * * `=` for all value types. - * * `>`, `<`, `>=`, `<=` for integer values. - * * `:`, meaning substring matching, for strings. - * The supported value types are: - * * string literals in quotes. - * * integer literals without quotes. - * * boolean literals `true` and `false` without quotes. - * - * Generated from protobuf field string filter = 3; - */ - protected $filter = ''; - /** - * The dataset to write findings' updates to. Its format is - * "projects/[project_id]/datasets/[bigquery_dataset_id]". - * BigQuery Dataset unique ID must contain only letters (a-z, A-Z), numbers - * (0-9), or underscores (_). - * - * Generated from protobuf field string dataset = 4; - */ - protected $dataset = ''; - /** - * Output only. The time at which the big query export was created. - * This field is set by the server and will be ignored if provided on export - * on creation. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The most recent time at which the big export was updated. - * This field is set by the server and will be ignored if provided on export - * creation or update. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. Email address of the user who last edited the big query export. - * This field is set by the server and will be ignored if provided on export - * creation or update. - * - * Generated from protobuf field string most_recent_editor = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $most_recent_editor = ''; - /** - * Output only. The service account that needs permission to create table, upload data to - * the big query dataset. - * - * Generated from protobuf field string principal = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $principal = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The relative resource name of this export. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name. - * Example format: - * "organizations/{organization_id}/bigQueryExports/{export_id}" Example - * format: "folders/{folder_id}/bigQueryExports/{export_id}" Example format: - * "projects/{project_id}/bigQueryExports/{export_id}" - * This field is provided in responses, and is ignored when provided in create - * requests. - * @type string $description - * The description of the export (max of 1024 characters). - * @type string $filter - * Expression that defines the filter to apply across create/update events - * of findings. The expression is a list of zero or more restrictions combined - * via logical operators `AND` and `OR`. Parentheses are supported, and `OR` - * has higher precedence than `AND`. - * Restrictions have the form ` ` and may have a - * `-` character in front of them to indicate negation. The fields map to - * those defined in the corresponding resource. - * The supported operators are: - * * `=` for all value types. - * * `>`, `<`, `>=`, `<=` for integer values. - * * `:`, meaning substring matching, for strings. - * The supported value types are: - * * string literals in quotes. - * * integer literals without quotes. - * * boolean literals `true` and `false` without quotes. - * @type string $dataset - * The dataset to write findings' updates to. Its format is - * "projects/[project_id]/datasets/[bigquery_dataset_id]". - * BigQuery Dataset unique ID must contain only letters (a-z, A-Z), numbers - * (0-9), or underscores (_). - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time at which the big query export was created. - * This field is set by the server and will be ignored if provided on export - * on creation. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The most recent time at which the big export was updated. - * This field is set by the server and will be ignored if provided on export - * creation or update. - * @type string $most_recent_editor - * Output only. Email address of the user who last edited the big query export. - * This field is set by the server and will be ignored if provided on export - * creation or update. - * @type string $principal - * Output only. The service account that needs permission to create table, upload data to - * the big query dataset. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\BigqueryExport::initOnce(); - parent::__construct($data); - } - - /** - * The relative resource name of this export. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name. - * Example format: - * "organizations/{organization_id}/bigQueryExports/{export_id}" Example - * format: "folders/{folder_id}/bigQueryExports/{export_id}" Example format: - * "projects/{project_id}/bigQueryExports/{export_id}" - * This field is provided in responses, and is ignored when provided in create - * requests. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The relative resource name of this export. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name. - * Example format: - * "organizations/{organization_id}/bigQueryExports/{export_id}" Example - * format: "folders/{folder_id}/bigQueryExports/{export_id}" Example format: - * "projects/{project_id}/bigQueryExports/{export_id}" - * This field is provided in responses, and is ignored when provided in create - * requests. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The description of the export (max of 1024 characters). - * - * Generated from protobuf field string description = 2; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * The description of the export (max of 1024 characters). - * - * Generated from protobuf field string description = 2; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Expression that defines the filter to apply across create/update events - * of findings. The expression is a list of zero or more restrictions combined - * via logical operators `AND` and `OR`. Parentheses are supported, and `OR` - * has higher precedence than `AND`. - * Restrictions have the form ` ` and may have a - * `-` character in front of them to indicate negation. The fields map to - * those defined in the corresponding resource. - * The supported operators are: - * * `=` for all value types. - * * `>`, `<`, `>=`, `<=` for integer values. - * * `:`, meaning substring matching, for strings. - * The supported value types are: - * * string literals in quotes. - * * integer literals without quotes. - * * boolean literals `true` and `false` without quotes. - * - * Generated from protobuf field string filter = 3; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Expression that defines the filter to apply across create/update events - * of findings. The expression is a list of zero or more restrictions combined - * via logical operators `AND` and `OR`. Parentheses are supported, and `OR` - * has higher precedence than `AND`. - * Restrictions have the form ` ` and may have a - * `-` character in front of them to indicate negation. The fields map to - * those defined in the corresponding resource. - * The supported operators are: - * * `=` for all value types. - * * `>`, `<`, `>=`, `<=` for integer values. - * * `:`, meaning substring matching, for strings. - * The supported value types are: - * * string literals in quotes. - * * integer literals without quotes. - * * boolean literals `true` and `false` without quotes. - * - * Generated from protobuf field string filter = 3; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * The dataset to write findings' updates to. Its format is - * "projects/[project_id]/datasets/[bigquery_dataset_id]". - * BigQuery Dataset unique ID must contain only letters (a-z, A-Z), numbers - * (0-9), or underscores (_). - * - * Generated from protobuf field string dataset = 4; - * @return string - */ - public function getDataset() - { - return $this->dataset; - } - - /** - * The dataset to write findings' updates to. Its format is - * "projects/[project_id]/datasets/[bigquery_dataset_id]". - * BigQuery Dataset unique ID must contain only letters (a-z, A-Z), numbers - * (0-9), or underscores (_). - * - * Generated from protobuf field string dataset = 4; - * @param string $var - * @return $this - */ - public function setDataset($var) - { - GPBUtil::checkString($var, True); - $this->dataset = $var; - - return $this; - } - - /** - * Output only. The time at which the big query export was created. - * This field is set by the server and will be ignored if provided on export - * on creation. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.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. The time at which the big query export was created. - * This field is set by the server and will be ignored if provided on export - * on creation. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.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. The most recent time at which the big export was updated. - * This field is set by the server and will be ignored if provided on export - * creation or update. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The most recent time at which the big export was updated. - * This field is set by the server and will be ignored if provided on export - * creation or update. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Output only. Email address of the user who last edited the big query export. - * This field is set by the server and will be ignored if provided on export - * creation or update. - * - * Generated from protobuf field string most_recent_editor = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getMostRecentEditor() - { - return $this->most_recent_editor; - } - - /** - * Output only. Email address of the user who last edited the big query export. - * This field is set by the server and will be ignored if provided on export - * creation or update. - * - * Generated from protobuf field string most_recent_editor = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setMostRecentEditor($var) - { - GPBUtil::checkString($var, True); - $this->most_recent_editor = $var; - - return $this; - } - - /** - * Output only. The service account that needs permission to create table, upload data to - * the big query dataset. - * - * Generated from protobuf field string principal = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getPrincipal() - { - return $this->principal; - } - - /** - * Output only. The service account that needs permission to create table, upload data to - * the big query dataset. - * - * Generated from protobuf field string principal = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setPrincipal($var) - { - GPBUtil::checkString($var, True); - $this->principal = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/BulkMuteFindingsRequest.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/BulkMuteFindingsRequest.php deleted file mode 100644 index 52ed9a0a8383..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/BulkMuteFindingsRequest.php +++ /dev/null @@ -1,212 +0,0 @@ -google.cloud.securitycenter.v1.BulkMuteFindingsRequest - */ -class BulkMuteFindingsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent, at which bulk action needs to be applied. Its format - * is "organizations/[organization_id]", "folders/[folder_id]", - * "projects/[project_id]". - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Expression that identifies findings that should be updated. - * The expression is a list of zero or more restrictions combined - * via logical operators `AND` and `OR`. Parentheses are supported, and `OR` - * has higher precedence than `AND`. - * Restrictions have the form ` ` and may have a - * `-` character in front of them to indicate negation. The fields map to - * those defined in the corresponding resource. - * The supported operators are: - * * `=` for all value types. - * * `>`, `<`, `>=`, `<=` for integer values. - * * `:`, meaning substring matching, for strings. - * The supported value types are: - * * string literals in quotes. - * * integer literals without quotes. - * * boolean literals `true` and `false` without quotes. - * - * Generated from protobuf field string filter = 2; - */ - protected $filter = ''; - /** - * This can be a mute configuration name or any identifier for mute/unmute - * of findings based on the filter. - * - * Generated from protobuf field string mute_annotation = 3 [deprecated = true]; - * @deprecated - */ - protected $mute_annotation = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent, at which bulk action needs to be applied. Its format - * is "organizations/[organization_id]", "folders/[folder_id]", - * "projects/[project_id]". - * @type string $filter - * Expression that identifies findings that should be updated. - * The expression is a list of zero or more restrictions combined - * via logical operators `AND` and `OR`. Parentheses are supported, and `OR` - * has higher precedence than `AND`. - * Restrictions have the form ` ` and may have a - * `-` character in front of them to indicate negation. The fields map to - * those defined in the corresponding resource. - * The supported operators are: - * * `=` for all value types. - * * `>`, `<`, `>=`, `<=` for integer values. - * * `:`, meaning substring matching, for strings. - * The supported value types are: - * * string literals in quotes. - * * integer literals without quotes. - * * boolean literals `true` and `false` without quotes. - * @type string $mute_annotation - * This can be a mute configuration name or any identifier for mute/unmute - * of findings based on the filter. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent, at which bulk action needs to be applied. Its format - * is "organizations/[organization_id]", "folders/[folder_id]", - * "projects/[project_id]". - * - * 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. The parent, at which bulk action needs to be applied. Its format - * is "organizations/[organization_id]", "folders/[folder_id]", - * "projects/[project_id]". - * - * 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; - } - - /** - * Expression that identifies findings that should be updated. - * The expression is a list of zero or more restrictions combined - * via logical operators `AND` and `OR`. Parentheses are supported, and `OR` - * has higher precedence than `AND`. - * Restrictions have the form ` ` and may have a - * `-` character in front of them to indicate negation. The fields map to - * those defined in the corresponding resource. - * The supported operators are: - * * `=` for all value types. - * * `>`, `<`, `>=`, `<=` for integer values. - * * `:`, meaning substring matching, for strings. - * The supported value types are: - * * string literals in quotes. - * * integer literals without quotes. - * * boolean literals `true` and `false` without quotes. - * - * Generated from protobuf field string filter = 2; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Expression that identifies findings that should be updated. - * The expression is a list of zero or more restrictions combined - * via logical operators `AND` and `OR`. Parentheses are supported, and `OR` - * has higher precedence than `AND`. - * Restrictions have the form ` ` and may have a - * `-` character in front of them to indicate negation. The fields map to - * those defined in the corresponding resource. - * The supported operators are: - * * `=` for all value types. - * * `>`, `<`, `>=`, `<=` for integer values. - * * `:`, meaning substring matching, for strings. - * The supported value types are: - * * string literals in quotes. - * * integer literals without quotes. - * * boolean literals `true` and `false` without quotes. - * - * Generated from protobuf field string filter = 2; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * This can be a mute configuration name or any identifier for mute/unmute - * of findings based on the filter. - * - * Generated from protobuf field string mute_annotation = 3 [deprecated = true]; - * @return string - * @deprecated - */ - public function getMuteAnnotation() - { - @trigger_error('mute_annotation is deprecated.', E_USER_DEPRECATED); - return $this->mute_annotation; - } - - /** - * This can be a mute configuration name or any identifier for mute/unmute - * of findings based on the filter. - * - * Generated from protobuf field string mute_annotation = 3 [deprecated = true]; - * @param string $var - * @return $this - * @deprecated - */ - public function setMuteAnnotation($var) - { - @trigger_error('mute_annotation is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, True); - $this->mute_annotation = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/BulkMuteFindingsResponse.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/BulkMuteFindingsResponse.php deleted file mode 100644 index 68edc47a055a..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/BulkMuteFindingsResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.securitycenter.v1.BulkMuteFindingsResponse - */ -class BulkMuteFindingsResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Compliance.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Compliance.php deleted file mode 100644 index c7bf14ba3827..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Compliance.php +++ /dev/null @@ -1,140 +0,0 @@ -google.cloud.securitycenter.v1.Compliance - */ -class Compliance extends \Google\Protobuf\Internal\Message -{ - /** - * Refers to industry wide standards or benchmarks e.g. "cis", "pci", "owasp", - * etc. - * - * Generated from protobuf field string standard = 1; - */ - protected $standard = ''; - /** - * Version of the standard/benchmark e.g. 1.1 - * - * Generated from protobuf field string version = 2; - */ - protected $version = ''; - /** - * Policies within the standard/benchmark e.g. A.12.4.1 - * - * Generated from protobuf field repeated string ids = 3; - */ - private $ids; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $standard - * Refers to industry wide standards or benchmarks e.g. "cis", "pci", "owasp", - * etc. - * @type string $version - * Version of the standard/benchmark e.g. 1.1 - * @type array|\Google\Protobuf\Internal\RepeatedField $ids - * Policies within the standard/benchmark e.g. A.12.4.1 - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\Compliance::initOnce(); - parent::__construct($data); - } - - /** - * Refers to industry wide standards or benchmarks e.g. "cis", "pci", "owasp", - * etc. - * - * Generated from protobuf field string standard = 1; - * @return string - */ - public function getStandard() - { - return $this->standard; - } - - /** - * Refers to industry wide standards or benchmarks e.g. "cis", "pci", "owasp", - * etc. - * - * Generated from protobuf field string standard = 1; - * @param string $var - * @return $this - */ - public function setStandard($var) - { - GPBUtil::checkString($var, True); - $this->standard = $var; - - return $this; - } - - /** - * Version of the standard/benchmark e.g. 1.1 - * - * Generated from protobuf field string version = 2; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Version of the standard/benchmark e.g. 1.1 - * - * Generated from protobuf field string version = 2; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - - /** - * Policies within the standard/benchmark e.g. A.12.4.1 - * - * Generated from protobuf field repeated string ids = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getIds() - { - return $this->ids; - } - - /** - * Policies within the standard/benchmark e.g. A.12.4.1 - * - * Generated from protobuf field repeated string ids = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->ids = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Connection.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Connection.php deleted file mode 100644 index ddaeaf3950ae..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Connection.php +++ /dev/null @@ -1,211 +0,0 @@ -google.cloud.securitycenter.v1.Connection - */ -class Connection extends \Google\Protobuf\Internal\Message -{ - /** - * Destination IP address. Not present for sockets that are listening and not - * connected. - * - * Generated from protobuf field string destination_ip = 1; - */ - protected $destination_ip = ''; - /** - * Destination port. Not present for sockets that are listening and not - * connected. - * - * Generated from protobuf field int32 destination_port = 2; - */ - protected $destination_port = 0; - /** - * Source IP address. - * - * Generated from protobuf field string source_ip = 3; - */ - protected $source_ip = ''; - /** - * Source port. - * - * Generated from protobuf field int32 source_port = 4; - */ - protected $source_port = 0; - /** - * IANA Internet Protocol Number such as TCP(6) and UDP(17). - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Connection.Protocol protocol = 5; - */ - protected $protocol = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $destination_ip - * Destination IP address. Not present for sockets that are listening and not - * connected. - * @type int $destination_port - * Destination port. Not present for sockets that are listening and not - * connected. - * @type string $source_ip - * Source IP address. - * @type int $source_port - * Source port. - * @type int $protocol - * IANA Internet Protocol Number such as TCP(6) and UDP(17). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\Connection::initOnce(); - parent::__construct($data); - } - - /** - * Destination IP address. Not present for sockets that are listening and not - * connected. - * - * Generated from protobuf field string destination_ip = 1; - * @return string - */ - public function getDestinationIp() - { - return $this->destination_ip; - } - - /** - * Destination IP address. Not present for sockets that are listening and not - * connected. - * - * Generated from protobuf field string destination_ip = 1; - * @param string $var - * @return $this - */ - public function setDestinationIp($var) - { - GPBUtil::checkString($var, True); - $this->destination_ip = $var; - - return $this; - } - - /** - * Destination port. Not present for sockets that are listening and not - * connected. - * - * Generated from protobuf field int32 destination_port = 2; - * @return int - */ - public function getDestinationPort() - { - return $this->destination_port; - } - - /** - * Destination port. Not present for sockets that are listening and not - * connected. - * - * Generated from protobuf field int32 destination_port = 2; - * @param int $var - * @return $this - */ - public function setDestinationPort($var) - { - GPBUtil::checkInt32($var); - $this->destination_port = $var; - - return $this; - } - - /** - * Source IP address. - * - * Generated from protobuf field string source_ip = 3; - * @return string - */ - public function getSourceIp() - { - return $this->source_ip; - } - - /** - * Source IP address. - * - * Generated from protobuf field string source_ip = 3; - * @param string $var - * @return $this - */ - public function setSourceIp($var) - { - GPBUtil::checkString($var, True); - $this->source_ip = $var; - - return $this; - } - - /** - * Source port. - * - * Generated from protobuf field int32 source_port = 4; - * @return int - */ - public function getSourcePort() - { - return $this->source_port; - } - - /** - * Source port. - * - * Generated from protobuf field int32 source_port = 4; - * @param int $var - * @return $this - */ - public function setSourcePort($var) - { - GPBUtil::checkInt32($var); - $this->source_port = $var; - - return $this; - } - - /** - * IANA Internet Protocol Number such as TCP(6) and UDP(17). - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Connection.Protocol protocol = 5; - * @return int - */ - public function getProtocol() - { - return $this->protocol; - } - - /** - * IANA Internet Protocol Number such as TCP(6) and UDP(17). - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Connection.Protocol protocol = 5; - * @param int $var - * @return $this - */ - public function setProtocol($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1\Connection\Protocol::class); - $this->protocol = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Connection/Protocol.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Connection/Protocol.php deleted file mode 100644 index 8c4837dac97d..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Connection/Protocol.php +++ /dev/null @@ -1,85 +0,0 @@ -google.cloud.securitycenter.v1.Connection.Protocol - */ -class Protocol -{ - /** - * Unspecified protocol (not HOPOPT). - * - * Generated from protobuf enum PROTOCOL_UNSPECIFIED = 0; - */ - const PROTOCOL_UNSPECIFIED = 0; - /** - * Internet Control Message Protocol. - * - * Generated from protobuf enum ICMP = 1; - */ - const ICMP = 1; - /** - * Transmission Control Protocol. - * - * Generated from protobuf enum TCP = 6; - */ - const TCP = 6; - /** - * User Datagram Protocol. - * - * Generated from protobuf enum UDP = 17; - */ - const UDP = 17; - /** - * Generic Routing Encapsulation. - * - * Generated from protobuf enum GRE = 47; - */ - const GRE = 47; - /** - * Encap Security Payload. - * - * Generated from protobuf enum ESP = 50; - */ - const ESP = 50; - - private static $valueToName = [ - self::PROTOCOL_UNSPECIFIED => 'PROTOCOL_UNSPECIFIED', - self::ICMP => 'ICMP', - self::TCP => 'TCP', - self::UDP => 'UDP', - self::GRE => 'GRE', - self::ESP => 'ESP', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Protocol::class, \Google\Cloud\SecurityCenter\V1\Connection_Protocol::class); - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Connection_Protocol.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Connection_Protocol.php deleted file mode 100644 index 75c99f25cd3d..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Connection_Protocol.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.securitycenter.v1.Contact - */ -class Contact extends \Google\Protobuf\Internal\Message -{ - /** - * An email address e.g. "person123@company.com" - * - * Generated from protobuf field string email = 1; - */ - protected $email = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $email - * An email address e.g. "person123@company.com" - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\ContactDetails::initOnce(); - parent::__construct($data); - } - - /** - * An email address e.g. "person123@company.com" - * - * Generated from protobuf field string email = 1; - * @return string - */ - public function getEmail() - { - return $this->email; - } - - /** - * An email address e.g. "person123@company.com" - * - * Generated from protobuf field string email = 1; - * @param string $var - * @return $this - */ - public function setEmail($var) - { - GPBUtil::checkString($var, True); - $this->email = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ContactDetails.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ContactDetails.php deleted file mode 100644 index b721cd702216..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ContactDetails.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.securitycenter.v1.ContactDetails - */ -class ContactDetails extends \Google\Protobuf\Internal\Message -{ - /** - * A list of contacts - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Contact contacts = 1; - */ - private $contacts; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\SecurityCenter\V1\Contact>|\Google\Protobuf\Internal\RepeatedField $contacts - * A list of contacts - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\ContactDetails::initOnce(); - parent::__construct($data); - } - - /** - * A list of contacts - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Contact contacts = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getContacts() - { - return $this->contacts; - } - - /** - * A list of contacts - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Contact contacts = 1; - * @param array<\Google\Cloud\SecurityCenter\V1\Contact>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setContacts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\Contact::class); - $this->contacts = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Container.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Container.php deleted file mode 100644 index d118287d30e1..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Container.php +++ /dev/null @@ -1,181 +0,0 @@ -google.cloud.securitycenter.v1.Container - */ -class Container extends \Google\Protobuf\Internal\Message -{ - /** - * Container name. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Container image URI provided when configuring a pod/container. - * May identify a container image version using mutable tags. - * - * Generated from protobuf field string uri = 2; - */ - protected $uri = ''; - /** - * Optional container image id, when provided by the container runtime. - * Uniquely identifies the container image launched using a container image - * digest. - * - * Generated from protobuf field string image_id = 3; - */ - protected $image_id = ''; - /** - * Container labels, as provided by the container runtime. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Label labels = 4; - */ - private $labels; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Container name. - * @type string $uri - * Container image URI provided when configuring a pod/container. - * May identify a container image version using mutable tags. - * @type string $image_id - * Optional container image id, when provided by the container runtime. - * Uniquely identifies the container image launched using a container image - * digest. - * @type array<\Google\Cloud\SecurityCenter\V1\Label>|\Google\Protobuf\Internal\RepeatedField $labels - * Container labels, as provided by the container runtime. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\Container::initOnce(); - parent::__construct($data); - } - - /** - * Container name. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Container name. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Container image URI provided when configuring a pod/container. - * May identify a container image version using mutable tags. - * - * Generated from protobuf field string uri = 2; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * Container image URI provided when configuring a pod/container. - * May identify a container image version using mutable tags. - * - * Generated from protobuf field string uri = 2; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * Optional container image id, when provided by the container runtime. - * Uniquely identifies the container image launched using a container image - * digest. - * - * Generated from protobuf field string image_id = 3; - * @return string - */ - public function getImageId() - { - return $this->image_id; - } - - /** - * Optional container image id, when provided by the container runtime. - * Uniquely identifies the container image launched using a container image - * digest. - * - * Generated from protobuf field string image_id = 3; - * @param string $var - * @return $this - */ - public function setImageId($var) - { - GPBUtil::checkString($var, True); - $this->image_id = $var; - - return $this; - } - - /** - * Container labels, as provided by the container runtime. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Label labels = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Container labels, as provided by the container runtime. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Label labels = 4; - * @param array<\Google\Cloud\SecurityCenter\V1\Label>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\Label::class); - $this->labels = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/CreateBigQueryExportRequest.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/CreateBigQueryExportRequest.php deleted file mode 100644 index b349b87a17ab..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/CreateBigQueryExportRequest.php +++ /dev/null @@ -1,165 +0,0 @@ -google.cloud.securitycenter.v1.CreateBigQueryExportRequest - */ -class CreateBigQueryExportRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the parent resource of the new BigQuery export. Its - * format is "organizations/[organization_id]", "folders/[folder_id]", or - * "projects/[project_id]". - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The BigQuery export being created. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.BigQueryExport big_query_export = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $big_query_export = null; - /** - * Required. Unique identifier provided by the client within the parent scope. - * It must consist of lower case letters, numbers, and hyphen, with the first - * character a letter, the last a letter or a number, and a 63 character - * maximum. - * - * Generated from protobuf field string big_query_export_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $big_query_export_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The name of the parent resource of the new BigQuery export. Its - * format is "organizations/[organization_id]", "folders/[folder_id]", or - * "projects/[project_id]". - * @type \Google\Cloud\SecurityCenter\V1\BigQueryExport $big_query_export - * Required. The BigQuery export being created. - * @type string $big_query_export_id - * Required. Unique identifier provided by the client within the parent scope. - * It must consist of lower case letters, numbers, and hyphen, with the first - * character a letter, the last a letter or a number, and a 63 character - * maximum. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the parent resource of the new BigQuery export. Its - * format is "organizations/[organization_id]", "folders/[folder_id]", or - * "projects/[project_id]". - * - * 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. The name of the parent resource of the new BigQuery export. Its - * format is "organizations/[organization_id]", "folders/[folder_id]", or - * "projects/[project_id]". - * - * 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; - } - - /** - * Required. The BigQuery export being created. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.BigQueryExport big_query_export = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\SecurityCenter\V1\BigQueryExport|null - */ - public function getBigQueryExport() - { - return $this->big_query_export; - } - - public function hasBigQueryExport() - { - return isset($this->big_query_export); - } - - public function clearBigQueryExport() - { - unset($this->big_query_export); - } - - /** - * Required. The BigQuery export being created. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.BigQueryExport big_query_export = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\SecurityCenter\V1\BigQueryExport $var - * @return $this - */ - public function setBigQueryExport($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\BigQueryExport::class); - $this->big_query_export = $var; - - return $this; - } - - /** - * Required. Unique identifier provided by the client within the parent scope. - * It must consist of lower case letters, numbers, and hyphen, with the first - * character a letter, the last a letter or a number, and a 63 character - * maximum. - * - * Generated from protobuf field string big_query_export_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getBigQueryExportId() - { - return $this->big_query_export_id; - } - - /** - * Required. Unique identifier provided by the client within the parent scope. - * It must consist of lower case letters, numbers, and hyphen, with the first - * character a letter, the last a letter or a number, and a 63 character - * maximum. - * - * Generated from protobuf field string big_query_export_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setBigQueryExportId($var) - { - GPBUtil::checkString($var, True); - $this->big_query_export_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/CreateFindingRequest.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/CreateFindingRequest.php deleted file mode 100644 index 0b0c76b5e158..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/CreateFindingRequest.php +++ /dev/null @@ -1,161 +0,0 @@ -google.cloud.securitycenter.v1.CreateFindingRequest - */ -class CreateFindingRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the new finding's parent. Its format should be - * "organizations/[organization_id]/sources/[source_id]". - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Unique identifier provided by the client within the parent scope. - * It must be alphanumeric and less than or equal to 32 characters and - * greater than 0 characters in length. - * - * Generated from protobuf field string finding_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $finding_id = ''; - /** - * Required. The Finding being created. The name and security_marks will be - * ignored as they are both output only fields on this resource. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Finding finding = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $finding = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Resource name of the new finding's parent. Its format should be - * "organizations/[organization_id]/sources/[source_id]". - * @type string $finding_id - * Required. Unique identifier provided by the client within the parent scope. - * It must be alphanumeric and less than or equal to 32 characters and - * greater than 0 characters in length. - * @type \Google\Cloud\SecurityCenter\V1\Finding $finding - * Required. The Finding being created. The name and security_marks will be - * ignored as they are both output only fields on this resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the new finding's parent. Its format should be - * "organizations/[organization_id]/sources/[source_id]". - * - * 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. Resource name of the new finding's parent. Its format should be - * "organizations/[organization_id]/sources/[source_id]". - * - * 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; - } - - /** - * Required. Unique identifier provided by the client within the parent scope. - * It must be alphanumeric and less than or equal to 32 characters and - * greater than 0 characters in length. - * - * Generated from protobuf field string finding_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getFindingId() - { - return $this->finding_id; - } - - /** - * Required. Unique identifier provided by the client within the parent scope. - * It must be alphanumeric and less than or equal to 32 characters and - * greater than 0 characters in length. - * - * Generated from protobuf field string finding_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setFindingId($var) - { - GPBUtil::checkString($var, True); - $this->finding_id = $var; - - return $this; - } - - /** - * Required. The Finding being created. The name and security_marks will be - * ignored as they are both output only fields on this resource. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Finding finding = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\SecurityCenter\V1\Finding|null - */ - public function getFinding() - { - return $this->finding; - } - - public function hasFinding() - { - return isset($this->finding); - } - - public function clearFinding() - { - unset($this->finding); - } - - /** - * Required. The Finding being created. The name and security_marks will be - * ignored as they are both output only fields on this resource. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Finding finding = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\SecurityCenter\V1\Finding $var - * @return $this - */ - public function setFinding($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\Finding::class); - $this->finding = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/CreateMuteConfigRequest.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/CreateMuteConfigRequest.php deleted file mode 100644 index 6e76b0fc7165..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/CreateMuteConfigRequest.php +++ /dev/null @@ -1,165 +0,0 @@ -google.cloud.securitycenter.v1.CreateMuteConfigRequest - */ -class CreateMuteConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the new mute configs's parent. Its format is - * "organizations/[organization_id]", "folders/[folder_id]", or - * "projects/[project_id]". - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The mute config being created. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.MuteConfig mute_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $mute_config = null; - /** - * Required. Unique identifier provided by the client within the parent scope. - * It must consist of lower case letters, numbers, and hyphen, with the first - * character a letter, the last a letter or a number, and a 63 character - * maximum. - * - * Generated from protobuf field string mute_config_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $mute_config_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Resource name of the new mute configs's parent. Its format is - * "organizations/[organization_id]", "folders/[folder_id]", or - * "projects/[project_id]". - * @type \Google\Cloud\SecurityCenter\V1\MuteConfig $mute_config - * Required. The mute config being created. - * @type string $mute_config_id - * Required. Unique identifier provided by the client within the parent scope. - * It must consist of lower case letters, numbers, and hyphen, with the first - * character a letter, the last a letter or a number, and a 63 character - * maximum. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the new mute configs's parent. Its format is - * "organizations/[organization_id]", "folders/[folder_id]", or - * "projects/[project_id]". - * - * 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. Resource name of the new mute configs's parent. Its format is - * "organizations/[organization_id]", "folders/[folder_id]", or - * "projects/[project_id]". - * - * 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; - } - - /** - * Required. The mute config being created. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.MuteConfig mute_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\SecurityCenter\V1\MuteConfig|null - */ - public function getMuteConfig() - { - return $this->mute_config; - } - - public function hasMuteConfig() - { - return isset($this->mute_config); - } - - public function clearMuteConfig() - { - unset($this->mute_config); - } - - /** - * Required. The mute config being created. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.MuteConfig mute_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\SecurityCenter\V1\MuteConfig $var - * @return $this - */ - public function setMuteConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\MuteConfig::class); - $this->mute_config = $var; - - return $this; - } - - /** - * Required. Unique identifier provided by the client within the parent scope. - * It must consist of lower case letters, numbers, and hyphen, with the first - * character a letter, the last a letter or a number, and a 63 character - * maximum. - * - * Generated from protobuf field string mute_config_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getMuteConfigId() - { - return $this->mute_config_id; - } - - /** - * Required. Unique identifier provided by the client within the parent scope. - * It must consist of lower case letters, numbers, and hyphen, with the first - * character a letter, the last a letter or a number, and a 63 character - * maximum. - * - * Generated from protobuf field string mute_config_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setMuteConfigId($var) - { - GPBUtil::checkString($var, True); - $this->mute_config_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/CreateNotificationConfigRequest.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/CreateNotificationConfigRequest.php deleted file mode 100644 index 6c3131adbf85..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/CreateNotificationConfigRequest.php +++ /dev/null @@ -1,173 +0,0 @@ -google.cloud.securitycenter.v1.CreateNotificationConfigRequest - */ -class CreateNotificationConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the new notification config's parent. Its format - * is "organizations/[organization_id]", "folders/[folder_id]", or - * "projects/[project_id]". - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. - * Unique identifier provided by the client within the parent scope. - * It must be between 1 and 128 characters and contain alphanumeric - * characters, underscores, or hyphens only. - * - * Generated from protobuf field string config_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $config_id = ''; - /** - * Required. The notification config being created. The name and the service - * account will be ignored as they are both output only fields on this - * resource. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.NotificationConfig notification_config = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $notification_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Resource name of the new notification config's parent. Its format - * is "organizations/[organization_id]", "folders/[folder_id]", or - * "projects/[project_id]". - * @type string $config_id - * Required. - * Unique identifier provided by the client within the parent scope. - * It must be between 1 and 128 characters and contain alphanumeric - * characters, underscores, or hyphens only. - * @type \Google\Cloud\SecurityCenter\V1\NotificationConfig $notification_config - * Required. The notification config being created. The name and the service - * account will be ignored as they are both output only fields on this - * resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the new notification config's parent. Its format - * is "organizations/[organization_id]", "folders/[folder_id]", or - * "projects/[project_id]". - * - * 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. Resource name of the new notification config's parent. Its format - * is "organizations/[organization_id]", "folders/[folder_id]", or - * "projects/[project_id]". - * - * 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; - } - - /** - * Required. - * Unique identifier provided by the client within the parent scope. - * It must be between 1 and 128 characters and contain alphanumeric - * characters, underscores, or hyphens only. - * - * Generated from protobuf field string config_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getConfigId() - { - return $this->config_id; - } - - /** - * Required. - * Unique identifier provided by the client within the parent scope. - * It must be between 1 and 128 characters and contain alphanumeric - * characters, underscores, or hyphens only. - * - * Generated from protobuf field string config_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setConfigId($var) - { - GPBUtil::checkString($var, True); - $this->config_id = $var; - - return $this; - } - - /** - * Required. The notification config being created. The name and the service - * account will be ignored as they are both output only fields on this - * resource. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.NotificationConfig notification_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\SecurityCenter\V1\NotificationConfig|null - */ - public function getNotificationConfig() - { - return $this->notification_config; - } - - public function hasNotificationConfig() - { - return isset($this->notification_config); - } - - public function clearNotificationConfig() - { - unset($this->notification_config); - } - - /** - * Required. The notification config being created. The name and the service - * account will be ignored as they are both output only fields on this - * resource. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.NotificationConfig notification_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\SecurityCenter\V1\NotificationConfig $var - * @return $this - */ - public function setNotificationConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\NotificationConfig::class); - $this->notification_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/CreateSourceRequest.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/CreateSourceRequest.php deleted file mode 100644 index 8c3f7cd7beee..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/CreateSourceRequest.php +++ /dev/null @@ -1,119 +0,0 @@ -google.cloud.securitycenter.v1.CreateSourceRequest - */ -class CreateSourceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the new source's parent. Its format should be - * "organizations/[organization_id]". - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The Source being created, only the display_name and description - * will be used. All other fields will be ignored. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $source = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Resource name of the new source's parent. Its format should be - * "organizations/[organization_id]". - * @type \Google\Cloud\SecurityCenter\V1\Source $source - * Required. The Source being created, only the display_name and description - * will be used. All other fields will be ignored. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the new source's parent. Its format should be - * "organizations/[organization_id]". - * - * 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. Resource name of the new source's parent. Its format should be - * "organizations/[organization_id]". - * - * 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; - } - - /** - * Required. The Source being created, only the display_name and description - * will be used. All other fields will be ignored. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\SecurityCenter\V1\Source|null - */ - public function getSource() - { - return $this->source; - } - - public function hasSource() - { - return isset($this->source); - } - - public function clearSource() - { - unset($this->source); - } - - /** - * Required. The Source being created, only the display_name and description - * will be used. All other fields will be ignored. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\SecurityCenter\V1\Source $var - * @return $this - */ - public function setSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\Source::class); - $this->source = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cve.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cve.php deleted file mode 100644 index 24899e7a49c6..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cve.php +++ /dev/null @@ -1,188 +0,0 @@ -google.cloud.securitycenter.v1.Cve - */ -class Cve extends \Google\Protobuf\Internal\Message -{ - /** - * The unique identifier for the vulnerability. e.g. CVE-2021-34527 - * - * Generated from protobuf field string id = 1; - */ - protected $id = ''; - /** - * Additional information about the CVE. - * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527 - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Reference references = 2; - */ - private $references; - /** - * Describe Common Vulnerability Scoring System specified at - * https://www.first.org/cvss/v3.1/specification-document - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Cvssv3 cvssv3 = 3; - */ - protected $cvssv3 = null; - /** - * Whether upstream fix is available for the CVE. - * - * Generated from protobuf field bool upstream_fix_available = 4; - */ - protected $upstream_fix_available = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $id - * The unique identifier for the vulnerability. e.g. CVE-2021-34527 - * @type array<\Google\Cloud\SecurityCenter\V1\Reference>|\Google\Protobuf\Internal\RepeatedField $references - * Additional information about the CVE. - * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527 - * @type \Google\Cloud\SecurityCenter\V1\Cvssv3 $cvssv3 - * Describe Common Vulnerability Scoring System specified at - * https://www.first.org/cvss/v3.1/specification-document - * @type bool $upstream_fix_available - * Whether upstream fix is available for the CVE. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\Vulnerability::initOnce(); - parent::__construct($data); - } - - /** - * The unique identifier for the vulnerability. e.g. CVE-2021-34527 - * - * Generated from protobuf field string id = 1; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * The unique identifier for the vulnerability. e.g. CVE-2021-34527 - * - * Generated from protobuf field string id = 1; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * Additional information about the CVE. - * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527 - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Reference references = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getReferences() - { - return $this->references; - } - - /** - * Additional information about the CVE. - * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527 - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Reference references = 2; - * @param array<\Google\Cloud\SecurityCenter\V1\Reference>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setReferences($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\Reference::class); - $this->references = $arr; - - return $this; - } - - /** - * Describe Common Vulnerability Scoring System specified at - * https://www.first.org/cvss/v3.1/specification-document - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Cvssv3 cvssv3 = 3; - * @return \Google\Cloud\SecurityCenter\V1\Cvssv3|null - */ - public function getCvssv3() - { - return $this->cvssv3; - } - - public function hasCvssv3() - { - return isset($this->cvssv3); - } - - public function clearCvssv3() - { - unset($this->cvssv3); - } - - /** - * Describe Common Vulnerability Scoring System specified at - * https://www.first.org/cvss/v3.1/specification-document - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Cvssv3 cvssv3 = 3; - * @param \Google\Cloud\SecurityCenter\V1\Cvssv3 $var - * @return $this - */ - public function setCvssv3($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\Cvssv3::class); - $this->cvssv3 = $var; - - return $this; - } - - /** - * Whether upstream fix is available for the CVE. - * - * Generated from protobuf field bool upstream_fix_available = 4; - * @return bool - */ - public function getUpstreamFixAvailable() - { - return $this->upstream_fix_available; - } - - /** - * Whether upstream fix is available for the CVE. - * - * Generated from protobuf field bool upstream_fix_available = 4; - * @param bool $var - * @return $this - */ - public function setUpstreamFixAvailable($var) - { - GPBUtil::checkBool($var); - $this->upstream_fix_available = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3.php deleted file mode 100644 index d7eb6ed7aaa5..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3.php +++ /dev/null @@ -1,391 +0,0 @@ -google.cloud.securitycenter.v1.Cvssv3 - */ -class Cvssv3 extends \Google\Protobuf\Internal\Message -{ - /** - * The base score is a function of the base metric scores. - * - * Generated from protobuf field double base_score = 1; - */ - protected $base_score = 0.0; - /** - * Base Metrics - * Represents the intrinsic characteristics of a vulnerability that are - * constant over time and across user environments. - * This metric reflects the context by which vulnerability exploitation is - * possible. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Cvssv3.AttackVector attack_vector = 5; - */ - protected $attack_vector = 0; - /** - * This metric describes the conditions beyond the attacker's control that - * must exist in order to exploit the vulnerability. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Cvssv3.AttackComplexity attack_complexity = 6; - */ - protected $attack_complexity = 0; - /** - * This metric describes the level of privileges an attacker must possess - * before successfully exploiting the vulnerability. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Cvssv3.PrivilegesRequired privileges_required = 7; - */ - protected $privileges_required = 0; - /** - * This metric captures the requirement for a human user, other than the - * attacker, to participate in the successful compromise of the vulnerable - * component. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Cvssv3.UserInteraction user_interaction = 8; - */ - protected $user_interaction = 0; - /** - * The Scope metric captures whether a vulnerability in one vulnerable - * component impacts resources in components beyond its security scope. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Cvssv3.Scope scope = 9; - */ - protected $scope = 0; - /** - * This metric measures the impact to the confidentiality of the information - * resources managed by a software component due to a successfully exploited - * vulnerability. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Cvssv3.Impact confidentiality_impact = 10; - */ - protected $confidentiality_impact = 0; - /** - * This metric measures the impact to integrity of a successfully exploited - * vulnerability. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Cvssv3.Impact integrity_impact = 11; - */ - protected $integrity_impact = 0; - /** - * This metric measures the impact to the availability of the impacted - * component resulting from a successfully exploited vulnerability. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Cvssv3.Impact availability_impact = 12; - */ - protected $availability_impact = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $base_score - * The base score is a function of the base metric scores. - * @type int $attack_vector - * Base Metrics - * Represents the intrinsic characteristics of a vulnerability that are - * constant over time and across user environments. - * This metric reflects the context by which vulnerability exploitation is - * possible. - * @type int $attack_complexity - * This metric describes the conditions beyond the attacker's control that - * must exist in order to exploit the vulnerability. - * @type int $privileges_required - * This metric describes the level of privileges an attacker must possess - * before successfully exploiting the vulnerability. - * @type int $user_interaction - * This metric captures the requirement for a human user, other than the - * attacker, to participate in the successful compromise of the vulnerable - * component. - * @type int $scope - * The Scope metric captures whether a vulnerability in one vulnerable - * component impacts resources in components beyond its security scope. - * @type int $confidentiality_impact - * This metric measures the impact to the confidentiality of the information - * resources managed by a software component due to a successfully exploited - * vulnerability. - * @type int $integrity_impact - * This metric measures the impact to integrity of a successfully exploited - * vulnerability. - * @type int $availability_impact - * This metric measures the impact to the availability of the impacted - * component resulting from a successfully exploited vulnerability. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\Vulnerability::initOnce(); - parent::__construct($data); - } - - /** - * The base score is a function of the base metric scores. - * - * Generated from protobuf field double base_score = 1; - * @return float - */ - public function getBaseScore() - { - return $this->base_score; - } - - /** - * The base score is a function of the base metric scores. - * - * Generated from protobuf field double base_score = 1; - * @param float $var - * @return $this - */ - public function setBaseScore($var) - { - GPBUtil::checkDouble($var); - $this->base_score = $var; - - return $this; - } - - /** - * Base Metrics - * Represents the intrinsic characteristics of a vulnerability that are - * constant over time and across user environments. - * This metric reflects the context by which vulnerability exploitation is - * possible. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Cvssv3.AttackVector attack_vector = 5; - * @return int - */ - public function getAttackVector() - { - return $this->attack_vector; - } - - /** - * Base Metrics - * Represents the intrinsic characteristics of a vulnerability that are - * constant over time and across user environments. - * This metric reflects the context by which vulnerability exploitation is - * possible. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Cvssv3.AttackVector attack_vector = 5; - * @param int $var - * @return $this - */ - public function setAttackVector($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1\Cvssv3\AttackVector::class); - $this->attack_vector = $var; - - return $this; - } - - /** - * This metric describes the conditions beyond the attacker's control that - * must exist in order to exploit the vulnerability. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Cvssv3.AttackComplexity attack_complexity = 6; - * @return int - */ - public function getAttackComplexity() - { - return $this->attack_complexity; - } - - /** - * This metric describes the conditions beyond the attacker's control that - * must exist in order to exploit the vulnerability. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Cvssv3.AttackComplexity attack_complexity = 6; - * @param int $var - * @return $this - */ - public function setAttackComplexity($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1\Cvssv3\AttackComplexity::class); - $this->attack_complexity = $var; - - return $this; - } - - /** - * This metric describes the level of privileges an attacker must possess - * before successfully exploiting the vulnerability. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Cvssv3.PrivilegesRequired privileges_required = 7; - * @return int - */ - public function getPrivilegesRequired() - { - return $this->privileges_required; - } - - /** - * This metric describes the level of privileges an attacker must possess - * before successfully exploiting the vulnerability. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Cvssv3.PrivilegesRequired privileges_required = 7; - * @param int $var - * @return $this - */ - public function setPrivilegesRequired($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1\Cvssv3\PrivilegesRequired::class); - $this->privileges_required = $var; - - return $this; - } - - /** - * This metric captures the requirement for a human user, other than the - * attacker, to participate in the successful compromise of the vulnerable - * component. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Cvssv3.UserInteraction user_interaction = 8; - * @return int - */ - public function getUserInteraction() - { - return $this->user_interaction; - } - - /** - * This metric captures the requirement for a human user, other than the - * attacker, to participate in the successful compromise of the vulnerable - * component. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Cvssv3.UserInteraction user_interaction = 8; - * @param int $var - * @return $this - */ - public function setUserInteraction($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1\Cvssv3\UserInteraction::class); - $this->user_interaction = $var; - - return $this; - } - - /** - * The Scope metric captures whether a vulnerability in one vulnerable - * component impacts resources in components beyond its security scope. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Cvssv3.Scope scope = 9; - * @return int - */ - public function getScope() - { - return $this->scope; - } - - /** - * The Scope metric captures whether a vulnerability in one vulnerable - * component impacts resources in components beyond its security scope. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Cvssv3.Scope scope = 9; - * @param int $var - * @return $this - */ - public function setScope($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1\Cvssv3\Scope::class); - $this->scope = $var; - - return $this; - } - - /** - * This metric measures the impact to the confidentiality of the information - * resources managed by a software component due to a successfully exploited - * vulnerability. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Cvssv3.Impact confidentiality_impact = 10; - * @return int - */ - public function getConfidentialityImpact() - { - return $this->confidentiality_impact; - } - - /** - * This metric measures the impact to the confidentiality of the information - * resources managed by a software component due to a successfully exploited - * vulnerability. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Cvssv3.Impact confidentiality_impact = 10; - * @param int $var - * @return $this - */ - public function setConfidentialityImpact($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1\Cvssv3\Impact::class); - $this->confidentiality_impact = $var; - - return $this; - } - - /** - * This metric measures the impact to integrity of a successfully exploited - * vulnerability. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Cvssv3.Impact integrity_impact = 11; - * @return int - */ - public function getIntegrityImpact() - { - return $this->integrity_impact; - } - - /** - * This metric measures the impact to integrity of a successfully exploited - * vulnerability. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Cvssv3.Impact integrity_impact = 11; - * @param int $var - * @return $this - */ - public function setIntegrityImpact($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1\Cvssv3\Impact::class); - $this->integrity_impact = $var; - - return $this; - } - - /** - * This metric measures the impact to the availability of the impacted - * component resulting from a successfully exploited vulnerability. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Cvssv3.Impact availability_impact = 12; - * @return int - */ - public function getAvailabilityImpact() - { - return $this->availability_impact; - } - - /** - * This metric measures the impact to the availability of the impacted - * component resulting from a successfully exploited vulnerability. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Cvssv3.Impact availability_impact = 12; - * @param int $var - * @return $this - */ - public function setAvailabilityImpact($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1\Cvssv3\Impact::class); - $this->availability_impact = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3/AttackComplexity.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3/AttackComplexity.php deleted file mode 100644 index 179eeffa8a5e..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3/AttackComplexity.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.securitycenter.v1.Cvssv3.AttackComplexity - */ -class AttackComplexity -{ - /** - * Invalid value. - * - * Generated from protobuf enum ATTACK_COMPLEXITY_UNSPECIFIED = 0; - */ - const ATTACK_COMPLEXITY_UNSPECIFIED = 0; - /** - * Specialized access conditions or extenuating circumstances do not exist. - * An attacker can expect repeatable success when attacking the vulnerable - * component. - * - * Generated from protobuf enum ATTACK_COMPLEXITY_LOW = 1; - */ - const ATTACK_COMPLEXITY_LOW = 1; - /** - * A successful attack depends on conditions beyond the attacker's control. - * That is, a successful attack cannot be accomplished at will, but requires - * the attacker to invest in some measurable amount of effort in preparation - * or execution against the vulnerable component before a successful attack - * can be expected. - * - * Generated from protobuf enum ATTACK_COMPLEXITY_HIGH = 2; - */ - const ATTACK_COMPLEXITY_HIGH = 2; - - private static $valueToName = [ - self::ATTACK_COMPLEXITY_UNSPECIFIED => 'ATTACK_COMPLEXITY_UNSPECIFIED', - self::ATTACK_COMPLEXITY_LOW => 'ATTACK_COMPLEXITY_LOW', - self::ATTACK_COMPLEXITY_HIGH => 'ATTACK_COMPLEXITY_HIGH', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AttackComplexity::class, \Google\Cloud\SecurityCenter\V1\Cvssv3_AttackComplexity::class); - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3/AttackVector.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3/AttackVector.php deleted file mode 100644 index fa6acfc9dc84..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3/AttackVector.php +++ /dev/null @@ -1,84 +0,0 @@ -google.cloud.securitycenter.v1.Cvssv3.AttackVector - */ -class AttackVector -{ - /** - * Invalid value. - * - * Generated from protobuf enum ATTACK_VECTOR_UNSPECIFIED = 0; - */ - const ATTACK_VECTOR_UNSPECIFIED = 0; - /** - * The vulnerable component is bound to the network stack and the set of - * possible attackers extends beyond the other options listed below, up to - * and including the entire Internet. - * - * Generated from protobuf enum ATTACK_VECTOR_NETWORK = 1; - */ - const ATTACK_VECTOR_NETWORK = 1; - /** - * The vulnerable component is bound to the network stack, but the attack is - * limited at the protocol level to a logically adjacent topology. - * - * Generated from protobuf enum ATTACK_VECTOR_ADJACENT = 2; - */ - const ATTACK_VECTOR_ADJACENT = 2; - /** - * The vulnerable component is not bound to the network stack and the - * attacker's path is via read/write/execute capabilities. - * - * Generated from protobuf enum ATTACK_VECTOR_LOCAL = 3; - */ - const ATTACK_VECTOR_LOCAL = 3; - /** - * The attack requires the attacker to physically touch or manipulate the - * vulnerable component. - * - * Generated from protobuf enum ATTACK_VECTOR_PHYSICAL = 4; - */ - const ATTACK_VECTOR_PHYSICAL = 4; - - private static $valueToName = [ - self::ATTACK_VECTOR_UNSPECIFIED => 'ATTACK_VECTOR_UNSPECIFIED', - self::ATTACK_VECTOR_NETWORK => 'ATTACK_VECTOR_NETWORK', - self::ATTACK_VECTOR_ADJACENT => 'ATTACK_VECTOR_ADJACENT', - self::ATTACK_VECTOR_LOCAL => 'ATTACK_VECTOR_LOCAL', - self::ATTACK_VECTOR_PHYSICAL => 'ATTACK_VECTOR_PHYSICAL', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AttackVector::class, \Google\Cloud\SecurityCenter\V1\Cvssv3_AttackVector::class); - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3/Impact.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3/Impact.php deleted file mode 100644 index 027aced5e553..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3/Impact.php +++ /dev/null @@ -1,73 +0,0 @@ -google.cloud.securitycenter.v1.Cvssv3.Impact - */ -class Impact -{ - /** - * Invalid value. - * - * Generated from protobuf enum IMPACT_UNSPECIFIED = 0; - */ - const IMPACT_UNSPECIFIED = 0; - /** - * High impact. - * - * Generated from protobuf enum IMPACT_HIGH = 1; - */ - const IMPACT_HIGH = 1; - /** - * Low impact. - * - * Generated from protobuf enum IMPACT_LOW = 2; - */ - const IMPACT_LOW = 2; - /** - * No impact. - * - * Generated from protobuf enum IMPACT_NONE = 3; - */ - const IMPACT_NONE = 3; - - private static $valueToName = [ - self::IMPACT_UNSPECIFIED => 'IMPACT_UNSPECIFIED', - self::IMPACT_HIGH => 'IMPACT_HIGH', - self::IMPACT_LOW => 'IMPACT_LOW', - self::IMPACT_NONE => 'IMPACT_NONE', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Impact::class, \Google\Cloud\SecurityCenter\V1\Cvssv3_Impact::class); - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3/PrivilegesRequired.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3/PrivilegesRequired.php deleted file mode 100644 index 29fef4718691..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3/PrivilegesRequired.php +++ /dev/null @@ -1,79 +0,0 @@ -google.cloud.securitycenter.v1.Cvssv3.PrivilegesRequired - */ -class PrivilegesRequired -{ - /** - * Invalid value. - * - * Generated from protobuf enum PRIVILEGES_REQUIRED_UNSPECIFIED = 0; - */ - const PRIVILEGES_REQUIRED_UNSPECIFIED = 0; - /** - * The attacker is unauthorized prior to attack, and therefore does not - * require any access to settings or files of the vulnerable system to - * carry out an attack. - * - * Generated from protobuf enum PRIVILEGES_REQUIRED_NONE = 1; - */ - const PRIVILEGES_REQUIRED_NONE = 1; - /** - * The attacker requires privileges that provide basic user capabilities - * that could normally affect only settings and files owned by a user. - * Alternatively, an attacker with Low privileges has the ability to access - * only non-sensitive resources. - * - * Generated from protobuf enum PRIVILEGES_REQUIRED_LOW = 2; - */ - const PRIVILEGES_REQUIRED_LOW = 2; - /** - * The attacker requires privileges that provide significant (e.g., - * administrative) control over the vulnerable component allowing access to - * component-wide settings and files. - * - * Generated from protobuf enum PRIVILEGES_REQUIRED_HIGH = 3; - */ - const PRIVILEGES_REQUIRED_HIGH = 3; - - private static $valueToName = [ - self::PRIVILEGES_REQUIRED_UNSPECIFIED => 'PRIVILEGES_REQUIRED_UNSPECIFIED', - self::PRIVILEGES_REQUIRED_NONE => 'PRIVILEGES_REQUIRED_NONE', - self::PRIVILEGES_REQUIRED_LOW => 'PRIVILEGES_REQUIRED_LOW', - self::PRIVILEGES_REQUIRED_HIGH => 'PRIVILEGES_REQUIRED_HIGH', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PrivilegesRequired::class, \Google\Cloud\SecurityCenter\V1\Cvssv3_PrivilegesRequired::class); - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3/Scope.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3/Scope.php deleted file mode 100644 index cb0e08038f76..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3/Scope.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.securitycenter.v1.Cvssv3.Scope - */ -class Scope -{ - /** - * Invalid value. - * - * Generated from protobuf enum SCOPE_UNSPECIFIED = 0; - */ - const SCOPE_UNSPECIFIED = 0; - /** - * An exploited vulnerability can only affect resources managed by the same - * security authority. - * - * Generated from protobuf enum SCOPE_UNCHANGED = 1; - */ - const SCOPE_UNCHANGED = 1; - /** - * An exploited vulnerability can affect resources beyond the security scope - * managed by the security authority of the vulnerable component. - * - * Generated from protobuf enum SCOPE_CHANGED = 2; - */ - const SCOPE_CHANGED = 2; - - private static $valueToName = [ - self::SCOPE_UNSPECIFIED => 'SCOPE_UNSPECIFIED', - self::SCOPE_UNCHANGED => 'SCOPE_UNCHANGED', - self::SCOPE_CHANGED => 'SCOPE_CHANGED', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Scope::class, \Google\Cloud\SecurityCenter\V1\Cvssv3_Scope::class); - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3/UserInteraction.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3/UserInteraction.php deleted file mode 100644 index 305d85c574e2..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3/UserInteraction.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.securitycenter.v1.Cvssv3.UserInteraction - */ -class UserInteraction -{ - /** - * Invalid value. - * - * Generated from protobuf enum USER_INTERACTION_UNSPECIFIED = 0; - */ - const USER_INTERACTION_UNSPECIFIED = 0; - /** - * The vulnerable system can be exploited without interaction from any user. - * - * Generated from protobuf enum USER_INTERACTION_NONE = 1; - */ - const USER_INTERACTION_NONE = 1; - /** - * Successful exploitation of this vulnerability requires a user to take - * some action before the vulnerability can be exploited. - * - * Generated from protobuf enum USER_INTERACTION_REQUIRED = 2; - */ - const USER_INTERACTION_REQUIRED = 2; - - private static $valueToName = [ - self::USER_INTERACTION_UNSPECIFIED => 'USER_INTERACTION_UNSPECIFIED', - self::USER_INTERACTION_NONE => 'USER_INTERACTION_NONE', - self::USER_INTERACTION_REQUIRED => 'USER_INTERACTION_REQUIRED', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(UserInteraction::class, \Google\Cloud\SecurityCenter\V1\Cvssv3_UserInteraction::class); - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3_AttackComplexity.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3_AttackComplexity.php deleted file mode 100644 index 32b2fb731a06..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Cvssv3_AttackComplexity.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.securitycenter.v1.Database - */ -class Database extends \Google\Protobuf\Internal\Message -{ - /** - * The full resource name of the database the user connected to, if it is - * supported by CAI. (https://google.aip.dev/122#full-resource-names) - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The human readable name of the database the user connected to. - * - * Generated from protobuf field string display_name = 2; - */ - protected $display_name = ''; - /** - * The username used to connect to the DB. This may not necessarily be an IAM - * principal, and has no required format. - * - * Generated from protobuf field string user_name = 3; - */ - protected $user_name = ''; - /** - * The SQL statement associated with the relevant access. - * - * Generated from protobuf field string query = 4; - */ - protected $query = ''; - /** - * The target usernames/roles/groups of a SQL privilege grant (not an IAM - * policy change). - * - * Generated from protobuf field repeated string grantees = 5; - */ - private $grantees; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The full resource name of the database the user connected to, if it is - * supported by CAI. (https://google.aip.dev/122#full-resource-names) - * @type string $display_name - * The human readable name of the database the user connected to. - * @type string $user_name - * The username used to connect to the DB. This may not necessarily be an IAM - * principal, and has no required format. - * @type string $query - * The SQL statement associated with the relevant access. - * @type array|\Google\Protobuf\Internal\RepeatedField $grantees - * The target usernames/roles/groups of a SQL privilege grant (not an IAM - * policy change). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\Database::initOnce(); - parent::__construct($data); - } - - /** - * The full resource name of the database the user connected to, if it is - * supported by CAI. (https://google.aip.dev/122#full-resource-names) - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The full resource name of the database the user connected to, if it is - * supported by CAI. (https://google.aip.dev/122#full-resource-names) - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The human readable name of the database the user connected to. - * - * Generated from protobuf field string display_name = 2; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The human readable name of the database the user connected to. - * - * 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; - } - - /** - * The username used to connect to the DB. This may not necessarily be an IAM - * principal, and has no required format. - * - * Generated from protobuf field string user_name = 3; - * @return string - */ - public function getUserName() - { - return $this->user_name; - } - - /** - * The username used to connect to the DB. This may not necessarily be an IAM - * principal, and has no required format. - * - * Generated from protobuf field string user_name = 3; - * @param string $var - * @return $this - */ - public function setUserName($var) - { - GPBUtil::checkString($var, True); - $this->user_name = $var; - - return $this; - } - - /** - * The SQL statement associated with the relevant access. - * - * Generated from protobuf field string query = 4; - * @return string - */ - public function getQuery() - { - return $this->query; - } - - /** - * The SQL statement associated with the relevant access. - * - * Generated from protobuf field string query = 4; - * @param string $var - * @return $this - */ - public function setQuery($var) - { - GPBUtil::checkString($var, True); - $this->query = $var; - - return $this; - } - - /** - * The target usernames/roles/groups of a SQL privilege grant (not an IAM - * policy change). - * - * Generated from protobuf field repeated string grantees = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getGrantees() - { - return $this->grantees; - } - - /** - * The target usernames/roles/groups of a SQL privilege grant (not an IAM - * policy change). - * - * Generated from protobuf field repeated string grantees = 5; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setGrantees($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->grantees = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/DeleteBigQueryExportRequest.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/DeleteBigQueryExportRequest.php deleted file mode 100644 index 9df6b9fb5fd0..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/DeleteBigQueryExportRequest.php +++ /dev/null @@ -1,79 +0,0 @@ -google.cloud.securitycenter.v1.DeleteBigQueryExportRequest - */ -class DeleteBigQueryExportRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the BigQuery export to delete. Its format is - * organizations/{organization}/bigQueryExports/{export_id}, - * folders/{folder}/bigQueryExports/{export_id}, or - * projects/{project}/bigQueryExports/{export_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the BigQuery export to delete. Its format is - * organizations/{organization}/bigQueryExports/{export_id}, - * folders/{folder}/bigQueryExports/{export_id}, or - * projects/{project}/bigQueryExports/{export_id} - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the BigQuery export to delete. Its format is - * organizations/{organization}/bigQueryExports/{export_id}, - * folders/{folder}/bigQueryExports/{export_id}, or - * projects/{project}/bigQueryExports/{export_id} - * - * 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. The name of the BigQuery export to delete. Its format is - * organizations/{organization}/bigQueryExports/{export_id}, - * folders/{folder}/bigQueryExports/{export_id}, or - * projects/{project}/bigQueryExports/{export_id} - * - * 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/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/DeleteMuteConfigRequest.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/DeleteMuteConfigRequest.php deleted file mode 100644 index cd06fb629409..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/DeleteMuteConfigRequest.php +++ /dev/null @@ -1,79 +0,0 @@ -google.cloud.securitycenter.v1.DeleteMuteConfigRequest - */ -class DeleteMuteConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the mute config to delete. Its format is - * organizations/{organization}/muteConfigs/{config_id}, - * folders/{folder}/muteConfigs/{config_id}, or - * projects/{project}/muteConfigs/{config_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the mute config to delete. Its format is - * organizations/{organization}/muteConfigs/{config_id}, - * folders/{folder}/muteConfigs/{config_id}, or - * projects/{project}/muteConfigs/{config_id} - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the mute config to delete. Its format is - * organizations/{organization}/muteConfigs/{config_id}, - * folders/{folder}/muteConfigs/{config_id}, or - * projects/{project}/muteConfigs/{config_id} - * - * 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 mute config to delete. Its format is - * organizations/{organization}/muteConfigs/{config_id}, - * folders/{folder}/muteConfigs/{config_id}, or - * projects/{project}/muteConfigs/{config_id} - * - * 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/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/DeleteNotificationConfigRequest.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/DeleteNotificationConfigRequest.php deleted file mode 100644 index b679ff1f54f5..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/DeleteNotificationConfigRequest.php +++ /dev/null @@ -1,79 +0,0 @@ -google.cloud.securitycenter.v1.DeleteNotificationConfigRequest - */ -class DeleteNotificationConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the notification config to delete. Its format is - * "organizations/[organization_id]/notificationConfigs/[config_id]", - * "folders/[folder_id]/notificationConfigs/[config_id]", - * or "projects/[project_id]/notificationConfigs/[config_id]". - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the notification config to delete. Its format is - * "organizations/[organization_id]/notificationConfigs/[config_id]", - * "folders/[folder_id]/notificationConfigs/[config_id]", - * or "projects/[project_id]/notificationConfigs/[config_id]". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the notification config to delete. Its format is - * "organizations/[organization_id]/notificationConfigs/[config_id]", - * "folders/[folder_id]/notificationConfigs/[config_id]", - * or "projects/[project_id]/notificationConfigs/[config_id]". - * - * 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 notification config to delete. Its format is - * "organizations/[organization_id]/notificationConfigs/[config_id]", - * "folders/[folder_id]/notificationConfigs/[config_id]", - * or "projects/[project_id]/notificationConfigs/[config_id]". - * - * 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/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/EnvironmentVariable.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/EnvironmentVariable.php deleted file mode 100644 index 09288144cbc0..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/EnvironmentVariable.php +++ /dev/null @@ -1,102 +0,0 @@ -google.cloud.securitycenter.v1.EnvironmentVariable - */ -class EnvironmentVariable extends \Google\Protobuf\Internal\Message -{ - /** - * Environment variable name as a JSON encoded string. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Environment variable value as a JSON encoded string. - * - * Generated from protobuf field string val = 2; - */ - protected $val = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Environment variable name as a JSON encoded string. - * @type string $val - * Environment variable value as a JSON encoded string. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\Process::initOnce(); - parent::__construct($data); - } - - /** - * Environment variable name as a JSON encoded string. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Environment variable name as a JSON encoded string. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Environment variable value as a JSON encoded string. - * - * Generated from protobuf field string val = 2; - * @return string - */ - public function getVal() - { - return $this->val; - } - - /** - * Environment variable value as a JSON encoded string. - * - * Generated from protobuf field string val = 2; - * @param string $var - * @return $this - */ - public function setVal($var) - { - GPBUtil::checkString($var, True); - $this->val = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ExfilResource.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ExfilResource.php deleted file mode 100644 index f5d1d7cf4c2d..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ExfilResource.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.securitycenter.v1.ExfilResource - */ -class ExfilResource extends \Google\Protobuf\Internal\Message -{ - /** - * Resource's URI (https://google.aip.dev/122#full-resource-names) - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Subcomponents of the asset that is exfiltrated - these could be - * URIs used during exfiltration, table names, databases, filenames, etc. - * For example, multiple tables may be exfiltrated from the same CloudSQL - * instance, or multiple files from the same Cloud Storage bucket. - * - * Generated from protobuf field repeated string components = 2; - */ - private $components; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Resource's URI (https://google.aip.dev/122#full-resource-names) - * @type array|\Google\Protobuf\Internal\RepeatedField $components - * Subcomponents of the asset that is exfiltrated - these could be - * URIs used during exfiltration, table names, databases, filenames, etc. - * For example, multiple tables may be exfiltrated from the same CloudSQL - * instance, or multiple files from the same Cloud Storage bucket. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\Exfiltration::initOnce(); - parent::__construct($data); - } - - /** - * Resource's URI (https://google.aip.dev/122#full-resource-names) - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Resource's URI (https://google.aip.dev/122#full-resource-names) - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Subcomponents of the asset that is exfiltrated - these could be - * URIs used during exfiltration, table names, databases, filenames, etc. - * For example, multiple tables may be exfiltrated from the same CloudSQL - * instance, or multiple files from the same Cloud Storage bucket. - * - * Generated from protobuf field repeated string components = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getComponents() - { - return $this->components; - } - - /** - * Subcomponents of the asset that is exfiltrated - these could be - * URIs used during exfiltration, table names, databases, filenames, etc. - * For example, multiple tables may be exfiltrated from the same CloudSQL - * instance, or multiple files from the same Cloud Storage bucket. - * - * Generated from protobuf field repeated string components = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setComponents($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->components = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Exfiltration.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Exfiltration.php deleted file mode 100644 index 5d0e98e891a2..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Exfiltration.php +++ /dev/null @@ -1,116 +0,0 @@ -google.cloud.securitycenter.v1.Exfiltration - */ -class Exfiltration extends \Google\Protobuf\Internal\Message -{ - /** - * If there are multiple sources, then the data is considered "joined" between - * them. For instance, BigQuery can join multiple tables, and each - * table would be considered a source. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.ExfilResource sources = 1; - */ - private $sources; - /** - * If there are multiple targets, each target would get a complete copy of the - * "joined" source data. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.ExfilResource targets = 2; - */ - private $targets; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\SecurityCenter\V1\ExfilResource>|\Google\Protobuf\Internal\RepeatedField $sources - * If there are multiple sources, then the data is considered "joined" between - * them. For instance, BigQuery can join multiple tables, and each - * table would be considered a source. - * @type array<\Google\Cloud\SecurityCenter\V1\ExfilResource>|\Google\Protobuf\Internal\RepeatedField $targets - * If there are multiple targets, each target would get a complete copy of the - * "joined" source data. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\Exfiltration::initOnce(); - parent::__construct($data); - } - - /** - * If there are multiple sources, then the data is considered "joined" between - * them. For instance, BigQuery can join multiple tables, and each - * table would be considered a source. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.ExfilResource sources = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSources() - { - return $this->sources; - } - - /** - * If there are multiple sources, then the data is considered "joined" between - * them. For instance, BigQuery can join multiple tables, and each - * table would be considered a source. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.ExfilResource sources = 1; - * @param array<\Google\Cloud\SecurityCenter\V1\ExfilResource>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSources($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\ExfilResource::class); - $this->sources = $arr; - - return $this; - } - - /** - * If there are multiple targets, each target would get a complete copy of the - * "joined" source data. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.ExfilResource targets = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTargets() - { - return $this->targets; - } - - /** - * If there are multiple targets, each target would get a complete copy of the - * "joined" source data. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.ExfilResource targets = 2; - * @param array<\Google\Cloud\SecurityCenter\V1\ExfilResource>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTargets($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\ExfilResource::class); - $this->targets = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ExternalSystem.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ExternalSystem.php deleted file mode 100644 index 11100d7739ce..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ExternalSystem.php +++ /dev/null @@ -1,233 +0,0 @@ -google.cloud.securitycenter.v1.ExternalSystem - */ -class ExternalSystem extends \Google\Protobuf\Internal\Message -{ - /** - * Full resource name of the external system, for example: - * "organizations/1234/sources/5678/findings/123456/externalSystems/jira", - * "folders/1234/sources/5678/findings/123456/externalSystems/jira", - * "projects/1234/sources/5678/findings/123456/externalSystems/jira" - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * References primary/secondary etc assignees in the external system. - * - * Generated from protobuf field repeated string assignees = 2; - */ - private $assignees; - /** - * Identifier that's used to track the given finding in the external system. - * - * Generated from protobuf field string external_uid = 3; - */ - protected $external_uid = ''; - /** - * Most recent status of the corresponding finding's ticket/tracker in the - * external system. - * - * Generated from protobuf field string status = 4; - */ - protected $status = ''; - /** - * The most recent time when the corresponding finding's ticket/tracker was - * updated in the external system. - * - * Generated from protobuf field .google.protobuf.Timestamp external_system_update_time = 5; - */ - protected $external_system_update_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Full resource name of the external system, for example: - * "organizations/1234/sources/5678/findings/123456/externalSystems/jira", - * "folders/1234/sources/5678/findings/123456/externalSystems/jira", - * "projects/1234/sources/5678/findings/123456/externalSystems/jira" - * @type array|\Google\Protobuf\Internal\RepeatedField $assignees - * References primary/secondary etc assignees in the external system. - * @type string $external_uid - * Identifier that's used to track the given finding in the external system. - * @type string $status - * Most recent status of the corresponding finding's ticket/tracker in the - * external system. - * @type \Google\Protobuf\Timestamp $external_system_update_time - * The most recent time when the corresponding finding's ticket/tracker was - * updated in the external system. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\ExternalSystem::initOnce(); - parent::__construct($data); - } - - /** - * Full resource name of the external system, for example: - * "organizations/1234/sources/5678/findings/123456/externalSystems/jira", - * "folders/1234/sources/5678/findings/123456/externalSystems/jira", - * "projects/1234/sources/5678/findings/123456/externalSystems/jira" - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Full resource name of the external system, for example: - * "organizations/1234/sources/5678/findings/123456/externalSystems/jira", - * "folders/1234/sources/5678/findings/123456/externalSystems/jira", - * "projects/1234/sources/5678/findings/123456/externalSystems/jira" - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * References primary/secondary etc assignees in the external system. - * - * Generated from protobuf field repeated string assignees = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAssignees() - { - return $this->assignees; - } - - /** - * References primary/secondary etc assignees in the external system. - * - * Generated from protobuf field repeated string assignees = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAssignees($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->assignees = $arr; - - return $this; - } - - /** - * Identifier that's used to track the given finding in the external system. - * - * Generated from protobuf field string external_uid = 3; - * @return string - */ - public function getExternalUid() - { - return $this->external_uid; - } - - /** - * Identifier that's used to track the given finding in the external system. - * - * Generated from protobuf field string external_uid = 3; - * @param string $var - * @return $this - */ - public function setExternalUid($var) - { - GPBUtil::checkString($var, True); - $this->external_uid = $var; - - return $this; - } - - /** - * Most recent status of the corresponding finding's ticket/tracker in the - * external system. - * - * Generated from protobuf field string status = 4; - * @return string - */ - public function getStatus() - { - return $this->status; - } - - /** - * Most recent status of the corresponding finding's ticket/tracker in the - * external system. - * - * Generated from protobuf field string status = 4; - * @param string $var - * @return $this - */ - public function setStatus($var) - { - GPBUtil::checkString($var, True); - $this->status = $var; - - return $this; - } - - /** - * The most recent time when the corresponding finding's ticket/tracker was - * updated in the external system. - * - * Generated from protobuf field .google.protobuf.Timestamp external_system_update_time = 5; - * @return \Google\Protobuf\Timestamp|null - */ - public function getExternalSystemUpdateTime() - { - return $this->external_system_update_time; - } - - public function hasExternalSystemUpdateTime() - { - return isset($this->external_system_update_time); - } - - public function clearExternalSystemUpdateTime() - { - unset($this->external_system_update_time); - } - - /** - * The most recent time when the corresponding finding's ticket/tracker was - * updated in the external system. - * - * Generated from protobuf field .google.protobuf.Timestamp external_system_update_time = 5; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setExternalSystemUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->external_system_update_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/File.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/File.php deleted file mode 100644 index e1f6109f00a7..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/File.php +++ /dev/null @@ -1,258 +0,0 @@ -google.cloud.securitycenter.v1.File - */ -class File extends \Google\Protobuf\Internal\Message -{ - /** - * Absolute path of the file as a JSON encoded string. - * - * Generated from protobuf field string path = 1; - */ - protected $path = ''; - /** - * Size of the file in bytes. - * - * Generated from protobuf field int64 size = 2; - */ - protected $size = 0; - /** - * SHA256 hash of the first hashed_size bytes of the file encoded as a - * hex string. If hashed_size == size, sha256 represents the SHA256 hash - * of the entire file. - * - * Generated from protobuf field string sha256 = 3; - */ - protected $sha256 = ''; - /** - * The length in bytes of the file prefix that was hashed. If - * hashed_size == size, any hashes reported represent the entire - * file. - * - * Generated from protobuf field int64 hashed_size = 4; - */ - protected $hashed_size = 0; - /** - * True when the hash covers only a prefix of the file. - * - * Generated from protobuf field bool partially_hashed = 5; - */ - protected $partially_hashed = false; - /** - * Prefix of the file contents as a JSON encoded string. - * (Currently only populated for Malicious Script Executed findings.) - * - * Generated from protobuf field string contents = 6; - */ - protected $contents = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $path - * Absolute path of the file as a JSON encoded string. - * @type int|string $size - * Size of the file in bytes. - * @type string $sha256 - * SHA256 hash of the first hashed_size bytes of the file encoded as a - * hex string. If hashed_size == size, sha256 represents the SHA256 hash - * of the entire file. - * @type int|string $hashed_size - * The length in bytes of the file prefix that was hashed. If - * hashed_size == size, any hashes reported represent the entire - * file. - * @type bool $partially_hashed - * True when the hash covers only a prefix of the file. - * @type string $contents - * Prefix of the file contents as a JSON encoded string. - * (Currently only populated for Malicious Script Executed findings.) - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\File::initOnce(); - parent::__construct($data); - } - - /** - * Absolute path of the file as a JSON encoded string. - * - * Generated from protobuf field string path = 1; - * @return string - */ - public function getPath() - { - return $this->path; - } - - /** - * Absolute path of the file as a JSON encoded string. - * - * Generated from protobuf field string path = 1; - * @param string $var - * @return $this - */ - public function setPath($var) - { - GPBUtil::checkString($var, True); - $this->path = $var; - - return $this; - } - - /** - * Size of the file in bytes. - * - * Generated from protobuf field int64 size = 2; - * @return int|string - */ - public function getSize() - { - return $this->size; - } - - /** - * Size of the file in bytes. - * - * Generated from protobuf field int64 size = 2; - * @param int|string $var - * @return $this - */ - public function setSize($var) - { - GPBUtil::checkInt64($var); - $this->size = $var; - - return $this; - } - - /** - * SHA256 hash of the first hashed_size bytes of the file encoded as a - * hex string. If hashed_size == size, sha256 represents the SHA256 hash - * of the entire file. - * - * Generated from protobuf field string sha256 = 3; - * @return string - */ - public function getSha256() - { - return $this->sha256; - } - - /** - * SHA256 hash of the first hashed_size bytes of the file encoded as a - * hex string. If hashed_size == size, sha256 represents the SHA256 hash - * of the entire file. - * - * Generated from protobuf field string sha256 = 3; - * @param string $var - * @return $this - */ - public function setSha256($var) - { - GPBUtil::checkString($var, True); - $this->sha256 = $var; - - return $this; - } - - /** - * The length in bytes of the file prefix that was hashed. If - * hashed_size == size, any hashes reported represent the entire - * file. - * - * Generated from protobuf field int64 hashed_size = 4; - * @return int|string - */ - public function getHashedSize() - { - return $this->hashed_size; - } - - /** - * The length in bytes of the file prefix that was hashed. If - * hashed_size == size, any hashes reported represent the entire - * file. - * - * Generated from protobuf field int64 hashed_size = 4; - * @param int|string $var - * @return $this - */ - public function setHashedSize($var) - { - GPBUtil::checkInt64($var); - $this->hashed_size = $var; - - return $this; - } - - /** - * True when the hash covers only a prefix of the file. - * - * Generated from protobuf field bool partially_hashed = 5; - * @return bool - */ - public function getPartiallyHashed() - { - return $this->partially_hashed; - } - - /** - * True when the hash covers only a prefix of the file. - * - * Generated from protobuf field bool partially_hashed = 5; - * @param bool $var - * @return $this - */ - public function setPartiallyHashed($var) - { - GPBUtil::checkBool($var); - $this->partially_hashed = $var; - - return $this; - } - - /** - * Prefix of the file contents as a JSON encoded string. - * (Currently only populated for Malicious Script Executed findings.) - * - * Generated from protobuf field string contents = 6; - * @return string - */ - public function getContents() - { - return $this->contents; - } - - /** - * Prefix of the file contents as a JSON encoded string. - * (Currently only populated for Malicious Script Executed findings.) - * - * Generated from protobuf field string contents = 6; - * @param string $var - * @return $this - */ - public function setContents($var) - { - GPBUtil::checkString($var, True); - $this->contents = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Finding.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Finding.php deleted file mode 100644 index 25fedd9136c0..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Finding.php +++ /dev/null @@ -1,1608 +0,0 @@ -google.cloud.securitycenter.v1.Finding - */ -class Finding extends \Google\Protobuf\Internal\Message -{ - /** - * The relative resource name of this finding. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name - * Example: - * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}" - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The relative resource name of the source the finding belongs to. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name - * This field is immutable after creation time. - * For example: - * "organizations/{organization_id}/sources/{source_id}" - * - * Generated from protobuf field string parent = 2; - */ - protected $parent = ''; - /** - * For findings on Google Cloud resources, the full resource - * name of the Google Cloud resource this finding is for. See: - * https://cloud.google.com/apis/design/resource_names#full_resource_name - * When the finding is for a non-Google Cloud resource, the resourceName can - * be a customer or partner defined string. This field is immutable after - * creation time. - * - * Generated from protobuf field string resource_name = 3; - */ - protected $resource_name = ''; - /** - * The state of the finding. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Finding.State state = 4; - */ - protected $state = 0; - /** - * The additional taxonomy group within findings from a given source. - * This field is immutable after creation time. - * Example: "XSS_FLASH_INJECTION" - * - * Generated from protobuf field string category = 5; - */ - protected $category = ''; - /** - * The URI that, if available, points to a web page outside of Security - * Command Center where additional information about the finding can be found. - * This field is guaranteed to be either empty or a well formed URL. - * - * Generated from protobuf field string external_uri = 6; - */ - protected $external_uri = ''; - /** - * Source specific properties. These properties are managed by the source - * that writes the finding. The key names in the source_properties map must be - * between 1 and 255 characters, and must start with a letter and contain - * alphanumeric characters or underscores only. - * - * Generated from protobuf field map source_properties = 7; - */ - private $source_properties; - /** - * Output only. User specified security marks. These marks are entirely - * managed by the user and come from the SecurityMarks resource that belongs - * to the finding. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.SecurityMarks security_marks = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $security_marks = null; - /** - * The time the finding was first detected. If an existing finding is updated, - * then this is the time the update occurred. - * For example, if the finding represents an open firewall, this property - * captures the time the detector believes the firewall became open. The - * accuracy is determined by the detector. If the finding is later resolved, - * then this time reflects when the finding was resolved. This must not - * be set to a value greater than the current timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp event_time = 9; - */ - protected $event_time = null; - /** - * The time at which the finding was created in Security Command Center. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 10; - */ - protected $create_time = null; - /** - * The severity of the finding. This field is managed by the source that - * writes the finding. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Finding.Severity severity = 12; - */ - protected $severity = 0; - /** - * The canonical name of the finding. It's either - * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", - * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}" or - * "projects/{project_number}/sources/{source_id}/findings/{finding_id}", - * depending on the closest CRM ancestor of the resource associated with the - * finding. - * - * Generated from protobuf field string canonical_name = 14; - */ - protected $canonical_name = ''; - /** - * Indicates the mute state of a finding (either muted, unmuted - * or undefined). Unlike other attributes of a finding, a finding provider - * shouldn't set the value of mute. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Finding.Mute mute = 15; - */ - protected $mute = 0; - /** - * The class of the finding. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Finding.FindingClass finding_class = 17; - */ - protected $finding_class = 0; - /** - * Represents what's commonly known as an Indicator of compromise (IoC) in - * computer forensics. This is an artifact observed on a network or in an - * operating system that, with high confidence, indicates a computer - * intrusion. - * Reference: https://en.wikipedia.org/wiki/Indicator_of_compromise - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Indicator indicator = 18; - */ - protected $indicator = null; - /** - * Represents vulnerability-specific fields like CVE and CVS scores. - * CVE stands for Common Vulnerabilities and Exposures - * (https://cve.mitre.org/about/) - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Vulnerability vulnerability = 20; - */ - protected $vulnerability = null; - /** - * Output only. The most recent time this finding was muted or unmuted. - * - * Generated from protobuf field .google.protobuf.Timestamp mute_update_time = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $mute_update_time = null; - /** - * Output only. Third party SIEM/SOAR fields within SCC, contains external system - * information and external system finding fields. - * - * Generated from protobuf field map external_systems = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $external_systems; - /** - * MITRE ATT&CK tactics and techniques related to this finding. - * See: https://attack.mitre.org - * - * Generated from protobuf field .google.cloud.securitycenter.v1.MitreAttack mitre_attack = 25; - */ - protected $mitre_attack = null; - /** - * Access details associated to the Finding, such as more information on the - * caller, which method was accessed, from where, etc. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Access access = 26; - */ - protected $access = null; - /** - * Contains information about the IP connection associated with the finding. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Connection connections = 31; - */ - private $connections; - /** - * First known as mute_annotation. Records additional information about the - * mute operation e.g. mute config that muted the finding, user who muted the - * finding, etc. Unlike other attributes of a finding, a finding provider - * shouldn't set the value of mute. - * - * Generated from protobuf field string mute_initiator = 28; - */ - protected $mute_initiator = ''; - /** - * Represents operating system processes associated with the Finding. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Process processes = 30; - */ - private $processes; - /** - * Output only. Map containing the points of contact for the given finding. The key - * represents the type of contact, while the value contains a list of all the - * contacts that pertain. Please refer to: - * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories - * { - * "security": { - * "contacts": [ - * { - * "email": "person1@company.com" - * }, - * { - * "email": "person2@company.com" - * } - * ] - * } - * } - * - * Generated from protobuf field map contacts = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $contacts; - /** - * Contains compliance information for security standards associated to the - * finding. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Compliance compliances = 34; - */ - private $compliances; - /** - * Output only. The human readable display name of the finding source such as - * "Event Threat Detection" or "Security Health Analytics". - * - * Generated from protobuf field string parent_display_name = 36 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $parent_display_name = ''; - /** - * Contains more detail about the finding. - * - * Generated from protobuf field string description = 37; - */ - protected $description = ''; - /** - * Represents exfiltration associated with the Finding. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Exfiltration exfiltration = 38; - */ - protected $exfiltration = null; - /** - * Represents IAM bindings associated with the Finding. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.IamBinding iam_bindings = 39; - */ - private $iam_bindings; - /** - * Next steps associate to the finding. - * - * Generated from protobuf field string next_steps = 40; - */ - protected $next_steps = ''; - /** - * Containers associated with the finding. containers provides information - * for both Kubernetes and non-Kubernetes containers. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Container containers = 42; - */ - private $containers; - /** - * Kubernetes resources associated with the finding. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Kubernetes kubernetes = 43; - */ - protected $kubernetes = null; - /** - * Database associated with the finding. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Database database = 44; - */ - protected $database = null; - /** - * File associated with the finding. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.File files = 46; - */ - private $files; - /** - * Kernel Rootkit signature. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.KernelRootkit kernel_rootkit = 50; - */ - protected $kernel_rootkit = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The relative resource name of this finding. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name - * Example: - * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}" - * @type string $parent - * The relative resource name of the source the finding belongs to. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name - * This field is immutable after creation time. - * For example: - * "organizations/{organization_id}/sources/{source_id}" - * @type string $resource_name - * For findings on Google Cloud resources, the full resource - * name of the Google Cloud resource this finding is for. See: - * https://cloud.google.com/apis/design/resource_names#full_resource_name - * When the finding is for a non-Google Cloud resource, the resourceName can - * be a customer or partner defined string. This field is immutable after - * creation time. - * @type int $state - * The state of the finding. - * @type string $category - * The additional taxonomy group within findings from a given source. - * This field is immutable after creation time. - * Example: "XSS_FLASH_INJECTION" - * @type string $external_uri - * The URI that, if available, points to a web page outside of Security - * Command Center where additional information about the finding can be found. - * This field is guaranteed to be either empty or a well formed URL. - * @type array|\Google\Protobuf\Internal\MapField $source_properties - * Source specific properties. These properties are managed by the source - * that writes the finding. The key names in the source_properties map must be - * between 1 and 255 characters, and must start with a letter and contain - * alphanumeric characters or underscores only. - * @type \Google\Cloud\SecurityCenter\V1\SecurityMarks $security_marks - * Output only. User specified security marks. These marks are entirely - * managed by the user and come from the SecurityMarks resource that belongs - * to the finding. - * @type \Google\Protobuf\Timestamp $event_time - * The time the finding was first detected. If an existing finding is updated, - * then this is the time the update occurred. - * For example, if the finding represents an open firewall, this property - * captures the time the detector believes the firewall became open. The - * accuracy is determined by the detector. If the finding is later resolved, - * then this time reflects when the finding was resolved. This must not - * be set to a value greater than the current timestamp. - * @type \Google\Protobuf\Timestamp $create_time - * The time at which the finding was created in Security Command Center. - * @type int $severity - * The severity of the finding. This field is managed by the source that - * writes the finding. - * @type string $canonical_name - * The canonical name of the finding. It's either - * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", - * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}" or - * "projects/{project_number}/sources/{source_id}/findings/{finding_id}", - * depending on the closest CRM ancestor of the resource associated with the - * finding. - * @type int $mute - * Indicates the mute state of a finding (either muted, unmuted - * or undefined). Unlike other attributes of a finding, a finding provider - * shouldn't set the value of mute. - * @type int $finding_class - * The class of the finding. - * @type \Google\Cloud\SecurityCenter\V1\Indicator $indicator - * Represents what's commonly known as an Indicator of compromise (IoC) in - * computer forensics. This is an artifact observed on a network or in an - * operating system that, with high confidence, indicates a computer - * intrusion. - * Reference: https://en.wikipedia.org/wiki/Indicator_of_compromise - * @type \Google\Cloud\SecurityCenter\V1\Vulnerability $vulnerability - * Represents vulnerability-specific fields like CVE and CVS scores. - * CVE stands for Common Vulnerabilities and Exposures - * (https://cve.mitre.org/about/) - * @type \Google\Protobuf\Timestamp $mute_update_time - * Output only. The most recent time this finding was muted or unmuted. - * @type array|\Google\Protobuf\Internal\MapField $external_systems - * Output only. Third party SIEM/SOAR fields within SCC, contains external system - * information and external system finding fields. - * @type \Google\Cloud\SecurityCenter\V1\MitreAttack $mitre_attack - * MITRE ATT&CK tactics and techniques related to this finding. - * See: https://attack.mitre.org - * @type \Google\Cloud\SecurityCenter\V1\Access $access - * Access details associated to the Finding, such as more information on the - * caller, which method was accessed, from where, etc. - * @type array<\Google\Cloud\SecurityCenter\V1\Connection>|\Google\Protobuf\Internal\RepeatedField $connections - * Contains information about the IP connection associated with the finding. - * @type string $mute_initiator - * First known as mute_annotation. Records additional information about the - * mute operation e.g. mute config that muted the finding, user who muted the - * finding, etc. Unlike other attributes of a finding, a finding provider - * shouldn't set the value of mute. - * @type array<\Google\Cloud\SecurityCenter\V1\Process>|\Google\Protobuf\Internal\RepeatedField $processes - * Represents operating system processes associated with the Finding. - * @type array|\Google\Protobuf\Internal\MapField $contacts - * Output only. Map containing the points of contact for the given finding. The key - * represents the type of contact, while the value contains a list of all the - * contacts that pertain. Please refer to: - * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories - * { - * "security": { - * "contacts": [ - * { - * "email": "person1@company.com" - * }, - * { - * "email": "person2@company.com" - * } - * ] - * } - * } - * @type array<\Google\Cloud\SecurityCenter\V1\Compliance>|\Google\Protobuf\Internal\RepeatedField $compliances - * Contains compliance information for security standards associated to the - * finding. - * @type string $parent_display_name - * Output only. The human readable display name of the finding source such as - * "Event Threat Detection" or "Security Health Analytics". - * @type string $description - * Contains more detail about the finding. - * @type \Google\Cloud\SecurityCenter\V1\Exfiltration $exfiltration - * Represents exfiltration associated with the Finding. - * @type array<\Google\Cloud\SecurityCenter\V1\IamBinding>|\Google\Protobuf\Internal\RepeatedField $iam_bindings - * Represents IAM bindings associated with the Finding. - * @type string $next_steps - * Next steps associate to the finding. - * @type array<\Google\Cloud\SecurityCenter\V1\Container>|\Google\Protobuf\Internal\RepeatedField $containers - * Containers associated with the finding. containers provides information - * for both Kubernetes and non-Kubernetes containers. - * @type \Google\Cloud\SecurityCenter\V1\Kubernetes $kubernetes - * Kubernetes resources associated with the finding. - * @type \Google\Cloud\SecurityCenter\V1\Database $database - * Database associated with the finding. - * @type array<\Google\Cloud\SecurityCenter\V1\File>|\Google\Protobuf\Internal\RepeatedField $files - * File associated with the finding. - * @type \Google\Cloud\SecurityCenter\V1\KernelRootkit $kernel_rootkit - * Kernel Rootkit signature. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\Finding::initOnce(); - parent::__construct($data); - } - - /** - * The relative resource name of this finding. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name - * Example: - * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}" - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The relative resource name of this finding. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name - * Example: - * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}" - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The relative resource name of the source the finding belongs to. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name - * This field is immutable after creation time. - * For example: - * "organizations/{organization_id}/sources/{source_id}" - * - * Generated from protobuf field string parent = 2; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * The relative resource name of the source the finding belongs to. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name - * This field is immutable after creation time. - * For example: - * "organizations/{organization_id}/sources/{source_id}" - * - * Generated from protobuf field string parent = 2; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * For findings on Google Cloud resources, the full resource - * name of the Google Cloud resource this finding is for. See: - * https://cloud.google.com/apis/design/resource_names#full_resource_name - * When the finding is for a non-Google Cloud resource, the resourceName can - * be a customer or partner defined string. This field is immutable after - * creation time. - * - * Generated from protobuf field string resource_name = 3; - * @return string - */ - public function getResourceName() - { - return $this->resource_name; - } - - /** - * For findings on Google Cloud resources, the full resource - * name of the Google Cloud resource this finding is for. See: - * https://cloud.google.com/apis/design/resource_names#full_resource_name - * When the finding is for a non-Google Cloud resource, the resourceName can - * be a customer or partner defined string. This field is immutable after - * creation time. - * - * Generated from protobuf field string resource_name = 3; - * @param string $var - * @return $this - */ - public function setResourceName($var) - { - GPBUtil::checkString($var, True); - $this->resource_name = $var; - - return $this; - } - - /** - * The state of the finding. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Finding.State state = 4; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The state of the finding. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Finding.State state = 4; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1\Finding\State::class); - $this->state = $var; - - return $this; - } - - /** - * The additional taxonomy group within findings from a given source. - * This field is immutable after creation time. - * Example: "XSS_FLASH_INJECTION" - * - * Generated from protobuf field string category = 5; - * @return string - */ - public function getCategory() - { - return $this->category; - } - - /** - * The additional taxonomy group within findings from a given source. - * This field is immutable after creation time. - * Example: "XSS_FLASH_INJECTION" - * - * Generated from protobuf field string category = 5; - * @param string $var - * @return $this - */ - public function setCategory($var) - { - GPBUtil::checkString($var, True); - $this->category = $var; - - return $this; - } - - /** - * The URI that, if available, points to a web page outside of Security - * Command Center where additional information about the finding can be found. - * This field is guaranteed to be either empty or a well formed URL. - * - * Generated from protobuf field string external_uri = 6; - * @return string - */ - public function getExternalUri() - { - return $this->external_uri; - } - - /** - * The URI that, if available, points to a web page outside of Security - * Command Center where additional information about the finding can be found. - * This field is guaranteed to be either empty or a well formed URL. - * - * Generated from protobuf field string external_uri = 6; - * @param string $var - * @return $this - */ - public function setExternalUri($var) - { - GPBUtil::checkString($var, True); - $this->external_uri = $var; - - return $this; - } - - /** - * Source specific properties. These properties are managed by the source - * that writes the finding. The key names in the source_properties map must be - * between 1 and 255 characters, and must start with a letter and contain - * alphanumeric characters or underscores only. - * - * Generated from protobuf field map source_properties = 7; - * @return \Google\Protobuf\Internal\MapField - */ - public function getSourceProperties() - { - return $this->source_properties; - } - - /** - * Source specific properties. These properties are managed by the source - * that writes the finding. The key names in the source_properties map must be - * between 1 and 255 characters, and must start with a letter and contain - * alphanumeric characters or underscores only. - * - * Generated from protobuf field map source_properties = 7; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setSourceProperties($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Value::class); - $this->source_properties = $arr; - - return $this; - } - - /** - * Output only. User specified security marks. These marks are entirely - * managed by the user and come from the SecurityMarks resource that belongs - * to the finding. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.SecurityMarks security_marks = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\SecurityCenter\V1\SecurityMarks|null - */ - public function getSecurityMarks() - { - return $this->security_marks; - } - - public function hasSecurityMarks() - { - return isset($this->security_marks); - } - - public function clearSecurityMarks() - { - unset($this->security_marks); - } - - /** - * Output only. User specified security marks. These marks are entirely - * managed by the user and come from the SecurityMarks resource that belongs - * to the finding. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.SecurityMarks security_marks = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\SecurityCenter\V1\SecurityMarks $var - * @return $this - */ - public function setSecurityMarks($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\SecurityMarks::class); - $this->security_marks = $var; - - return $this; - } - - /** - * The time the finding was first detected. If an existing finding is updated, - * then this is the time the update occurred. - * For example, if the finding represents an open firewall, this property - * captures the time the detector believes the firewall became open. The - * accuracy is determined by the detector. If the finding is later resolved, - * then this time reflects when the finding was resolved. This must not - * be set to a value greater than the current timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp event_time = 9; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEventTime() - { - return $this->event_time; - } - - public function hasEventTime() - { - return isset($this->event_time); - } - - public function clearEventTime() - { - unset($this->event_time); - } - - /** - * The time the finding was first detected. If an existing finding is updated, - * then this is the time the update occurred. - * For example, if the finding represents an open firewall, this property - * captures the time the detector believes the firewall became open. The - * accuracy is determined by the detector. If the finding is later resolved, - * then this time reflects when the finding was resolved. This must not - * be set to a value greater than the current timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp event_time = 9; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEventTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->event_time = $var; - - return $this; - } - - /** - * The time at which the finding was created in Security Command Center. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 10; - * @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); - } - - /** - * The time at which the finding was created in Security Command Center. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 10; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * The severity of the finding. This field is managed by the source that - * writes the finding. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Finding.Severity severity = 12; - * @return int - */ - public function getSeverity() - { - return $this->severity; - } - - /** - * The severity of the finding. This field is managed by the source that - * writes the finding. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Finding.Severity severity = 12; - * @param int $var - * @return $this - */ - public function setSeverity($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1\Finding\Severity::class); - $this->severity = $var; - - return $this; - } - - /** - * The canonical name of the finding. It's either - * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", - * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}" or - * "projects/{project_number}/sources/{source_id}/findings/{finding_id}", - * depending on the closest CRM ancestor of the resource associated with the - * finding. - * - * Generated from protobuf field string canonical_name = 14; - * @return string - */ - public function getCanonicalName() - { - return $this->canonical_name; - } - - /** - * The canonical name of the finding. It's either - * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", - * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}" or - * "projects/{project_number}/sources/{source_id}/findings/{finding_id}", - * depending on the closest CRM ancestor of the resource associated with the - * finding. - * - * Generated from protobuf field string canonical_name = 14; - * @param string $var - * @return $this - */ - public function setCanonicalName($var) - { - GPBUtil::checkString($var, True); - $this->canonical_name = $var; - - return $this; - } - - /** - * Indicates the mute state of a finding (either muted, unmuted - * or undefined). Unlike other attributes of a finding, a finding provider - * shouldn't set the value of mute. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Finding.Mute mute = 15; - * @return int - */ - public function getMute() - { - return $this->mute; - } - - /** - * Indicates the mute state of a finding (either muted, unmuted - * or undefined). Unlike other attributes of a finding, a finding provider - * shouldn't set the value of mute. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Finding.Mute mute = 15; - * @param int $var - * @return $this - */ - public function setMute($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1\Finding\Mute::class); - $this->mute = $var; - - return $this; - } - - /** - * The class of the finding. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Finding.FindingClass finding_class = 17; - * @return int - */ - public function getFindingClass() - { - return $this->finding_class; - } - - /** - * The class of the finding. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Finding.FindingClass finding_class = 17; - * @param int $var - * @return $this - */ - public function setFindingClass($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1\Finding\FindingClass::class); - $this->finding_class = $var; - - return $this; - } - - /** - * Represents what's commonly known as an Indicator of compromise (IoC) in - * computer forensics. This is an artifact observed on a network or in an - * operating system that, with high confidence, indicates a computer - * intrusion. - * Reference: https://en.wikipedia.org/wiki/Indicator_of_compromise - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Indicator indicator = 18; - * @return \Google\Cloud\SecurityCenter\V1\Indicator|null - */ - public function getIndicator() - { - return $this->indicator; - } - - public function hasIndicator() - { - return isset($this->indicator); - } - - public function clearIndicator() - { - unset($this->indicator); - } - - /** - * Represents what's commonly known as an Indicator of compromise (IoC) in - * computer forensics. This is an artifact observed on a network or in an - * operating system that, with high confidence, indicates a computer - * intrusion. - * Reference: https://en.wikipedia.org/wiki/Indicator_of_compromise - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Indicator indicator = 18; - * @param \Google\Cloud\SecurityCenter\V1\Indicator $var - * @return $this - */ - public function setIndicator($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\Indicator::class); - $this->indicator = $var; - - return $this; - } - - /** - * Represents vulnerability-specific fields like CVE and CVS scores. - * CVE stands for Common Vulnerabilities and Exposures - * (https://cve.mitre.org/about/) - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Vulnerability vulnerability = 20; - * @return \Google\Cloud\SecurityCenter\V1\Vulnerability|null - */ - public function getVulnerability() - { - return $this->vulnerability; - } - - public function hasVulnerability() - { - return isset($this->vulnerability); - } - - public function clearVulnerability() - { - unset($this->vulnerability); - } - - /** - * Represents vulnerability-specific fields like CVE and CVS scores. - * CVE stands for Common Vulnerabilities and Exposures - * (https://cve.mitre.org/about/) - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Vulnerability vulnerability = 20; - * @param \Google\Cloud\SecurityCenter\V1\Vulnerability $var - * @return $this - */ - public function setVulnerability($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\Vulnerability::class); - $this->vulnerability = $var; - - return $this; - } - - /** - * Output only. The most recent time this finding was muted or unmuted. - * - * Generated from protobuf field .google.protobuf.Timestamp mute_update_time = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getMuteUpdateTime() - { - return $this->mute_update_time; - } - - public function hasMuteUpdateTime() - { - return isset($this->mute_update_time); - } - - public function clearMuteUpdateTime() - { - unset($this->mute_update_time); - } - - /** - * Output only. The most recent time this finding was muted or unmuted. - * - * Generated from protobuf field .google.protobuf.Timestamp mute_update_time = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setMuteUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->mute_update_time = $var; - - return $this; - } - - /** - * Output only. Third party SIEM/SOAR fields within SCC, contains external system - * information and external system finding fields. - * - * Generated from protobuf field map external_systems = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getExternalSystems() - { - return $this->external_systems; - } - - /** - * Output only. Third party SIEM/SOAR fields within SCC, contains external system - * information and external system finding fields. - * - * Generated from protobuf field map external_systems = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setExternalSystems($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\ExternalSystem::class); - $this->external_systems = $arr; - - return $this; - } - - /** - * MITRE ATT&CK tactics and techniques related to this finding. - * See: https://attack.mitre.org - * - * Generated from protobuf field .google.cloud.securitycenter.v1.MitreAttack mitre_attack = 25; - * @return \Google\Cloud\SecurityCenter\V1\MitreAttack|null - */ - public function getMitreAttack() - { - return $this->mitre_attack; - } - - public function hasMitreAttack() - { - return isset($this->mitre_attack); - } - - public function clearMitreAttack() - { - unset($this->mitre_attack); - } - - /** - * MITRE ATT&CK tactics and techniques related to this finding. - * See: https://attack.mitre.org - * - * Generated from protobuf field .google.cloud.securitycenter.v1.MitreAttack mitre_attack = 25; - * @param \Google\Cloud\SecurityCenter\V1\MitreAttack $var - * @return $this - */ - public function setMitreAttack($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\MitreAttack::class); - $this->mitre_attack = $var; - - return $this; - } - - /** - * Access details associated to the Finding, such as more information on the - * caller, which method was accessed, from where, etc. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Access access = 26; - * @return \Google\Cloud\SecurityCenter\V1\Access|null - */ - public function getAccess() - { - return $this->access; - } - - public function hasAccess() - { - return isset($this->access); - } - - public function clearAccess() - { - unset($this->access); - } - - /** - * Access details associated to the Finding, such as more information on the - * caller, which method was accessed, from where, etc. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Access access = 26; - * @param \Google\Cloud\SecurityCenter\V1\Access $var - * @return $this - */ - public function setAccess($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\Access::class); - $this->access = $var; - - return $this; - } - - /** - * Contains information about the IP connection associated with the finding. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Connection connections = 31; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getConnections() - { - return $this->connections; - } - - /** - * Contains information about the IP connection associated with the finding. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Connection connections = 31; - * @param array<\Google\Cloud\SecurityCenter\V1\Connection>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setConnections($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\Connection::class); - $this->connections = $arr; - - return $this; - } - - /** - * First known as mute_annotation. Records additional information about the - * mute operation e.g. mute config that muted the finding, user who muted the - * finding, etc. Unlike other attributes of a finding, a finding provider - * shouldn't set the value of mute. - * - * Generated from protobuf field string mute_initiator = 28; - * @return string - */ - public function getMuteInitiator() - { - return $this->mute_initiator; - } - - /** - * First known as mute_annotation. Records additional information about the - * mute operation e.g. mute config that muted the finding, user who muted the - * finding, etc. Unlike other attributes of a finding, a finding provider - * shouldn't set the value of mute. - * - * Generated from protobuf field string mute_initiator = 28; - * @param string $var - * @return $this - */ - public function setMuteInitiator($var) - { - GPBUtil::checkString($var, True); - $this->mute_initiator = $var; - - return $this; - } - - /** - * Represents operating system processes associated with the Finding. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Process processes = 30; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getProcesses() - { - return $this->processes; - } - - /** - * Represents operating system processes associated with the Finding. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Process processes = 30; - * @param array<\Google\Cloud\SecurityCenter\V1\Process>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setProcesses($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\Process::class); - $this->processes = $arr; - - return $this; - } - - /** - * Output only. Map containing the points of contact for the given finding. The key - * represents the type of contact, while the value contains a list of all the - * contacts that pertain. Please refer to: - * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories - * { - * "security": { - * "contacts": [ - * { - * "email": "person1@company.com" - * }, - * { - * "email": "person2@company.com" - * } - * ] - * } - * } - * - * Generated from protobuf field map contacts = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getContacts() - { - return $this->contacts; - } - - /** - * Output only. Map containing the points of contact for the given finding. The key - * represents the type of contact, while the value contains a list of all the - * contacts that pertain. Please refer to: - * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories - * { - * "security": { - * "contacts": [ - * { - * "email": "person1@company.com" - * }, - * { - * "email": "person2@company.com" - * } - * ] - * } - * } - * - * Generated from protobuf field map contacts = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setContacts($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\ContactDetails::class); - $this->contacts = $arr; - - return $this; - } - - /** - * Contains compliance information for security standards associated to the - * finding. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Compliance compliances = 34; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCompliances() - { - return $this->compliances; - } - - /** - * Contains compliance information for security standards associated to the - * finding. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Compliance compliances = 34; - * @param array<\Google\Cloud\SecurityCenter\V1\Compliance>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCompliances($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\Compliance::class); - $this->compliances = $arr; - - return $this; - } - - /** - * Output only. The human readable display name of the finding source such as - * "Event Threat Detection" or "Security Health Analytics". - * - * Generated from protobuf field string parent_display_name = 36 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getParentDisplayName() - { - return $this->parent_display_name; - } - - /** - * Output only. The human readable display name of the finding source such as - * "Event Threat Detection" or "Security Health Analytics". - * - * Generated from protobuf field string parent_display_name = 36 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setParentDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->parent_display_name = $var; - - return $this; - } - - /** - * Contains more detail about the finding. - * - * Generated from protobuf field string description = 37; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Contains more detail about the finding. - * - * Generated from protobuf field string description = 37; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Represents exfiltration associated with the Finding. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Exfiltration exfiltration = 38; - * @return \Google\Cloud\SecurityCenter\V1\Exfiltration|null - */ - public function getExfiltration() - { - return $this->exfiltration; - } - - public function hasExfiltration() - { - return isset($this->exfiltration); - } - - public function clearExfiltration() - { - unset($this->exfiltration); - } - - /** - * Represents exfiltration associated with the Finding. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Exfiltration exfiltration = 38; - * @param \Google\Cloud\SecurityCenter\V1\Exfiltration $var - * @return $this - */ - public function setExfiltration($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\Exfiltration::class); - $this->exfiltration = $var; - - return $this; - } - - /** - * Represents IAM bindings associated with the Finding. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.IamBinding iam_bindings = 39; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getIamBindings() - { - return $this->iam_bindings; - } - - /** - * Represents IAM bindings associated with the Finding. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.IamBinding iam_bindings = 39; - * @param array<\Google\Cloud\SecurityCenter\V1\IamBinding>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setIamBindings($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\IamBinding::class); - $this->iam_bindings = $arr; - - return $this; - } - - /** - * Next steps associate to the finding. - * - * Generated from protobuf field string next_steps = 40; - * @return string - */ - public function getNextSteps() - { - return $this->next_steps; - } - - /** - * Next steps associate to the finding. - * - * Generated from protobuf field string next_steps = 40; - * @param string $var - * @return $this - */ - public function setNextSteps($var) - { - GPBUtil::checkString($var, True); - $this->next_steps = $var; - - return $this; - } - - /** - * Containers associated with the finding. containers provides information - * for both Kubernetes and non-Kubernetes containers. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Container containers = 42; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getContainers() - { - return $this->containers; - } - - /** - * Containers associated with the finding. containers provides information - * for both Kubernetes and non-Kubernetes containers. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Container containers = 42; - * @param array<\Google\Cloud\SecurityCenter\V1\Container>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setContainers($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\Container::class); - $this->containers = $arr; - - return $this; - } - - /** - * Kubernetes resources associated with the finding. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Kubernetes kubernetes = 43; - * @return \Google\Cloud\SecurityCenter\V1\Kubernetes|null - */ - public function getKubernetes() - { - return $this->kubernetes; - } - - public function hasKubernetes() - { - return isset($this->kubernetes); - } - - public function clearKubernetes() - { - unset($this->kubernetes); - } - - /** - * Kubernetes resources associated with the finding. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Kubernetes kubernetes = 43; - * @param \Google\Cloud\SecurityCenter\V1\Kubernetes $var - * @return $this - */ - public function setKubernetes($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\Kubernetes::class); - $this->kubernetes = $var; - - return $this; - } - - /** - * Database associated with the finding. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Database database = 44; - * @return \Google\Cloud\SecurityCenter\V1\Database|null - */ - public function getDatabase() - { - return $this->database; - } - - public function hasDatabase() - { - return isset($this->database); - } - - public function clearDatabase() - { - unset($this->database); - } - - /** - * Database associated with the finding. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Database database = 44; - * @param \Google\Cloud\SecurityCenter\V1\Database $var - * @return $this - */ - public function setDatabase($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\Database::class); - $this->database = $var; - - return $this; - } - - /** - * File associated with the finding. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.File files = 46; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFiles() - { - return $this->files; - } - - /** - * File associated with the finding. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.File files = 46; - * @param array<\Google\Cloud\SecurityCenter\V1\File>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFiles($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\File::class); - $this->files = $arr; - - return $this; - } - - /** - * Kernel Rootkit signature. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.KernelRootkit kernel_rootkit = 50; - * @return \Google\Cloud\SecurityCenter\V1\KernelRootkit|null - */ - public function getKernelRootkit() - { - return $this->kernel_rootkit; - } - - public function hasKernelRootkit() - { - return isset($this->kernel_rootkit); - } - - public function clearKernelRootkit() - { - unset($this->kernel_rootkit); - } - - /** - * Kernel Rootkit signature. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.KernelRootkit kernel_rootkit = 50; - * @param \Google\Cloud\SecurityCenter\V1\KernelRootkit $var - * @return $this - */ - public function setKernelRootkit($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\KernelRootkit::class); - $this->kernel_rootkit = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Finding/FindingClass.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Finding/FindingClass.php deleted file mode 100644 index c931f5f2d966..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Finding/FindingClass.php +++ /dev/null @@ -1,87 +0,0 @@ -google.cloud.securitycenter.v1.Finding.FindingClass - */ -class FindingClass -{ - /** - * Unspecified finding class. - * - * Generated from protobuf enum FINDING_CLASS_UNSPECIFIED = 0; - */ - const FINDING_CLASS_UNSPECIFIED = 0; - /** - * Describes unwanted or malicious activity. - * - * Generated from protobuf enum THREAT = 1; - */ - const THREAT = 1; - /** - * Describes a potential weakness in software that increases risk to - * Confidentiality & Integrity & Availability. - * - * Generated from protobuf enum VULNERABILITY = 2; - */ - const VULNERABILITY = 2; - /** - * Describes a potential weakness in cloud resource/asset configuration that - * increases risk. - * - * Generated from protobuf enum MISCONFIGURATION = 3; - */ - const MISCONFIGURATION = 3; - /** - * Describes a security observation that is for informational purposes. - * - * Generated from protobuf enum OBSERVATION = 4; - */ - const OBSERVATION = 4; - /** - * Describes an error that prevents some SCC functionality. - * - * Generated from protobuf enum SCC_ERROR = 5; - */ - const SCC_ERROR = 5; - - private static $valueToName = [ - self::FINDING_CLASS_UNSPECIFIED => 'FINDING_CLASS_UNSPECIFIED', - self::THREAT => 'THREAT', - self::VULNERABILITY => 'VULNERABILITY', - self::MISCONFIGURATION => 'MISCONFIGURATION', - self::OBSERVATION => 'OBSERVATION', - self::SCC_ERROR => 'SCC_ERROR', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(FindingClass::class, \Google\Cloud\SecurityCenter\V1\Finding_FindingClass::class); - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Finding/Mute.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Finding/Mute.php deleted file mode 100644 index 8e7576dc4a0e..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Finding/Mute.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.securitycenter.v1.Finding.Mute - */ -class Mute -{ - /** - * Unspecified. - * - * Generated from protobuf enum MUTE_UNSPECIFIED = 0; - */ - const MUTE_UNSPECIFIED = 0; - /** - * Finding has been muted. - * - * Generated from protobuf enum MUTED = 1; - */ - const MUTED = 1; - /** - * Finding has been unmuted. - * - * Generated from protobuf enum UNMUTED = 2; - */ - const UNMUTED = 2; - /** - * Finding has never been muted/unmuted. - * - * Generated from protobuf enum UNDEFINED = 4; - */ - const UNDEFINED = 4; - - private static $valueToName = [ - self::MUTE_UNSPECIFIED => 'MUTE_UNSPECIFIED', - self::MUTED => 'MUTED', - self::UNMUTED => 'UNMUTED', - self::UNDEFINED => 'UNDEFINED', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Mute::class, \Google\Cloud\SecurityCenter\V1\Finding_Mute::class); - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Finding/Severity.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Finding/Severity.php deleted file mode 100644 index 846f6d355b7c..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Finding/Severity.php +++ /dev/null @@ -1,115 +0,0 @@ -google.cloud.securitycenter.v1.Finding.Severity - */ -class Severity -{ - /** - * This value is used for findings when a source doesn't write a severity - * value. - * - * Generated from protobuf enum SEVERITY_UNSPECIFIED = 0; - */ - const SEVERITY_UNSPECIFIED = 0; - /** - * Vulnerability: - * A critical vulnerability is easily discoverable by an external actor, - * exploitable, and results in the direct ability to execute arbitrary code, - * exfiltrate data, and otherwise gain additional access and privileges to - * cloud resources and workloads. Examples include publicly accessible - * unprotected user data, public SSH access with weak or no passwords, etc. - * Threat: - * Indicates a threat that is able to access, modify, or delete data or - * execute unauthorized code within existing resources. - * - * Generated from protobuf enum CRITICAL = 1; - */ - const CRITICAL = 1; - /** - * Vulnerability: - * A high risk vulnerability can be easily discovered and exploited in - * combination with other vulnerabilities in order to gain direct access and - * the ability to execute arbitrary code, exfiltrate data, and otherwise - * gain additional access and privileges to cloud resources and workloads. - * An example is a database with weak or no passwords that is only - * accessible internally. This database could easily be compromised by an - * actor that had access to the internal network. - * Threat: - * Indicates a threat that is able to create new computational resources in - * an environment but not able to access data or execute code in existing - * resources. - * - * Generated from protobuf enum HIGH = 2; - */ - const HIGH = 2; - /** - * Vulnerability: - * A medium risk vulnerability could be used by an actor to gain access to - * resources or privileges that enable them to eventually (through multiple - * steps or a complex exploit) gain access and the ability to execute - * arbitrary code or exfiltrate data. An example is a service account with - * access to more projects than it should have. If an actor gains access to - * the service account, they could potentially use that access to manipulate - * a project the service account was not intended to. - * Threat: - * Indicates a threat that is able to cause operational impact but may not - * access data or execute unauthorized code. - * - * Generated from protobuf enum MEDIUM = 3; - */ - const MEDIUM = 3; - /** - * Vulnerability: - * A low risk vulnerability hampers a security organization's ability to - * detect vulnerabilities or active threats in their deployment, or prevents - * the root cause investigation of security issues. An example is monitoring - * and logs being disabled for resource configurations and access. - * Threat: - * Indicates a threat that has obtained minimal access to an environment but - * is not able to access data, execute code, or create resources. - * - * Generated from protobuf enum LOW = 4; - */ - const LOW = 4; - - private static $valueToName = [ - self::SEVERITY_UNSPECIFIED => 'SEVERITY_UNSPECIFIED', - self::CRITICAL => 'CRITICAL', - self::HIGH => 'HIGH', - self::MEDIUM => 'MEDIUM', - self::LOW => 'LOW', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Severity::class, \Google\Cloud\SecurityCenter\V1\Finding_Severity::class); - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Finding/State.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Finding/State.php deleted file mode 100644 index c1d5b5aa3bf5..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Finding/State.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.securitycenter.v1.Finding.State - */ -class State -{ - /** - * Unspecified state. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The finding requires attention and has not been addressed yet. - * - * Generated from protobuf enum ACTIVE = 1; - */ - const ACTIVE = 1; - /** - * The finding has been fixed, triaged as a non-issue or otherwise addressed - * and is no longer active. - * - * Generated from protobuf enum INACTIVE = 2; - */ - const INACTIVE = 2; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::ACTIVE => 'ACTIVE', - self::INACTIVE => 'INACTIVE', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\SecurityCenter\V1\Finding_State::class); - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Finding_FindingClass.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Finding_FindingClass.php deleted file mode 100644 index 2f7744ca0180..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Finding_FindingClass.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.securitycenter.v1.Folder - */ -class Folder extends \Google\Protobuf\Internal\Message -{ - /** - * Full resource name of this folder. See: - * https://cloud.google.com/apis/design/resource_names#full_resource_name - * - * Generated from protobuf field string resource_folder = 1; - */ - protected $resource_folder = ''; - /** - * The user defined display name for this folder. - * - * Generated from protobuf field string resource_folder_display_name = 2; - */ - protected $resource_folder_display_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $resource_folder - * Full resource name of this folder. See: - * https://cloud.google.com/apis/design/resource_names#full_resource_name - * @type string $resource_folder_display_name - * The user defined display name for this folder. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\Folder::initOnce(); - parent::__construct($data); - } - - /** - * Full resource name of this folder. See: - * https://cloud.google.com/apis/design/resource_names#full_resource_name - * - * Generated from protobuf field string resource_folder = 1; - * @return string - */ - public function getResourceFolder() - { - return $this->resource_folder; - } - - /** - * Full resource name of this folder. See: - * https://cloud.google.com/apis/design/resource_names#full_resource_name - * - * Generated from protobuf field string resource_folder = 1; - * @param string $var - * @return $this - */ - public function setResourceFolder($var) - { - GPBUtil::checkString($var, True); - $this->resource_folder = $var; - - return $this; - } - - /** - * The user defined display name for this folder. - * - * Generated from protobuf field string resource_folder_display_name = 2; - * @return string - */ - public function getResourceFolderDisplayName() - { - return $this->resource_folder_display_name; - } - - /** - * The user defined display name for this folder. - * - * Generated from protobuf field string resource_folder_display_name = 2; - * @param string $var - * @return $this - */ - public function setResourceFolderDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->resource_folder_display_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Geolocation.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Geolocation.php deleted file mode 100644 index 840ddadf3caf..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Geolocation.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.securitycenter.v1.Geolocation - */ -class Geolocation extends \Google\Protobuf\Internal\Message -{ - /** - * A CLDR. - * - * Generated from protobuf field string region_code = 1; - */ - protected $region_code = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $region_code - * A CLDR. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\Access::initOnce(); - parent::__construct($data); - } - - /** - * A CLDR. - * - * Generated from protobuf field string region_code = 1; - * @return string - */ - public function getRegionCode() - { - return $this->region_code; - } - - /** - * A CLDR. - * - * Generated from protobuf field string region_code = 1; - * @param string $var - * @return $this - */ - public function setRegionCode($var) - { - GPBUtil::checkString($var, True); - $this->region_code = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GetBigQueryExportRequest.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GetBigQueryExportRequest.php deleted file mode 100644 index 4bf3cf9b4bc3..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GetBigQueryExportRequest.php +++ /dev/null @@ -1,79 +0,0 @@ -google.cloud.securitycenter.v1.GetBigQueryExportRequest - */ -class GetBigQueryExportRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the BigQuery export to retrieve. Its format is - * organizations/{organization}/bigQueryExports/{export_id}, - * folders/{folder}/bigQueryExports/{export_id}, or - * projects/{project}/bigQueryExports/{export_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the BigQuery export to retrieve. Its format is - * organizations/{organization}/bigQueryExports/{export_id}, - * folders/{folder}/bigQueryExports/{export_id}, or - * projects/{project}/bigQueryExports/{export_id} - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the BigQuery export to retrieve. Its format is - * organizations/{organization}/bigQueryExports/{export_id}, - * folders/{folder}/bigQueryExports/{export_id}, or - * projects/{project}/bigQueryExports/{export_id} - * - * 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 BigQuery export to retrieve. Its format is - * organizations/{organization}/bigQueryExports/{export_id}, - * folders/{folder}/bigQueryExports/{export_id}, or - * projects/{project}/bigQueryExports/{export_id} - * - * 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/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GetMuteConfigRequest.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GetMuteConfigRequest.php deleted file mode 100644 index 464494de039c..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GetMuteConfigRequest.php +++ /dev/null @@ -1,79 +0,0 @@ -google.cloud.securitycenter.v1.GetMuteConfigRequest - */ -class GetMuteConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the mute config to retrieve. Its format is - * organizations/{organization}/muteConfigs/{config_id}, - * folders/{folder}/muteConfigs/{config_id}, or - * projects/{project}/muteConfigs/{config_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the mute config to retrieve. Its format is - * organizations/{organization}/muteConfigs/{config_id}, - * folders/{folder}/muteConfigs/{config_id}, or - * projects/{project}/muteConfigs/{config_id} - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the mute config to retrieve. Its format is - * organizations/{organization}/muteConfigs/{config_id}, - * folders/{folder}/muteConfigs/{config_id}, or - * projects/{project}/muteConfigs/{config_id} - * - * 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 mute config to retrieve. Its format is - * organizations/{organization}/muteConfigs/{config_id}, - * folders/{folder}/muteConfigs/{config_id}, or - * projects/{project}/muteConfigs/{config_id} - * - * 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/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GetNotificationConfigRequest.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GetNotificationConfigRequest.php deleted file mode 100644 index 0d54bcbc5b50..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GetNotificationConfigRequest.php +++ /dev/null @@ -1,79 +0,0 @@ -google.cloud.securitycenter.v1.GetNotificationConfigRequest - */ -class GetNotificationConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the notification config to get. Its format is - * "organizations/[organization_id]/notificationConfigs/[config_id]", - * "folders/[folder_id]/notificationConfigs/[config_id]", - * or "projects/[project_id]/notificationConfigs/[config_id]". - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the notification config to get. Its format is - * "organizations/[organization_id]/notificationConfigs/[config_id]", - * "folders/[folder_id]/notificationConfigs/[config_id]", - * or "projects/[project_id]/notificationConfigs/[config_id]". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the notification config to get. Its format is - * "organizations/[organization_id]/notificationConfigs/[config_id]", - * "folders/[folder_id]/notificationConfigs/[config_id]", - * or "projects/[project_id]/notificationConfigs/[config_id]". - * - * 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 notification config to get. Its format is - * "organizations/[organization_id]/notificationConfigs/[config_id]", - * "folders/[folder_id]/notificationConfigs/[config_id]", - * or "projects/[project_id]/notificationConfigs/[config_id]". - * - * 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/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GetOrganizationSettingsRequest.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GetOrganizationSettingsRequest.php deleted file mode 100644 index fcb7295481f8..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GetOrganizationSettingsRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.securitycenter.v1.GetOrganizationSettingsRequest - */ -class GetOrganizationSettingsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the organization to get organization settings for. Its - * format is "organizations/[organization_id]/organizationSettings". - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the organization to get organization settings for. Its - * format is "organizations/[organization_id]/organizationSettings". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the organization to get organization settings for. Its - * format is "organizations/[organization_id]/organizationSettings". - * - * 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 organization to get organization settings for. Its - * format is "organizations/[organization_id]/organizationSettings". - * - * 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/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GetSourceRequest.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GetSourceRequest.php deleted file mode 100644 index 258db6b19e5f..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GetSourceRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.securitycenter.v1.GetSourceRequest - */ -class GetSourceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Relative resource name of the source. Its format is - * "organizations/[organization_id]/source/[source_id]". - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Relative resource name of the source. Its format is - * "organizations/[organization_id]/source/[source_id]". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Relative resource name of the source. Its format is - * "organizations/[organization_id]/source/[source_id]". - * - * 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. Relative resource name of the source. Its format is - * "organizations/[organization_id]/source/[source_id]". - * - * 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/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GroupAssetsRequest.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GroupAssetsRequest.php deleted file mode 100644 index 5414cdfb275b..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GroupAssetsRequest.php +++ /dev/null @@ -1,643 +0,0 @@ -google.cloud.securitycenter.v1.GroupAssetsRequest - */ -class GroupAssetsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the parent to group the assets by. Its format is - * "organizations/[organization_id]", "folders/[folder_id]", or - * "projects/[project_id]". - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Expression that defines the filter to apply across assets. - * The expression is a list of zero or more restrictions combined via logical - * operators `AND` and `OR`. - * Parentheses are supported, and `OR` has higher precedence than `AND`. - * Restrictions have the form ` ` and may have a `-` - * character in front of them to indicate negation. The fields map to those - * defined in the Asset resource. Examples include: - * * name - * * security_center_properties.resource_name - * * resource_properties.a_property - * * security_marks.marks.marka - * The supported operators are: - * * `=` for all value types. - * * `>`, `<`, `>=`, `<=` for integer values. - * * `:`, meaning substring matching, for strings. - * The supported value types are: - * * string literals in quotes. - * * integer literals without quotes. - * * boolean literals `true` and `false` without quotes. - * The following field and operator combinations are supported: - * * name: `=` - * * update_time: `=`, `>`, `<`, `>=`, `<=` - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `update_time = "2019-06-10T16:07:18-07:00"` - * `update_time = 1560208038000` - * * create_time: `=`, `>`, `<`, `>=`, `<=` - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `create_time = "2019-06-10T16:07:18-07:00"` - * `create_time = 1560208038000` - * * iam_policy.policy_blob: `=`, `:` - * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - * * security_marks.marks: `=`, `:` - * * security_center_properties.resource_name: `=`, `:` - * * security_center_properties.resource_display_name: `=`, `:` - * * security_center_properties.resource_type: `=`, `:` - * * security_center_properties.resource_parent: `=`, `:` - * * security_center_properties.resource_parent_display_name: `=`, `:` - * * security_center_properties.resource_project: `=`, `:` - * * security_center_properties.resource_project_display_name: `=`, `:` - * * security_center_properties.resource_owners: `=`, `:` - * For example, `resource_properties.size = 100` is a valid filter string. - * Use a partial match on the empty string to filter based on a property - * existing: `resource_properties.my_property : ""` - * Use a negated partial match on the empty string to filter based on a - * property not existing: `-resource_properties.my_property : ""` - * - * Generated from protobuf field string filter = 2; - */ - protected $filter = ''; - /** - * Required. Expression that defines what assets fields to use for grouping. - * The string value should follow SQL syntax: comma separated list of fields. - * For example: - * "security_center_properties.resource_project,security_center_properties.project". - * The following fields are supported when compare_duration is not set: - * * security_center_properties.resource_project - * * security_center_properties.resource_project_display_name - * * security_center_properties.resource_type - * * security_center_properties.resource_parent - * * security_center_properties.resource_parent_display_name - * The following fields are supported when compare_duration is set: - * * security_center_properties.resource_type - * * security_center_properties.resource_project_display_name - * * security_center_properties.resource_parent_display_name - * - * Generated from protobuf field string group_by = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $group_by = ''; - /** - * When compare_duration is set, the GroupResult's "state_change" property is - * updated to indicate whether the asset was added, removed, or remained - * present during the compare_duration period of time that precedes the - * read_time. This is the time between (read_time - compare_duration) and - * read_time. - * The state change value is derived based on the presence of the asset at the - * two points in time. Intermediate state changes between the two times don't - * affect the result. For example, the results aren't affected if the asset is - * removed and re-created again. - * Possible "state_change" values when compare_duration is specified: - * * "ADDED": indicates that the asset was not present at the start of - * compare_duration, but present at reference_time. - * * "REMOVED": indicates that the asset was present at the start of - * compare_duration, but not present at reference_time. - * * "ACTIVE": indicates that the asset was present at both the - * start and the end of the time period defined by - * compare_duration and reference_time. - * If compare_duration is not specified, then the only possible state_change - * is "UNUSED", which will be the state_change set for all assets present at - * read_time. - * If this field is set then `state_change` must be a specified field in - * `group_by`. - * - * Generated from protobuf field .google.protobuf.Duration compare_duration = 4; - */ - protected $compare_duration = null; - /** - * Time used as a reference point when filtering assets. The filter is limited - * to assets existing at the supplied time and their values are those at that - * specific time. Absence of this field will default to the API's version of - * NOW. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 5; - */ - protected $read_time = null; - /** - * The value returned by the last `GroupAssetsResponse`; indicates - * that this is a continuation of a prior `GroupAssets` call, and that the - * system should return the next page of data. - * - * Generated from protobuf field string page_token = 7; - */ - protected $page_token = ''; - /** - * The maximum number of results to return in a single response. Default is - * 10, minimum is 1, maximum is 1000. - * - * Generated from protobuf field int32 page_size = 8; - */ - protected $page_size = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The name of the parent to group the assets by. Its format is - * "organizations/[organization_id]", "folders/[folder_id]", or - * "projects/[project_id]". - * @type string $filter - * Expression that defines the filter to apply across assets. - * The expression is a list of zero or more restrictions combined via logical - * operators `AND` and `OR`. - * Parentheses are supported, and `OR` has higher precedence than `AND`. - * Restrictions have the form ` ` and may have a `-` - * character in front of them to indicate negation. The fields map to those - * defined in the Asset resource. Examples include: - * * name - * * security_center_properties.resource_name - * * resource_properties.a_property - * * security_marks.marks.marka - * The supported operators are: - * * `=` for all value types. - * * `>`, `<`, `>=`, `<=` for integer values. - * * `:`, meaning substring matching, for strings. - * The supported value types are: - * * string literals in quotes. - * * integer literals without quotes. - * * boolean literals `true` and `false` without quotes. - * The following field and operator combinations are supported: - * * name: `=` - * * update_time: `=`, `>`, `<`, `>=`, `<=` - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `update_time = "2019-06-10T16:07:18-07:00"` - * `update_time = 1560208038000` - * * create_time: `=`, `>`, `<`, `>=`, `<=` - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `create_time = "2019-06-10T16:07:18-07:00"` - * `create_time = 1560208038000` - * * iam_policy.policy_blob: `=`, `:` - * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - * * security_marks.marks: `=`, `:` - * * security_center_properties.resource_name: `=`, `:` - * * security_center_properties.resource_display_name: `=`, `:` - * * security_center_properties.resource_type: `=`, `:` - * * security_center_properties.resource_parent: `=`, `:` - * * security_center_properties.resource_parent_display_name: `=`, `:` - * * security_center_properties.resource_project: `=`, `:` - * * security_center_properties.resource_project_display_name: `=`, `:` - * * security_center_properties.resource_owners: `=`, `:` - * For example, `resource_properties.size = 100` is a valid filter string. - * Use a partial match on the empty string to filter based on a property - * existing: `resource_properties.my_property : ""` - * Use a negated partial match on the empty string to filter based on a - * property not existing: `-resource_properties.my_property : ""` - * @type string $group_by - * Required. Expression that defines what assets fields to use for grouping. - * The string value should follow SQL syntax: comma separated list of fields. - * For example: - * "security_center_properties.resource_project,security_center_properties.project". - * The following fields are supported when compare_duration is not set: - * * security_center_properties.resource_project - * * security_center_properties.resource_project_display_name - * * security_center_properties.resource_type - * * security_center_properties.resource_parent - * * security_center_properties.resource_parent_display_name - * The following fields are supported when compare_duration is set: - * * security_center_properties.resource_type - * * security_center_properties.resource_project_display_name - * * security_center_properties.resource_parent_display_name - * @type \Google\Protobuf\Duration $compare_duration - * When compare_duration is set, the GroupResult's "state_change" property is - * updated to indicate whether the asset was added, removed, or remained - * present during the compare_duration period of time that precedes the - * read_time. This is the time between (read_time - compare_duration) and - * read_time. - * The state change value is derived based on the presence of the asset at the - * two points in time. Intermediate state changes between the two times don't - * affect the result. For example, the results aren't affected if the asset is - * removed and re-created again. - * Possible "state_change" values when compare_duration is specified: - * * "ADDED": indicates that the asset was not present at the start of - * compare_duration, but present at reference_time. - * * "REMOVED": indicates that the asset was present at the start of - * compare_duration, but not present at reference_time. - * * "ACTIVE": indicates that the asset was present at both the - * start and the end of the time period defined by - * compare_duration and reference_time. - * If compare_duration is not specified, then the only possible state_change - * is "UNUSED", which will be the state_change set for all assets present at - * read_time. - * If this field is set then `state_change` must be a specified field in - * `group_by`. - * @type \Google\Protobuf\Timestamp $read_time - * Time used as a reference point when filtering assets. The filter is limited - * to assets existing at the supplied time and their values are those at that - * specific time. Absence of this field will default to the API's version of - * NOW. - * @type string $page_token - * The value returned by the last `GroupAssetsResponse`; indicates - * that this is a continuation of a prior `GroupAssets` call, and that the - * system should return the next page of data. - * @type int $page_size - * The maximum number of results to return in a single response. Default is - * 10, minimum is 1, maximum is 1000. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the parent to group the assets by. Its format is - * "organizations/[organization_id]", "folders/[folder_id]", or - * "projects/[project_id]". - * - * 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. The name of the parent to group the assets by. Its format is - * "organizations/[organization_id]", "folders/[folder_id]", or - * "projects/[project_id]". - * - * 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; - } - - /** - * Expression that defines the filter to apply across assets. - * The expression is a list of zero or more restrictions combined via logical - * operators `AND` and `OR`. - * Parentheses are supported, and `OR` has higher precedence than `AND`. - * Restrictions have the form ` ` and may have a `-` - * character in front of them to indicate negation. The fields map to those - * defined in the Asset resource. Examples include: - * * name - * * security_center_properties.resource_name - * * resource_properties.a_property - * * security_marks.marks.marka - * The supported operators are: - * * `=` for all value types. - * * `>`, `<`, `>=`, `<=` for integer values. - * * `:`, meaning substring matching, for strings. - * The supported value types are: - * * string literals in quotes. - * * integer literals without quotes. - * * boolean literals `true` and `false` without quotes. - * The following field and operator combinations are supported: - * * name: `=` - * * update_time: `=`, `>`, `<`, `>=`, `<=` - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `update_time = "2019-06-10T16:07:18-07:00"` - * `update_time = 1560208038000` - * * create_time: `=`, `>`, `<`, `>=`, `<=` - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `create_time = "2019-06-10T16:07:18-07:00"` - * `create_time = 1560208038000` - * * iam_policy.policy_blob: `=`, `:` - * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - * * security_marks.marks: `=`, `:` - * * security_center_properties.resource_name: `=`, `:` - * * security_center_properties.resource_display_name: `=`, `:` - * * security_center_properties.resource_type: `=`, `:` - * * security_center_properties.resource_parent: `=`, `:` - * * security_center_properties.resource_parent_display_name: `=`, `:` - * * security_center_properties.resource_project: `=`, `:` - * * security_center_properties.resource_project_display_name: `=`, `:` - * * security_center_properties.resource_owners: `=`, `:` - * For example, `resource_properties.size = 100` is a valid filter string. - * Use a partial match on the empty string to filter based on a property - * existing: `resource_properties.my_property : ""` - * Use a negated partial match on the empty string to filter based on a - * property not existing: `-resource_properties.my_property : ""` - * - * Generated from protobuf field string filter = 2; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Expression that defines the filter to apply across assets. - * The expression is a list of zero or more restrictions combined via logical - * operators `AND` and `OR`. - * Parentheses are supported, and `OR` has higher precedence than `AND`. - * Restrictions have the form ` ` and may have a `-` - * character in front of them to indicate negation. The fields map to those - * defined in the Asset resource. Examples include: - * * name - * * security_center_properties.resource_name - * * resource_properties.a_property - * * security_marks.marks.marka - * The supported operators are: - * * `=` for all value types. - * * `>`, `<`, `>=`, `<=` for integer values. - * * `:`, meaning substring matching, for strings. - * The supported value types are: - * * string literals in quotes. - * * integer literals without quotes. - * * boolean literals `true` and `false` without quotes. - * The following field and operator combinations are supported: - * * name: `=` - * * update_time: `=`, `>`, `<`, `>=`, `<=` - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `update_time = "2019-06-10T16:07:18-07:00"` - * `update_time = 1560208038000` - * * create_time: `=`, `>`, `<`, `>=`, `<=` - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `create_time = "2019-06-10T16:07:18-07:00"` - * `create_time = 1560208038000` - * * iam_policy.policy_blob: `=`, `:` - * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - * * security_marks.marks: `=`, `:` - * * security_center_properties.resource_name: `=`, `:` - * * security_center_properties.resource_display_name: `=`, `:` - * * security_center_properties.resource_type: `=`, `:` - * * security_center_properties.resource_parent: `=`, `:` - * * security_center_properties.resource_parent_display_name: `=`, `:` - * * security_center_properties.resource_project: `=`, `:` - * * security_center_properties.resource_project_display_name: `=`, `:` - * * security_center_properties.resource_owners: `=`, `:` - * For example, `resource_properties.size = 100` is a valid filter string. - * Use a partial match on the empty string to filter based on a property - * existing: `resource_properties.my_property : ""` - * Use a negated partial match on the empty string to filter based on a - * property not existing: `-resource_properties.my_property : ""` - * - * Generated from protobuf field string filter = 2; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Required. Expression that defines what assets fields to use for grouping. - * The string value should follow SQL syntax: comma separated list of fields. - * For example: - * "security_center_properties.resource_project,security_center_properties.project". - * The following fields are supported when compare_duration is not set: - * * security_center_properties.resource_project - * * security_center_properties.resource_project_display_name - * * security_center_properties.resource_type - * * security_center_properties.resource_parent - * * security_center_properties.resource_parent_display_name - * The following fields are supported when compare_duration is set: - * * security_center_properties.resource_type - * * security_center_properties.resource_project_display_name - * * security_center_properties.resource_parent_display_name - * - * Generated from protobuf field string group_by = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getGroupBy() - { - return $this->group_by; - } - - /** - * Required. Expression that defines what assets fields to use for grouping. - * The string value should follow SQL syntax: comma separated list of fields. - * For example: - * "security_center_properties.resource_project,security_center_properties.project". - * The following fields are supported when compare_duration is not set: - * * security_center_properties.resource_project - * * security_center_properties.resource_project_display_name - * * security_center_properties.resource_type - * * security_center_properties.resource_parent - * * security_center_properties.resource_parent_display_name - * The following fields are supported when compare_duration is set: - * * security_center_properties.resource_type - * * security_center_properties.resource_project_display_name - * * security_center_properties.resource_parent_display_name - * - * Generated from protobuf field string group_by = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setGroupBy($var) - { - GPBUtil::checkString($var, True); - $this->group_by = $var; - - return $this; - } - - /** - * When compare_duration is set, the GroupResult's "state_change" property is - * updated to indicate whether the asset was added, removed, or remained - * present during the compare_duration period of time that precedes the - * read_time. This is the time between (read_time - compare_duration) and - * read_time. - * The state change value is derived based on the presence of the asset at the - * two points in time. Intermediate state changes between the two times don't - * affect the result. For example, the results aren't affected if the asset is - * removed and re-created again. - * Possible "state_change" values when compare_duration is specified: - * * "ADDED": indicates that the asset was not present at the start of - * compare_duration, but present at reference_time. - * * "REMOVED": indicates that the asset was present at the start of - * compare_duration, but not present at reference_time. - * * "ACTIVE": indicates that the asset was present at both the - * start and the end of the time period defined by - * compare_duration and reference_time. - * If compare_duration is not specified, then the only possible state_change - * is "UNUSED", which will be the state_change set for all assets present at - * read_time. - * If this field is set then `state_change` must be a specified field in - * `group_by`. - * - * Generated from protobuf field .google.protobuf.Duration compare_duration = 4; - * @return \Google\Protobuf\Duration|null - */ - public function getCompareDuration() - { - return $this->compare_duration; - } - - public function hasCompareDuration() - { - return isset($this->compare_duration); - } - - public function clearCompareDuration() - { - unset($this->compare_duration); - } - - /** - * When compare_duration is set, the GroupResult's "state_change" property is - * updated to indicate whether the asset was added, removed, or remained - * present during the compare_duration period of time that precedes the - * read_time. This is the time between (read_time - compare_duration) and - * read_time. - * The state change value is derived based on the presence of the asset at the - * two points in time. Intermediate state changes between the two times don't - * affect the result. For example, the results aren't affected if the asset is - * removed and re-created again. - * Possible "state_change" values when compare_duration is specified: - * * "ADDED": indicates that the asset was not present at the start of - * compare_duration, but present at reference_time. - * * "REMOVED": indicates that the asset was present at the start of - * compare_duration, but not present at reference_time. - * * "ACTIVE": indicates that the asset was present at both the - * start and the end of the time period defined by - * compare_duration and reference_time. - * If compare_duration is not specified, then the only possible state_change - * is "UNUSED", which will be the state_change set for all assets present at - * read_time. - * If this field is set then `state_change` must be a specified field in - * `group_by`. - * - * Generated from protobuf field .google.protobuf.Duration compare_duration = 4; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setCompareDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->compare_duration = $var; - - return $this; - } - - /** - * Time used as a reference point when filtering assets. The filter is limited - * to assets existing at the supplied time and their values are those at that - * specific time. Absence of this field will default to the API's version of - * NOW. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 5; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->read_time; - } - - public function hasReadTime() - { - return isset($this->read_time); - } - - public function clearReadTime() - { - unset($this->read_time); - } - - /** - * Time used as a reference point when filtering assets. The filter is limited - * to assets existing at the supplied time and their values are those at that - * specific time. Absence of this field will default to the API's version of - * NOW. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 5; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->read_time = $var; - - return $this; - } - - /** - * The value returned by the last `GroupAssetsResponse`; indicates - * that this is a continuation of a prior `GroupAssets` call, and that the - * system should return the next page of data. - * - * Generated from protobuf field string page_token = 7; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The value returned by the last `GroupAssetsResponse`; indicates - * that this is a continuation of a prior `GroupAssets` call, and that the - * system should return the next page of data. - * - * Generated from protobuf field string page_token = 7; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * The maximum number of results to return in a single response. Default is - * 10, minimum is 1, maximum is 1000. - * - * Generated from protobuf field int32 page_size = 8; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of results to return in a single response. Default is - * 10, minimum is 1, maximum is 1000. - * - * Generated from protobuf field int32 page_size = 8; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GroupAssetsResponse.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GroupAssetsResponse.php deleted file mode 100644 index 22c92dbe38ec..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GroupAssetsResponse.php +++ /dev/null @@ -1,191 +0,0 @@ -google.cloud.securitycenter.v1.GroupAssetsResponse - */ -class GroupAssetsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Group results. There exists an element for each existing unique - * combination of property/values. The element contains a count for the number - * of times those specific property/values appear. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; - */ - private $group_by_results; - /** - * Time used for executing the groupBy request. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 2; - */ - protected $read_time = null; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results. - * - * Generated from protobuf field string next_page_token = 3; - */ - protected $next_page_token = ''; - /** - * The total number of results matching the query. - * - * Generated from protobuf field int32 total_size = 4; - */ - protected $total_size = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\SecurityCenter\V1\GroupResult>|\Google\Protobuf\Internal\RepeatedField $group_by_results - * Group results. There exists an element for each existing unique - * combination of property/values. The element contains a count for the number - * of times those specific property/values appear. - * @type \Google\Protobuf\Timestamp $read_time - * Time used for executing the groupBy request. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results. - * @type int $total_size - * The total number of results matching the query. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Group results. There exists an element for each existing unique - * combination of property/values. The element contains a count for the number - * of times those specific property/values appear. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getGroupByResults() - { - return $this->group_by_results; - } - - /** - * Group results. There exists an element for each existing unique - * combination of property/values. The element contains a count for the number - * of times those specific property/values appear. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; - * @param array<\Google\Cloud\SecurityCenter\V1\GroupResult>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setGroupByResults($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\GroupResult::class); - $this->group_by_results = $arr; - - return $this; - } - - /** - * Time used for executing the groupBy request. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->read_time; - } - - public function hasReadTime() - { - return isset($this->read_time); - } - - public function clearReadTime() - { - unset($this->read_time); - } - - /** - * Time used for executing the groupBy request. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->read_time = $var; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results. - * - * Generated from protobuf field string next_page_token = 3; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results. - * - * Generated from protobuf field string next_page_token = 3; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * The total number of results matching the query. - * - * Generated from protobuf field int32 total_size = 4; - * @return int - */ - public function getTotalSize() - { - return $this->total_size; - } - - /** - * The total number of results matching the query. - * - * Generated from protobuf field int32 total_size = 4; - * @param int $var - * @return $this - */ - public function setTotalSize($var) - { - GPBUtil::checkInt32($var); - $this->total_size = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GroupFindingsRequest.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GroupFindingsRequest.php deleted file mode 100644 index 7dd52b451ba4..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GroupFindingsRequest.php +++ /dev/null @@ -1,659 +0,0 @@ -google.cloud.securitycenter.v1.GroupFindingsRequest - */ -class GroupFindingsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the source to groupBy. Its format is - * "organizations/[organization_id]/sources/[source_id]", - * folders/[folder_id]/sources/[source_id], or - * projects/[project_id]/sources/[source_id]. To groupBy across all sources - * provide a source_id of `-`. For example: - * organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-, - * or projects/{project_id}/sources/- - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Expression that defines the filter to apply across findings. - * The expression is a list of one or more restrictions combined via logical - * operators `AND` and `OR`. - * Parentheses are supported, and `OR` has higher precedence than `AND`. - * Restrictions have the form ` ` and may have a `-` - * character in front of them to indicate negation. Examples include: - * * name - * * source_properties.a_property - * * security_marks.marks.marka - * The supported operators are: - * * `=` for all value types. - * * `>`, `<`, `>=`, `<=` for integer values. - * * `:`, meaning substring matching, for strings. - * The supported value types are: - * * string literals in quotes. - * * integer literals without quotes. - * * boolean literals `true` and `false` without quotes. - * The following field and operator combinations are supported: - * * name: `=` - * * parent: `=`, `:` - * * resource_name: `=`, `:` - * * state: `=`, `:` - * * category: `=`, `:` - * * external_uri: `=`, `:` - * * event_time: `=`, `>`, `<`, `>=`, `<=` - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `event_time = "2019-06-10T16:07:18-07:00"` - * `event_time = 1560208038000` - * * severity: `=`, `:` - * * workflow_state: `=`, `:` - * * security_marks.marks: `=`, `:` - * * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - * For example, `source_properties.size = 100` is a valid filter string. - * Use a partial match on the empty string to filter based on a property - * existing: `source_properties.my_property : ""` - * Use a negated partial match on the empty string to filter based on a - * property not existing: `-source_properties.my_property : ""` - * * resource: - * * resource.name: `=`, `:` - * * resource.parent_name: `=`, `:` - * * resource.parent_display_name: `=`, `:` - * * resource.project_name: `=`, `:` - * * resource.project_display_name: `=`, `:` - * * resource.type: `=`, `:` - * - * Generated from protobuf field string filter = 2; - */ - protected $filter = ''; - /** - * Required. Expression that defines what assets fields to use for grouping - * (including `state_change`). The string value should follow SQL syntax: - * comma separated list of fields. For example: "parent,resource_name". - * The following fields are supported: - * * resource_name - * * category - * * state - * * parent - * * severity - * The following fields are supported when compare_duration is set: - * * state_change - * - * Generated from protobuf field string group_by = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $group_by = ''; - /** - * Time used as a reference point when filtering findings. The filter is - * limited to findings existing at the supplied time and their values are - * those at that specific time. Absence of this field will default to the - * API's version of NOW. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; - */ - protected $read_time = null; - /** - * When compare_duration is set, the GroupResult's "state_change" attribute is - * updated to indicate whether the finding had its state changed, the - * finding's state remained unchanged, or if the finding was added during the - * compare_duration period of time that precedes the read_time. This is the - * time between (read_time - compare_duration) and read_time. - * The state_change value is derived based on the presence and state of the - * finding at the two points in time. Intermediate state changes between the - * two times don't affect the result. For example, the results aren't affected - * if the finding is made inactive and then active again. - * Possible "state_change" values when compare_duration is specified: - * * "CHANGED": indicates that the finding was present and matched the given - * filter at the start of compare_duration, but changed its - * state at read_time. - * * "UNCHANGED": indicates that the finding was present and matched the given - * filter at the start of compare_duration and did not change - * state at read_time. - * * "ADDED": indicates that the finding did not match the given filter or - * was not present at the start of compare_duration, but was - * present at read_time. - * * "REMOVED": indicates that the finding was present and matched the - * filter at the start of compare_duration, but did not match - * the filter at read_time. - * If compare_duration is not specified, then the only possible state_change - * is "UNUSED", which will be the state_change set for all findings present - * at read_time. - * If this field is set then `state_change` must be a specified field in - * `group_by`. - * - * Generated from protobuf field .google.protobuf.Duration compare_duration = 5; - */ - protected $compare_duration = null; - /** - * The value returned by the last `GroupFindingsResponse`; indicates - * that this is a continuation of a prior `GroupFindings` call, and - * that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 7; - */ - protected $page_token = ''; - /** - * The maximum number of results to return in a single response. Default is - * 10, minimum is 1, maximum is 1000. - * - * Generated from protobuf field int32 page_size = 8; - */ - protected $page_size = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Name of the source to groupBy. Its format is - * "organizations/[organization_id]/sources/[source_id]", - * folders/[folder_id]/sources/[source_id], or - * projects/[project_id]/sources/[source_id]. To groupBy across all sources - * provide a source_id of `-`. For example: - * organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-, - * or projects/{project_id}/sources/- - * @type string $filter - * Expression that defines the filter to apply across findings. - * The expression is a list of one or more restrictions combined via logical - * operators `AND` and `OR`. - * Parentheses are supported, and `OR` has higher precedence than `AND`. - * Restrictions have the form ` ` and may have a `-` - * character in front of them to indicate negation. Examples include: - * * name - * * source_properties.a_property - * * security_marks.marks.marka - * The supported operators are: - * * `=` for all value types. - * * `>`, `<`, `>=`, `<=` for integer values. - * * `:`, meaning substring matching, for strings. - * The supported value types are: - * * string literals in quotes. - * * integer literals without quotes. - * * boolean literals `true` and `false` without quotes. - * The following field and operator combinations are supported: - * * name: `=` - * * parent: `=`, `:` - * * resource_name: `=`, `:` - * * state: `=`, `:` - * * category: `=`, `:` - * * external_uri: `=`, `:` - * * event_time: `=`, `>`, `<`, `>=`, `<=` - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `event_time = "2019-06-10T16:07:18-07:00"` - * `event_time = 1560208038000` - * * severity: `=`, `:` - * * workflow_state: `=`, `:` - * * security_marks.marks: `=`, `:` - * * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - * For example, `source_properties.size = 100` is a valid filter string. - * Use a partial match on the empty string to filter based on a property - * existing: `source_properties.my_property : ""` - * Use a negated partial match on the empty string to filter based on a - * property not existing: `-source_properties.my_property : ""` - * * resource: - * * resource.name: `=`, `:` - * * resource.parent_name: `=`, `:` - * * resource.parent_display_name: `=`, `:` - * * resource.project_name: `=`, `:` - * * resource.project_display_name: `=`, `:` - * * resource.type: `=`, `:` - * @type string $group_by - * Required. Expression that defines what assets fields to use for grouping - * (including `state_change`). The string value should follow SQL syntax: - * comma separated list of fields. For example: "parent,resource_name". - * The following fields are supported: - * * resource_name - * * category - * * state - * * parent - * * severity - * The following fields are supported when compare_duration is set: - * * state_change - * @type \Google\Protobuf\Timestamp $read_time - * Time used as a reference point when filtering findings. The filter is - * limited to findings existing at the supplied time and their values are - * those at that specific time. Absence of this field will default to the - * API's version of NOW. - * @type \Google\Protobuf\Duration $compare_duration - * When compare_duration is set, the GroupResult's "state_change" attribute is - * updated to indicate whether the finding had its state changed, the - * finding's state remained unchanged, or if the finding was added during the - * compare_duration period of time that precedes the read_time. This is the - * time between (read_time - compare_duration) and read_time. - * The state_change value is derived based on the presence and state of the - * finding at the two points in time. Intermediate state changes between the - * two times don't affect the result. For example, the results aren't affected - * if the finding is made inactive and then active again. - * Possible "state_change" values when compare_duration is specified: - * * "CHANGED": indicates that the finding was present and matched the given - * filter at the start of compare_duration, but changed its - * state at read_time. - * * "UNCHANGED": indicates that the finding was present and matched the given - * filter at the start of compare_duration and did not change - * state at read_time. - * * "ADDED": indicates that the finding did not match the given filter or - * was not present at the start of compare_duration, but was - * present at read_time. - * * "REMOVED": indicates that the finding was present and matched the - * filter at the start of compare_duration, but did not match - * the filter at read_time. - * If compare_duration is not specified, then the only possible state_change - * is "UNUSED", which will be the state_change set for all findings present - * at read_time. - * If this field is set then `state_change` must be a specified field in - * `group_by`. - * @type string $page_token - * The value returned by the last `GroupFindingsResponse`; indicates - * that this is a continuation of a prior `GroupFindings` call, and - * that the system should return the next page of data. - * @type int $page_size - * The maximum number of results to return in a single response. Default is - * 10, minimum is 1, maximum is 1000. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the source to groupBy. Its format is - * "organizations/[organization_id]/sources/[source_id]", - * folders/[folder_id]/sources/[source_id], or - * projects/[project_id]/sources/[source_id]. To groupBy across all sources - * provide a source_id of `-`. For example: - * organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-, - * or projects/{project_id}/sources/- - * - * 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. Name of the source to groupBy. Its format is - * "organizations/[organization_id]/sources/[source_id]", - * folders/[folder_id]/sources/[source_id], or - * projects/[project_id]/sources/[source_id]. To groupBy across all sources - * provide a source_id of `-`. For example: - * organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-, - * or projects/{project_id}/sources/- - * - * 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; - } - - /** - * Expression that defines the filter to apply across findings. - * The expression is a list of one or more restrictions combined via logical - * operators `AND` and `OR`. - * Parentheses are supported, and `OR` has higher precedence than `AND`. - * Restrictions have the form ` ` and may have a `-` - * character in front of them to indicate negation. Examples include: - * * name - * * source_properties.a_property - * * security_marks.marks.marka - * The supported operators are: - * * `=` for all value types. - * * `>`, `<`, `>=`, `<=` for integer values. - * * `:`, meaning substring matching, for strings. - * The supported value types are: - * * string literals in quotes. - * * integer literals without quotes. - * * boolean literals `true` and `false` without quotes. - * The following field and operator combinations are supported: - * * name: `=` - * * parent: `=`, `:` - * * resource_name: `=`, `:` - * * state: `=`, `:` - * * category: `=`, `:` - * * external_uri: `=`, `:` - * * event_time: `=`, `>`, `<`, `>=`, `<=` - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `event_time = "2019-06-10T16:07:18-07:00"` - * `event_time = 1560208038000` - * * severity: `=`, `:` - * * workflow_state: `=`, `:` - * * security_marks.marks: `=`, `:` - * * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - * For example, `source_properties.size = 100` is a valid filter string. - * Use a partial match on the empty string to filter based on a property - * existing: `source_properties.my_property : ""` - * Use a negated partial match on the empty string to filter based on a - * property not existing: `-source_properties.my_property : ""` - * * resource: - * * resource.name: `=`, `:` - * * resource.parent_name: `=`, `:` - * * resource.parent_display_name: `=`, `:` - * * resource.project_name: `=`, `:` - * * resource.project_display_name: `=`, `:` - * * resource.type: `=`, `:` - * - * Generated from protobuf field string filter = 2; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Expression that defines the filter to apply across findings. - * The expression is a list of one or more restrictions combined via logical - * operators `AND` and `OR`. - * Parentheses are supported, and `OR` has higher precedence than `AND`. - * Restrictions have the form ` ` and may have a `-` - * character in front of them to indicate negation. Examples include: - * * name - * * source_properties.a_property - * * security_marks.marks.marka - * The supported operators are: - * * `=` for all value types. - * * `>`, `<`, `>=`, `<=` for integer values. - * * `:`, meaning substring matching, for strings. - * The supported value types are: - * * string literals in quotes. - * * integer literals without quotes. - * * boolean literals `true` and `false` without quotes. - * The following field and operator combinations are supported: - * * name: `=` - * * parent: `=`, `:` - * * resource_name: `=`, `:` - * * state: `=`, `:` - * * category: `=`, `:` - * * external_uri: `=`, `:` - * * event_time: `=`, `>`, `<`, `>=`, `<=` - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `event_time = "2019-06-10T16:07:18-07:00"` - * `event_time = 1560208038000` - * * severity: `=`, `:` - * * workflow_state: `=`, `:` - * * security_marks.marks: `=`, `:` - * * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - * For example, `source_properties.size = 100` is a valid filter string. - * Use a partial match on the empty string to filter based on a property - * existing: `source_properties.my_property : ""` - * Use a negated partial match on the empty string to filter based on a - * property not existing: `-source_properties.my_property : ""` - * * resource: - * * resource.name: `=`, `:` - * * resource.parent_name: `=`, `:` - * * resource.parent_display_name: `=`, `:` - * * resource.project_name: `=`, `:` - * * resource.project_display_name: `=`, `:` - * * resource.type: `=`, `:` - * - * Generated from protobuf field string filter = 2; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Required. Expression that defines what assets fields to use for grouping - * (including `state_change`). The string value should follow SQL syntax: - * comma separated list of fields. For example: "parent,resource_name". - * The following fields are supported: - * * resource_name - * * category - * * state - * * parent - * * severity - * The following fields are supported when compare_duration is set: - * * state_change - * - * Generated from protobuf field string group_by = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getGroupBy() - { - return $this->group_by; - } - - /** - * Required. Expression that defines what assets fields to use for grouping - * (including `state_change`). The string value should follow SQL syntax: - * comma separated list of fields. For example: "parent,resource_name". - * The following fields are supported: - * * resource_name - * * category - * * state - * * parent - * * severity - * The following fields are supported when compare_duration is set: - * * state_change - * - * Generated from protobuf field string group_by = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setGroupBy($var) - { - GPBUtil::checkString($var, True); - $this->group_by = $var; - - return $this; - } - - /** - * Time used as a reference point when filtering findings. The filter is - * limited to findings existing at the supplied time and their values are - * those at that specific time. Absence of this field will default to the - * API's version of NOW. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->read_time; - } - - public function hasReadTime() - { - return isset($this->read_time); - } - - public function clearReadTime() - { - unset($this->read_time); - } - - /** - * Time used as a reference point when filtering findings. The filter is - * limited to findings existing at the supplied time and their values are - * those at that specific time. Absence of this field will default to the - * API's version of NOW. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->read_time = $var; - - return $this; - } - - /** - * When compare_duration is set, the GroupResult's "state_change" attribute is - * updated to indicate whether the finding had its state changed, the - * finding's state remained unchanged, or if the finding was added during the - * compare_duration period of time that precedes the read_time. This is the - * time between (read_time - compare_duration) and read_time. - * The state_change value is derived based on the presence and state of the - * finding at the two points in time. Intermediate state changes between the - * two times don't affect the result. For example, the results aren't affected - * if the finding is made inactive and then active again. - * Possible "state_change" values when compare_duration is specified: - * * "CHANGED": indicates that the finding was present and matched the given - * filter at the start of compare_duration, but changed its - * state at read_time. - * * "UNCHANGED": indicates that the finding was present and matched the given - * filter at the start of compare_duration and did not change - * state at read_time. - * * "ADDED": indicates that the finding did not match the given filter or - * was not present at the start of compare_duration, but was - * present at read_time. - * * "REMOVED": indicates that the finding was present and matched the - * filter at the start of compare_duration, but did not match - * the filter at read_time. - * If compare_duration is not specified, then the only possible state_change - * is "UNUSED", which will be the state_change set for all findings present - * at read_time. - * If this field is set then `state_change` must be a specified field in - * `group_by`. - * - * Generated from protobuf field .google.protobuf.Duration compare_duration = 5; - * @return \Google\Protobuf\Duration|null - */ - public function getCompareDuration() - { - return $this->compare_duration; - } - - public function hasCompareDuration() - { - return isset($this->compare_duration); - } - - public function clearCompareDuration() - { - unset($this->compare_duration); - } - - /** - * When compare_duration is set, the GroupResult's "state_change" attribute is - * updated to indicate whether the finding had its state changed, the - * finding's state remained unchanged, or if the finding was added during the - * compare_duration period of time that precedes the read_time. This is the - * time between (read_time - compare_duration) and read_time. - * The state_change value is derived based on the presence and state of the - * finding at the two points in time. Intermediate state changes between the - * two times don't affect the result. For example, the results aren't affected - * if the finding is made inactive and then active again. - * Possible "state_change" values when compare_duration is specified: - * * "CHANGED": indicates that the finding was present and matched the given - * filter at the start of compare_duration, but changed its - * state at read_time. - * * "UNCHANGED": indicates that the finding was present and matched the given - * filter at the start of compare_duration and did not change - * state at read_time. - * * "ADDED": indicates that the finding did not match the given filter or - * was not present at the start of compare_duration, but was - * present at read_time. - * * "REMOVED": indicates that the finding was present and matched the - * filter at the start of compare_duration, but did not match - * the filter at read_time. - * If compare_duration is not specified, then the only possible state_change - * is "UNUSED", which will be the state_change set for all findings present - * at read_time. - * If this field is set then `state_change` must be a specified field in - * `group_by`. - * - * Generated from protobuf field .google.protobuf.Duration compare_duration = 5; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setCompareDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->compare_duration = $var; - - return $this; - } - - /** - * The value returned by the last `GroupFindingsResponse`; indicates - * that this is a continuation of a prior `GroupFindings` call, and - * that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 7; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The value returned by the last `GroupFindingsResponse`; indicates - * that this is a continuation of a prior `GroupFindings` call, and - * that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 7; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * The maximum number of results to return in a single response. Default is - * 10, minimum is 1, maximum is 1000. - * - * Generated from protobuf field int32 page_size = 8; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of results to return in a single response. Default is - * 10, minimum is 1, maximum is 1000. - * - * Generated from protobuf field int32 page_size = 8; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GroupFindingsResponse.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GroupFindingsResponse.php deleted file mode 100644 index fdda76699257..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GroupFindingsResponse.php +++ /dev/null @@ -1,191 +0,0 @@ -google.cloud.securitycenter.v1.GroupFindingsResponse - */ -class GroupFindingsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Group results. There exists an element for each existing unique - * combination of property/values. The element contains a count for the number - * of times those specific property/values appear. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; - */ - private $group_by_results; - /** - * Time used for executing the groupBy request. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 2; - */ - protected $read_time = null; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results. - * - * Generated from protobuf field string next_page_token = 3; - */ - protected $next_page_token = ''; - /** - * The total number of results matching the query. - * - * Generated from protobuf field int32 total_size = 4; - */ - protected $total_size = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\SecurityCenter\V1\GroupResult>|\Google\Protobuf\Internal\RepeatedField $group_by_results - * Group results. There exists an element for each existing unique - * combination of property/values. The element contains a count for the number - * of times those specific property/values appear. - * @type \Google\Protobuf\Timestamp $read_time - * Time used for executing the groupBy request. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results. - * @type int $total_size - * The total number of results matching the query. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Group results. There exists an element for each existing unique - * combination of property/values. The element contains a count for the number - * of times those specific property/values appear. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getGroupByResults() - { - return $this->group_by_results; - } - - /** - * Group results. There exists an element for each existing unique - * combination of property/values. The element contains a count for the number - * of times those specific property/values appear. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.GroupResult group_by_results = 1; - * @param array<\Google\Cloud\SecurityCenter\V1\GroupResult>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setGroupByResults($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\GroupResult::class); - $this->group_by_results = $arr; - - return $this; - } - - /** - * Time used for executing the groupBy request. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->read_time; - } - - public function hasReadTime() - { - return isset($this->read_time); - } - - public function clearReadTime() - { - unset($this->read_time); - } - - /** - * Time used for executing the groupBy request. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->read_time = $var; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results. - * - * Generated from protobuf field string next_page_token = 3; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results. - * - * Generated from protobuf field string next_page_token = 3; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * The total number of results matching the query. - * - * Generated from protobuf field int32 total_size = 4; - * @return int - */ - public function getTotalSize() - { - return $this->total_size; - } - - /** - * The total number of results matching the query. - * - * Generated from protobuf field int32 total_size = 4; - * @param int $var - * @return $this - */ - public function setTotalSize($var) - { - GPBUtil::checkInt32($var); - $this->total_size = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GroupResult.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GroupResult.php deleted file mode 100644 index a4e254e07323..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/GroupResult.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.securitycenter.v1.GroupResult - */ -class GroupResult extends \Google\Protobuf\Internal\Message -{ - /** - * Properties matching the groupBy fields in the request. - * - * Generated from protobuf field map properties = 1; - */ - private $properties; - /** - * Total count of resources for the given properties. - * - * Generated from protobuf field int64 count = 2; - */ - protected $count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\MapField $properties - * Properties matching the groupBy fields in the request. - * @type int|string $count - * Total count of resources for the given properties. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Properties matching the groupBy fields in the request. - * - * Generated from protobuf field map properties = 1; - * @return \Google\Protobuf\Internal\MapField - */ - public function getProperties() - { - return $this->properties; - } - - /** - * Properties matching the groupBy fields in the request. - * - * Generated from protobuf field map properties = 1; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setProperties($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Value::class); - $this->properties = $arr; - - return $this; - } - - /** - * Total count of resources for the given properties. - * - * Generated from protobuf field int64 count = 2; - * @return int|string - */ - public function getCount() - { - return $this->count; - } - - /** - * Total count of resources for the given properties. - * - * Generated from protobuf field int64 count = 2; - * @param int|string $var - * @return $this - */ - public function setCount($var) - { - GPBUtil::checkInt64($var); - $this->count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/IamBinding.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/IamBinding.php deleted file mode 100644 index 46549c7e00f2..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/IamBinding.php +++ /dev/null @@ -1,144 +0,0 @@ -google.cloud.securitycenter.v1.IamBinding - */ -class IamBinding extends \Google\Protobuf\Internal\Message -{ - /** - * The action that was performed on a Binding. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.IamBinding.Action action = 1; - */ - protected $action = 0; - /** - * Role that is assigned to "members". - * For example, "roles/viewer", "roles/editor", or "roles/owner". - * - * Generated from protobuf field string role = 2; - */ - protected $role = ''; - /** - * A single identity requesting access for a Cloud Platform resource, - * e.g. "foo@google.com". - * - * Generated from protobuf field string member = 3; - */ - protected $member = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $action - * The action that was performed on a Binding. - * @type string $role - * Role that is assigned to "members". - * For example, "roles/viewer", "roles/editor", or "roles/owner". - * @type string $member - * A single identity requesting access for a Cloud Platform resource, - * e.g. "foo@google.com". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\IamBinding::initOnce(); - parent::__construct($data); - } - - /** - * The action that was performed on a Binding. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.IamBinding.Action action = 1; - * @return int - */ - public function getAction() - { - return $this->action; - } - - /** - * The action that was performed on a Binding. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.IamBinding.Action action = 1; - * @param int $var - * @return $this - */ - public function setAction($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1\IamBinding\Action::class); - $this->action = $var; - - return $this; - } - - /** - * Role that is assigned to "members". - * For example, "roles/viewer", "roles/editor", or "roles/owner". - * - * Generated from protobuf field string role = 2; - * @return string - */ - public function getRole() - { - return $this->role; - } - - /** - * Role that is assigned to "members". - * For example, "roles/viewer", "roles/editor", or "roles/owner". - * - * Generated from protobuf field string role = 2; - * @param string $var - * @return $this - */ - public function setRole($var) - { - GPBUtil::checkString($var, True); - $this->role = $var; - - return $this; - } - - /** - * A single identity requesting access for a Cloud Platform resource, - * e.g. "foo@google.com". - * - * Generated from protobuf field string member = 3; - * @return string - */ - public function getMember() - { - return $this->member; - } - - /** - * A single identity requesting access for a Cloud Platform resource, - * e.g. "foo@google.com". - * - * Generated from protobuf field string member = 3; - * @param string $var - * @return $this - */ - public function setMember($var) - { - GPBUtil::checkString($var, True); - $this->member = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/IamBinding/Action.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/IamBinding/Action.php deleted file mode 100644 index f846cd97254a..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/IamBinding/Action.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.securitycenter.v1.IamBinding.Action - */ -class Action -{ - /** - * Unspecified. - * - * Generated from protobuf enum ACTION_UNSPECIFIED = 0; - */ - const ACTION_UNSPECIFIED = 0; - /** - * Addition of a Binding. - * - * Generated from protobuf enum ADD = 1; - */ - const ADD = 1; - /** - * Removal of a Binding. - * - * Generated from protobuf enum REMOVE = 2; - */ - const REMOVE = 2; - - private static $valueToName = [ - self::ACTION_UNSPECIFIED => 'ACTION_UNSPECIFIED', - self::ADD => 'ADD', - self::REMOVE => 'REMOVE', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Action::class, \Google\Cloud\SecurityCenter\V1\IamBinding_Action::class); - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/IamBinding_Action.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/IamBinding_Action.php deleted file mode 100644 index 711cccfaebb3..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/IamBinding_Action.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.securitycenter.v1.Indicator - */ -class Indicator extends \Google\Protobuf\Internal\Message -{ - /** - * List of ip addresses associated to the Finding. - * - * Generated from protobuf field repeated string ip_addresses = 1; - */ - private $ip_addresses; - /** - * List of domains associated to the Finding. - * - * Generated from protobuf field repeated string domains = 2; - */ - private $domains; - /** - * The list of matched signatures indicating that the given - * process is present in the environment. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature signatures = 3; - */ - private $signatures; - /** - * The list of URIs associated to the Findings. - * - * Generated from protobuf field repeated string uris = 4; - */ - private $uris; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $ip_addresses - * List of ip addresses associated to the Finding. - * @type array|\Google\Protobuf\Internal\RepeatedField $domains - * List of domains associated to the Finding. - * @type array<\Google\Cloud\SecurityCenter\V1\Indicator\ProcessSignature>|\Google\Protobuf\Internal\RepeatedField $signatures - * The list of matched signatures indicating that the given - * process is present in the environment. - * @type array|\Google\Protobuf\Internal\RepeatedField $uris - * The list of URIs associated to the Findings. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\Indicator::initOnce(); - parent::__construct($data); - } - - /** - * List of ip addresses associated to the Finding. - * - * Generated from protobuf field repeated string ip_addresses = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getIpAddresses() - { - return $this->ip_addresses; - } - - /** - * List of ip addresses associated to the Finding. - * - * Generated from protobuf field repeated string ip_addresses = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setIpAddresses($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->ip_addresses = $arr; - - return $this; - } - - /** - * List of domains associated to the Finding. - * - * Generated from protobuf field repeated string domains = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDomains() - { - return $this->domains; - } - - /** - * List of domains associated to the Finding. - * - * Generated from protobuf field repeated string domains = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDomains($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->domains = $arr; - - return $this; - } - - /** - * The list of matched signatures indicating that the given - * process is present in the environment. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature signatures = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSignatures() - { - return $this->signatures; - } - - /** - * The list of matched signatures indicating that the given - * process is present in the environment. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature signatures = 3; - * @param array<\Google\Cloud\SecurityCenter\V1\Indicator\ProcessSignature>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSignatures($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\Indicator\ProcessSignature::class); - $this->signatures = $arr; - - return $this; - } - - /** - * The list of URIs associated to the Findings. - * - * Generated from protobuf field repeated string uris = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUris() - { - return $this->uris; - } - - /** - * The list of URIs associated to the Findings. - * - * Generated from protobuf field repeated string uris = 4; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUris($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->uris = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Indicator/ProcessSignature.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Indicator/ProcessSignature.php deleted file mode 100644 index ebf591a8cffa..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Indicator/ProcessSignature.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.securitycenter.v1.Indicator.ProcessSignature - */ -class ProcessSignature extends \Google\Protobuf\Internal\Message -{ - protected $signature; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\SecurityCenter\V1\Indicator\ProcessSignature\MemoryHashSignature $memory_hash_signature - * Signature indicating that a binary family was matched. - * @type \Google\Cloud\SecurityCenter\V1\Indicator\ProcessSignature\YaraRuleSignature $yara_rule_signature - * Signature indicating that a YARA rule was matched. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\Indicator::initOnce(); - parent::__construct($data); - } - - /** - * Signature indicating that a binary family was matched. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature memory_hash_signature = 6; - * @return \Google\Cloud\SecurityCenter\V1\Indicator\ProcessSignature\MemoryHashSignature|null - */ - public function getMemoryHashSignature() - { - return $this->readOneof(6); - } - - public function hasMemoryHashSignature() - { - return $this->hasOneof(6); - } - - /** - * Signature indicating that a binary family was matched. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature memory_hash_signature = 6; - * @param \Google\Cloud\SecurityCenter\V1\Indicator\ProcessSignature\MemoryHashSignature $var - * @return $this - */ - public function setMemoryHashSignature($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\Indicator\ProcessSignature\MemoryHashSignature::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Signature indicating that a YARA rule was matched. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature yara_rule_signature = 7; - * @return \Google\Cloud\SecurityCenter\V1\Indicator\ProcessSignature\YaraRuleSignature|null - */ - public function getYaraRuleSignature() - { - return $this->readOneof(7); - } - - public function hasYaraRuleSignature() - { - return $this->hasOneof(7); - } - - /** - * Signature indicating that a YARA rule was matched. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature yara_rule_signature = 7; - * @param \Google\Cloud\SecurityCenter\V1\Indicator\ProcessSignature\YaraRuleSignature $var - * @return $this - */ - public function setYaraRuleSignature($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\Indicator\ProcessSignature\YaraRuleSignature::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * @return string - */ - public function getSignature() - { - return $this->whichOneof("signature"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ProcessSignature::class, \Google\Cloud\SecurityCenter\V1\Indicator_ProcessSignature::class); - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Indicator/ProcessSignature/MemoryHashSignature.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Indicator/ProcessSignature/MemoryHashSignature.php deleted file mode 100644 index 11476d5b7ad9..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Indicator/ProcessSignature/MemoryHashSignature.php +++ /dev/null @@ -1,108 +0,0 @@ -google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature - */ -class MemoryHashSignature extends \Google\Protobuf\Internal\Message -{ - /** - * The binary family. - * - * Generated from protobuf field string binary_family = 1; - */ - protected $binary_family = ''; - /** - * The list of memory hash detections contributing to the binary family - * match. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; - */ - private $detections; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $binary_family - * The binary family. - * @type array<\Google\Cloud\SecurityCenter\V1\Indicator\ProcessSignature\MemoryHashSignature\Detection>|\Google\Protobuf\Internal\RepeatedField $detections - * The list of memory hash detections contributing to the binary family - * match. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\Indicator::initOnce(); - parent::__construct($data); - } - - /** - * The binary family. - * - * Generated from protobuf field string binary_family = 1; - * @return string - */ - public function getBinaryFamily() - { - return $this->binary_family; - } - - /** - * The binary family. - * - * Generated from protobuf field string binary_family = 1; - * @param string $var - * @return $this - */ - public function setBinaryFamily($var) - { - GPBUtil::checkString($var, True); - $this->binary_family = $var; - - return $this; - } - - /** - * The list of memory hash detections contributing to the binary family - * match. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDetections() - { - return $this->detections; - } - - /** - * The list of memory hash detections contributing to the binary family - * match. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; - * @param array<\Google\Cloud\SecurityCenter\V1\Indicator\ProcessSignature\MemoryHashSignature\Detection>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDetections($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\Indicator\ProcessSignature\MemoryHashSignature\Detection::class); - $this->detections = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(MemoryHashSignature::class, \Google\Cloud\SecurityCenter\V1\Indicator_ProcessSignature_MemoryHashSignature::class); - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Indicator/ProcessSignature/MemoryHashSignature/Detection.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Indicator/ProcessSignature/MemoryHashSignature/Detection.php deleted file mode 100644 index 5ffcc1036014..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Indicator/ProcessSignature/MemoryHashSignature/Detection.php +++ /dev/null @@ -1,112 +0,0 @@ -google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection - */ -class Detection extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the binary associated with the memory hash - * signature detection. - * - * Generated from protobuf field string binary = 2; - */ - protected $binary = ''; - /** - * The percentage of memory page hashes in the signature - * that were matched. - * - * Generated from protobuf field double percent_pages_matched = 3; - */ - protected $percent_pages_matched = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $binary - * The name of the binary associated with the memory hash - * signature detection. - * @type float $percent_pages_matched - * The percentage of memory page hashes in the signature - * that were matched. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\Indicator::initOnce(); - parent::__construct($data); - } - - /** - * The name of the binary associated with the memory hash - * signature detection. - * - * Generated from protobuf field string binary = 2; - * @return string - */ - public function getBinary() - { - return $this->binary; - } - - /** - * The name of the binary associated with the memory hash - * signature detection. - * - * Generated from protobuf field string binary = 2; - * @param string $var - * @return $this - */ - public function setBinary($var) - { - GPBUtil::checkString($var, True); - $this->binary = $var; - - return $this; - } - - /** - * The percentage of memory page hashes in the signature - * that were matched. - * - * Generated from protobuf field double percent_pages_matched = 3; - * @return float - */ - public function getPercentPagesMatched() - { - return $this->percent_pages_matched; - } - - /** - * The percentage of memory page hashes in the signature - * that were matched. - * - * Generated from protobuf field double percent_pages_matched = 3; - * @param float $var - * @return $this - */ - public function setPercentPagesMatched($var) - { - GPBUtil::checkDouble($var); - $this->percent_pages_matched = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Detection::class, \Google\Cloud\SecurityCenter\V1\Indicator_ProcessSignature_MemoryHashSignature_Detection::class); - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Indicator/ProcessSignature/YaraRuleSignature.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Indicator/ProcessSignature/YaraRuleSignature.php deleted file mode 100644 index 2b26a610f499..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Indicator/ProcessSignature/YaraRuleSignature.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature - */ -class YaraRuleSignature extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the YARA rule. - * - * Generated from protobuf field string yara_rule = 5; - */ - protected $yara_rule = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $yara_rule - * The name of the YARA rule. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\Indicator::initOnce(); - parent::__construct($data); - } - - /** - * The name of the YARA rule. - * - * Generated from protobuf field string yara_rule = 5; - * @return string - */ - public function getYaraRule() - { - return $this->yara_rule; - } - - /** - * The name of the YARA rule. - * - * Generated from protobuf field string yara_rule = 5; - * @param string $var - * @return $this - */ - public function setYaraRule($var) - { - GPBUtil::checkString($var, True); - $this->yara_rule = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(YaraRuleSignature::class, \Google\Cloud\SecurityCenter\V1\Indicator_ProcessSignature_YaraRuleSignature::class); - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Indicator_ProcessSignature.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Indicator_ProcessSignature.php deleted file mode 100644 index 1eaac4fd6698..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Indicator_ProcessSignature.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.securitycenter.v1.KernelRootkit - */ -class KernelRootkit extends \Google\Protobuf\Internal\Message -{ - /** - * Rootkit name when available. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * True if unexpected modifications of kernel code memory are present. - * - * Generated from protobuf field bool unexpected_code_modification = 2; - */ - protected $unexpected_code_modification = false; - /** - * True if unexpected modifications of kernel read-only data memory are - * present. - * - * Generated from protobuf field bool unexpected_read_only_data_modification = 3; - */ - protected $unexpected_read_only_data_modification = false; - /** - * True if `ftrace` points are present with callbacks pointing to regions - * that are not in the expected kernel or module code range. - * - * Generated from protobuf field bool unexpected_ftrace_handler = 4; - */ - protected $unexpected_ftrace_handler = false; - /** - * True if `kprobe` points are present with callbacks pointing to regions - * that are not in the expected kernel or module code range. - * - * Generated from protobuf field bool unexpected_kprobe_handler = 5; - */ - protected $unexpected_kprobe_handler = false; - /** - * True if kernel code pages that are not in the expected kernel or module - * code regions are present. - * - * Generated from protobuf field bool unexpected_kernel_code_pages = 6; - */ - protected $unexpected_kernel_code_pages = false; - /** - * True if system call handlers that are are not in the expected kernel or - * module code regions are present. - * - * Generated from protobuf field bool unexpected_system_call_handler = 7; - */ - protected $unexpected_system_call_handler = false; - /** - * True if interrupt handlers that are are not in the expected kernel or - * module code regions are present. - * - * Generated from protobuf field bool unexpected_interrupt_handler = 8; - */ - protected $unexpected_interrupt_handler = false; - /** - * True if unexpected processes in the scheduler run queue are present. Such - * processes are in the run queue, but not in the process task list. - * - * Generated from protobuf field bool unexpected_processes_in_runqueue = 9; - */ - protected $unexpected_processes_in_runqueue = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Rootkit name when available. - * @type bool $unexpected_code_modification - * True if unexpected modifications of kernel code memory are present. - * @type bool $unexpected_read_only_data_modification - * True if unexpected modifications of kernel read-only data memory are - * present. - * @type bool $unexpected_ftrace_handler - * True if `ftrace` points are present with callbacks pointing to regions - * that are not in the expected kernel or module code range. - * @type bool $unexpected_kprobe_handler - * True if `kprobe` points are present with callbacks pointing to regions - * that are not in the expected kernel or module code range. - * @type bool $unexpected_kernel_code_pages - * True if kernel code pages that are not in the expected kernel or module - * code regions are present. - * @type bool $unexpected_system_call_handler - * True if system call handlers that are are not in the expected kernel or - * module code regions are present. - * @type bool $unexpected_interrupt_handler - * True if interrupt handlers that are are not in the expected kernel or - * module code regions are present. - * @type bool $unexpected_processes_in_runqueue - * True if unexpected processes in the scheduler run queue are present. Such - * processes are in the run queue, but not in the process task list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\KernelRootkit::initOnce(); - parent::__construct($data); - } - - /** - * Rootkit name when available. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Rootkit name when available. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * True if unexpected modifications of kernel code memory are present. - * - * Generated from protobuf field bool unexpected_code_modification = 2; - * @return bool - */ - public function getUnexpectedCodeModification() - { - return $this->unexpected_code_modification; - } - - /** - * True if unexpected modifications of kernel code memory are present. - * - * Generated from protobuf field bool unexpected_code_modification = 2; - * @param bool $var - * @return $this - */ - public function setUnexpectedCodeModification($var) - { - GPBUtil::checkBool($var); - $this->unexpected_code_modification = $var; - - return $this; - } - - /** - * True if unexpected modifications of kernel read-only data memory are - * present. - * - * Generated from protobuf field bool unexpected_read_only_data_modification = 3; - * @return bool - */ - public function getUnexpectedReadOnlyDataModification() - { - return $this->unexpected_read_only_data_modification; - } - - /** - * True if unexpected modifications of kernel read-only data memory are - * present. - * - * Generated from protobuf field bool unexpected_read_only_data_modification = 3; - * @param bool $var - * @return $this - */ - public function setUnexpectedReadOnlyDataModification($var) - { - GPBUtil::checkBool($var); - $this->unexpected_read_only_data_modification = $var; - - return $this; - } - - /** - * True if `ftrace` points are present with callbacks pointing to regions - * that are not in the expected kernel or module code range. - * - * Generated from protobuf field bool unexpected_ftrace_handler = 4; - * @return bool - */ - public function getUnexpectedFtraceHandler() - { - return $this->unexpected_ftrace_handler; - } - - /** - * True if `ftrace` points are present with callbacks pointing to regions - * that are not in the expected kernel or module code range. - * - * Generated from protobuf field bool unexpected_ftrace_handler = 4; - * @param bool $var - * @return $this - */ - public function setUnexpectedFtraceHandler($var) - { - GPBUtil::checkBool($var); - $this->unexpected_ftrace_handler = $var; - - return $this; - } - - /** - * True if `kprobe` points are present with callbacks pointing to regions - * that are not in the expected kernel or module code range. - * - * Generated from protobuf field bool unexpected_kprobe_handler = 5; - * @return bool - */ - public function getUnexpectedKprobeHandler() - { - return $this->unexpected_kprobe_handler; - } - - /** - * True if `kprobe` points are present with callbacks pointing to regions - * that are not in the expected kernel or module code range. - * - * Generated from protobuf field bool unexpected_kprobe_handler = 5; - * @param bool $var - * @return $this - */ - public function setUnexpectedKprobeHandler($var) - { - GPBUtil::checkBool($var); - $this->unexpected_kprobe_handler = $var; - - return $this; - } - - /** - * True if kernel code pages that are not in the expected kernel or module - * code regions are present. - * - * Generated from protobuf field bool unexpected_kernel_code_pages = 6; - * @return bool - */ - public function getUnexpectedKernelCodePages() - { - return $this->unexpected_kernel_code_pages; - } - - /** - * True if kernel code pages that are not in the expected kernel or module - * code regions are present. - * - * Generated from protobuf field bool unexpected_kernel_code_pages = 6; - * @param bool $var - * @return $this - */ - public function setUnexpectedKernelCodePages($var) - { - GPBUtil::checkBool($var); - $this->unexpected_kernel_code_pages = $var; - - return $this; - } - - /** - * True if system call handlers that are are not in the expected kernel or - * module code regions are present. - * - * Generated from protobuf field bool unexpected_system_call_handler = 7; - * @return bool - */ - public function getUnexpectedSystemCallHandler() - { - return $this->unexpected_system_call_handler; - } - - /** - * True if system call handlers that are are not in the expected kernel or - * module code regions are present. - * - * Generated from protobuf field bool unexpected_system_call_handler = 7; - * @param bool $var - * @return $this - */ - public function setUnexpectedSystemCallHandler($var) - { - GPBUtil::checkBool($var); - $this->unexpected_system_call_handler = $var; - - return $this; - } - - /** - * True if interrupt handlers that are are not in the expected kernel or - * module code regions are present. - * - * Generated from protobuf field bool unexpected_interrupt_handler = 8; - * @return bool - */ - public function getUnexpectedInterruptHandler() - { - return $this->unexpected_interrupt_handler; - } - - /** - * True if interrupt handlers that are are not in the expected kernel or - * module code regions are present. - * - * Generated from protobuf field bool unexpected_interrupt_handler = 8; - * @param bool $var - * @return $this - */ - public function setUnexpectedInterruptHandler($var) - { - GPBUtil::checkBool($var); - $this->unexpected_interrupt_handler = $var; - - return $this; - } - - /** - * True if unexpected processes in the scheduler run queue are present. Such - * processes are in the run queue, but not in the process task list. - * - * Generated from protobuf field bool unexpected_processes_in_runqueue = 9; - * @return bool - */ - public function getUnexpectedProcessesInRunqueue() - { - return $this->unexpected_processes_in_runqueue; - } - - /** - * True if unexpected processes in the scheduler run queue are present. Such - * processes are in the run queue, but not in the process task list. - * - * Generated from protobuf field bool unexpected_processes_in_runqueue = 9; - * @param bool $var - * @return $this - */ - public function setUnexpectedProcessesInRunqueue($var) - { - GPBUtil::checkBool($var); - $this->unexpected_processes_in_runqueue = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes.php deleted file mode 100644 index e431f2818c65..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes.php +++ /dev/null @@ -1,257 +0,0 @@ -google.cloud.securitycenter.v1.Kubernetes - */ -class Kubernetes extends \Google\Protobuf\Internal\Message -{ - /** - * Kubernetes Pods associated with the finding. This field will contain Pod - * records for each container that is owned by a Pod. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Kubernetes.Pod pods = 1; - */ - private $pods; - /** - * Provides Kubernetes Node information. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; - */ - private $nodes; - /** - * GKE Node Pools associated with the finding. This field will - * contain NodePool information for each Node, when it is available. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Kubernetes.NodePool node_pools = 3; - */ - private $node_pools; - /** - * Provides Kubernetes role information for findings that involve - * Roles or ClusterRoles. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Kubernetes.Role roles = 4; - */ - private $roles; - /** - * Provides Kubernetes role binding information for findings that involve - * RoleBindings or ClusterRoleBindings. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Kubernetes.Binding bindings = 5; - */ - private $bindings; - /** - * Provides information on any Kubernetes access reviews (i.e. privilege - * checks) relevant to the finding. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Kubernetes.AccessReview access_reviews = 6; - */ - private $access_reviews; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\SecurityCenter\V1\Kubernetes\Pod>|\Google\Protobuf\Internal\RepeatedField $pods - * Kubernetes Pods associated with the finding. This field will contain Pod - * records for each container that is owned by a Pod. - * @type array<\Google\Cloud\SecurityCenter\V1\Kubernetes\Node>|\Google\Protobuf\Internal\RepeatedField $nodes - * Provides Kubernetes Node information. - * @type array<\Google\Cloud\SecurityCenter\V1\Kubernetes\NodePool>|\Google\Protobuf\Internal\RepeatedField $node_pools - * GKE Node Pools associated with the finding. This field will - * contain NodePool information for each Node, when it is available. - * @type array<\Google\Cloud\SecurityCenter\V1\Kubernetes\Role>|\Google\Protobuf\Internal\RepeatedField $roles - * Provides Kubernetes role information for findings that involve - * Roles or ClusterRoles. - * @type array<\Google\Cloud\SecurityCenter\V1\Kubernetes\Binding>|\Google\Protobuf\Internal\RepeatedField $bindings - * Provides Kubernetes role binding information for findings that involve - * RoleBindings or ClusterRoleBindings. - * @type array<\Google\Cloud\SecurityCenter\V1\Kubernetes\AccessReview>|\Google\Protobuf\Internal\RepeatedField $access_reviews - * Provides information on any Kubernetes access reviews (i.e. privilege - * checks) relevant to the finding. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\Kubernetes::initOnce(); - parent::__construct($data); - } - - /** - * Kubernetes Pods associated with the finding. This field will contain Pod - * records for each container that is owned by a Pod. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Kubernetes.Pod pods = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPods() - { - return $this->pods; - } - - /** - * Kubernetes Pods associated with the finding. This field will contain Pod - * records for each container that is owned by a Pod. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Kubernetes.Pod pods = 1; - * @param array<\Google\Cloud\SecurityCenter\V1\Kubernetes\Pod>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPods($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\Kubernetes\Pod::class); - $this->pods = $arr; - - return $this; - } - - /** - * Provides Kubernetes Node information. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNodes() - { - return $this->nodes; - } - - /** - * Provides Kubernetes Node information. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; - * @param array<\Google\Cloud\SecurityCenter\V1\Kubernetes\Node>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNodes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\Kubernetes\Node::class); - $this->nodes = $arr; - - return $this; - } - - /** - * GKE Node Pools associated with the finding. This field will - * contain NodePool information for each Node, when it is available. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Kubernetes.NodePool node_pools = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNodePools() - { - return $this->node_pools; - } - - /** - * GKE Node Pools associated with the finding. This field will - * contain NodePool information for each Node, when it is available. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Kubernetes.NodePool node_pools = 3; - * @param array<\Google\Cloud\SecurityCenter\V1\Kubernetes\NodePool>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNodePools($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\Kubernetes\NodePool::class); - $this->node_pools = $arr; - - return $this; - } - - /** - * Provides Kubernetes role information for findings that involve - * Roles or ClusterRoles. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Kubernetes.Role roles = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRoles() - { - return $this->roles; - } - - /** - * Provides Kubernetes role information for findings that involve - * Roles or ClusterRoles. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Kubernetes.Role roles = 4; - * @param array<\Google\Cloud\SecurityCenter\V1\Kubernetes\Role>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRoles($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\Kubernetes\Role::class); - $this->roles = $arr; - - return $this; - } - - /** - * Provides Kubernetes role binding information for findings that involve - * RoleBindings or ClusterRoleBindings. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Kubernetes.Binding bindings = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getBindings() - { - return $this->bindings; - } - - /** - * Provides Kubernetes role binding information for findings that involve - * RoleBindings or ClusterRoleBindings. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Kubernetes.Binding bindings = 5; - * @param array<\Google\Cloud\SecurityCenter\V1\Kubernetes\Binding>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setBindings($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\Kubernetes\Binding::class); - $this->bindings = $arr; - - return $this; - } - - /** - * Provides information on any Kubernetes access reviews (i.e. privilege - * checks) relevant to the finding. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Kubernetes.AccessReview access_reviews = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAccessReviews() - { - return $this->access_reviews; - } - - /** - * Provides information on any Kubernetes access reviews (i.e. privilege - * checks) relevant to the finding. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Kubernetes.AccessReview access_reviews = 6; - * @param array<\Google\Cloud\SecurityCenter\V1\Kubernetes\AccessReview>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAccessReviews($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\Kubernetes\AccessReview::class); - $this->access_reviews = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/AccessReview.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/AccessReview.php deleted file mode 100644 index cee5c614be6b..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/AccessReview.php +++ /dev/null @@ -1,287 +0,0 @@ -google.cloud.securitycenter.v1.Kubernetes.AccessReview - */ -class AccessReview extends \Google\Protobuf\Internal\Message -{ - /** - * Group is the API Group of the Resource. "*" means all. - * - * Generated from protobuf field string group = 1; - */ - protected $group = ''; - /** - * Namespace of the action being requested. Currently, there is no - * distinction between no namespace and all namespaces. Both - * are represented by "" (empty). - * - * Generated from protobuf field string ns = 2; - */ - protected $ns = ''; - /** - * Name is the name of the resource being requested. Empty means all. - * - * Generated from protobuf field string name = 3; - */ - protected $name = ''; - /** - * Resource is the optional resource type requested. "*" means all. - * - * Generated from protobuf field string resource = 4; - */ - protected $resource = ''; - /** - * Subresource is the optional subresource type. - * - * Generated from protobuf field string subresource = 5; - */ - protected $subresource = ''; - /** - * Verb is a Kubernetes resource API verb, like: get, list, watch, create, - * update, delete, proxy. "*" means all. - * - * Generated from protobuf field string verb = 6; - */ - protected $verb = ''; - /** - * Version is the API Version of the Resource. "*" means all. - * - * Generated from protobuf field string version = 7; - */ - protected $version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $group - * Group is the API Group of the Resource. "*" means all. - * @type string $ns - * Namespace of the action being requested. Currently, there is no - * distinction between no namespace and all namespaces. Both - * are represented by "" (empty). - * @type string $name - * Name is the name of the resource being requested. Empty means all. - * @type string $resource - * Resource is the optional resource type requested. "*" means all. - * @type string $subresource - * Subresource is the optional subresource type. - * @type string $verb - * Verb is a Kubernetes resource API verb, like: get, list, watch, create, - * update, delete, proxy. "*" means all. - * @type string $version - * Version is the API Version of the Resource. "*" means all. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\Kubernetes::initOnce(); - parent::__construct($data); - } - - /** - * Group is the API Group of the Resource. "*" means all. - * - * Generated from protobuf field string group = 1; - * @return string - */ - public function getGroup() - { - return $this->group; - } - - /** - * Group is the API Group of the Resource. "*" means all. - * - * Generated from protobuf field string group = 1; - * @param string $var - * @return $this - */ - public function setGroup($var) - { - GPBUtil::checkString($var, True); - $this->group = $var; - - return $this; - } - - /** - * Namespace of the action being requested. Currently, there is no - * distinction between no namespace and all namespaces. Both - * are represented by "" (empty). - * - * Generated from protobuf field string ns = 2; - * @return string - */ - public function getNs() - { - return $this->ns; - } - - /** - * Namespace of the action being requested. Currently, there is no - * distinction between no namespace and all namespaces. Both - * are represented by "" (empty). - * - * Generated from protobuf field string ns = 2; - * @param string $var - * @return $this - */ - public function setNs($var) - { - GPBUtil::checkString($var, True); - $this->ns = $var; - - return $this; - } - - /** - * Name is the name of the resource being requested. Empty means all. - * - * Generated from protobuf field string name = 3; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Name is the name of the resource being requested. Empty means all. - * - * Generated from protobuf field string name = 3; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Resource is the optional resource type requested. "*" means all. - * - * Generated from protobuf field string resource = 4; - * @return string - */ - public function getResource() - { - return $this->resource; - } - - /** - * Resource is the optional resource type requested. "*" means all. - * - * Generated from protobuf field string resource = 4; - * @param string $var - * @return $this - */ - public function setResource($var) - { - GPBUtil::checkString($var, True); - $this->resource = $var; - - return $this; - } - - /** - * Subresource is the optional subresource type. - * - * Generated from protobuf field string subresource = 5; - * @return string - */ - public function getSubresource() - { - return $this->subresource; - } - - /** - * Subresource is the optional subresource type. - * - * Generated from protobuf field string subresource = 5; - * @param string $var - * @return $this - */ - public function setSubresource($var) - { - GPBUtil::checkString($var, True); - $this->subresource = $var; - - return $this; - } - - /** - * Verb is a Kubernetes resource API verb, like: get, list, watch, create, - * update, delete, proxy. "*" means all. - * - * Generated from protobuf field string verb = 6; - * @return string - */ - public function getVerb() - { - return $this->verb; - } - - /** - * Verb is a Kubernetes resource API verb, like: get, list, watch, create, - * update, delete, proxy. "*" means all. - * - * Generated from protobuf field string verb = 6; - * @param string $var - * @return $this - */ - public function setVerb($var) - { - GPBUtil::checkString($var, True); - $this->verb = $var; - - return $this; - } - - /** - * Version is the API Version of the Resource. "*" means all. - * - * Generated from protobuf field string version = 7; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Version is the API Version of the Resource. "*" means all. - * - * Generated from protobuf field string version = 7; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AccessReview::class, \Google\Cloud\SecurityCenter\V1\Kubernetes_AccessReview::class); - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/Binding.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/Binding.php deleted file mode 100644 index b49bad0bdc1f..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/Binding.php +++ /dev/null @@ -1,186 +0,0 @@ -google.cloud.securitycenter.v1.Kubernetes.Binding - */ -class Binding extends \Google\Protobuf\Internal\Message -{ - /** - * Namespace for binding. - * - * Generated from protobuf field string ns = 1; - */ - protected $ns = ''; - /** - * Name for binding. - * - * Generated from protobuf field string name = 2; - */ - protected $name = ''; - /** - * The Role or ClusterRole referenced by the binding. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Kubernetes.Role role = 3; - */ - protected $role = null; - /** - * Represents the subjects(s) bound to the role. Not always available - * for PATCH requests. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Kubernetes.Subject subjects = 4; - */ - private $subjects; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $ns - * Namespace for binding. - * @type string $name - * Name for binding. - * @type \Google\Cloud\SecurityCenter\V1\Kubernetes\Role $role - * The Role or ClusterRole referenced by the binding. - * @type array<\Google\Cloud\SecurityCenter\V1\Kubernetes\Subject>|\Google\Protobuf\Internal\RepeatedField $subjects - * Represents the subjects(s) bound to the role. Not always available - * for PATCH requests. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\Kubernetes::initOnce(); - parent::__construct($data); - } - - /** - * Namespace for binding. - * - * Generated from protobuf field string ns = 1; - * @return string - */ - public function getNs() - { - return $this->ns; - } - - /** - * Namespace for binding. - * - * Generated from protobuf field string ns = 1; - * @param string $var - * @return $this - */ - public function setNs($var) - { - GPBUtil::checkString($var, True); - $this->ns = $var; - - return $this; - } - - /** - * Name for binding. - * - * Generated from protobuf field string name = 2; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Name for binding. - * - * Generated from protobuf field string name = 2; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The Role or ClusterRole referenced by the binding. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Kubernetes.Role role = 3; - * @return \Google\Cloud\SecurityCenter\V1\Kubernetes\Role|null - */ - public function getRole() - { - return $this->role; - } - - public function hasRole() - { - return isset($this->role); - } - - public function clearRole() - { - unset($this->role); - } - - /** - * The Role or ClusterRole referenced by the binding. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Kubernetes.Role role = 3; - * @param \Google\Cloud\SecurityCenter\V1\Kubernetes\Role $var - * @return $this - */ - public function setRole($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\Kubernetes\Role::class); - $this->role = $var; - - return $this; - } - - /** - * Represents the subjects(s) bound to the role. Not always available - * for PATCH requests. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Kubernetes.Subject subjects = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSubjects() - { - return $this->subjects; - } - - /** - * Represents the subjects(s) bound to the role. Not always available - * for PATCH requests. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Kubernetes.Subject subjects = 4; - * @param array<\Google\Cloud\SecurityCenter\V1\Kubernetes\Subject>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSubjects($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\Kubernetes\Subject::class); - $this->subjects = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Binding::class, \Google\Cloud\SecurityCenter\V1\Kubernetes_Binding::class); - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/Node.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/Node.php deleted file mode 100644 index dff9526301ff..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/Node.php +++ /dev/null @@ -1,74 +0,0 @@ -google.cloud.securitycenter.v1.Kubernetes.Node - */ -class Node extends \Google\Protobuf\Internal\Message -{ - /** - * Full Resource name of the Compute Engine VM running the - * cluster node. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Full Resource name of the Compute Engine VM running the - * cluster node. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\Kubernetes::initOnce(); - parent::__construct($data); - } - - /** - * Full Resource name of the Compute Engine VM running the - * cluster node. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Full Resource name of the Compute Engine VM running the - * cluster node. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Node::class, \Google\Cloud\SecurityCenter\V1\Kubernetes_Node::class); - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/NodePool.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/NodePool.php deleted file mode 100644 index 372c9bec0e82..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/NodePool.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.securitycenter.v1.Kubernetes.NodePool - */ -class NodePool extends \Google\Protobuf\Internal\Message -{ - /** - * Kubernetes Node pool name. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Nodes associated with the finding. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; - */ - private $nodes; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Kubernetes Node pool name. - * @type array<\Google\Cloud\SecurityCenter\V1\Kubernetes\Node>|\Google\Protobuf\Internal\RepeatedField $nodes - * Nodes associated with the finding. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\Kubernetes::initOnce(); - parent::__construct($data); - } - - /** - * Kubernetes Node pool name. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Kubernetes Node pool name. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Nodes associated with the finding. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNodes() - { - return $this->nodes; - } - - /** - * Nodes associated with the finding. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Kubernetes.Node nodes = 2; - * @param array<\Google\Cloud\SecurityCenter\V1\Kubernetes\Node>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNodes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\Kubernetes\Node::class); - $this->nodes = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(NodePool::class, \Google\Cloud\SecurityCenter\V1\Kubernetes_NodePool::class); - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/Pod.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/Pod.php deleted file mode 100644 index 0365bdd2a73f..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/Pod.php +++ /dev/null @@ -1,176 +0,0 @@ -google.cloud.securitycenter.v1.Kubernetes.Pod - */ -class Pod extends \Google\Protobuf\Internal\Message -{ - /** - * Kubernetes Pod namespace. - * - * Generated from protobuf field string ns = 1; - */ - protected $ns = ''; - /** - * Kubernetes Pod name. - * - * Generated from protobuf field string name = 2; - */ - protected $name = ''; - /** - * Pod labels. For Kubernetes containers, these are applied to the - * container. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Label labels = 3; - */ - private $labels; - /** - * Pod containers associated with this finding, if any. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Container containers = 4; - */ - private $containers; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $ns - * Kubernetes Pod namespace. - * @type string $name - * Kubernetes Pod name. - * @type array<\Google\Cloud\SecurityCenter\V1\Label>|\Google\Protobuf\Internal\RepeatedField $labels - * Pod labels. For Kubernetes containers, these are applied to the - * container. - * @type array<\Google\Cloud\SecurityCenter\V1\Container>|\Google\Protobuf\Internal\RepeatedField $containers - * Pod containers associated with this finding, if any. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\Kubernetes::initOnce(); - parent::__construct($data); - } - - /** - * Kubernetes Pod namespace. - * - * Generated from protobuf field string ns = 1; - * @return string - */ - public function getNs() - { - return $this->ns; - } - - /** - * Kubernetes Pod namespace. - * - * Generated from protobuf field string ns = 1; - * @param string $var - * @return $this - */ - public function setNs($var) - { - GPBUtil::checkString($var, True); - $this->ns = $var; - - return $this; - } - - /** - * Kubernetes Pod name. - * - * Generated from protobuf field string name = 2; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Kubernetes Pod name. - * - * Generated from protobuf field string name = 2; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Pod labels. For Kubernetes containers, these are applied to the - * container. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Label labels = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Pod labels. For Kubernetes containers, these are applied to the - * container. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Label labels = 3; - * @param array<\Google\Cloud\SecurityCenter\V1\Label>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\Label::class); - $this->labels = $arr; - - return $this; - } - - /** - * Pod containers associated with this finding, if any. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Container containers = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getContainers() - { - return $this->containers; - } - - /** - * Pod containers associated with this finding, if any. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Container containers = 4; - * @param array<\Google\Cloud\SecurityCenter\V1\Container>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setContainers($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\Container::class); - $this->containers = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Pod::class, \Google\Cloud\SecurityCenter\V1\Kubernetes_Pod::class); - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/Role.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/Role.php deleted file mode 100644 index 87c452fbdc16..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/Role.php +++ /dev/null @@ -1,138 +0,0 @@ -google.cloud.securitycenter.v1.Kubernetes.Role - */ -class Role extends \Google\Protobuf\Internal\Message -{ - /** - * Role type. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Kubernetes.Role.Kind kind = 1; - */ - protected $kind = 0; - /** - * Role namespace. - * - * Generated from protobuf field string ns = 2; - */ - protected $ns = ''; - /** - * Role name. - * - * Generated from protobuf field string name = 3; - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $kind - * Role type. - * @type string $ns - * Role namespace. - * @type string $name - * Role name. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\Kubernetes::initOnce(); - parent::__construct($data); - } - - /** - * Role type. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Kubernetes.Role.Kind kind = 1; - * @return int - */ - public function getKind() - { - return $this->kind; - } - - /** - * Role type. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Kubernetes.Role.Kind kind = 1; - * @param int $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1\Kubernetes\Role\Kind::class); - $this->kind = $var; - - return $this; - } - - /** - * Role namespace. - * - * Generated from protobuf field string ns = 2; - * @return string - */ - public function getNs() - { - return $this->ns; - } - - /** - * Role namespace. - * - * Generated from protobuf field string ns = 2; - * @param string $var - * @return $this - */ - public function setNs($var) - { - GPBUtil::checkString($var, True); - $this->ns = $var; - - return $this; - } - - /** - * Role name. - * - * Generated from protobuf field string name = 3; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Role name. - * - * Generated from protobuf field string name = 3; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Role::class, \Google\Cloud\SecurityCenter\V1\Kubernetes_Role::class); - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/Role/Kind.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/Role/Kind.php deleted file mode 100644 index 36dd17cbb47b..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/Role/Kind.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.securitycenter.v1.Kubernetes.Role.Kind - */ -class Kind -{ - /** - * Role type is not specified. - * - * Generated from protobuf enum KIND_UNSPECIFIED = 0; - */ - const KIND_UNSPECIFIED = 0; - /** - * Kubernetes Role. - * - * Generated from protobuf enum ROLE = 1; - */ - const ROLE = 1; - /** - * Kubernetes ClusterRole. - * - * Generated from protobuf enum CLUSTER_ROLE = 2; - */ - const CLUSTER_ROLE = 2; - - private static $valueToName = [ - self::KIND_UNSPECIFIED => 'KIND_UNSPECIFIED', - self::ROLE => 'ROLE', - self::CLUSTER_ROLE => 'CLUSTER_ROLE', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Kind::class, \Google\Cloud\SecurityCenter\V1\Kubernetes_Role_Kind::class); - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/Subject.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/Subject.php deleted file mode 100644 index ce92c29e71db..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/Subject.php +++ /dev/null @@ -1,138 +0,0 @@ -google.cloud.securitycenter.v1.Kubernetes.Subject - */ -class Subject extends \Google\Protobuf\Internal\Message -{ - /** - * Authentication type for subject. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Kubernetes.Subject.AuthType kind = 1; - */ - protected $kind = 0; - /** - * Namespace for subject. - * - * Generated from protobuf field string ns = 2; - */ - protected $ns = ''; - /** - * Name for subject. - * - * Generated from protobuf field string name = 3; - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $kind - * Authentication type for subject. - * @type string $ns - * Namespace for subject. - * @type string $name - * Name for subject. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\Kubernetes::initOnce(); - parent::__construct($data); - } - - /** - * Authentication type for subject. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Kubernetes.Subject.AuthType kind = 1; - * @return int - */ - public function getKind() - { - return $this->kind; - } - - /** - * Authentication type for subject. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Kubernetes.Subject.AuthType kind = 1; - * @param int $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1\Kubernetes\Subject\AuthType::class); - $this->kind = $var; - - return $this; - } - - /** - * Namespace for subject. - * - * Generated from protobuf field string ns = 2; - * @return string - */ - public function getNs() - { - return $this->ns; - } - - /** - * Namespace for subject. - * - * Generated from protobuf field string ns = 2; - * @param string $var - * @return $this - */ - public function setNs($var) - { - GPBUtil::checkString($var, True); - $this->ns = $var; - - return $this; - } - - /** - * Name for subject. - * - * Generated from protobuf field string name = 3; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Name for subject. - * - * Generated from protobuf field string name = 3; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Subject::class, \Google\Cloud\SecurityCenter\V1\Kubernetes_Subject::class); - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/Subject/AuthType.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/Subject/AuthType.php deleted file mode 100644 index b71d56232f57..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes/Subject/AuthType.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.securitycenter.v1.Kubernetes.Subject.AuthType - */ -class AuthType -{ - /** - * Authentication is not specified. - * - * Generated from protobuf enum AUTH_TYPE_UNSPECIFIED = 0; - */ - const AUTH_TYPE_UNSPECIFIED = 0; - /** - * User with valid certificate. - * - * Generated from protobuf enum USER = 1; - */ - const USER = 1; - /** - * Users managed by Kubernetes API with credentials stored as Secrets. - * - * Generated from protobuf enum SERVICEACCOUNT = 2; - */ - const SERVICEACCOUNT = 2; - /** - * Collection of users. - * - * Generated from protobuf enum GROUP = 3; - */ - const GROUP = 3; - - private static $valueToName = [ - self::AUTH_TYPE_UNSPECIFIED => 'AUTH_TYPE_UNSPECIFIED', - self::USER => 'USER', - self::SERVICEACCOUNT => 'SERVICEACCOUNT', - self::GROUP => 'GROUP', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AuthType::class, \Google\Cloud\SecurityCenter\V1\Kubernetes_Subject_AuthType::class); - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes_AccessReview.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes_AccessReview.php deleted file mode 100644 index 8a67ce2863ae..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Kubernetes_AccessReview.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.securitycenter.v1.Label - */ -class Label extends \Google\Protobuf\Internal\Message -{ - /** - * Label name. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Label value. - * - * Generated from protobuf field string value = 2; - */ - protected $value = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Label name. - * @type string $value - * Label value. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\Label::initOnce(); - parent::__construct($data); - } - - /** - * Label name. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Label name. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Label value. - * - * Generated from protobuf field string value = 2; - * @return string - */ - public function getValue() - { - return $this->value; - } - - /** - * Label value. - * - * Generated from protobuf field string value = 2; - * @param string $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkString($var, True); - $this->value = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListAssetsRequest.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListAssetsRequest.php deleted file mode 100644 index 0601a927e3bc..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListAssetsRequest.php +++ /dev/null @@ -1,719 +0,0 @@ -google.cloud.securitycenter.v1.ListAssetsRequest - */ -class ListAssetsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the parent resource that contains the assets. The - * value that you can specify on parent depends on the method in which you - * specify parent. You can specify one of the following values: - * "organizations/[organization_id]", "folders/[folder_id]", or - * "projects/[project_id]". - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Expression that defines the filter to apply across assets. - * The expression is a list of zero or more restrictions combined via logical - * operators `AND` and `OR`. - * Parentheses are supported, and `OR` has higher precedence than `AND`. - * Restrictions have the form ` ` and may have a `-` - * character in front of them to indicate negation. The fields map to those - * defined in the Asset resource. Examples include: - * * name - * * security_center_properties.resource_name - * * resource_properties.a_property - * * security_marks.marks.marka - * The supported operators are: - * * `=` for all value types. - * * `>`, `<`, `>=`, `<=` for integer values. - * * `:`, meaning substring matching, for strings. - * The supported value types are: - * * string literals in quotes. - * * integer literals without quotes. - * * boolean literals `true` and `false` without quotes. - * The following are the allowed field and operator combinations: - * * name: `=` - * * update_time: `=`, `>`, `<`, `>=`, `<=` - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `update_time = "2019-06-10T16:07:18-07:00"` - * `update_time = 1560208038000` - * * create_time: `=`, `>`, `<`, `>=`, `<=` - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `create_time = "2019-06-10T16:07:18-07:00"` - * `create_time = 1560208038000` - * * iam_policy.policy_blob: `=`, `:` - * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - * * security_marks.marks: `=`, `:` - * * security_center_properties.resource_name: `=`, `:` - * * security_center_properties.resource_display_name: `=`, `:` - * * security_center_properties.resource_type: `=`, `:` - * * security_center_properties.resource_parent: `=`, `:` - * * security_center_properties.resource_parent_display_name: `=`, `:` - * * security_center_properties.resource_project: `=`, `:` - * * security_center_properties.resource_project_display_name: `=`, `:` - * * security_center_properties.resource_owners: `=`, `:` - * For example, `resource_properties.size = 100` is a valid filter string. - * Use a partial match on the empty string to filter based on a property - * existing: `resource_properties.my_property : ""` - * Use a negated partial match on the empty string to filter based on a - * property not existing: `-resource_properties.my_property : ""` - * - * Generated from protobuf field string filter = 2; - */ - protected $filter = ''; - /** - * Expression that defines what fields and order to use for sorting. The - * string value should follow SQL syntax: comma separated list of fields. For - * example: "name,resource_properties.a_property". The default sorting order - * is ascending. To specify descending order for a field, a suffix " desc" - * should be appended to the field name. For example: "name - * desc,resource_properties.a_property". Redundant space characters in the - * syntax are insignificant. "name desc,resource_properties.a_property" and " - * name desc , resource_properties.a_property " are equivalent. - * The following fields are supported: - * name - * update_time - * resource_properties - * security_marks.marks - * security_center_properties.resource_name - * security_center_properties.resource_display_name - * security_center_properties.resource_parent - * security_center_properties.resource_parent_display_name - * security_center_properties.resource_project - * security_center_properties.resource_project_display_name - * security_center_properties.resource_type - * - * Generated from protobuf field string order_by = 3; - */ - protected $order_by = ''; - /** - * Time used as a reference point when filtering assets. The filter is limited - * to assets existing at the supplied time and their values are those at that - * specific time. Absence of this field will default to the API's version of - * NOW. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; - */ - protected $read_time = null; - /** - * When compare_duration is set, the ListAssetsResult's "state_change" - * attribute is updated to indicate whether the asset was added, removed, or - * remained present during the compare_duration period of time that precedes - * the read_time. This is the time between (read_time - compare_duration) and - * read_time. - * The state_change value is derived based on the presence of the asset at the - * two points in time. Intermediate state changes between the two times don't - * affect the result. For example, the results aren't affected if the asset is - * removed and re-created again. - * Possible "state_change" values when compare_duration is specified: - * * "ADDED": indicates that the asset was not present at the start of - * compare_duration, but present at read_time. - * * "REMOVED": indicates that the asset was present at the start of - * compare_duration, but not present at read_time. - * * "ACTIVE": indicates that the asset was present at both the - * start and the end of the time period defined by - * compare_duration and read_time. - * If compare_duration is not specified, then the only possible state_change - * is "UNUSED", which will be the state_change set for all assets present at - * read_time. - * - * Generated from protobuf field .google.protobuf.Duration compare_duration = 5; - */ - protected $compare_duration = null; - /** - * A field mask to specify the ListAssetsResult fields to be listed in the - * response. - * An empty field mask will list all fields. - * - * Generated from protobuf field .google.protobuf.FieldMask field_mask = 7; - */ - protected $field_mask = null; - /** - * The value returned by the last `ListAssetsResponse`; indicates - * that this is a continuation of a prior `ListAssets` call, and - * that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 8; - */ - protected $page_token = ''; - /** - * The maximum number of results to return in a single response. Default is - * 10, minimum is 1, maximum is 1000. - * - * Generated from protobuf field int32 page_size = 9; - */ - protected $page_size = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The name of the parent resource that contains the assets. The - * value that you can specify on parent depends on the method in which you - * specify parent. You can specify one of the following values: - * "organizations/[organization_id]", "folders/[folder_id]", or - * "projects/[project_id]". - * @type string $filter - * Expression that defines the filter to apply across assets. - * The expression is a list of zero or more restrictions combined via logical - * operators `AND` and `OR`. - * Parentheses are supported, and `OR` has higher precedence than `AND`. - * Restrictions have the form ` ` and may have a `-` - * character in front of them to indicate negation. The fields map to those - * defined in the Asset resource. Examples include: - * * name - * * security_center_properties.resource_name - * * resource_properties.a_property - * * security_marks.marks.marka - * The supported operators are: - * * `=` for all value types. - * * `>`, `<`, `>=`, `<=` for integer values. - * * `:`, meaning substring matching, for strings. - * The supported value types are: - * * string literals in quotes. - * * integer literals without quotes. - * * boolean literals `true` and `false` without quotes. - * The following are the allowed field and operator combinations: - * * name: `=` - * * update_time: `=`, `>`, `<`, `>=`, `<=` - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `update_time = "2019-06-10T16:07:18-07:00"` - * `update_time = 1560208038000` - * * create_time: `=`, `>`, `<`, `>=`, `<=` - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `create_time = "2019-06-10T16:07:18-07:00"` - * `create_time = 1560208038000` - * * iam_policy.policy_blob: `=`, `:` - * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - * * security_marks.marks: `=`, `:` - * * security_center_properties.resource_name: `=`, `:` - * * security_center_properties.resource_display_name: `=`, `:` - * * security_center_properties.resource_type: `=`, `:` - * * security_center_properties.resource_parent: `=`, `:` - * * security_center_properties.resource_parent_display_name: `=`, `:` - * * security_center_properties.resource_project: `=`, `:` - * * security_center_properties.resource_project_display_name: `=`, `:` - * * security_center_properties.resource_owners: `=`, `:` - * For example, `resource_properties.size = 100` is a valid filter string. - * Use a partial match on the empty string to filter based on a property - * existing: `resource_properties.my_property : ""` - * Use a negated partial match on the empty string to filter based on a - * property not existing: `-resource_properties.my_property : ""` - * @type string $order_by - * Expression that defines what fields and order to use for sorting. The - * string value should follow SQL syntax: comma separated list of fields. For - * example: "name,resource_properties.a_property". The default sorting order - * is ascending. To specify descending order for a field, a suffix " desc" - * should be appended to the field name. For example: "name - * desc,resource_properties.a_property". Redundant space characters in the - * syntax are insignificant. "name desc,resource_properties.a_property" and " - * name desc , resource_properties.a_property " are equivalent. - * The following fields are supported: - * name - * update_time - * resource_properties - * security_marks.marks - * security_center_properties.resource_name - * security_center_properties.resource_display_name - * security_center_properties.resource_parent - * security_center_properties.resource_parent_display_name - * security_center_properties.resource_project - * security_center_properties.resource_project_display_name - * security_center_properties.resource_type - * @type \Google\Protobuf\Timestamp $read_time - * Time used as a reference point when filtering assets. The filter is limited - * to assets existing at the supplied time and their values are those at that - * specific time. Absence of this field will default to the API's version of - * NOW. - * @type \Google\Protobuf\Duration $compare_duration - * When compare_duration is set, the ListAssetsResult's "state_change" - * attribute is updated to indicate whether the asset was added, removed, or - * remained present during the compare_duration period of time that precedes - * the read_time. This is the time between (read_time - compare_duration) and - * read_time. - * The state_change value is derived based on the presence of the asset at the - * two points in time. Intermediate state changes between the two times don't - * affect the result. For example, the results aren't affected if the asset is - * removed and re-created again. - * Possible "state_change" values when compare_duration is specified: - * * "ADDED": indicates that the asset was not present at the start of - * compare_duration, but present at read_time. - * * "REMOVED": indicates that the asset was present at the start of - * compare_duration, but not present at read_time. - * * "ACTIVE": indicates that the asset was present at both the - * start and the end of the time period defined by - * compare_duration and read_time. - * If compare_duration is not specified, then the only possible state_change - * is "UNUSED", which will be the state_change set for all assets present at - * read_time. - * @type \Google\Protobuf\FieldMask $field_mask - * A field mask to specify the ListAssetsResult fields to be listed in the - * response. - * An empty field mask will list all fields. - * @type string $page_token - * The value returned by the last `ListAssetsResponse`; indicates - * that this is a continuation of a prior `ListAssets` call, and - * that the system should return the next page of data. - * @type int $page_size - * The maximum number of results to return in a single response. Default is - * 10, minimum is 1, maximum is 1000. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the parent resource that contains the assets. The - * value that you can specify on parent depends on the method in which you - * specify parent. You can specify one of the following values: - * "organizations/[organization_id]", "folders/[folder_id]", or - * "projects/[project_id]". - * - * 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. The name of the parent resource that contains the assets. The - * value that you can specify on parent depends on the method in which you - * specify parent. You can specify one of the following values: - * "organizations/[organization_id]", "folders/[folder_id]", or - * "projects/[project_id]". - * - * 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; - } - - /** - * Expression that defines the filter to apply across assets. - * The expression is a list of zero or more restrictions combined via logical - * operators `AND` and `OR`. - * Parentheses are supported, and `OR` has higher precedence than `AND`. - * Restrictions have the form ` ` and may have a `-` - * character in front of them to indicate negation. The fields map to those - * defined in the Asset resource. Examples include: - * * name - * * security_center_properties.resource_name - * * resource_properties.a_property - * * security_marks.marks.marka - * The supported operators are: - * * `=` for all value types. - * * `>`, `<`, `>=`, `<=` for integer values. - * * `:`, meaning substring matching, for strings. - * The supported value types are: - * * string literals in quotes. - * * integer literals without quotes. - * * boolean literals `true` and `false` without quotes. - * The following are the allowed field and operator combinations: - * * name: `=` - * * update_time: `=`, `>`, `<`, `>=`, `<=` - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `update_time = "2019-06-10T16:07:18-07:00"` - * `update_time = 1560208038000` - * * create_time: `=`, `>`, `<`, `>=`, `<=` - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `create_time = "2019-06-10T16:07:18-07:00"` - * `create_time = 1560208038000` - * * iam_policy.policy_blob: `=`, `:` - * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - * * security_marks.marks: `=`, `:` - * * security_center_properties.resource_name: `=`, `:` - * * security_center_properties.resource_display_name: `=`, `:` - * * security_center_properties.resource_type: `=`, `:` - * * security_center_properties.resource_parent: `=`, `:` - * * security_center_properties.resource_parent_display_name: `=`, `:` - * * security_center_properties.resource_project: `=`, `:` - * * security_center_properties.resource_project_display_name: `=`, `:` - * * security_center_properties.resource_owners: `=`, `:` - * For example, `resource_properties.size = 100` is a valid filter string. - * Use a partial match on the empty string to filter based on a property - * existing: `resource_properties.my_property : ""` - * Use a negated partial match on the empty string to filter based on a - * property not existing: `-resource_properties.my_property : ""` - * - * Generated from protobuf field string filter = 2; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Expression that defines the filter to apply across assets. - * The expression is a list of zero or more restrictions combined via logical - * operators `AND` and `OR`. - * Parentheses are supported, and `OR` has higher precedence than `AND`. - * Restrictions have the form ` ` and may have a `-` - * character in front of them to indicate negation. The fields map to those - * defined in the Asset resource. Examples include: - * * name - * * security_center_properties.resource_name - * * resource_properties.a_property - * * security_marks.marks.marka - * The supported operators are: - * * `=` for all value types. - * * `>`, `<`, `>=`, `<=` for integer values. - * * `:`, meaning substring matching, for strings. - * The supported value types are: - * * string literals in quotes. - * * integer literals without quotes. - * * boolean literals `true` and `false` without quotes. - * The following are the allowed field and operator combinations: - * * name: `=` - * * update_time: `=`, `>`, `<`, `>=`, `<=` - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `update_time = "2019-06-10T16:07:18-07:00"` - * `update_time = 1560208038000` - * * create_time: `=`, `>`, `<`, `>=`, `<=` - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `create_time = "2019-06-10T16:07:18-07:00"` - * `create_time = 1560208038000` - * * iam_policy.policy_blob: `=`, `:` - * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - * * security_marks.marks: `=`, `:` - * * security_center_properties.resource_name: `=`, `:` - * * security_center_properties.resource_display_name: `=`, `:` - * * security_center_properties.resource_type: `=`, `:` - * * security_center_properties.resource_parent: `=`, `:` - * * security_center_properties.resource_parent_display_name: `=`, `:` - * * security_center_properties.resource_project: `=`, `:` - * * security_center_properties.resource_project_display_name: `=`, `:` - * * security_center_properties.resource_owners: `=`, `:` - * For example, `resource_properties.size = 100` is a valid filter string. - * Use a partial match on the empty string to filter based on a property - * existing: `resource_properties.my_property : ""` - * Use a negated partial match on the empty string to filter based on a - * property not existing: `-resource_properties.my_property : ""` - * - * Generated from protobuf field string filter = 2; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Expression that defines what fields and order to use for sorting. The - * string value should follow SQL syntax: comma separated list of fields. For - * example: "name,resource_properties.a_property". The default sorting order - * is ascending. To specify descending order for a field, a suffix " desc" - * should be appended to the field name. For example: "name - * desc,resource_properties.a_property". Redundant space characters in the - * syntax are insignificant. "name desc,resource_properties.a_property" and " - * name desc , resource_properties.a_property " are equivalent. - * The following fields are supported: - * name - * update_time - * resource_properties - * security_marks.marks - * security_center_properties.resource_name - * security_center_properties.resource_display_name - * security_center_properties.resource_parent - * security_center_properties.resource_parent_display_name - * security_center_properties.resource_project - * security_center_properties.resource_project_display_name - * security_center_properties.resource_type - * - * Generated from protobuf field string order_by = 3; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Expression that defines what fields and order to use for sorting. The - * string value should follow SQL syntax: comma separated list of fields. For - * example: "name,resource_properties.a_property". The default sorting order - * is ascending. To specify descending order for a field, a suffix " desc" - * should be appended to the field name. For example: "name - * desc,resource_properties.a_property". Redundant space characters in the - * syntax are insignificant. "name desc,resource_properties.a_property" and " - * name desc , resource_properties.a_property " are equivalent. - * The following fields are supported: - * name - * update_time - * resource_properties - * security_marks.marks - * security_center_properties.resource_name - * security_center_properties.resource_display_name - * security_center_properties.resource_parent - * security_center_properties.resource_parent_display_name - * security_center_properties.resource_project - * security_center_properties.resource_project_display_name - * security_center_properties.resource_type - * - * Generated from protobuf field string order_by = 3; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - - /** - * Time used as a reference point when filtering assets. The filter is limited - * to assets existing at the supplied time and their values are those at that - * specific time. Absence of this field will default to the API's version of - * NOW. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->read_time; - } - - public function hasReadTime() - { - return isset($this->read_time); - } - - public function clearReadTime() - { - unset($this->read_time); - } - - /** - * Time used as a reference point when filtering assets. The filter is limited - * to assets existing at the supplied time and their values are those at that - * specific time. Absence of this field will default to the API's version of - * NOW. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->read_time = $var; - - return $this; - } - - /** - * When compare_duration is set, the ListAssetsResult's "state_change" - * attribute is updated to indicate whether the asset was added, removed, or - * remained present during the compare_duration period of time that precedes - * the read_time. This is the time between (read_time - compare_duration) and - * read_time. - * The state_change value is derived based on the presence of the asset at the - * two points in time. Intermediate state changes between the two times don't - * affect the result. For example, the results aren't affected if the asset is - * removed and re-created again. - * Possible "state_change" values when compare_duration is specified: - * * "ADDED": indicates that the asset was not present at the start of - * compare_duration, but present at read_time. - * * "REMOVED": indicates that the asset was present at the start of - * compare_duration, but not present at read_time. - * * "ACTIVE": indicates that the asset was present at both the - * start and the end of the time period defined by - * compare_duration and read_time. - * If compare_duration is not specified, then the only possible state_change - * is "UNUSED", which will be the state_change set for all assets present at - * read_time. - * - * Generated from protobuf field .google.protobuf.Duration compare_duration = 5; - * @return \Google\Protobuf\Duration|null - */ - public function getCompareDuration() - { - return $this->compare_duration; - } - - public function hasCompareDuration() - { - return isset($this->compare_duration); - } - - public function clearCompareDuration() - { - unset($this->compare_duration); - } - - /** - * When compare_duration is set, the ListAssetsResult's "state_change" - * attribute is updated to indicate whether the asset was added, removed, or - * remained present during the compare_duration period of time that precedes - * the read_time. This is the time between (read_time - compare_duration) and - * read_time. - * The state_change value is derived based on the presence of the asset at the - * two points in time. Intermediate state changes between the two times don't - * affect the result. For example, the results aren't affected if the asset is - * removed and re-created again. - * Possible "state_change" values when compare_duration is specified: - * * "ADDED": indicates that the asset was not present at the start of - * compare_duration, but present at read_time. - * * "REMOVED": indicates that the asset was present at the start of - * compare_duration, but not present at read_time. - * * "ACTIVE": indicates that the asset was present at both the - * start and the end of the time period defined by - * compare_duration and read_time. - * If compare_duration is not specified, then the only possible state_change - * is "UNUSED", which will be the state_change set for all assets present at - * read_time. - * - * Generated from protobuf field .google.protobuf.Duration compare_duration = 5; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setCompareDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->compare_duration = $var; - - return $this; - } - - /** - * A field mask to specify the ListAssetsResult fields to be listed in the - * response. - * An empty field mask will list all fields. - * - * Generated from protobuf field .google.protobuf.FieldMask field_mask = 7; - * @return \Google\Protobuf\FieldMask|null - */ - public function getFieldMask() - { - return $this->field_mask; - } - - public function hasFieldMask() - { - return isset($this->field_mask); - } - - public function clearFieldMask() - { - unset($this->field_mask); - } - - /** - * A field mask to specify the ListAssetsResult fields to be listed in the - * response. - * An empty field mask will list all fields. - * - * Generated from protobuf field .google.protobuf.FieldMask field_mask = 7; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setFieldMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->field_mask = $var; - - return $this; - } - - /** - * The value returned by the last `ListAssetsResponse`; indicates - * that this is a continuation of a prior `ListAssets` call, and - * that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 8; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The value returned by the last `ListAssetsResponse`; indicates - * that this is a continuation of a prior `ListAssets` call, and - * that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 8; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * The maximum number of results to return in a single response. Default is - * 10, minimum is 1, maximum is 1000. - * - * Generated from protobuf field int32 page_size = 9; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of results to return in a single response. Default is - * 10, minimum is 1, maximum is 1000. - * - * Generated from protobuf field int32 page_size = 9; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListAssetsResponse.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListAssetsResponse.php deleted file mode 100644 index 0628a39e7ed7..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListAssetsResponse.php +++ /dev/null @@ -1,183 +0,0 @@ -google.cloud.securitycenter.v1.ListAssetsResponse - */ -class ListAssetsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Assets matching the list request. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult list_assets_results = 1; - */ - private $list_assets_results; - /** - * Time used for executing the list request. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 2; - */ - protected $read_time = null; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results. - * - * Generated from protobuf field string next_page_token = 3; - */ - protected $next_page_token = ''; - /** - * The total number of assets matching the query. - * - * Generated from protobuf field int32 total_size = 4; - */ - protected $total_size = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\SecurityCenter\V1\ListAssetsResponse\ListAssetsResult>|\Google\Protobuf\Internal\RepeatedField $list_assets_results - * Assets matching the list request. - * @type \Google\Protobuf\Timestamp $read_time - * Time used for executing the list request. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results. - * @type int $total_size - * The total number of assets matching the query. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Assets matching the list request. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult list_assets_results = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getListAssetsResults() - { - return $this->list_assets_results; - } - - /** - * Assets matching the list request. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult list_assets_results = 1; - * @param array<\Google\Cloud\SecurityCenter\V1\ListAssetsResponse\ListAssetsResult>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setListAssetsResults($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\ListAssetsResponse\ListAssetsResult::class); - $this->list_assets_results = $arr; - - return $this; - } - - /** - * Time used for executing the list request. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->read_time; - } - - public function hasReadTime() - { - return isset($this->read_time); - } - - public function clearReadTime() - { - unset($this->read_time); - } - - /** - * Time used for executing the list request. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->read_time = $var; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results. - * - * Generated from protobuf field string next_page_token = 3; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results. - * - * Generated from protobuf field string next_page_token = 3; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * The total number of assets matching the query. - * - * Generated from protobuf field int32 total_size = 4; - * @return int - */ - public function getTotalSize() - { - return $this->total_size; - } - - /** - * The total number of assets matching the query. - * - * Generated from protobuf field int32 total_size = 4; - * @param int $var - * @return $this - */ - public function setTotalSize($var) - { - GPBUtil::checkInt32($var); - $this->total_size = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListAssetsResponse/ListAssetsResult.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListAssetsResponse/ListAssetsResult.php deleted file mode 100644 index 32294763c7cc..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListAssetsResponse/ListAssetsResult.php +++ /dev/null @@ -1,114 +0,0 @@ -google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult - */ -class ListAssetsResult extends \Google\Protobuf\Internal\Message -{ - /** - * Asset matching the search request. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Asset asset = 1; - */ - protected $asset = null; - /** - * State change of the asset between the points in time. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.StateChange state_change = 2; - */ - protected $state_change = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\SecurityCenter\V1\Asset $asset - * Asset matching the search request. - * @type int $state_change - * State change of the asset between the points in time. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Asset matching the search request. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Asset asset = 1; - * @return \Google\Cloud\SecurityCenter\V1\Asset|null - */ - public function getAsset() - { - return $this->asset; - } - - public function hasAsset() - { - return isset($this->asset); - } - - public function clearAsset() - { - unset($this->asset); - } - - /** - * Asset matching the search request. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Asset asset = 1; - * @param \Google\Cloud\SecurityCenter\V1\Asset $var - * @return $this - */ - public function setAsset($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\Asset::class); - $this->asset = $var; - - return $this; - } - - /** - * State change of the asset between the points in time. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.StateChange state_change = 2; - * @return int - */ - public function getStateChange() - { - return $this->state_change; - } - - /** - * State change of the asset between the points in time. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.StateChange state_change = 2; - * @param int $var - * @return $this - */ - public function setStateChange($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1\ListAssetsResponse\ListAssetsResult\StateChange::class); - $this->state_change = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ListAssetsResult::class, \Google\Cloud\SecurityCenter\V1\ListAssetsResponse_ListAssetsResult::class); - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListAssetsResponse/ListAssetsResult/StateChange.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListAssetsResponse/ListAssetsResult/StateChange.php deleted file mode 100644 index 54ae768528cb..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListAssetsResponse/ListAssetsResult/StateChange.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.securitycenter.v1.ListAssetsResponse.ListAssetsResult.StateChange - */ -class StateChange -{ - /** - * State change is unused, this is the canonical default for this enum. - * - * Generated from protobuf enum UNUSED = 0; - */ - const UNUSED = 0; - /** - * Asset was added between the points in time. - * - * Generated from protobuf enum ADDED = 1; - */ - const ADDED = 1; - /** - * Asset was removed between the points in time. - * - * Generated from protobuf enum REMOVED = 2; - */ - const REMOVED = 2; - /** - * Asset was present at both point(s) in time. - * - * Generated from protobuf enum ACTIVE = 3; - */ - const ACTIVE = 3; - - private static $valueToName = [ - self::UNUSED => 'UNUSED', - self::ADDED => 'ADDED', - self::REMOVED => 'REMOVED', - self::ACTIVE => 'ACTIVE', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(StateChange::class, \Google\Cloud\SecurityCenter\V1\ListAssetsResponse_ListAssetsResult_StateChange::class); - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListAssetsResponse_ListAssetsResult.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListAssetsResponse_ListAssetsResult.php deleted file mode 100644 index f70ed6d1ce31..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListAssetsResponse_ListAssetsResult.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.securitycenter.v1.ListBigQueryExportsRequest - */ -class ListBigQueryExportsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent, which owns the collection of BigQuery exports. Its - * format is "organizations/[organization_id]", "folders/[folder_id]", - * "projects/[project_id]". - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of configs to return. The service may return fewer than - * this value. - * If unspecified, at most 10 configs will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A page token, received from a previous `ListBigQueryExports` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListBigQueryExports` - * must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent, which owns the collection of BigQuery exports. Its - * format is "organizations/[organization_id]", "folders/[folder_id]", - * "projects/[project_id]". - * @type int $page_size - * The maximum number of configs to return. The service may return fewer than - * this value. - * If unspecified, at most 10 configs will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * @type string $page_token - * A page token, received from a previous `ListBigQueryExports` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListBigQueryExports` - * must match the call that provided the page token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent, which owns the collection of BigQuery exports. Its - * format is "organizations/[organization_id]", "folders/[folder_id]", - * "projects/[project_id]". - * - * 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. The parent, which owns the collection of BigQuery exports. Its - * format is "organizations/[organization_id]", "folders/[folder_id]", - * "projects/[project_id]". - * - * 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; - } - - /** - * The maximum number of configs to return. The service may return fewer than - * this value. - * If unspecified, at most 10 configs will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of configs to return. The service may return fewer than - * this value. - * If unspecified, at most 10 configs will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A page token, received from a previous `ListBigQueryExports` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListBigQueryExports` - * must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A page token, received from a previous `ListBigQueryExports` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListBigQueryExports` - * must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - * @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/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListBigQueryExportsResponse.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListBigQueryExportsResponse.php deleted file mode 100644 index 6a4c6adae970..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListBigQueryExportsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.securitycenter.v1.ListBigQueryExportsResponse - */ -class ListBigQueryExportsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The BigQuery exports from the specified parent. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.BigQueryExport big_query_exports = 1; - */ - private $big_query_exports; - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\SecurityCenter\V1\BigQueryExport>|\Google\Protobuf\Internal\RepeatedField $big_query_exports - * The BigQuery exports from the specified parent. - * @type string $next_page_token - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * The BigQuery exports from the specified parent. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.BigQueryExport big_query_exports = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getBigQueryExports() - { - return $this->big_query_exports; - } - - /** - * The BigQuery exports from the specified parent. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.BigQueryExport big_query_exports = 1; - * @param array<\Google\Cloud\SecurityCenter\V1\BigQueryExport>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setBigQueryExports($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\BigQueryExport::class); - $this->big_query_exports = $arr; - - return $this; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @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/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListFindingsRequest.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListFindingsRequest.php deleted file mode 100644 index 20a7ef23ff7f..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListFindingsRequest.php +++ /dev/null @@ -1,735 +0,0 @@ -google.cloud.securitycenter.v1.ListFindingsRequest - */ -class ListFindingsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the source the findings belong to. Its format is - * "organizations/[organization_id]/sources/[source_id], - * folders/[folder_id]/sources/[source_id], or - * projects/[project_id]/sources/[source_id]". To list across all sources - * provide a source_id of `-`. For example: - * organizations/{organization_id}/sources/-, folders/{folder_id}/sources/- or - * projects/{projects_id}/sources/- - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Expression that defines the filter to apply across findings. - * The expression is a list of one or more restrictions combined via logical - * operators `AND` and `OR`. - * Parentheses are supported, and `OR` has higher precedence than `AND`. - * Restrictions have the form ` ` and may have a `-` - * character in front of them to indicate negation. Examples include: - * * name - * * source_properties.a_property - * * security_marks.marks.marka - * The supported operators are: - * * `=` for all value types. - * * `>`, `<`, `>=`, `<=` for integer values. - * * `:`, meaning substring matching, for strings. - * The supported value types are: - * * string literals in quotes. - * * integer literals without quotes. - * * boolean literals `true` and `false` without quotes. - * The following field and operator combinations are supported: - * * name: `=` - * * parent: `=`, `:` - * * resource_name: `=`, `:` - * * state: `=`, `:` - * * category: `=`, `:` - * * external_uri: `=`, `:` - * * event_time: `=`, `>`, `<`, `>=`, `<=` - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `event_time = "2019-06-10T16:07:18-07:00"` - * `event_time = 1560208038000` - * * severity: `=`, `:` - * * workflow_state: `=`, `:` - * * security_marks.marks: `=`, `:` - * * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - * For example, `source_properties.size = 100` is a valid filter string. - * Use a partial match on the empty string to filter based on a property - * existing: `source_properties.my_property : ""` - * Use a negated partial match on the empty string to filter based on a - * property not existing: `-source_properties.my_property : ""` - * * resource: - * * resource.name: `=`, `:` - * * resource.parent_name: `=`, `:` - * * resource.parent_display_name: `=`, `:` - * * resource.project_name: `=`, `:` - * * resource.project_display_name: `=`, `:` - * * resource.type: `=`, `:` - * * resource.folders.resource_folder: `=`, `:` - * * resource.display_name: `=`, `:` - * - * Generated from protobuf field string filter = 2; - */ - protected $filter = ''; - /** - * Expression that defines what fields and order to use for sorting. The - * string value should follow SQL syntax: comma separated list of fields. For - * example: "name,resource_properties.a_property". The default sorting order - * is ascending. To specify descending order for a field, a suffix " desc" - * should be appended to the field name. For example: "name - * desc,source_properties.a_property". Redundant space characters in the - * syntax are insignificant. "name desc,source_properties.a_property" and " - * name desc , source_properties.a_property " are equivalent. - * The following fields are supported: - * name - * parent - * state - * category - * resource_name - * event_time - * source_properties - * security_marks.marks - * - * Generated from protobuf field string order_by = 3; - */ - protected $order_by = ''; - /** - * Time used as a reference point when filtering findings. The filter is - * limited to findings existing at the supplied time and their values are - * those at that specific time. Absence of this field will default to the - * API's version of NOW. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; - */ - protected $read_time = null; - /** - * When compare_duration is set, the ListFindingsResult's "state_change" - * attribute is updated to indicate whether the finding had its state changed, - * the finding's state remained unchanged, or if the finding was added in any - * state during the compare_duration period of time that precedes the - * read_time. This is the time between (read_time - compare_duration) and - * read_time. - * The state_change value is derived based on the presence and state of the - * finding at the two points in time. Intermediate state changes between the - * two times don't affect the result. For example, the results aren't affected - * if the finding is made inactive and then active again. - * Possible "state_change" values when compare_duration is specified: - * * "CHANGED": indicates that the finding was present and matched the given - * filter at the start of compare_duration, but changed its - * state at read_time. - * * "UNCHANGED": indicates that the finding was present and matched the given - * filter at the start of compare_duration and did not change - * state at read_time. - * * "ADDED": indicates that the finding did not match the given filter or - * was not present at the start of compare_duration, but was - * present at read_time. - * * "REMOVED": indicates that the finding was present and matched the - * filter at the start of compare_duration, but did not match - * the filter at read_time. - * If compare_duration is not specified, then the only possible state_change - * is "UNUSED", which will be the state_change set for all findings present at - * read_time. - * - * Generated from protobuf field .google.protobuf.Duration compare_duration = 5; - */ - protected $compare_duration = null; - /** - * A field mask to specify the Finding fields to be listed in the response. - * An empty field mask will list all fields. - * - * Generated from protobuf field .google.protobuf.FieldMask field_mask = 7; - */ - protected $field_mask = null; - /** - * The value returned by the last `ListFindingsResponse`; indicates - * that this is a continuation of a prior `ListFindings` call, and - * that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 8; - */ - protected $page_token = ''; - /** - * The maximum number of results to return in a single response. Default is - * 10, minimum is 1, maximum is 1000. - * - * Generated from protobuf field int32 page_size = 9; - */ - protected $page_size = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Name of the source the findings belong to. Its format is - * "organizations/[organization_id]/sources/[source_id], - * folders/[folder_id]/sources/[source_id], or - * projects/[project_id]/sources/[source_id]". To list across all sources - * provide a source_id of `-`. For example: - * organizations/{organization_id}/sources/-, folders/{folder_id}/sources/- or - * projects/{projects_id}/sources/- - * @type string $filter - * Expression that defines the filter to apply across findings. - * The expression is a list of one or more restrictions combined via logical - * operators `AND` and `OR`. - * Parentheses are supported, and `OR` has higher precedence than `AND`. - * Restrictions have the form ` ` and may have a `-` - * character in front of them to indicate negation. Examples include: - * * name - * * source_properties.a_property - * * security_marks.marks.marka - * The supported operators are: - * * `=` for all value types. - * * `>`, `<`, `>=`, `<=` for integer values. - * * `:`, meaning substring matching, for strings. - * The supported value types are: - * * string literals in quotes. - * * integer literals without quotes. - * * boolean literals `true` and `false` without quotes. - * The following field and operator combinations are supported: - * * name: `=` - * * parent: `=`, `:` - * * resource_name: `=`, `:` - * * state: `=`, `:` - * * category: `=`, `:` - * * external_uri: `=`, `:` - * * event_time: `=`, `>`, `<`, `>=`, `<=` - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `event_time = "2019-06-10T16:07:18-07:00"` - * `event_time = 1560208038000` - * * severity: `=`, `:` - * * workflow_state: `=`, `:` - * * security_marks.marks: `=`, `:` - * * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - * For example, `source_properties.size = 100` is a valid filter string. - * Use a partial match on the empty string to filter based on a property - * existing: `source_properties.my_property : ""` - * Use a negated partial match on the empty string to filter based on a - * property not existing: `-source_properties.my_property : ""` - * * resource: - * * resource.name: `=`, `:` - * * resource.parent_name: `=`, `:` - * * resource.parent_display_name: `=`, `:` - * * resource.project_name: `=`, `:` - * * resource.project_display_name: `=`, `:` - * * resource.type: `=`, `:` - * * resource.folders.resource_folder: `=`, `:` - * * resource.display_name: `=`, `:` - * @type string $order_by - * Expression that defines what fields and order to use for sorting. The - * string value should follow SQL syntax: comma separated list of fields. For - * example: "name,resource_properties.a_property". The default sorting order - * is ascending. To specify descending order for a field, a suffix " desc" - * should be appended to the field name. For example: "name - * desc,source_properties.a_property". Redundant space characters in the - * syntax are insignificant. "name desc,source_properties.a_property" and " - * name desc , source_properties.a_property " are equivalent. - * The following fields are supported: - * name - * parent - * state - * category - * resource_name - * event_time - * source_properties - * security_marks.marks - * @type \Google\Protobuf\Timestamp $read_time - * Time used as a reference point when filtering findings. The filter is - * limited to findings existing at the supplied time and their values are - * those at that specific time. Absence of this field will default to the - * API's version of NOW. - * @type \Google\Protobuf\Duration $compare_duration - * When compare_duration is set, the ListFindingsResult's "state_change" - * attribute is updated to indicate whether the finding had its state changed, - * the finding's state remained unchanged, or if the finding was added in any - * state during the compare_duration period of time that precedes the - * read_time. This is the time between (read_time - compare_duration) and - * read_time. - * The state_change value is derived based on the presence and state of the - * finding at the two points in time. Intermediate state changes between the - * two times don't affect the result. For example, the results aren't affected - * if the finding is made inactive and then active again. - * Possible "state_change" values when compare_duration is specified: - * * "CHANGED": indicates that the finding was present and matched the given - * filter at the start of compare_duration, but changed its - * state at read_time. - * * "UNCHANGED": indicates that the finding was present and matched the given - * filter at the start of compare_duration and did not change - * state at read_time. - * * "ADDED": indicates that the finding did not match the given filter or - * was not present at the start of compare_duration, but was - * present at read_time. - * * "REMOVED": indicates that the finding was present and matched the - * filter at the start of compare_duration, but did not match - * the filter at read_time. - * If compare_duration is not specified, then the only possible state_change - * is "UNUSED", which will be the state_change set for all findings present at - * read_time. - * @type \Google\Protobuf\FieldMask $field_mask - * A field mask to specify the Finding fields to be listed in the response. - * An empty field mask will list all fields. - * @type string $page_token - * The value returned by the last `ListFindingsResponse`; indicates - * that this is a continuation of a prior `ListFindings` call, and - * that the system should return the next page of data. - * @type int $page_size - * The maximum number of results to return in a single response. Default is - * 10, minimum is 1, maximum is 1000. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the source the findings belong to. Its format is - * "organizations/[organization_id]/sources/[source_id], - * folders/[folder_id]/sources/[source_id], or - * projects/[project_id]/sources/[source_id]". To list across all sources - * provide a source_id of `-`. For example: - * organizations/{organization_id}/sources/-, folders/{folder_id}/sources/- or - * projects/{projects_id}/sources/- - * - * 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. Name of the source the findings belong to. Its format is - * "organizations/[organization_id]/sources/[source_id], - * folders/[folder_id]/sources/[source_id], or - * projects/[project_id]/sources/[source_id]". To list across all sources - * provide a source_id of `-`. For example: - * organizations/{organization_id}/sources/-, folders/{folder_id}/sources/- or - * projects/{projects_id}/sources/- - * - * 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; - } - - /** - * Expression that defines the filter to apply across findings. - * The expression is a list of one or more restrictions combined via logical - * operators `AND` and `OR`. - * Parentheses are supported, and `OR` has higher precedence than `AND`. - * Restrictions have the form ` ` and may have a `-` - * character in front of them to indicate negation. Examples include: - * * name - * * source_properties.a_property - * * security_marks.marks.marka - * The supported operators are: - * * `=` for all value types. - * * `>`, `<`, `>=`, `<=` for integer values. - * * `:`, meaning substring matching, for strings. - * The supported value types are: - * * string literals in quotes. - * * integer literals without quotes. - * * boolean literals `true` and `false` without quotes. - * The following field and operator combinations are supported: - * * name: `=` - * * parent: `=`, `:` - * * resource_name: `=`, `:` - * * state: `=`, `:` - * * category: `=`, `:` - * * external_uri: `=`, `:` - * * event_time: `=`, `>`, `<`, `>=`, `<=` - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `event_time = "2019-06-10T16:07:18-07:00"` - * `event_time = 1560208038000` - * * severity: `=`, `:` - * * workflow_state: `=`, `:` - * * security_marks.marks: `=`, `:` - * * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - * For example, `source_properties.size = 100` is a valid filter string. - * Use a partial match on the empty string to filter based on a property - * existing: `source_properties.my_property : ""` - * Use a negated partial match on the empty string to filter based on a - * property not existing: `-source_properties.my_property : ""` - * * resource: - * * resource.name: `=`, `:` - * * resource.parent_name: `=`, `:` - * * resource.parent_display_name: `=`, `:` - * * resource.project_name: `=`, `:` - * * resource.project_display_name: `=`, `:` - * * resource.type: `=`, `:` - * * resource.folders.resource_folder: `=`, `:` - * * resource.display_name: `=`, `:` - * - * Generated from protobuf field string filter = 2; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Expression that defines the filter to apply across findings. - * The expression is a list of one or more restrictions combined via logical - * operators `AND` and `OR`. - * Parentheses are supported, and `OR` has higher precedence than `AND`. - * Restrictions have the form ` ` and may have a `-` - * character in front of them to indicate negation. Examples include: - * * name - * * source_properties.a_property - * * security_marks.marks.marka - * The supported operators are: - * * `=` for all value types. - * * `>`, `<`, `>=`, `<=` for integer values. - * * `:`, meaning substring matching, for strings. - * The supported value types are: - * * string literals in quotes. - * * integer literals without quotes. - * * boolean literals `true` and `false` without quotes. - * The following field and operator combinations are supported: - * * name: `=` - * * parent: `=`, `:` - * * resource_name: `=`, `:` - * * state: `=`, `:` - * * category: `=`, `:` - * * external_uri: `=`, `:` - * * event_time: `=`, `>`, `<`, `>=`, `<=` - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `event_time = "2019-06-10T16:07:18-07:00"` - * `event_time = 1560208038000` - * * severity: `=`, `:` - * * workflow_state: `=`, `:` - * * security_marks.marks: `=`, `:` - * * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - * For example, `source_properties.size = 100` is a valid filter string. - * Use a partial match on the empty string to filter based on a property - * existing: `source_properties.my_property : ""` - * Use a negated partial match on the empty string to filter based on a - * property not existing: `-source_properties.my_property : ""` - * * resource: - * * resource.name: `=`, `:` - * * resource.parent_name: `=`, `:` - * * resource.parent_display_name: `=`, `:` - * * resource.project_name: `=`, `:` - * * resource.project_display_name: `=`, `:` - * * resource.type: `=`, `:` - * * resource.folders.resource_folder: `=`, `:` - * * resource.display_name: `=`, `:` - * - * Generated from protobuf field string filter = 2; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Expression that defines what fields and order to use for sorting. The - * string value should follow SQL syntax: comma separated list of fields. For - * example: "name,resource_properties.a_property". The default sorting order - * is ascending. To specify descending order for a field, a suffix " desc" - * should be appended to the field name. For example: "name - * desc,source_properties.a_property". Redundant space characters in the - * syntax are insignificant. "name desc,source_properties.a_property" and " - * name desc , source_properties.a_property " are equivalent. - * The following fields are supported: - * name - * parent - * state - * category - * resource_name - * event_time - * source_properties - * security_marks.marks - * - * Generated from protobuf field string order_by = 3; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Expression that defines what fields and order to use for sorting. The - * string value should follow SQL syntax: comma separated list of fields. For - * example: "name,resource_properties.a_property". The default sorting order - * is ascending. To specify descending order for a field, a suffix " desc" - * should be appended to the field name. For example: "name - * desc,source_properties.a_property". Redundant space characters in the - * syntax are insignificant. "name desc,source_properties.a_property" and " - * name desc , source_properties.a_property " are equivalent. - * The following fields are supported: - * name - * parent - * state - * category - * resource_name - * event_time - * source_properties - * security_marks.marks - * - * Generated from protobuf field string order_by = 3; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - - /** - * Time used as a reference point when filtering findings. The filter is - * limited to findings existing at the supplied time and their values are - * those at that specific time. Absence of this field will default to the - * API's version of NOW. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->read_time; - } - - public function hasReadTime() - { - return isset($this->read_time); - } - - public function clearReadTime() - { - unset($this->read_time); - } - - /** - * Time used as a reference point when filtering findings. The filter is - * limited to findings existing at the supplied time and their values are - * those at that specific time. Absence of this field will default to the - * API's version of NOW. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->read_time = $var; - - return $this; - } - - /** - * When compare_duration is set, the ListFindingsResult's "state_change" - * attribute is updated to indicate whether the finding had its state changed, - * the finding's state remained unchanged, or if the finding was added in any - * state during the compare_duration period of time that precedes the - * read_time. This is the time between (read_time - compare_duration) and - * read_time. - * The state_change value is derived based on the presence and state of the - * finding at the two points in time. Intermediate state changes between the - * two times don't affect the result. For example, the results aren't affected - * if the finding is made inactive and then active again. - * Possible "state_change" values when compare_duration is specified: - * * "CHANGED": indicates that the finding was present and matched the given - * filter at the start of compare_duration, but changed its - * state at read_time. - * * "UNCHANGED": indicates that the finding was present and matched the given - * filter at the start of compare_duration and did not change - * state at read_time. - * * "ADDED": indicates that the finding did not match the given filter or - * was not present at the start of compare_duration, but was - * present at read_time. - * * "REMOVED": indicates that the finding was present and matched the - * filter at the start of compare_duration, but did not match - * the filter at read_time. - * If compare_duration is not specified, then the only possible state_change - * is "UNUSED", which will be the state_change set for all findings present at - * read_time. - * - * Generated from protobuf field .google.protobuf.Duration compare_duration = 5; - * @return \Google\Protobuf\Duration|null - */ - public function getCompareDuration() - { - return $this->compare_duration; - } - - public function hasCompareDuration() - { - return isset($this->compare_duration); - } - - public function clearCompareDuration() - { - unset($this->compare_duration); - } - - /** - * When compare_duration is set, the ListFindingsResult's "state_change" - * attribute is updated to indicate whether the finding had its state changed, - * the finding's state remained unchanged, or if the finding was added in any - * state during the compare_duration period of time that precedes the - * read_time. This is the time between (read_time - compare_duration) and - * read_time. - * The state_change value is derived based on the presence and state of the - * finding at the two points in time. Intermediate state changes between the - * two times don't affect the result. For example, the results aren't affected - * if the finding is made inactive and then active again. - * Possible "state_change" values when compare_duration is specified: - * * "CHANGED": indicates that the finding was present and matched the given - * filter at the start of compare_duration, but changed its - * state at read_time. - * * "UNCHANGED": indicates that the finding was present and matched the given - * filter at the start of compare_duration and did not change - * state at read_time. - * * "ADDED": indicates that the finding did not match the given filter or - * was not present at the start of compare_duration, but was - * present at read_time. - * * "REMOVED": indicates that the finding was present and matched the - * filter at the start of compare_duration, but did not match - * the filter at read_time. - * If compare_duration is not specified, then the only possible state_change - * is "UNUSED", which will be the state_change set for all findings present at - * read_time. - * - * Generated from protobuf field .google.protobuf.Duration compare_duration = 5; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setCompareDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->compare_duration = $var; - - return $this; - } - - /** - * A field mask to specify the Finding fields to be listed in the response. - * An empty field mask will list all fields. - * - * Generated from protobuf field .google.protobuf.FieldMask field_mask = 7; - * @return \Google\Protobuf\FieldMask|null - */ - public function getFieldMask() - { - return $this->field_mask; - } - - public function hasFieldMask() - { - return isset($this->field_mask); - } - - public function clearFieldMask() - { - unset($this->field_mask); - } - - /** - * A field mask to specify the Finding fields to be listed in the response. - * An empty field mask will list all fields. - * - * Generated from protobuf field .google.protobuf.FieldMask field_mask = 7; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setFieldMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->field_mask = $var; - - return $this; - } - - /** - * The value returned by the last `ListFindingsResponse`; indicates - * that this is a continuation of a prior `ListFindings` call, and - * that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 8; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The value returned by the last `ListFindingsResponse`; indicates - * that this is a continuation of a prior `ListFindings` call, and - * that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 8; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * The maximum number of results to return in a single response. Default is - * 10, minimum is 1, maximum is 1000. - * - * Generated from protobuf field int32 page_size = 9; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of results to return in a single response. Default is - * 10, minimum is 1, maximum is 1000. - * - * Generated from protobuf field int32 page_size = 9; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListFindingsResponse.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListFindingsResponse.php deleted file mode 100644 index f0f409419e18..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListFindingsResponse.php +++ /dev/null @@ -1,183 +0,0 @@ -google.cloud.securitycenter.v1.ListFindingsResponse - */ -class ListFindingsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Findings matching the list request. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult list_findings_results = 1; - */ - private $list_findings_results; - /** - * Time used for executing the list request. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 2; - */ - protected $read_time = null; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results. - * - * Generated from protobuf field string next_page_token = 3; - */ - protected $next_page_token = ''; - /** - * The total number of findings matching the query. - * - * Generated from protobuf field int32 total_size = 4; - */ - protected $total_size = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\SecurityCenter\V1\ListFindingsResponse\ListFindingsResult>|\Google\Protobuf\Internal\RepeatedField $list_findings_results - * Findings matching the list request. - * @type \Google\Protobuf\Timestamp $read_time - * Time used for executing the list request. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results. - * @type int $total_size - * The total number of findings matching the query. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Findings matching the list request. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult list_findings_results = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getListFindingsResults() - { - return $this->list_findings_results; - } - - /** - * Findings matching the list request. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult list_findings_results = 1; - * @param array<\Google\Cloud\SecurityCenter\V1\ListFindingsResponse\ListFindingsResult>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setListFindingsResults($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\ListFindingsResponse\ListFindingsResult::class); - $this->list_findings_results = $arr; - - return $this; - } - - /** - * Time used for executing the list request. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->read_time; - } - - public function hasReadTime() - { - return isset($this->read_time); - } - - public function clearReadTime() - { - unset($this->read_time); - } - - /** - * Time used for executing the list request. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->read_time = $var; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results. - * - * Generated from protobuf field string next_page_token = 3; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results. - * - * Generated from protobuf field string next_page_token = 3; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * The total number of findings matching the query. - * - * Generated from protobuf field int32 total_size = 4; - * @return int - */ - public function getTotalSize() - { - return $this->total_size; - } - - /** - * The total number of findings matching the query. - * - * Generated from protobuf field int32 total_size = 4; - * @param int $var - * @return $this - */ - public function setTotalSize($var) - { - GPBUtil::checkInt32($var); - $this->total_size = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListFindingsResponse/ListFindingsResult.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListFindingsResponse/ListFindingsResult.php deleted file mode 100644 index f24a6f2dedd5..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListFindingsResponse/ListFindingsResult.php +++ /dev/null @@ -1,158 +0,0 @@ -google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult - */ -class ListFindingsResult extends \Google\Protobuf\Internal\Message -{ - /** - * Finding matching the search request. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Finding finding = 1; - */ - protected $finding = null; - /** - * State change of the finding between the points in time. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.StateChange state_change = 2; - */ - protected $state_change = 0; - /** - * Output only. Resource that is associated with this finding. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource resource = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $resource = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\SecurityCenter\V1\Finding $finding - * Finding matching the search request. - * @type int $state_change - * State change of the finding between the points in time. - * @type \Google\Cloud\SecurityCenter\V1\ListFindingsResponse\ListFindingsResult\Resource $resource - * Output only. Resource that is associated with this finding. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Finding matching the search request. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Finding finding = 1; - * @return \Google\Cloud\SecurityCenter\V1\Finding|null - */ - public function getFinding() - { - return $this->finding; - } - - public function hasFinding() - { - return isset($this->finding); - } - - public function clearFinding() - { - unset($this->finding); - } - - /** - * Finding matching the search request. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Finding finding = 1; - * @param \Google\Cloud\SecurityCenter\V1\Finding $var - * @return $this - */ - public function setFinding($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\Finding::class); - $this->finding = $var; - - return $this; - } - - /** - * State change of the finding between the points in time. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.StateChange state_change = 2; - * @return int - */ - public function getStateChange() - { - return $this->state_change; - } - - /** - * State change of the finding between the points in time. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.StateChange state_change = 2; - * @param int $var - * @return $this - */ - public function setStateChange($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1\ListFindingsResponse\ListFindingsResult\StateChange::class); - $this->state_change = $var; - - return $this; - } - - /** - * Output only. Resource that is associated with this finding. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource resource = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\SecurityCenter\V1\ListFindingsResponse\ListFindingsResult\Resource|null - */ - public function getResource() - { - return $this->resource; - } - - public function hasResource() - { - return isset($this->resource); - } - - public function clearResource() - { - unset($this->resource); - } - - /** - * Output only. Resource that is associated with this finding. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource resource = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\SecurityCenter\V1\ListFindingsResponse\ListFindingsResult\Resource $var - * @return $this - */ - public function setResource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\ListFindingsResponse\ListFindingsResult\Resource::class); - $this->resource = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ListFindingsResult::class, \Google\Cloud\SecurityCenter\V1\ListFindingsResponse_ListFindingsResult::class); - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListFindingsResponse/ListFindingsResult/Resource.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListFindingsResponse/ListFindingsResult/Resource.php deleted file mode 100644 index be2d2d246150..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListFindingsResponse/ListFindingsResult/Resource.php +++ /dev/null @@ -1,321 +0,0 @@ -google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.Resource - */ -class Resource extends \Google\Protobuf\Internal\Message -{ - /** - * The full resource name of the resource. See: - * https://cloud.google.com/apis/design/resource_names#full_resource_name - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The human readable name of the resource. - * - * Generated from protobuf field string display_name = 8; - */ - protected $display_name = ''; - /** - * The full resource type of the resource. - * - * Generated from protobuf field string type = 6; - */ - protected $type = ''; - /** - * The full resource name of project that the resource belongs to. - * - * Generated from protobuf field string project_name = 2; - */ - protected $project_name = ''; - /** - * The project ID that the resource belongs to. - * - * Generated from protobuf field string project_display_name = 3; - */ - protected $project_display_name = ''; - /** - * The full resource name of resource's parent. - * - * Generated from protobuf field string parent_name = 4; - */ - protected $parent_name = ''; - /** - * The human readable name of resource's parent. - * - * Generated from protobuf field string parent_display_name = 5; - */ - protected $parent_display_name = ''; - /** - * Contains a Folder message for each folder in the assets ancestry. - * The first folder is the deepest nested folder, and the last folder is - * the folder directly under the Organization. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Folder folders = 7; - */ - private $folders; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The full resource name of the resource. See: - * https://cloud.google.com/apis/design/resource_names#full_resource_name - * @type string $display_name - * The human readable name of the resource. - * @type string $type - * The full resource type of the resource. - * @type string $project_name - * The full resource name of project that the resource belongs to. - * @type string $project_display_name - * The project ID that the resource belongs to. - * @type string $parent_name - * The full resource name of resource's parent. - * @type string $parent_display_name - * The human readable name of resource's parent. - * @type array<\Google\Cloud\SecurityCenter\V1\Folder>|\Google\Protobuf\Internal\RepeatedField $folders - * Contains a Folder message for each folder in the assets ancestry. - * The first folder is the deepest nested folder, and the last folder is - * the folder directly under the Organization. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * The full resource name of the resource. See: - * https://cloud.google.com/apis/design/resource_names#full_resource_name - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The full resource name of the resource. See: - * https://cloud.google.com/apis/design/resource_names#full_resource_name - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The human readable name of the resource. - * - * Generated from protobuf field string display_name = 8; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The human readable name of the resource. - * - * Generated from protobuf field string display_name = 8; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * The full resource type of the resource. - * - * Generated from protobuf field string type = 6; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * The full resource type of the resource. - * - * Generated from protobuf field string type = 6; - * @param string $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkString($var, True); - $this->type = $var; - - return $this; - } - - /** - * The full resource name of project that the resource belongs to. - * - * Generated from protobuf field string project_name = 2; - * @return string - */ - public function getProjectName() - { - return $this->project_name; - } - - /** - * The full resource name of project that the resource belongs to. - * - * Generated from protobuf field string project_name = 2; - * @param string $var - * @return $this - */ - public function setProjectName($var) - { - GPBUtil::checkString($var, True); - $this->project_name = $var; - - return $this; - } - - /** - * The project ID that the resource belongs to. - * - * Generated from protobuf field string project_display_name = 3; - * @return string - */ - public function getProjectDisplayName() - { - return $this->project_display_name; - } - - /** - * The project ID that the resource belongs to. - * - * Generated from protobuf field string project_display_name = 3; - * @param string $var - * @return $this - */ - public function setProjectDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->project_display_name = $var; - - return $this; - } - - /** - * The full resource name of resource's parent. - * - * Generated from protobuf field string parent_name = 4; - * @return string - */ - public function getParentName() - { - return $this->parent_name; - } - - /** - * The full resource name of resource's parent. - * - * Generated from protobuf field string parent_name = 4; - * @param string $var - * @return $this - */ - public function setParentName($var) - { - GPBUtil::checkString($var, True); - $this->parent_name = $var; - - return $this; - } - - /** - * The human readable name of resource's parent. - * - * Generated from protobuf field string parent_display_name = 5; - * @return string - */ - public function getParentDisplayName() - { - return $this->parent_display_name; - } - - /** - * The human readable name of resource's parent. - * - * Generated from protobuf field string parent_display_name = 5; - * @param string $var - * @return $this - */ - public function setParentDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->parent_display_name = $var; - - return $this; - } - - /** - * Contains a Folder message for each folder in the assets ancestry. - * The first folder is the deepest nested folder, and the last folder is - * the folder directly under the Organization. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Folder folders = 7; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFolders() - { - return $this->folders; - } - - /** - * Contains a Folder message for each folder in the assets ancestry. - * The first folder is the deepest nested folder, and the last folder is - * the folder directly under the Organization. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Folder folders = 7; - * @param array<\Google\Cloud\SecurityCenter\V1\Folder>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFolders($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\Folder::class); - $this->folders = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Resource::class, \Google\Cloud\SecurityCenter\V1\ListFindingsResponse_ListFindingsResult_Resource::class); - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListFindingsResponse/ListFindingsResult/StateChange.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListFindingsResponse/ListFindingsResult/StateChange.php deleted file mode 100644 index f723d59d4747..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListFindingsResponse/ListFindingsResult/StateChange.php +++ /dev/null @@ -1,87 +0,0 @@ -google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.StateChange - */ -class StateChange -{ - /** - * State change is unused, this is the canonical default for this enum. - * - * Generated from protobuf enum UNUSED = 0; - */ - const UNUSED = 0; - /** - * The finding has changed state in some way between the points in time - * and existed at both points. - * - * Generated from protobuf enum CHANGED = 1; - */ - const CHANGED = 1; - /** - * The finding has not changed state between the points in time and - * existed at both points. - * - * Generated from protobuf enum UNCHANGED = 2; - */ - const UNCHANGED = 2; - /** - * The finding was created between the points in time. - * - * Generated from protobuf enum ADDED = 3; - */ - const ADDED = 3; - /** - * The finding at timestamp does not match the filter specified, but it - * did at timestamp - compare_duration. - * - * Generated from protobuf enum REMOVED = 4; - */ - const REMOVED = 4; - - private static $valueToName = [ - self::UNUSED => 'UNUSED', - self::CHANGED => 'CHANGED', - self::UNCHANGED => 'UNCHANGED', - self::ADDED => 'ADDED', - self::REMOVED => 'REMOVED', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(StateChange::class, \Google\Cloud\SecurityCenter\V1\ListFindingsResponse_ListFindingsResult_StateChange::class); - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListFindingsResponse_ListFindingsResult.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListFindingsResponse_ListFindingsResult.php deleted file mode 100644 index b9d33513225a..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListFindingsResponse_ListFindingsResult.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.securitycenter.v1.ListMuteConfigsRequest - */ -class ListMuteConfigsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent, which owns the collection of mute configs. Its format - * is "organizations/[organization_id]", "folders/[folder_id]", - * "projects/[project_id]". - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of configs to return. The service may return fewer than - * this value. - * If unspecified, at most 10 configs will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A page token, received from a previous `ListMuteConfigs` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListMuteConfigs` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent, which owns the collection of mute configs. Its format - * is "organizations/[organization_id]", "folders/[folder_id]", - * "projects/[project_id]". - * @type int $page_size - * The maximum number of configs to return. The service may return fewer than - * this value. - * If unspecified, at most 10 configs will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * @type string $page_token - * A page token, received from a previous `ListMuteConfigs` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListMuteConfigs` must - * match the call that provided the page token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent, which owns the collection of mute configs. Its format - * is "organizations/[organization_id]", "folders/[folder_id]", - * "projects/[project_id]". - * - * 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. The parent, which owns the collection of mute configs. Its format - * is "organizations/[organization_id]", "folders/[folder_id]", - * "projects/[project_id]". - * - * 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; - } - - /** - * The maximum number of configs to return. The service may return fewer than - * this value. - * If unspecified, at most 10 configs will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of configs to return. The service may return fewer than - * this value. - * If unspecified, at most 10 configs will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A page token, received from a previous `ListMuteConfigs` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListMuteConfigs` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A page token, received from a previous `ListMuteConfigs` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListMuteConfigs` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - * @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/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListMuteConfigsResponse.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListMuteConfigsResponse.php deleted file mode 100644 index 31b493a80a68..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListMuteConfigsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.securitycenter.v1.ListMuteConfigsResponse - */ -class ListMuteConfigsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The mute configs from the specified parent. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.MuteConfig mute_configs = 1; - */ - private $mute_configs; - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\SecurityCenter\V1\MuteConfig>|\Google\Protobuf\Internal\RepeatedField $mute_configs - * The mute configs from the specified parent. - * @type string $next_page_token - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * The mute configs from the specified parent. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.MuteConfig mute_configs = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMuteConfigs() - { - return $this->mute_configs; - } - - /** - * The mute configs from the specified parent. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.MuteConfig mute_configs = 1; - * @param array<\Google\Cloud\SecurityCenter\V1\MuteConfig>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMuteConfigs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\MuteConfig::class); - $this->mute_configs = $arr; - - return $this; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @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/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListNotificationConfigsRequest.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListNotificationConfigsRequest.php deleted file mode 100644 index 362049967fae..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListNotificationConfigsRequest.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.securitycenter.v1.ListNotificationConfigsRequest - */ -class ListNotificationConfigsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the parent in which to list the notification - * configurations. Its format is "organizations/[organization_id]", - * "folders/[folder_id]", or "projects/[project_id]". - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The value returned by the last `ListNotificationConfigsResponse`; indicates - * that this is a continuation of a prior `ListNotificationConfigs` call, and - * that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 2; - */ - protected $page_token = ''; - /** - * The maximum number of results to return in a single response. Default is - * 10, minimum is 1, maximum is 1000. - * - * Generated from protobuf field int32 page_size = 3; - */ - protected $page_size = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The name of the parent in which to list the notification - * configurations. Its format is "organizations/[organization_id]", - * "folders/[folder_id]", or "projects/[project_id]". - * @type string $page_token - * The value returned by the last `ListNotificationConfigsResponse`; indicates - * that this is a continuation of a prior `ListNotificationConfigs` call, and - * that the system should return the next page of data. - * @type int $page_size - * The maximum number of results to return in a single response. Default is - * 10, minimum is 1, maximum is 1000. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the parent in which to list the notification - * configurations. Its format is "organizations/[organization_id]", - * "folders/[folder_id]", or "projects/[project_id]". - * - * 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. The name of the parent in which to list the notification - * configurations. Its format is "organizations/[organization_id]", - * "folders/[folder_id]", or "projects/[project_id]". - * - * 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; - } - - /** - * The value returned by the last `ListNotificationConfigsResponse`; indicates - * that this is a continuation of a prior `ListNotificationConfigs` call, and - * that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 2; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The value returned by the last `ListNotificationConfigsResponse`; indicates - * that this is a continuation of a prior `ListNotificationConfigs` call, and - * that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 2; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * The maximum number of results to return in a single response. Default is - * 10, minimum is 1, maximum is 1000. - * - * Generated from protobuf field int32 page_size = 3; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of results to return in a single response. Default is - * 10, minimum is 1, maximum is 1000. - * - * Generated from protobuf field int32 page_size = 3; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListNotificationConfigsResponse.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListNotificationConfigsResponse.php deleted file mode 100644 index a6fa6d4a15b2..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListNotificationConfigsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.securitycenter.v1.ListNotificationConfigsResponse - */ -class ListNotificationConfigsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Notification configs belonging to the requested parent. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.NotificationConfig notification_configs = 1; - */ - private $notification_configs; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\SecurityCenter\V1\NotificationConfig>|\Google\Protobuf\Internal\RepeatedField $notification_configs - * Notification configs belonging to the requested parent. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Notification configs belonging to the requested parent. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.NotificationConfig notification_configs = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNotificationConfigs() - { - return $this->notification_configs; - } - - /** - * Notification configs belonging to the requested parent. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.NotificationConfig notification_configs = 1; - * @param array<\Google\Cloud\SecurityCenter\V1\NotificationConfig>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNotificationConfigs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\NotificationConfig::class); - $this->notification_configs = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results. - * - * Generated from protobuf field string next_page_token = 2; - * @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/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListSourcesRequest.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListSourcesRequest.php deleted file mode 100644 index b81a0d450f1f..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListSourcesRequest.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.securitycenter.v1.ListSourcesRequest - */ -class ListSourcesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the parent of sources to list. Its format should - * be "organizations/[organization_id]", "folders/[folder_id]", or - * "projects/[project_id]". - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The value returned by the last `ListSourcesResponse`; indicates - * that this is a continuation of a prior `ListSources` call, and - * that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 2; - */ - protected $page_token = ''; - /** - * The maximum number of results to return in a single response. Default is - * 10, minimum is 1, maximum is 1000. - * - * Generated from protobuf field int32 page_size = 7; - */ - protected $page_size = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Resource name of the parent of sources to list. Its format should - * be "organizations/[organization_id]", "folders/[folder_id]", or - * "projects/[project_id]". - * @type string $page_token - * The value returned by the last `ListSourcesResponse`; indicates - * that this is a continuation of a prior `ListSources` call, and - * that the system should return the next page of data. - * @type int $page_size - * The maximum number of results to return in a single response. Default is - * 10, minimum is 1, maximum is 1000. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the parent of sources to list. Its format should - * be "organizations/[organization_id]", "folders/[folder_id]", or - * "projects/[project_id]". - * - * 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. Resource name of the parent of sources to list. Its format should - * be "organizations/[organization_id]", "folders/[folder_id]", or - * "projects/[project_id]". - * - * 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; - } - - /** - * The value returned by the last `ListSourcesResponse`; indicates - * that this is a continuation of a prior `ListSources` call, and - * that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 2; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The value returned by the last `ListSourcesResponse`; indicates - * that this is a continuation of a prior `ListSources` call, and - * that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 2; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * The maximum number of results to return in a single response. Default is - * 10, minimum is 1, maximum is 1000. - * - * Generated from protobuf field int32 page_size = 7; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of results to return in a single response. Default is - * 10, minimum is 1, maximum is 1000. - * - * Generated from protobuf field int32 page_size = 7; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListSourcesResponse.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListSourcesResponse.php deleted file mode 100644 index 97309f3b340f..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ListSourcesResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.securitycenter.v1.ListSourcesResponse - */ -class ListSourcesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Sources belonging to the requested parent. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Source sources = 1; - */ - private $sources; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\SecurityCenter\V1\Source>|\Google\Protobuf\Internal\RepeatedField $sources - * Sources belonging to the requested parent. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Sources belonging to the requested parent. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Source sources = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSources() - { - return $this->sources; - } - - /** - * Sources belonging to the requested parent. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Source sources = 1; - * @param array<\Google\Cloud\SecurityCenter\V1\Source>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSources($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\Source::class); - $this->sources = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results. - * - * Generated from protobuf field string next_page_token = 2; - * @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/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/MitreAttack.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/MitreAttack.php deleted file mode 100644 index 77ad4a2a0770..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/MitreAttack.php +++ /dev/null @@ -1,228 +0,0 @@ -google.cloud.securitycenter.v1.MitreAttack - */ -class MitreAttack extends \Google\Protobuf\Internal\Message -{ - /** - * The MITRE ATT&CK tactic most closely represented by this finding, if any. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.MitreAttack.Tactic primary_tactic = 1; - */ - protected $primary_tactic = 0; - /** - * The MITRE ATT&CK technique most closely represented by this finding, if - * any. primary_techniques is a repeated field because there are multiple - * levels of MITRE ATT&CK techniques. If the technique most closely - * represented by this finding is a sub-technique (e.g. `SCANNING_IP_BLOCKS`), - * both the sub-technique and its parent technique(s) will be listed (e.g. - * `SCANNING_IP_BLOCKS`, `ACTIVE_SCANNING`). - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.MitreAttack.Technique primary_techniques = 2; - */ - private $primary_techniques; - /** - * Additional MITRE ATT&CK tactics related to this finding, if any. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.MitreAttack.Tactic additional_tactics = 3; - */ - private $additional_tactics; - /** - * Additional MITRE ATT&CK techniques related to this finding, if any, along - * with any of their respective parent techniques. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.MitreAttack.Technique additional_techniques = 4; - */ - private $additional_techniques; - /** - * The MITRE ATT&CK version referenced by the above fields. E.g. "8". - * - * Generated from protobuf field string version = 5; - */ - protected $version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $primary_tactic - * The MITRE ATT&CK tactic most closely represented by this finding, if any. - * @type array|\Google\Protobuf\Internal\RepeatedField $primary_techniques - * The MITRE ATT&CK technique most closely represented by this finding, if - * any. primary_techniques is a repeated field because there are multiple - * levels of MITRE ATT&CK techniques. If the technique most closely - * represented by this finding is a sub-technique (e.g. `SCANNING_IP_BLOCKS`), - * both the sub-technique and its parent technique(s) will be listed (e.g. - * `SCANNING_IP_BLOCKS`, `ACTIVE_SCANNING`). - * @type array|\Google\Protobuf\Internal\RepeatedField $additional_tactics - * Additional MITRE ATT&CK tactics related to this finding, if any. - * @type array|\Google\Protobuf\Internal\RepeatedField $additional_techniques - * Additional MITRE ATT&CK techniques related to this finding, if any, along - * with any of their respective parent techniques. - * @type string $version - * The MITRE ATT&CK version referenced by the above fields. E.g. "8". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\MitreAttack::initOnce(); - parent::__construct($data); - } - - /** - * The MITRE ATT&CK tactic most closely represented by this finding, if any. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.MitreAttack.Tactic primary_tactic = 1; - * @return int - */ - public function getPrimaryTactic() - { - return $this->primary_tactic; - } - - /** - * The MITRE ATT&CK tactic most closely represented by this finding, if any. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.MitreAttack.Tactic primary_tactic = 1; - * @param int $var - * @return $this - */ - public function setPrimaryTactic($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1\MitreAttack\Tactic::class); - $this->primary_tactic = $var; - - return $this; - } - - /** - * The MITRE ATT&CK technique most closely represented by this finding, if - * any. primary_techniques is a repeated field because there are multiple - * levels of MITRE ATT&CK techniques. If the technique most closely - * represented by this finding is a sub-technique (e.g. `SCANNING_IP_BLOCKS`), - * both the sub-technique and its parent technique(s) will be listed (e.g. - * `SCANNING_IP_BLOCKS`, `ACTIVE_SCANNING`). - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.MitreAttack.Technique primary_techniques = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPrimaryTechniques() - { - return $this->primary_techniques; - } - - /** - * The MITRE ATT&CK technique most closely represented by this finding, if - * any. primary_techniques is a repeated field because there are multiple - * levels of MITRE ATT&CK techniques. If the technique most closely - * represented by this finding is a sub-technique (e.g. `SCANNING_IP_BLOCKS`), - * both the sub-technique and its parent technique(s) will be listed (e.g. - * `SCANNING_IP_BLOCKS`, `ACTIVE_SCANNING`). - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.MitreAttack.Technique primary_techniques = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPrimaryTechniques($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\SecurityCenter\V1\MitreAttack\Technique::class); - $this->primary_techniques = $arr; - - return $this; - } - - /** - * Additional MITRE ATT&CK tactics related to this finding, if any. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.MitreAttack.Tactic additional_tactics = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAdditionalTactics() - { - return $this->additional_tactics; - } - - /** - * Additional MITRE ATT&CK tactics related to this finding, if any. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.MitreAttack.Tactic additional_tactics = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAdditionalTactics($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\SecurityCenter\V1\MitreAttack\Tactic::class); - $this->additional_tactics = $arr; - - return $this; - } - - /** - * Additional MITRE ATT&CK techniques related to this finding, if any, along - * with any of their respective parent techniques. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.MitreAttack.Technique additional_techniques = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAdditionalTechniques() - { - return $this->additional_techniques; - } - - /** - * Additional MITRE ATT&CK techniques related to this finding, if any, along - * with any of their respective parent techniques. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.MitreAttack.Technique additional_techniques = 4; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAdditionalTechniques($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\SecurityCenter\V1\MitreAttack\Technique::class); - $this->additional_techniques = $arr; - - return $this; - } - - /** - * The MITRE ATT&CK version referenced by the above fields. E.g. "8". - * - * Generated from protobuf field string version = 5; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * The MITRE ATT&CK version referenced by the above fields. E.g. "8". - * - * Generated from protobuf field string version = 5; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/MitreAttack/Tactic.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/MitreAttack/Tactic.php deleted file mode 100644 index d59277981594..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/MitreAttack/Tactic.php +++ /dev/null @@ -1,149 +0,0 @@ -google.cloud.securitycenter.v1.MitreAttack.Tactic - */ -class Tactic -{ - /** - * Unspecified value. - * - * Generated from protobuf enum TACTIC_UNSPECIFIED = 0; - */ - const TACTIC_UNSPECIFIED = 0; - /** - * TA0043 - * - * Generated from protobuf enum RECONNAISSANCE = 1; - */ - const RECONNAISSANCE = 1; - /** - * TA0042 - * - * Generated from protobuf enum RESOURCE_DEVELOPMENT = 2; - */ - const RESOURCE_DEVELOPMENT = 2; - /** - * TA0001 - * - * Generated from protobuf enum INITIAL_ACCESS = 5; - */ - const INITIAL_ACCESS = 5; - /** - * TA0002 - * - * Generated from protobuf enum EXECUTION = 3; - */ - const EXECUTION = 3; - /** - * TA0003 - * - * Generated from protobuf enum PERSISTENCE = 6; - */ - const PERSISTENCE = 6; - /** - * TA0004 - * - * Generated from protobuf enum PRIVILEGE_ESCALATION = 8; - */ - const PRIVILEGE_ESCALATION = 8; - /** - * TA0005 - * - * Generated from protobuf enum DEFENSE_EVASION = 7; - */ - const DEFENSE_EVASION = 7; - /** - * TA0006 - * - * Generated from protobuf enum CREDENTIAL_ACCESS = 9; - */ - const CREDENTIAL_ACCESS = 9; - /** - * TA0007 - * - * Generated from protobuf enum DISCOVERY = 10; - */ - const DISCOVERY = 10; - /** - * TA0008 - * - * Generated from protobuf enum LATERAL_MOVEMENT = 11; - */ - const LATERAL_MOVEMENT = 11; - /** - * TA0009 - * - * Generated from protobuf enum COLLECTION = 12; - */ - const COLLECTION = 12; - /** - * TA0011 - * - * Generated from protobuf enum COMMAND_AND_CONTROL = 4; - */ - const COMMAND_AND_CONTROL = 4; - /** - * TA0010 - * - * Generated from protobuf enum EXFILTRATION = 13; - */ - const EXFILTRATION = 13; - /** - * TA0040 - * - * Generated from protobuf enum IMPACT = 14; - */ - const IMPACT = 14; - - private static $valueToName = [ - self::TACTIC_UNSPECIFIED => 'TACTIC_UNSPECIFIED', - self::RECONNAISSANCE => 'RECONNAISSANCE', - self::RESOURCE_DEVELOPMENT => 'RESOURCE_DEVELOPMENT', - self::INITIAL_ACCESS => 'INITIAL_ACCESS', - self::EXECUTION => 'EXECUTION', - self::PERSISTENCE => 'PERSISTENCE', - self::PRIVILEGE_ESCALATION => 'PRIVILEGE_ESCALATION', - self::DEFENSE_EVASION => 'DEFENSE_EVASION', - self::CREDENTIAL_ACCESS => 'CREDENTIAL_ACCESS', - self::DISCOVERY => 'DISCOVERY', - self::LATERAL_MOVEMENT => 'LATERAL_MOVEMENT', - self::COLLECTION => 'COLLECTION', - self::COMMAND_AND_CONTROL => 'COMMAND_AND_CONTROL', - self::EXFILTRATION => 'EXFILTRATION', - self::IMPACT => 'IMPACT', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Tactic::class, \Google\Cloud\SecurityCenter\V1\MitreAttack_Tactic::class); - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/MitreAttack/Technique.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/MitreAttack/Technique.php deleted file mode 100644 index cef1c7d69067..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/MitreAttack/Technique.php +++ /dev/null @@ -1,296 +0,0 @@ -google.cloud.securitycenter.v1.MitreAttack.Technique - */ -class Technique -{ - /** - * Unspecified value. - * - * Generated from protobuf enum TECHNIQUE_UNSPECIFIED = 0; - */ - const TECHNIQUE_UNSPECIFIED = 0; - /** - * T1595 - * - * Generated from protobuf enum ACTIVE_SCANNING = 1; - */ - const ACTIVE_SCANNING = 1; - /** - * T1595.001 - * - * Generated from protobuf enum SCANNING_IP_BLOCKS = 2; - */ - const SCANNING_IP_BLOCKS = 2; - /** - * T1105 - * - * Generated from protobuf enum INGRESS_TOOL_TRANSFER = 3; - */ - const INGRESS_TOOL_TRANSFER = 3; - /** - * T1106 - * - * Generated from protobuf enum NATIVE_API = 4; - */ - const NATIVE_API = 4; - /** - * T1129 - * - * Generated from protobuf enum SHARED_MODULES = 5; - */ - const SHARED_MODULES = 5; - /** - * T1059 - * - * Generated from protobuf enum COMMAND_AND_SCRIPTING_INTERPRETER = 6; - */ - const COMMAND_AND_SCRIPTING_INTERPRETER = 6; - /** - * T1059.004 - * - * Generated from protobuf enum UNIX_SHELL = 7; - */ - const UNIX_SHELL = 7; - /** - * T1496 - * - * Generated from protobuf enum RESOURCE_HIJACKING = 8; - */ - const RESOURCE_HIJACKING = 8; - /** - * T1090 - * - * Generated from protobuf enum PROXY = 9; - */ - const PROXY = 9; - /** - * T1090.002 - * - * Generated from protobuf enum EXTERNAL_PROXY = 10; - */ - const EXTERNAL_PROXY = 10; - /** - * T1090.003 - * - * Generated from protobuf enum MULTI_HOP_PROXY = 11; - */ - const MULTI_HOP_PROXY = 11; - /** - * T1568 - * - * Generated from protobuf enum DYNAMIC_RESOLUTION = 12; - */ - const DYNAMIC_RESOLUTION = 12; - /** - * T1552 - * - * Generated from protobuf enum UNSECURED_CREDENTIALS = 13; - */ - const UNSECURED_CREDENTIALS = 13; - /** - * T1078 - * - * Generated from protobuf enum VALID_ACCOUNTS = 14; - */ - const VALID_ACCOUNTS = 14; - /** - * T1078.003 - * - * Generated from protobuf enum LOCAL_ACCOUNTS = 15; - */ - const LOCAL_ACCOUNTS = 15; - /** - * T1078.004 - * - * Generated from protobuf enum CLOUD_ACCOUNTS = 16; - */ - const CLOUD_ACCOUNTS = 16; - /** - * T1498 - * - * Generated from protobuf enum NETWORK_DENIAL_OF_SERVICE = 17; - */ - const NETWORK_DENIAL_OF_SERVICE = 17; - /** - * T1069 - * - * Generated from protobuf enum PERMISSION_GROUPS_DISCOVERY = 18; - */ - const PERMISSION_GROUPS_DISCOVERY = 18; - /** - * T1069.003 - * - * Generated from protobuf enum CLOUD_GROUPS = 19; - */ - const CLOUD_GROUPS = 19; - /** - * T1567 - * - * Generated from protobuf enum EXFILTRATION_OVER_WEB_SERVICE = 20; - */ - const EXFILTRATION_OVER_WEB_SERVICE = 20; - /** - * T1567.002 - * - * Generated from protobuf enum EXFILTRATION_TO_CLOUD_STORAGE = 21; - */ - const EXFILTRATION_TO_CLOUD_STORAGE = 21; - /** - * T1098 - * - * Generated from protobuf enum ACCOUNT_MANIPULATION = 22; - */ - const ACCOUNT_MANIPULATION = 22; - /** - * T1098.004 - * - * Generated from protobuf enum SSH_AUTHORIZED_KEYS = 23; - */ - const SSH_AUTHORIZED_KEYS = 23; - /** - * T1543 - * - * Generated from protobuf enum CREATE_OR_MODIFY_SYSTEM_PROCESS = 24; - */ - const CREATE_OR_MODIFY_SYSTEM_PROCESS = 24; - /** - * T1539 - * - * Generated from protobuf enum STEAL_WEB_SESSION_COOKIE = 25; - */ - const STEAL_WEB_SESSION_COOKIE = 25; - /** - * T1578 - * - * Generated from protobuf enum MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE = 26; - */ - const MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE = 26; - /** - * T1190 - * - * Generated from protobuf enum EXPLOIT_PUBLIC_FACING_APPLICATION = 27; - */ - const EXPLOIT_PUBLIC_FACING_APPLICATION = 27; - /** - * T1556 - * - * Generated from protobuf enum MODIFY_AUTHENTICATION_PROCESS = 28; - */ - const MODIFY_AUTHENTICATION_PROCESS = 28; - /** - * T1485 - * - * Generated from protobuf enum DATA_DESTRUCTION = 29; - */ - const DATA_DESTRUCTION = 29; - /** - * T1484 - * - * Generated from protobuf enum DOMAIN_POLICY_MODIFICATION = 30; - */ - const DOMAIN_POLICY_MODIFICATION = 30; - /** - * T1562 - * - * Generated from protobuf enum IMPAIR_DEFENSES = 31; - */ - const IMPAIR_DEFENSES = 31; - /** - * T1046 - * - * Generated from protobuf enum NETWORK_SERVICE_DISCOVERY = 32; - */ - const NETWORK_SERVICE_DISCOVERY = 32; - /** - * T1134 - * - * Generated from protobuf enum ACCESS_TOKEN_MANIPULATION = 33; - */ - const ACCESS_TOKEN_MANIPULATION = 33; - /** - * T1548 - * - * Generated from protobuf enum ABUSE_ELEVATION_CONTROL_MECHANISM = 34; - */ - const ABUSE_ELEVATION_CONTROL_MECHANISM = 34; - /** - * T1078.001 - * - * Generated from protobuf enum DEFAULT_ACCOUNTS = 35; - */ - const DEFAULT_ACCOUNTS = 35; - - private static $valueToName = [ - self::TECHNIQUE_UNSPECIFIED => 'TECHNIQUE_UNSPECIFIED', - self::ACTIVE_SCANNING => 'ACTIVE_SCANNING', - self::SCANNING_IP_BLOCKS => 'SCANNING_IP_BLOCKS', - self::INGRESS_TOOL_TRANSFER => 'INGRESS_TOOL_TRANSFER', - self::NATIVE_API => 'NATIVE_API', - self::SHARED_MODULES => 'SHARED_MODULES', - self::COMMAND_AND_SCRIPTING_INTERPRETER => 'COMMAND_AND_SCRIPTING_INTERPRETER', - self::UNIX_SHELL => 'UNIX_SHELL', - self::RESOURCE_HIJACKING => 'RESOURCE_HIJACKING', - self::PROXY => 'PROXY', - self::EXTERNAL_PROXY => 'EXTERNAL_PROXY', - self::MULTI_HOP_PROXY => 'MULTI_HOP_PROXY', - self::DYNAMIC_RESOLUTION => 'DYNAMIC_RESOLUTION', - self::UNSECURED_CREDENTIALS => 'UNSECURED_CREDENTIALS', - self::VALID_ACCOUNTS => 'VALID_ACCOUNTS', - self::LOCAL_ACCOUNTS => 'LOCAL_ACCOUNTS', - self::CLOUD_ACCOUNTS => 'CLOUD_ACCOUNTS', - self::NETWORK_DENIAL_OF_SERVICE => 'NETWORK_DENIAL_OF_SERVICE', - self::PERMISSION_GROUPS_DISCOVERY => 'PERMISSION_GROUPS_DISCOVERY', - self::CLOUD_GROUPS => 'CLOUD_GROUPS', - self::EXFILTRATION_OVER_WEB_SERVICE => 'EXFILTRATION_OVER_WEB_SERVICE', - self::EXFILTRATION_TO_CLOUD_STORAGE => 'EXFILTRATION_TO_CLOUD_STORAGE', - self::ACCOUNT_MANIPULATION => 'ACCOUNT_MANIPULATION', - self::SSH_AUTHORIZED_KEYS => 'SSH_AUTHORIZED_KEYS', - self::CREATE_OR_MODIFY_SYSTEM_PROCESS => 'CREATE_OR_MODIFY_SYSTEM_PROCESS', - self::STEAL_WEB_SESSION_COOKIE => 'STEAL_WEB_SESSION_COOKIE', - self::MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE => 'MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE', - self::EXPLOIT_PUBLIC_FACING_APPLICATION => 'EXPLOIT_PUBLIC_FACING_APPLICATION', - self::MODIFY_AUTHENTICATION_PROCESS => 'MODIFY_AUTHENTICATION_PROCESS', - self::DATA_DESTRUCTION => 'DATA_DESTRUCTION', - self::DOMAIN_POLICY_MODIFICATION => 'DOMAIN_POLICY_MODIFICATION', - self::IMPAIR_DEFENSES => 'IMPAIR_DEFENSES', - self::NETWORK_SERVICE_DISCOVERY => 'NETWORK_SERVICE_DISCOVERY', - self::ACCESS_TOKEN_MANIPULATION => 'ACCESS_TOKEN_MANIPULATION', - self::ABUSE_ELEVATION_CONTROL_MECHANISM => 'ABUSE_ELEVATION_CONTROL_MECHANISM', - self::DEFAULT_ACCOUNTS => 'DEFAULT_ACCOUNTS', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Technique::class, \Google\Cloud\SecurityCenter\V1\MitreAttack_Technique::class); - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/MitreAttack_Tactic.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/MitreAttack_Tactic.php deleted file mode 100644 index ca32547c8da4..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/MitreAttack_Tactic.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.securitycenter.v1.MuteConfig - */ -class MuteConfig extends \Google\Protobuf\Internal\Message -{ - /** - * This field will be ignored if provided on config creation. Format - * "organizations/{organization}/muteConfigs/{mute_config}" - * "folders/{folder}/muteConfigs/{mute_config}" - * "projects/{project}/muteConfigs/{mute_config}" - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The human readable name to be displayed for the mute config. - * - * Generated from protobuf field string display_name = 2 [deprecated = true]; - * @deprecated - */ - protected $display_name = ''; - /** - * A description of the mute config. - * - * Generated from protobuf field string description = 3; - */ - protected $description = ''; - /** - * Required. An expression that defines the filter to apply across create/update events - * of findings. While creating a filter string, be mindful of the - * scope in which the mute configuration is being created. E.g., If a filter - * contains project = X but is created under the project = Y scope, it might - * not match any findings. - * The following field and operator combinations are supported: - * * severity: `=`, `:` - * * category: `=`, `:` - * * resource.name: `=`, `:` - * * resource.project_name: `=`, `:` - * * resource.project_display_name: `=`, `:` - * * resource.folders.resource_folder: `=`, `:` - * * resource.parent_name: `=`, `:` - * * resource.parent_display_name: `=`, `:` - * * resource.type: `=`, `:` - * * finding_class: `=`, `:` - * * indicator.ip_addresses: `=`, `:` - * * indicator.domains: `=`, `:` - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $filter = ''; - /** - * Output only. The time at which the mute config was created. - * This field is set by the server and will be ignored if provided on config - * creation. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The most recent time at which the mute config was updated. - * This field is set by the server and will be ignored if provided on config - * creation or update. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. Email address of the user who last edited the mute config. - * This field is set by the server and will be ignored if provided on config - * creation or update. - * - * Generated from protobuf field string most_recent_editor = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $most_recent_editor = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * This field will be ignored if provided on config creation. Format - * "organizations/{organization}/muteConfigs/{mute_config}" - * "folders/{folder}/muteConfigs/{mute_config}" - * "projects/{project}/muteConfigs/{mute_config}" - * @type string $display_name - * The human readable name to be displayed for the mute config. - * @type string $description - * A description of the mute config. - * @type string $filter - * Required. An expression that defines the filter to apply across create/update events - * of findings. While creating a filter string, be mindful of the - * scope in which the mute configuration is being created. E.g., If a filter - * contains project = X but is created under the project = Y scope, it might - * not match any findings. - * The following field and operator combinations are supported: - * * severity: `=`, `:` - * * category: `=`, `:` - * * resource.name: `=`, `:` - * * resource.project_name: `=`, `:` - * * resource.project_display_name: `=`, `:` - * * resource.folders.resource_folder: `=`, `:` - * * resource.parent_name: `=`, `:` - * * resource.parent_display_name: `=`, `:` - * * resource.type: `=`, `:` - * * finding_class: `=`, `:` - * * indicator.ip_addresses: `=`, `:` - * * indicator.domains: `=`, `:` - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time at which the mute config was created. - * This field is set by the server and will be ignored if provided on config - * creation. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The most recent time at which the mute config was updated. - * This field is set by the server and will be ignored if provided on config - * creation or update. - * @type string $most_recent_editor - * Output only. Email address of the user who last edited the mute config. - * This field is set by the server and will be ignored if provided on config - * creation or update. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\MuteConfig::initOnce(); - parent::__construct($data); - } - - /** - * This field will be ignored if provided on config creation. Format - * "organizations/{organization}/muteConfigs/{mute_config}" - * "folders/{folder}/muteConfigs/{mute_config}" - * "projects/{project}/muteConfigs/{mute_config}" - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * This field will be ignored if provided on config creation. Format - * "organizations/{organization}/muteConfigs/{mute_config}" - * "folders/{folder}/muteConfigs/{mute_config}" - * "projects/{project}/muteConfigs/{mute_config}" - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The human readable name to be displayed for the mute config. - * - * Generated from protobuf field string display_name = 2 [deprecated = true]; - * @return string - * @deprecated - */ - public function getDisplayName() - { - @trigger_error('display_name is deprecated.', E_USER_DEPRECATED); - return $this->display_name; - } - - /** - * The human readable name to be displayed for the mute config. - * - * Generated from protobuf field string display_name = 2 [deprecated = true]; - * @param string $var - * @return $this - * @deprecated - */ - public function setDisplayName($var) - { - @trigger_error('display_name is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * A description of the mute config. - * - * Generated from protobuf field string description = 3; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * A description of the mute config. - * - * Generated from protobuf field string description = 3; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Required. An expression that defines the filter to apply across create/update events - * of findings. While creating a filter string, be mindful of the - * scope in which the mute configuration is being created. E.g., If a filter - * contains project = X but is created under the project = Y scope, it might - * not match any findings. - * The following field and operator combinations are supported: - * * severity: `=`, `:` - * * category: `=`, `:` - * * resource.name: `=`, `:` - * * resource.project_name: `=`, `:` - * * resource.project_display_name: `=`, `:` - * * resource.folders.resource_folder: `=`, `:` - * * resource.parent_name: `=`, `:` - * * resource.parent_display_name: `=`, `:` - * * resource.type: `=`, `:` - * * finding_class: `=`, `:` - * * indicator.ip_addresses: `=`, `:` - * * indicator.domains: `=`, `:` - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Required. An expression that defines the filter to apply across create/update events - * of findings. While creating a filter string, be mindful of the - * scope in which the mute configuration is being created. E.g., If a filter - * contains project = X but is created under the project = Y scope, it might - * not match any findings. - * The following field and operator combinations are supported: - * * severity: `=`, `:` - * * category: `=`, `:` - * * resource.name: `=`, `:` - * * resource.project_name: `=`, `:` - * * resource.project_display_name: `=`, `:` - * * resource.folders.resource_folder: `=`, `:` - * * resource.parent_name: `=`, `:` - * * resource.parent_display_name: `=`, `:` - * * resource.type: `=`, `:` - * * finding_class: `=`, `:` - * * indicator.ip_addresses: `=`, `:` - * * indicator.domains: `=`, `:` - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Output only. The time at which the mute config was created. - * This field is set by the server and will be ignored if provided on config - * creation. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.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. The time at which the mute config was created. - * This field is set by the server and will be ignored if provided on config - * creation. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.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. The most recent time at which the mute config was updated. - * This field is set by the server and will be ignored if provided on config - * creation or update. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The most recent time at which the mute config was updated. - * This field is set by the server and will be ignored if provided on config - * creation or update. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Output only. Email address of the user who last edited the mute config. - * This field is set by the server and will be ignored if provided on config - * creation or update. - * - * Generated from protobuf field string most_recent_editor = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getMostRecentEditor() - { - return $this->most_recent_editor; - } - - /** - * Output only. Email address of the user who last edited the mute config. - * This field is set by the server and will be ignored if provided on config - * creation or update. - * - * Generated from protobuf field string most_recent_editor = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setMostRecentEditor($var) - { - GPBUtil::checkString($var, True); - $this->most_recent_editor = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/NotificationConfig.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/NotificationConfig.php deleted file mode 100644 index 5638bbb45c82..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/NotificationConfig.php +++ /dev/null @@ -1,241 +0,0 @@ -google.cloud.securitycenter.v1.NotificationConfig - */ -class NotificationConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The relative resource name of this notification config. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name - * Example: - * "organizations/{organization_id}/notificationConfigs/notify_public_bucket", - * "folders/{folder_id}/notificationConfigs/notify_public_bucket", - * or "projects/{project_id}/notificationConfigs/notify_public_bucket". - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The description of the notification config (max of 1024 characters). - * - * Generated from protobuf field string description = 2; - */ - protected $description = ''; - /** - * The Pub/Sub topic to send notifications to. Its format is - * "projects/[project_id]/topics/[topic]". - * - * Generated from protobuf field string pubsub_topic = 3 [(.google.api.resource_reference) = { - */ - protected $pubsub_topic = ''; - /** - * Output only. The service account that needs "pubsub.topics.publish" - * permission to publish to the Pub/Sub topic. - * - * Generated from protobuf field string service_account = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $service_account = ''; - protected $notify_config; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The relative resource name of this notification config. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name - * Example: - * "organizations/{organization_id}/notificationConfigs/notify_public_bucket", - * "folders/{folder_id}/notificationConfigs/notify_public_bucket", - * or "projects/{project_id}/notificationConfigs/notify_public_bucket". - * @type string $description - * The description of the notification config (max of 1024 characters). - * @type string $pubsub_topic - * The Pub/Sub topic to send notifications to. Its format is - * "projects/[project_id]/topics/[topic]". - * @type string $service_account - * Output only. The service account that needs "pubsub.topics.publish" - * permission to publish to the Pub/Sub topic. - * @type \Google\Cloud\SecurityCenter\V1\NotificationConfig\StreamingConfig $streaming_config - * The config for triggering streaming-based notifications. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\NotificationConfig::initOnce(); - parent::__construct($data); - } - - /** - * The relative resource name of this notification config. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name - * Example: - * "organizations/{organization_id}/notificationConfigs/notify_public_bucket", - * "folders/{folder_id}/notificationConfigs/notify_public_bucket", - * or "projects/{project_id}/notificationConfigs/notify_public_bucket". - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The relative resource name of this notification config. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name - * Example: - * "organizations/{organization_id}/notificationConfigs/notify_public_bucket", - * "folders/{folder_id}/notificationConfigs/notify_public_bucket", - * or "projects/{project_id}/notificationConfigs/notify_public_bucket". - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The description of the notification config (max of 1024 characters). - * - * Generated from protobuf field string description = 2; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * The description of the notification config (max of 1024 characters). - * - * Generated from protobuf field string description = 2; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * The Pub/Sub topic to send notifications to. Its format is - * "projects/[project_id]/topics/[topic]". - * - * Generated from protobuf field string pubsub_topic = 3 [(.google.api.resource_reference) = { - * @return string - */ - public function getPubsubTopic() - { - return $this->pubsub_topic; - } - - /** - * The Pub/Sub topic to send notifications to. Its format is - * "projects/[project_id]/topics/[topic]". - * - * Generated from protobuf field string pubsub_topic = 3 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setPubsubTopic($var) - { - GPBUtil::checkString($var, True); - $this->pubsub_topic = $var; - - return $this; - } - - /** - * Output only. The service account that needs "pubsub.topics.publish" - * permission to publish to the Pub/Sub topic. - * - * Generated from protobuf field string service_account = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getServiceAccount() - { - return $this->service_account; - } - - /** - * Output only. The service account that needs "pubsub.topics.publish" - * permission to publish to the Pub/Sub topic. - * - * Generated from protobuf field string service_account = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setServiceAccount($var) - { - GPBUtil::checkString($var, True); - $this->service_account = $var; - - return $this; - } - - /** - * The config for triggering streaming-based notifications. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig streaming_config = 5; - * @return \Google\Cloud\SecurityCenter\V1\NotificationConfig\StreamingConfig|null - */ - public function getStreamingConfig() - { - return $this->readOneof(5); - } - - public function hasStreamingConfig() - { - return $this->hasOneof(5); - } - - /** - * The config for triggering streaming-based notifications. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig streaming_config = 5; - * @param \Google\Cloud\SecurityCenter\V1\NotificationConfig\StreamingConfig $var - * @return $this - */ - public function setStreamingConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\NotificationConfig\StreamingConfig::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * @return string - */ - public function getNotifyConfig() - { - return $this->whichOneof("notify_config"); - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/NotificationConfig/StreamingConfig.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/NotificationConfig/StreamingConfig.php deleted file mode 100644 index 7f332dbc44a0..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/NotificationConfig/StreamingConfig.php +++ /dev/null @@ -1,131 +0,0 @@ -google.cloud.securitycenter.v1.NotificationConfig.StreamingConfig - */ -class StreamingConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Expression that defines the filter to apply across create/update events - * of assets or findings as specified by the event type. The expression is a - * list of zero or more restrictions combined via logical operators `AND` - * and `OR`. Parentheses are supported, and `OR` has higher precedence than - * `AND`. - * Restrictions have the form ` ` and may have a - * `-` character in front of them to indicate negation. The fields map to - * those defined in the corresponding resource. - * The supported operators are: - * * `=` for all value types. - * * `>`, `<`, `>=`, `<=` for integer values. - * * `:`, meaning substring matching, for strings. - * The supported value types are: - * * string literals in quotes. - * * integer literals without quotes. - * * boolean literals `true` and `false` without quotes. - * - * Generated from protobuf field string filter = 1; - */ - protected $filter = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $filter - * Expression that defines the filter to apply across create/update events - * of assets or findings as specified by the event type. The expression is a - * list of zero or more restrictions combined via logical operators `AND` - * and `OR`. Parentheses are supported, and `OR` has higher precedence than - * `AND`. - * Restrictions have the form ` ` and may have a - * `-` character in front of them to indicate negation. The fields map to - * those defined in the corresponding resource. - * The supported operators are: - * * `=` for all value types. - * * `>`, `<`, `>=`, `<=` for integer values. - * * `:`, meaning substring matching, for strings. - * The supported value types are: - * * string literals in quotes. - * * integer literals without quotes. - * * boolean literals `true` and `false` without quotes. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\NotificationConfig::initOnce(); - parent::__construct($data); - } - - /** - * Expression that defines the filter to apply across create/update events - * of assets or findings as specified by the event type. The expression is a - * list of zero or more restrictions combined via logical operators `AND` - * and `OR`. Parentheses are supported, and `OR` has higher precedence than - * `AND`. - * Restrictions have the form ` ` and may have a - * `-` character in front of them to indicate negation. The fields map to - * those defined in the corresponding resource. - * The supported operators are: - * * `=` for all value types. - * * `>`, `<`, `>=`, `<=` for integer values. - * * `:`, meaning substring matching, for strings. - * The supported value types are: - * * string literals in quotes. - * * integer literals without quotes. - * * boolean literals `true` and `false` without quotes. - * - * Generated from protobuf field string filter = 1; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Expression that defines the filter to apply across create/update events - * of assets or findings as specified by the event type. The expression is a - * list of zero or more restrictions combined via logical operators `AND` - * and `OR`. Parentheses are supported, and `OR` has higher precedence than - * `AND`. - * Restrictions have the form ` ` and may have a - * `-` character in front of them to indicate negation. The fields map to - * those defined in the corresponding resource. - * The supported operators are: - * * `=` for all value types. - * * `>`, `<`, `>=`, `<=` for integer values. - * * `:`, meaning substring matching, for strings. - * The supported value types are: - * * string literals in quotes. - * * integer literals without quotes. - * * boolean literals `true` and `false` without quotes. - * - * Generated from protobuf field string filter = 1; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(StreamingConfig::class, \Google\Cloud\SecurityCenter\V1\NotificationConfig_StreamingConfig::class); - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/NotificationConfig_StreamingConfig.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/NotificationConfig_StreamingConfig.php deleted file mode 100644 index 40a53ab475b6..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/NotificationConfig_StreamingConfig.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.securitycenter.v1.NotificationMessage - */ -class NotificationMessage extends \Google\Protobuf\Internal\Message -{ - /** - * Name of the notification config that generated current notification. - * - * Generated from protobuf field string notification_config_name = 1; - */ - protected $notification_config_name = ''; - /** - * The Cloud resource tied to this notification's Finding. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Resource resource = 3; - */ - protected $resource = null; - protected $event; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $notification_config_name - * Name of the notification config that generated current notification. - * @type \Google\Cloud\SecurityCenter\V1\Finding $finding - * If it's a Finding based notification config, this field will be - * populated. - * @type \Google\Cloud\SecurityCenter\V1\Resource $resource - * The Cloud resource tied to this notification's Finding. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\NotificationMessage::initOnce(); - parent::__construct($data); - } - - /** - * Name of the notification config that generated current notification. - * - * Generated from protobuf field string notification_config_name = 1; - * @return string - */ - public function getNotificationConfigName() - { - return $this->notification_config_name; - } - - /** - * Name of the notification config that generated current notification. - * - * Generated from protobuf field string notification_config_name = 1; - * @param string $var - * @return $this - */ - public function setNotificationConfigName($var) - { - GPBUtil::checkString($var, True); - $this->notification_config_name = $var; - - return $this; - } - - /** - * If it's a Finding based notification config, this field will be - * populated. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Finding finding = 2; - * @return \Google\Cloud\SecurityCenter\V1\Finding|null - */ - public function getFinding() - { - return $this->readOneof(2); - } - - public function hasFinding() - { - return $this->hasOneof(2); - } - - /** - * If it's a Finding based notification config, this field will be - * populated. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Finding finding = 2; - * @param \Google\Cloud\SecurityCenter\V1\Finding $var - * @return $this - */ - public function setFinding($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\Finding::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * The Cloud resource tied to this notification's Finding. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Resource resource = 3; - * @return \Google\Cloud\SecurityCenter\V1\Resource|null - */ - public function getResource() - { - return $this->resource; - } - - public function hasResource() - { - return isset($this->resource); - } - - public function clearResource() - { - unset($this->resource); - } - - /** - * The Cloud resource tied to this notification's Finding. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Resource resource = 3; - * @param \Google\Cloud\SecurityCenter\V1\Resource $var - * @return $this - */ - public function setResource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\Resource::class); - $this->resource = $var; - - return $this; - } - - /** - * @return string - */ - public function getEvent() - { - return $this->whichOneof("event"); - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/OrganizationSettings.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/OrganizationSettings.php deleted file mode 100644 index 08d83dfae30c..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/OrganizationSettings.php +++ /dev/null @@ -1,170 +0,0 @@ -google.cloud.securitycenter.v1.OrganizationSettings - */ -class OrganizationSettings extends \Google\Protobuf\Internal\Message -{ - /** - * The relative resource name of the settings. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name - * Example: - * "organizations/{organization_id}/organizationSettings". - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * A flag that indicates if Asset Discovery should be enabled. If the flag is - * set to `true`, then discovery of assets will occur. If it is set to `false, - * all historical assets will remain, but discovery of future assets will not - * occur. - * - * Generated from protobuf field bool enable_asset_discovery = 2; - */ - protected $enable_asset_discovery = false; - /** - * The configuration used for Asset Discovery runs. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig asset_discovery_config = 3; - */ - protected $asset_discovery_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The relative resource name of the settings. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name - * Example: - * "organizations/{organization_id}/organizationSettings". - * @type bool $enable_asset_discovery - * A flag that indicates if Asset Discovery should be enabled. If the flag is - * set to `true`, then discovery of assets will occur. If it is set to `false, - * all historical assets will remain, but discovery of future assets will not - * occur. - * @type \Google\Cloud\SecurityCenter\V1\OrganizationSettings\AssetDiscoveryConfig $asset_discovery_config - * The configuration used for Asset Discovery runs. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\OrganizationSettings::initOnce(); - parent::__construct($data); - } - - /** - * The relative resource name of the settings. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name - * Example: - * "organizations/{organization_id}/organizationSettings". - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The relative resource name of the settings. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name - * Example: - * "organizations/{organization_id}/organizationSettings". - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * A flag that indicates if Asset Discovery should be enabled. If the flag is - * set to `true`, then discovery of assets will occur. If it is set to `false, - * all historical assets will remain, but discovery of future assets will not - * occur. - * - * Generated from protobuf field bool enable_asset_discovery = 2; - * @return bool - */ - public function getEnableAssetDiscovery() - { - return $this->enable_asset_discovery; - } - - /** - * A flag that indicates if Asset Discovery should be enabled. If the flag is - * set to `true`, then discovery of assets will occur. If it is set to `false, - * all historical assets will remain, but discovery of future assets will not - * occur. - * - * Generated from protobuf field bool enable_asset_discovery = 2; - * @param bool $var - * @return $this - */ - public function setEnableAssetDiscovery($var) - { - GPBUtil::checkBool($var); - $this->enable_asset_discovery = $var; - - return $this; - } - - /** - * The configuration used for Asset Discovery runs. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig asset_discovery_config = 3; - * @return \Google\Cloud\SecurityCenter\V1\OrganizationSettings\AssetDiscoveryConfig|null - */ - public function getAssetDiscoveryConfig() - { - return $this->asset_discovery_config; - } - - public function hasAssetDiscoveryConfig() - { - return isset($this->asset_discovery_config); - } - - public function clearAssetDiscoveryConfig() - { - unset($this->asset_discovery_config); - } - - /** - * The configuration used for Asset Discovery runs. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig asset_discovery_config = 3; - * @param \Google\Cloud\SecurityCenter\V1\OrganizationSettings\AssetDiscoveryConfig $var - * @return $this - */ - public function setAssetDiscoveryConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\OrganizationSettings\AssetDiscoveryConfig::class); - $this->asset_discovery_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/OrganizationSettings/AssetDiscoveryConfig.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/OrganizationSettings/AssetDiscoveryConfig.php deleted file mode 100644 index bfa7935a6f48..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/OrganizationSettings/AssetDiscoveryConfig.php +++ /dev/null @@ -1,142 +0,0 @@ -google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig - */ -class AssetDiscoveryConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The project ids to use for filtering asset discovery. - * - * Generated from protobuf field repeated string project_ids = 1; - */ - private $project_ids; - /** - * The mode to use for filtering asset discovery. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.InclusionMode inclusion_mode = 2; - */ - protected $inclusion_mode = 0; - /** - * The folder ids to use for filtering asset discovery. - * It consists of only digits, e.g., 756619654966. - * - * Generated from protobuf field repeated string folder_ids = 3; - */ - private $folder_ids; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $project_ids - * The project ids to use for filtering asset discovery. - * @type int $inclusion_mode - * The mode to use for filtering asset discovery. - * @type array|\Google\Protobuf\Internal\RepeatedField $folder_ids - * The folder ids to use for filtering asset discovery. - * It consists of only digits, e.g., 756619654966. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\OrganizationSettings::initOnce(); - parent::__construct($data); - } - - /** - * The project ids to use for filtering asset discovery. - * - * Generated from protobuf field repeated string project_ids = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getProjectIds() - { - return $this->project_ids; - } - - /** - * The project ids to use for filtering asset discovery. - * - * Generated from protobuf field repeated string project_ids = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setProjectIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->project_ids = $arr; - - return $this; - } - - /** - * The mode to use for filtering asset discovery. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.InclusionMode inclusion_mode = 2; - * @return int - */ - public function getInclusionMode() - { - return $this->inclusion_mode; - } - - /** - * The mode to use for filtering asset discovery. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.InclusionMode inclusion_mode = 2; - * @param int $var - * @return $this - */ - public function setInclusionMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1\OrganizationSettings\AssetDiscoveryConfig\InclusionMode::class); - $this->inclusion_mode = $var; - - return $this; - } - - /** - * The folder ids to use for filtering asset discovery. - * It consists of only digits, e.g., 756619654966. - * - * Generated from protobuf field repeated string folder_ids = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFolderIds() - { - return $this->folder_ids; - } - - /** - * The folder ids to use for filtering asset discovery. - * It consists of only digits, e.g., 756619654966. - * - * Generated from protobuf field repeated string folder_ids = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFolderIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->folder_ids = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AssetDiscoveryConfig::class, \Google\Cloud\SecurityCenter\V1\OrganizationSettings_AssetDiscoveryConfig::class); - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/OrganizationSettings/AssetDiscoveryConfig/InclusionMode.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/OrganizationSettings/AssetDiscoveryConfig/InclusionMode.php deleted file mode 100644 index 33dd51cd818b..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/OrganizationSettings/AssetDiscoveryConfig/InclusionMode.php +++ /dev/null @@ -1,74 +0,0 @@ -google.cloud.securitycenter.v1.OrganizationSettings.AssetDiscoveryConfig.InclusionMode - */ -class InclusionMode -{ - /** - * Unspecified. Setting the mode with this value will disable - * inclusion/exclusion filtering for Asset Discovery. - * - * Generated from protobuf enum INCLUSION_MODE_UNSPECIFIED = 0; - */ - const INCLUSION_MODE_UNSPECIFIED = 0; - /** - * Asset Discovery will capture only the resources within the projects - * specified. All other resources will be ignored. - * - * Generated from protobuf enum INCLUDE_ONLY = 1; - */ - const INCLUDE_ONLY = 1; - /** - * Asset Discovery will ignore all resources under the projects specified. - * All other resources will be retrieved. - * - * Generated from protobuf enum EXCLUDE = 2; - */ - const EXCLUDE = 2; - - private static $valueToName = [ - self::INCLUSION_MODE_UNSPECIFIED => 'INCLUSION_MODE_UNSPECIFIED', - self::INCLUDE_ONLY => 'INCLUDE_ONLY', - self::EXCLUDE => 'EXCLUDE', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(InclusionMode::class, \Google\Cloud\SecurityCenter\V1\OrganizationSettings_AssetDiscoveryConfig_InclusionMode::class); - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/OrganizationSettings_AssetDiscoveryConfig.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/OrganizationSettings_AssetDiscoveryConfig.php deleted file mode 100644 index c2e11ae882d1..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/OrganizationSettings_AssetDiscoveryConfig.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.securitycenter.v1.Process - */ -class Process extends \Google\Protobuf\Internal\Message -{ - /** - * The process name visible in utilities like `top` and `ps`; it can - * be accessed via `/proc/[pid]/comm` and changed with `prctl(PR_SET_NAME)`. - * - * Generated from protobuf field string name = 12; - */ - protected $name = ''; - /** - * File information for the process executable. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.File binary = 3; - */ - protected $binary = null; - /** - * File information for libraries loaded by the process. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.File libraries = 4; - */ - private $libraries; - /** - * When the process represents the invocation of a script, - * `binary` provides information about the interpreter while `script` - * provides information about the script file provided to the - * interpreter. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.File script = 5; - */ - protected $script = null; - /** - * Process arguments as JSON encoded strings. - * - * Generated from protobuf field repeated string args = 6; - */ - private $args; - /** - * True if `args` is incomplete. - * - * Generated from protobuf field bool arguments_truncated = 7; - */ - protected $arguments_truncated = false; - /** - * Process environment variables. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.EnvironmentVariable env_variables = 8; - */ - private $env_variables; - /** - * True if `env_variables` is incomplete. - * - * Generated from protobuf field bool env_variables_truncated = 9; - */ - protected $env_variables_truncated = false; - /** - * The process id. - * - * Generated from protobuf field int64 pid = 10; - */ - protected $pid = 0; - /** - * The parent process id. - * - * Generated from protobuf field int64 parent_pid = 11; - */ - protected $parent_pid = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The process name visible in utilities like `top` and `ps`; it can - * be accessed via `/proc/[pid]/comm` and changed with `prctl(PR_SET_NAME)`. - * @type \Google\Cloud\SecurityCenter\V1\File $binary - * File information for the process executable. - * @type array<\Google\Cloud\SecurityCenter\V1\File>|\Google\Protobuf\Internal\RepeatedField $libraries - * File information for libraries loaded by the process. - * @type \Google\Cloud\SecurityCenter\V1\File $script - * When the process represents the invocation of a script, - * `binary` provides information about the interpreter while `script` - * provides information about the script file provided to the - * interpreter. - * @type array|\Google\Protobuf\Internal\RepeatedField $args - * Process arguments as JSON encoded strings. - * @type bool $arguments_truncated - * True if `args` is incomplete. - * @type array<\Google\Cloud\SecurityCenter\V1\EnvironmentVariable>|\Google\Protobuf\Internal\RepeatedField $env_variables - * Process environment variables. - * @type bool $env_variables_truncated - * True if `env_variables` is incomplete. - * @type int|string $pid - * The process id. - * @type int|string $parent_pid - * The parent process id. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\Process::initOnce(); - parent::__construct($data); - } - - /** - * The process name visible in utilities like `top` and `ps`; it can - * be accessed via `/proc/[pid]/comm` and changed with `prctl(PR_SET_NAME)`. - * - * Generated from protobuf field string name = 12; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The process name visible in utilities like `top` and `ps`; it can - * be accessed via `/proc/[pid]/comm` and changed with `prctl(PR_SET_NAME)`. - * - * Generated from protobuf field string name = 12; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * File information for the process executable. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.File binary = 3; - * @return \Google\Cloud\SecurityCenter\V1\File|null - */ - public function getBinary() - { - return $this->binary; - } - - public function hasBinary() - { - return isset($this->binary); - } - - public function clearBinary() - { - unset($this->binary); - } - - /** - * File information for the process executable. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.File binary = 3; - * @param \Google\Cloud\SecurityCenter\V1\File $var - * @return $this - */ - public function setBinary($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\File::class); - $this->binary = $var; - - return $this; - } - - /** - * File information for libraries loaded by the process. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.File libraries = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLibraries() - { - return $this->libraries; - } - - /** - * File information for libraries loaded by the process. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.File libraries = 4; - * @param array<\Google\Cloud\SecurityCenter\V1\File>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLibraries($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\File::class); - $this->libraries = $arr; - - return $this; - } - - /** - * When the process represents the invocation of a script, - * `binary` provides information about the interpreter while `script` - * provides information about the script file provided to the - * interpreter. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.File script = 5; - * @return \Google\Cloud\SecurityCenter\V1\File|null - */ - public function getScript() - { - return $this->script; - } - - public function hasScript() - { - return isset($this->script); - } - - public function clearScript() - { - unset($this->script); - } - - /** - * When the process represents the invocation of a script, - * `binary` provides information about the interpreter while `script` - * provides information about the script file provided to the - * interpreter. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.File script = 5; - * @param \Google\Cloud\SecurityCenter\V1\File $var - * @return $this - */ - public function setScript($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\File::class); - $this->script = $var; - - return $this; - } - - /** - * Process arguments as JSON encoded strings. - * - * Generated from protobuf field repeated string args = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getArgs() - { - return $this->args; - } - - /** - * Process arguments as JSON encoded strings. - * - * Generated from protobuf field repeated string args = 6; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setArgs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->args = $arr; - - return $this; - } - - /** - * True if `args` is incomplete. - * - * Generated from protobuf field bool arguments_truncated = 7; - * @return bool - */ - public function getArgumentsTruncated() - { - return $this->arguments_truncated; - } - - /** - * True if `args` is incomplete. - * - * Generated from protobuf field bool arguments_truncated = 7; - * @param bool $var - * @return $this - */ - public function setArgumentsTruncated($var) - { - GPBUtil::checkBool($var); - $this->arguments_truncated = $var; - - return $this; - } - - /** - * Process environment variables. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.EnvironmentVariable env_variables = 8; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEnvVariables() - { - return $this->env_variables; - } - - /** - * Process environment variables. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.EnvironmentVariable env_variables = 8; - * @param array<\Google\Cloud\SecurityCenter\V1\EnvironmentVariable>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEnvVariables($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\EnvironmentVariable::class); - $this->env_variables = $arr; - - return $this; - } - - /** - * True if `env_variables` is incomplete. - * - * Generated from protobuf field bool env_variables_truncated = 9; - * @return bool - */ - public function getEnvVariablesTruncated() - { - return $this->env_variables_truncated; - } - - /** - * True if `env_variables` is incomplete. - * - * Generated from protobuf field bool env_variables_truncated = 9; - * @param bool $var - * @return $this - */ - public function setEnvVariablesTruncated($var) - { - GPBUtil::checkBool($var); - $this->env_variables_truncated = $var; - - return $this; - } - - /** - * The process id. - * - * Generated from protobuf field int64 pid = 10; - * @return int|string - */ - public function getPid() - { - return $this->pid; - } - - /** - * The process id. - * - * Generated from protobuf field int64 pid = 10; - * @param int|string $var - * @return $this - */ - public function setPid($var) - { - GPBUtil::checkInt64($var); - $this->pid = $var; - - return $this; - } - - /** - * The parent process id. - * - * Generated from protobuf field int64 parent_pid = 11; - * @return int|string - */ - public function getParentPid() - { - return $this->parent_pid; - } - - /** - * The parent process id. - * - * Generated from protobuf field int64 parent_pid = 11; - * @param int|string $var - * @return $this - */ - public function setParentPid($var) - { - GPBUtil::checkInt64($var); - $this->parent_pid = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Reference.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Reference.php deleted file mode 100644 index 0dead12073c9..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Reference.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.securitycenter.v1.Reference - */ -class Reference extends \Google\Protobuf\Internal\Message -{ - /** - * Source of the reference e.g. NVD - * - * Generated from protobuf field string source = 1; - */ - protected $source = ''; - /** - * Uri for the mentioned source e.g. - * https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527. - * - * Generated from protobuf field string uri = 2; - */ - protected $uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $source - * Source of the reference e.g. NVD - * @type string $uri - * Uri for the mentioned source e.g. - * https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\Vulnerability::initOnce(); - parent::__construct($data); - } - - /** - * Source of the reference e.g. NVD - * - * Generated from protobuf field string source = 1; - * @return string - */ - public function getSource() - { - return $this->source; - } - - /** - * Source of the reference e.g. NVD - * - * Generated from protobuf field string source = 1; - * @param string $var - * @return $this - */ - public function setSource($var) - { - GPBUtil::checkString($var, True); - $this->source = $var; - - return $this; - } - - /** - * Uri for the mentioned source e.g. - * https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527. - * - * Generated from protobuf field string uri = 2; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * Uri for the mentioned source e.g. - * https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527. - * - * Generated from protobuf field string uri = 2; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Resource.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Resource.php deleted file mode 100644 index ae3d5819c440..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Resource.php +++ /dev/null @@ -1,317 +0,0 @@ -google.cloud.securitycenter.v1.Resource - */ -class Resource extends \Google\Protobuf\Internal\Message -{ - /** - * The full resource name of the resource. See: - * https://cloud.google.com/apis/design/resource_names#full_resource_name - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The human readable name of the resource. - * - * Generated from protobuf field string display_name = 8; - */ - protected $display_name = ''; - /** - * The full resource type of the resource. - * - * Generated from protobuf field string type = 6; - */ - protected $type = ''; - /** - * The full resource name of project that the resource belongs to. - * - * Generated from protobuf field string project = 2; - */ - protected $project = ''; - /** - * The project ID that the resource belongs to. - * - * Generated from protobuf field string project_display_name = 3; - */ - protected $project_display_name = ''; - /** - * The full resource name of resource's parent. - * - * Generated from protobuf field string parent = 4; - */ - protected $parent = ''; - /** - * The human readable name of resource's parent. - * - * Generated from protobuf field string parent_display_name = 5; - */ - protected $parent_display_name = ''; - /** - * Output only. Contains a Folder message for each folder in the assets ancestry. - * The first folder is the deepest nested folder, and the last folder is the - * folder directly under the Organization. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Folder folders = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $folders; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The full resource name of the resource. See: - * https://cloud.google.com/apis/design/resource_names#full_resource_name - * @type string $display_name - * The human readable name of the resource. - * @type string $type - * The full resource type of the resource. - * @type string $project - * The full resource name of project that the resource belongs to. - * @type string $project_display_name - * The project ID that the resource belongs to. - * @type string $parent - * The full resource name of resource's parent. - * @type string $parent_display_name - * The human readable name of resource's parent. - * @type array<\Google\Cloud\SecurityCenter\V1\Folder>|\Google\Protobuf\Internal\RepeatedField $folders - * Output only. Contains a Folder message for each folder in the assets ancestry. - * The first folder is the deepest nested folder, and the last folder is the - * folder directly under the Organization. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\Resource::initOnce(); - parent::__construct($data); - } - - /** - * The full resource name of the resource. See: - * https://cloud.google.com/apis/design/resource_names#full_resource_name - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The full resource name of the resource. See: - * https://cloud.google.com/apis/design/resource_names#full_resource_name - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The human readable name of the resource. - * - * Generated from protobuf field string display_name = 8; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The human readable name of the resource. - * - * Generated from protobuf field string display_name = 8; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * The full resource type of the resource. - * - * Generated from protobuf field string type = 6; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * The full resource type of the resource. - * - * Generated from protobuf field string type = 6; - * @param string $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkString($var, True); - $this->type = $var; - - return $this; - } - - /** - * The full resource name of project that the resource belongs to. - * - * Generated from protobuf field string project = 2; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * The full resource name of project that the resource belongs to. - * - * Generated from protobuf field string project = 2; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - - /** - * The project ID that the resource belongs to. - * - * Generated from protobuf field string project_display_name = 3; - * @return string - */ - public function getProjectDisplayName() - { - return $this->project_display_name; - } - - /** - * The project ID that the resource belongs to. - * - * Generated from protobuf field string project_display_name = 3; - * @param string $var - * @return $this - */ - public function setProjectDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->project_display_name = $var; - - return $this; - } - - /** - * The full resource name of resource's parent. - * - * Generated from protobuf field string parent = 4; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * The full resource name of resource's parent. - * - * Generated from protobuf field string parent = 4; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The human readable name of resource's parent. - * - * Generated from protobuf field string parent_display_name = 5; - * @return string - */ - public function getParentDisplayName() - { - return $this->parent_display_name; - } - - /** - * The human readable name of resource's parent. - * - * Generated from protobuf field string parent_display_name = 5; - * @param string $var - * @return $this - */ - public function setParentDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->parent_display_name = $var; - - return $this; - } - - /** - * Output only. Contains a Folder message for each folder in the assets ancestry. - * The first folder is the deepest nested folder, and the last folder is the - * folder directly under the Organization. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Folder folders = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFolders() - { - return $this->folders; - } - - /** - * Output only. Contains a Folder message for each folder in the assets ancestry. - * The first folder is the deepest nested folder, and the last folder is the - * folder directly under the Organization. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1.Folder folders = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\SecurityCenter\V1\Folder>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFolders($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\Folder::class); - $this->folders = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/RunAssetDiscoveryRequest.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/RunAssetDiscoveryRequest.php deleted file mode 100644 index f698c9d65783..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/RunAssetDiscoveryRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.securitycenter.v1.RunAssetDiscoveryRequest - */ -class RunAssetDiscoveryRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the organization to run asset discovery for. Its format - * is "organizations/[organization_id]". - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Name of the organization to run asset discovery for. Its format - * is "organizations/[organization_id]". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the organization to run asset discovery for. Its format - * is "organizations/[organization_id]". - * - * 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. Name of the organization to run asset discovery for. Its format - * is "organizations/[organization_id]". - * - * 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; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/RunAssetDiscoveryResponse.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/RunAssetDiscoveryResponse.php deleted file mode 100644 index ff4858d1b647..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/RunAssetDiscoveryResponse.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.securitycenter.v1.RunAssetDiscoveryResponse - */ -class RunAssetDiscoveryResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The state of an asset discovery run. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.RunAssetDiscoveryResponse.State state = 1; - */ - protected $state = 0; - /** - * The duration between asset discovery run start and end - * - * Generated from protobuf field .google.protobuf.Duration duration = 2; - */ - protected $duration = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $state - * The state of an asset discovery run. - * @type \Google\Protobuf\Duration $duration - * The duration between asset discovery run start and end - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\RunAssetDiscoveryResponse::initOnce(); - parent::__construct($data); - } - - /** - * The state of an asset discovery run. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.RunAssetDiscoveryResponse.State state = 1; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The state of an asset discovery run. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.RunAssetDiscoveryResponse.State state = 1; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1\RunAssetDiscoveryResponse\State::class); - $this->state = $var; - - return $this; - } - - /** - * The duration between asset discovery run start and end - * - * Generated from protobuf field .google.protobuf.Duration duration = 2; - * @return \Google\Protobuf\Duration|null - */ - public function getDuration() - { - return $this->duration; - } - - public function hasDuration() - { - return isset($this->duration); - } - - public function clearDuration() - { - unset($this->duration); - } - - /** - * The duration between asset discovery run start and end - * - * Generated from protobuf field .google.protobuf.Duration duration = 2; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->duration = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/RunAssetDiscoveryResponse/State.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/RunAssetDiscoveryResponse/State.php deleted file mode 100644 index 51273e889fe3..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/RunAssetDiscoveryResponse/State.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.securitycenter.v1.RunAssetDiscoveryResponse.State - */ -class State -{ - /** - * Asset discovery run state was unspecified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Asset discovery run completed successfully. - * - * Generated from protobuf enum COMPLETED = 1; - */ - const COMPLETED = 1; - /** - * Asset discovery run was cancelled with tasks still pending, as another - * run for the same organization was started with a higher priority. - * - * Generated from protobuf enum SUPERSEDED = 2; - */ - const SUPERSEDED = 2; - /** - * Asset discovery run was killed and terminated. - * - * Generated from protobuf enum TERMINATED = 3; - */ - const TERMINATED = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::COMPLETED => 'COMPLETED', - self::SUPERSEDED => 'SUPERSEDED', - self::TERMINATED => 'TERMINATED', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\SecurityCenter\V1\RunAssetDiscoveryResponse_State::class); - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/RunAssetDiscoveryResponse_State.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/RunAssetDiscoveryResponse_State.php deleted file mode 100644 index 83777996b9da..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/RunAssetDiscoveryResponse_State.php +++ /dev/null @@ -1,16 +0,0 @@ -_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/BulkMuteFindings', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Creates a source. - * @param \Google\Cloud\SecurityCenter\V1\CreateSourceRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateSource(\Google\Cloud\SecurityCenter\V1\CreateSourceRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/CreateSource', - $argument, - ['\Google\Cloud\SecurityCenter\V1\Source', 'decode'], - $metadata, $options); - } - - /** - * Creates a finding. The corresponding source must exist for finding creation - * to succeed. - * @param \Google\Cloud\SecurityCenter\V1\CreateFindingRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateFinding(\Google\Cloud\SecurityCenter\V1\CreateFindingRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/CreateFinding', - $argument, - ['\Google\Cloud\SecurityCenter\V1\Finding', 'decode'], - $metadata, $options); - } - - /** - * Creates a mute config. - * @param \Google\Cloud\SecurityCenter\V1\CreateMuteConfigRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateMuteConfig(\Google\Cloud\SecurityCenter\V1\CreateMuteConfigRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/CreateMuteConfig', - $argument, - ['\Google\Cloud\SecurityCenter\V1\MuteConfig', 'decode'], - $metadata, $options); - } - - /** - * Creates a notification config. - * @param \Google\Cloud\SecurityCenter\V1\CreateNotificationConfigRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateNotificationConfig(\Google\Cloud\SecurityCenter\V1\CreateNotificationConfigRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/CreateNotificationConfig', - $argument, - ['\Google\Cloud\SecurityCenter\V1\NotificationConfig', 'decode'], - $metadata, $options); - } - - /** - * Deletes an existing mute config. - * @param \Google\Cloud\SecurityCenter\V1\DeleteMuteConfigRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteMuteConfig(\Google\Cloud\SecurityCenter\V1\DeleteMuteConfigRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/DeleteMuteConfig', - $argument, - ['\Google\Protobuf\GPBEmpty', 'decode'], - $metadata, $options); - } - - /** - * Deletes a notification config. - * @param \Google\Cloud\SecurityCenter\V1\DeleteNotificationConfigRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteNotificationConfig(\Google\Cloud\SecurityCenter\V1\DeleteNotificationConfigRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/DeleteNotificationConfig', - $argument, - ['\Google\Protobuf\GPBEmpty', 'decode'], - $metadata, $options); - } - - /** - * Gets a BigQuery export. - * @param \Google\Cloud\SecurityCenter\V1\GetBigQueryExportRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetBigQueryExport(\Google\Cloud\SecurityCenter\V1\GetBigQueryExportRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/GetBigQueryExport', - $argument, - ['\Google\Cloud\SecurityCenter\V1\BigQueryExport', 'decode'], - $metadata, $options); - } - - /** - * Gets the access control policy on the specified Source. - * @param \Google\Cloud\Iam\V1\GetIamPolicyRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetIamPolicy(\Google\Cloud\Iam\V1\GetIamPolicyRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/GetIamPolicy', - $argument, - ['\Google\Cloud\Iam\V1\Policy', 'decode'], - $metadata, $options); - } - - /** - * Gets a mute config. - * @param \Google\Cloud\SecurityCenter\V1\GetMuteConfigRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetMuteConfig(\Google\Cloud\SecurityCenter\V1\GetMuteConfigRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/GetMuteConfig', - $argument, - ['\Google\Cloud\SecurityCenter\V1\MuteConfig', 'decode'], - $metadata, $options); - } - - /** - * Gets a notification config. - * @param \Google\Cloud\SecurityCenter\V1\GetNotificationConfigRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetNotificationConfig(\Google\Cloud\SecurityCenter\V1\GetNotificationConfigRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/GetNotificationConfig', - $argument, - ['\Google\Cloud\SecurityCenter\V1\NotificationConfig', 'decode'], - $metadata, $options); - } - - /** - * Gets the settings for an organization. - * @param \Google\Cloud\SecurityCenter\V1\GetOrganizationSettingsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetOrganizationSettings(\Google\Cloud\SecurityCenter\V1\GetOrganizationSettingsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/GetOrganizationSettings', - $argument, - ['\Google\Cloud\SecurityCenter\V1\OrganizationSettings', 'decode'], - $metadata, $options); - } - - /** - * Gets a source. - * @param \Google\Cloud\SecurityCenter\V1\GetSourceRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetSource(\Google\Cloud\SecurityCenter\V1\GetSourceRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/GetSource', - $argument, - ['\Google\Cloud\SecurityCenter\V1\Source', 'decode'], - $metadata, $options); - } - - /** - * Filters an organization's assets and groups them by their specified - * properties. - * @param \Google\Cloud\SecurityCenter\V1\GroupAssetsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GroupAssets(\Google\Cloud\SecurityCenter\V1\GroupAssetsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/GroupAssets', - $argument, - ['\Google\Cloud\SecurityCenter\V1\GroupAssetsResponse', 'decode'], - $metadata, $options); - } - - /** - * Filters an organization or source's findings and groups them by their - * specified properties. - * - * To group across all sources provide a `-` as the source id. - * Example: /v1/organizations/{organization_id}/sources/-/findings, - * /v1/folders/{folder_id}/sources/-/findings, - * /v1/projects/{project_id}/sources/-/findings - * @param \Google\Cloud\SecurityCenter\V1\GroupFindingsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GroupFindings(\Google\Cloud\SecurityCenter\V1\GroupFindingsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/GroupFindings', - $argument, - ['\Google\Cloud\SecurityCenter\V1\GroupFindingsResponse', 'decode'], - $metadata, $options); - } - - /** - * Lists an organization's assets. - * @param \Google\Cloud\SecurityCenter\V1\ListAssetsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListAssets(\Google\Cloud\SecurityCenter\V1\ListAssetsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/ListAssets', - $argument, - ['\Google\Cloud\SecurityCenter\V1\ListAssetsResponse', 'decode'], - $metadata, $options); - } - - /** - * Lists an organization or source's findings. - * - * To list across all sources provide a `-` as the source id. - * Example: /v1/organizations/{organization_id}/sources/-/findings - * @param \Google\Cloud\SecurityCenter\V1\ListFindingsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListFindings(\Google\Cloud\SecurityCenter\V1\ListFindingsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/ListFindings', - $argument, - ['\Google\Cloud\SecurityCenter\V1\ListFindingsResponse', 'decode'], - $metadata, $options); - } - - /** - * Lists mute configs. - * @param \Google\Cloud\SecurityCenter\V1\ListMuteConfigsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListMuteConfigs(\Google\Cloud\SecurityCenter\V1\ListMuteConfigsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/ListMuteConfigs', - $argument, - ['\Google\Cloud\SecurityCenter\V1\ListMuteConfigsResponse', 'decode'], - $metadata, $options); - } - - /** - * Lists notification configs. - * @param \Google\Cloud\SecurityCenter\V1\ListNotificationConfigsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListNotificationConfigs(\Google\Cloud\SecurityCenter\V1\ListNotificationConfigsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/ListNotificationConfigs', - $argument, - ['\Google\Cloud\SecurityCenter\V1\ListNotificationConfigsResponse', 'decode'], - $metadata, $options); - } - - /** - * Lists all sources belonging to an organization. - * @param \Google\Cloud\SecurityCenter\V1\ListSourcesRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListSources(\Google\Cloud\SecurityCenter\V1\ListSourcesRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/ListSources', - $argument, - ['\Google\Cloud\SecurityCenter\V1\ListSourcesResponse', 'decode'], - $metadata, $options); - } - - /** - * Runs asset discovery. The discovery is tracked with a long-running - * operation. - * - * This API can only be called with limited frequency for an organization. If - * it is called too frequently the caller will receive a TOO_MANY_REQUESTS - * error. - * @param \Google\Cloud\SecurityCenter\V1\RunAssetDiscoveryRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function RunAssetDiscovery(\Google\Cloud\SecurityCenter\V1\RunAssetDiscoveryRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/RunAssetDiscovery', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Updates the state of a finding. - * @param \Google\Cloud\SecurityCenter\V1\SetFindingStateRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function SetFindingState(\Google\Cloud\SecurityCenter\V1\SetFindingStateRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/SetFindingState', - $argument, - ['\Google\Cloud\SecurityCenter\V1\Finding', 'decode'], - $metadata, $options); - } - - /** - * Updates the mute state of a finding. - * @param \Google\Cloud\SecurityCenter\V1\SetMuteRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function SetMute(\Google\Cloud\SecurityCenter\V1\SetMuteRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/SetMute', - $argument, - ['\Google\Cloud\SecurityCenter\V1\Finding', 'decode'], - $metadata, $options); - } - - /** - * Sets the access control policy on the specified Source. - * @param \Google\Cloud\Iam\V1\SetIamPolicyRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function SetIamPolicy(\Google\Cloud\Iam\V1\SetIamPolicyRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/SetIamPolicy', - $argument, - ['\Google\Cloud\Iam\V1\Policy', 'decode'], - $metadata, $options); - } - - /** - * Returns the permissions that a caller has on the specified source. - * @param \Google\Cloud\Iam\V1\TestIamPermissionsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function TestIamPermissions(\Google\Cloud\Iam\V1\TestIamPermissionsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/TestIamPermissions', - $argument, - ['\Google\Cloud\Iam\V1\TestIamPermissionsResponse', 'decode'], - $metadata, $options); - } - - /** - * Updates external system. This is for a given finding. - * @param \Google\Cloud\SecurityCenter\V1\UpdateExternalSystemRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateExternalSystem(\Google\Cloud\SecurityCenter\V1\UpdateExternalSystemRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/UpdateExternalSystem', - $argument, - ['\Google\Cloud\SecurityCenter\V1\ExternalSystem', 'decode'], - $metadata, $options); - } - - /** - * Creates or updates a finding. The corresponding source must exist for a - * finding creation to succeed. - * @param \Google\Cloud\SecurityCenter\V1\UpdateFindingRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateFinding(\Google\Cloud\SecurityCenter\V1\UpdateFindingRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/UpdateFinding', - $argument, - ['\Google\Cloud\SecurityCenter\V1\Finding', 'decode'], - $metadata, $options); - } - - /** - * Updates a mute config. - * @param \Google\Cloud\SecurityCenter\V1\UpdateMuteConfigRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateMuteConfig(\Google\Cloud\SecurityCenter\V1\UpdateMuteConfigRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/UpdateMuteConfig', - $argument, - ['\Google\Cloud\SecurityCenter\V1\MuteConfig', 'decode'], - $metadata, $options); - } - - /** - * - * Updates a notification config. The following update - * fields are allowed: description, pubsub_topic, streaming_config.filter - * @param \Google\Cloud\SecurityCenter\V1\UpdateNotificationConfigRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateNotificationConfig(\Google\Cloud\SecurityCenter\V1\UpdateNotificationConfigRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/UpdateNotificationConfig', - $argument, - ['\Google\Cloud\SecurityCenter\V1\NotificationConfig', 'decode'], - $metadata, $options); - } - - /** - * Updates an organization's settings. - * @param \Google\Cloud\SecurityCenter\V1\UpdateOrganizationSettingsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateOrganizationSettings(\Google\Cloud\SecurityCenter\V1\UpdateOrganizationSettingsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/UpdateOrganizationSettings', - $argument, - ['\Google\Cloud\SecurityCenter\V1\OrganizationSettings', 'decode'], - $metadata, $options); - } - - /** - * Updates a source. - * @param \Google\Cloud\SecurityCenter\V1\UpdateSourceRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateSource(\Google\Cloud\SecurityCenter\V1\UpdateSourceRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/UpdateSource', - $argument, - ['\Google\Cloud\SecurityCenter\V1\Source', 'decode'], - $metadata, $options); - } - - /** - * Updates security marks. - * @param \Google\Cloud\SecurityCenter\V1\UpdateSecurityMarksRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateSecurityMarks(\Google\Cloud\SecurityCenter\V1\UpdateSecurityMarksRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/UpdateSecurityMarks', - $argument, - ['\Google\Cloud\SecurityCenter\V1\SecurityMarks', 'decode'], - $metadata, $options); - } - - /** - * Creates a BigQuery export. - * @param \Google\Cloud\SecurityCenter\V1\CreateBigQueryExportRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateBigQueryExport(\Google\Cloud\SecurityCenter\V1\CreateBigQueryExportRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/CreateBigQueryExport', - $argument, - ['\Google\Cloud\SecurityCenter\V1\BigQueryExport', 'decode'], - $metadata, $options); - } - - /** - * Deletes an existing BigQuery export. - * @param \Google\Cloud\SecurityCenter\V1\DeleteBigQueryExportRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteBigQueryExport(\Google\Cloud\SecurityCenter\V1\DeleteBigQueryExportRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/DeleteBigQueryExport', - $argument, - ['\Google\Protobuf\GPBEmpty', 'decode'], - $metadata, $options); - } - - /** - * Updates a BigQuery export. - * @param \Google\Cloud\SecurityCenter\V1\UpdateBigQueryExportRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateBigQueryExport(\Google\Cloud\SecurityCenter\V1\UpdateBigQueryExportRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/UpdateBigQueryExport', - $argument, - ['\Google\Cloud\SecurityCenter\V1\BigQueryExport', 'decode'], - $metadata, $options); - } - - /** - * Lists BigQuery exports. Note that when requesting BigQuery exports at a - * given level all exports under that level are also returned e.g. if - * requesting BigQuery exports under a folder, then all BigQuery exports - * immediately under the folder plus the ones created under the projects - * within the folder are returned. - * @param \Google\Cloud\SecurityCenter\V1\ListBigQueryExportsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListBigQueryExports(\Google\Cloud\SecurityCenter\V1\ListBigQueryExportsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/ListBigQueryExports', - $argument, - ['\Google\Cloud\SecurityCenter\V1\ListBigQueryExportsResponse', 'decode'], - $metadata, $options); - } - -} diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/SecurityMarks.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/SecurityMarks.php deleted file mode 100644 index d5a9c82d0fbc..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/SecurityMarks.php +++ /dev/null @@ -1,206 +0,0 @@ -google.cloud.securitycenter.v1.SecurityMarks - */ -class SecurityMarks extends \Google\Protobuf\Internal\Message -{ - /** - * The relative resource name of the SecurityMarks. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name - * Examples: - * "organizations/{organization_id}/assets/{asset_id}/securityMarks" - * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks". - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Mutable user specified security marks belonging to the parent resource. - * Constraints are as follows: - * * Keys and values are treated as case insensitive - * * Keys must be between 1 - 256 characters (inclusive) - * * Keys must be letters, numbers, underscores, or dashes - * * Values have leading and trailing whitespace trimmed, remaining - * characters must be between 1 - 4096 characters (inclusive) - * - * Generated from protobuf field map marks = 2; - */ - private $marks; - /** - * The canonical name of the marks. - * Examples: - * "organizations/{organization_id}/assets/{asset_id}/securityMarks" - * "folders/{folder_id}/assets/{asset_id}/securityMarks" - * "projects/{project_number}/assets/{asset_id}/securityMarks" - * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks" - * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks" - * "projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks" - * - * Generated from protobuf field string canonical_name = 3; - */ - protected $canonical_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The relative resource name of the SecurityMarks. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name - * Examples: - * "organizations/{organization_id}/assets/{asset_id}/securityMarks" - * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks". - * @type array|\Google\Protobuf\Internal\MapField $marks - * Mutable user specified security marks belonging to the parent resource. - * Constraints are as follows: - * * Keys and values are treated as case insensitive - * * Keys must be between 1 - 256 characters (inclusive) - * * Keys must be letters, numbers, underscores, or dashes - * * Values have leading and trailing whitespace trimmed, remaining - * characters must be between 1 - 4096 characters (inclusive) - * @type string $canonical_name - * The canonical name of the marks. - * Examples: - * "organizations/{organization_id}/assets/{asset_id}/securityMarks" - * "folders/{folder_id}/assets/{asset_id}/securityMarks" - * "projects/{project_number}/assets/{asset_id}/securityMarks" - * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks" - * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks" - * "projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks" - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\SecurityMarks::initOnce(); - parent::__construct($data); - } - - /** - * The relative resource name of the SecurityMarks. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name - * Examples: - * "organizations/{organization_id}/assets/{asset_id}/securityMarks" - * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks". - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The relative resource name of the SecurityMarks. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name - * Examples: - * "organizations/{organization_id}/assets/{asset_id}/securityMarks" - * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks". - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Mutable user specified security marks belonging to the parent resource. - * Constraints are as follows: - * * Keys and values are treated as case insensitive - * * Keys must be between 1 - 256 characters (inclusive) - * * Keys must be letters, numbers, underscores, or dashes - * * Values have leading and trailing whitespace trimmed, remaining - * characters must be between 1 - 4096 characters (inclusive) - * - * Generated from protobuf field map marks = 2; - * @return \Google\Protobuf\Internal\MapField - */ - public function getMarks() - { - return $this->marks; - } - - /** - * Mutable user specified security marks belonging to the parent resource. - * Constraints are as follows: - * * Keys and values are treated as case insensitive - * * Keys must be between 1 - 256 characters (inclusive) - * * Keys must be letters, numbers, underscores, or dashes - * * Values have leading and trailing whitespace trimmed, remaining - * characters must be between 1 - 4096 characters (inclusive) - * - * Generated from protobuf field map marks = 2; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setMarks($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->marks = $arr; - - return $this; - } - - /** - * The canonical name of the marks. - * Examples: - * "organizations/{organization_id}/assets/{asset_id}/securityMarks" - * "folders/{folder_id}/assets/{asset_id}/securityMarks" - * "projects/{project_number}/assets/{asset_id}/securityMarks" - * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks" - * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks" - * "projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks" - * - * Generated from protobuf field string canonical_name = 3; - * @return string - */ - public function getCanonicalName() - { - return $this->canonical_name; - } - - /** - * The canonical name of the marks. - * Examples: - * "organizations/{organization_id}/assets/{asset_id}/securityMarks" - * "folders/{folder_id}/assets/{asset_id}/securityMarks" - * "projects/{project_number}/assets/{asset_id}/securityMarks" - * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks" - * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks" - * "projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks" - * - * Generated from protobuf field string canonical_name = 3; - * @param string $var - * @return $this - */ - public function setCanonicalName($var) - { - GPBUtil::checkString($var, True); - $this->canonical_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ServiceAccountDelegationInfo.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ServiceAccountDelegationInfo.php deleted file mode 100644 index d6cb5540abbe..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/ServiceAccountDelegationInfo.php +++ /dev/null @@ -1,125 +0,0 @@ -google.cloud.securitycenter.v1.ServiceAccountDelegationInfo - */ -class ServiceAccountDelegationInfo extends \Google\Protobuf\Internal\Message -{ - /** - * The email address of a Google account. - * - * Generated from protobuf field string principal_email = 1; - */ - protected $principal_email = ''; - /** - * A string representing the principal_subject associated with the identity. - * As compared to `principal_email`, supports principals that aren't - * associated with email addresses, such as third party principals. For most - * identities, the format will be `principal://iam.googleapis.com/{identity - * pool name}/subjects/{subject}` except for some GKE identities - * (GKE_WORKLOAD, FREEFORM, GKE_HUB_WORKLOAD) that are still in the legacy - * format `serviceAccount:{identity pool name}[{subject}]` - * - * Generated from protobuf field string principal_subject = 2; - */ - protected $principal_subject = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $principal_email - * The email address of a Google account. - * @type string $principal_subject - * A string representing the principal_subject associated with the identity. - * As compared to `principal_email`, supports principals that aren't - * associated with email addresses, such as third party principals. For most - * identities, the format will be `principal://iam.googleapis.com/{identity - * pool name}/subjects/{subject}` except for some GKE identities - * (GKE_WORKLOAD, FREEFORM, GKE_HUB_WORKLOAD) that are still in the legacy - * format `serviceAccount:{identity pool name}[{subject}]` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\Access::initOnce(); - parent::__construct($data); - } - - /** - * The email address of a Google account. - * - * Generated from protobuf field string principal_email = 1; - * @return string - */ - public function getPrincipalEmail() - { - return $this->principal_email; - } - - /** - * The email address of a Google account. - * - * Generated from protobuf field string principal_email = 1; - * @param string $var - * @return $this - */ - public function setPrincipalEmail($var) - { - GPBUtil::checkString($var, True); - $this->principal_email = $var; - - return $this; - } - - /** - * A string representing the principal_subject associated with the identity. - * As compared to `principal_email`, supports principals that aren't - * associated with email addresses, such as third party principals. For most - * identities, the format will be `principal://iam.googleapis.com/{identity - * pool name}/subjects/{subject}` except for some GKE identities - * (GKE_WORKLOAD, FREEFORM, GKE_HUB_WORKLOAD) that are still in the legacy - * format `serviceAccount:{identity pool name}[{subject}]` - * - * Generated from protobuf field string principal_subject = 2; - * @return string - */ - public function getPrincipalSubject() - { - return $this->principal_subject; - } - - /** - * A string representing the principal_subject associated with the identity. - * As compared to `principal_email`, supports principals that aren't - * associated with email addresses, such as third party principals. For most - * identities, the format will be `principal://iam.googleapis.com/{identity - * pool name}/subjects/{subject}` except for some GKE identities - * (GKE_WORKLOAD, FREEFORM, GKE_HUB_WORKLOAD) that are still in the legacy - * format `serviceAccount:{identity pool name}[{subject}]` - * - * Generated from protobuf field string principal_subject = 2; - * @param string $var - * @return $this - */ - public function setPrincipalSubject($var) - { - GPBUtil::checkString($var, True); - $this->principal_subject = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/SetFindingStateRequest.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/SetFindingStateRequest.php deleted file mode 100644 index 5f89458834fd..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/SetFindingStateRequest.php +++ /dev/null @@ -1,165 +0,0 @@ -google.cloud.securitycenter.v1.SetFindingStateRequest - */ -class SetFindingStateRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The [relative resource - * name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) - * of the finding. Example: - * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", - * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", - * "projects/{project_id}/sources/{source_id}/findings/{finding_id}". - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The desired State of the finding. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Finding.State state = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $state = 0; - /** - * Required. The time at which the updated state takes effect. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $start_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The [relative resource - * name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) - * of the finding. Example: - * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", - * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", - * "projects/{project_id}/sources/{source_id}/findings/{finding_id}". - * @type int $state - * Required. The desired State of the finding. - * @type \Google\Protobuf\Timestamp $start_time - * Required. The time at which the updated state takes effect. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The [relative resource - * name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) - * of the finding. Example: - * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", - * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", - * "projects/{project_id}/sources/{source_id}/findings/{finding_id}". - * - * 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. The [relative resource - * name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) - * of the finding. Example: - * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", - * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", - * "projects/{project_id}/sources/{source_id}/findings/{finding_id}". - * - * 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; - } - - /** - * Required. The desired State of the finding. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Finding.State state = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Required. The desired State of the finding. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Finding.State state = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1\Finding\State::class); - $this->state = $var; - - return $this; - } - - /** - * Required. The time at which the updated state takes effect. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * Required. The time at which the updated state takes effect. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/SetMuteRequest.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/SetMuteRequest.php deleted file mode 100644 index 9f085063a7e4..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/SetMuteRequest.php +++ /dev/null @@ -1,121 +0,0 @@ -google.cloud.securitycenter.v1.SetMuteRequest - */ -class SetMuteRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The [relative resource - * name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) - * of the finding. Example: - * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", - * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", - * "projects/{project_id}/sources/{source_id}/findings/{finding_id}". - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The desired state of the Mute. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Finding.Mute mute = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $mute = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The [relative resource - * name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) - * of the finding. Example: - * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", - * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", - * "projects/{project_id}/sources/{source_id}/findings/{finding_id}". - * @type int $mute - * Required. The desired state of the Mute. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The [relative resource - * name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) - * of the finding. Example: - * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", - * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", - * "projects/{project_id}/sources/{source_id}/findings/{finding_id}". - * - * 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. The [relative resource - * name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) - * of the finding. Example: - * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", - * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", - * "projects/{project_id}/sources/{source_id}/findings/{finding_id}". - * - * 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; - } - - /** - * Required. The desired state of the Mute. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Finding.Mute mute = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getMute() - { - return $this->mute; - } - - /** - * Required. The desired state of the Mute. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Finding.Mute mute = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setMute($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1\Finding\Mute::class); - $this->mute = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Source.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Source.php deleted file mode 100644 index b2107f876e61..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Source.php +++ /dev/null @@ -1,244 +0,0 @@ -google.cloud.securitycenter.v1.Source - */ -class Source extends \Google\Protobuf\Internal\Message -{ - /** - * The relative resource name of this source. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name - * Example: - * "organizations/{organization_id}/sources/{source_id}" - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The source's display name. - * A source's display name must be unique amongst its siblings, for example, - * two sources with the same parent can't share the same display name. - * The display name must have a length between 1 and 64 characters - * (inclusive). - * - * Generated from protobuf field string display_name = 2; - */ - protected $display_name = ''; - /** - * The description of the source (max of 1024 characters). - * Example: - * "Web Security Scanner is a web security scanner for common - * vulnerabilities in App Engine applications. It can automatically - * scan and detect four common vulnerabilities, including cross-site-scripting - * (XSS), Flash injection, mixed content (HTTP in HTTPS), and - * outdated or insecure libraries." - * - * Generated from protobuf field string description = 3; - */ - protected $description = ''; - /** - * The canonical name of the finding. It's either - * "organizations/{organization_id}/sources/{source_id}", - * "folders/{folder_id}/sources/{source_id}" or - * "projects/{project_number}/sources/{source_id}", - * depending on the closest CRM ancestor of the resource associated with the - * finding. - * - * Generated from protobuf field string canonical_name = 14; - */ - protected $canonical_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The relative resource name of this source. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name - * Example: - * "organizations/{organization_id}/sources/{source_id}" - * @type string $display_name - * The source's display name. - * A source's display name must be unique amongst its siblings, for example, - * two sources with the same parent can't share the same display name. - * The display name must have a length between 1 and 64 characters - * (inclusive). - * @type string $description - * The description of the source (max of 1024 characters). - * Example: - * "Web Security Scanner is a web security scanner for common - * vulnerabilities in App Engine applications. It can automatically - * scan and detect four common vulnerabilities, including cross-site-scripting - * (XSS), Flash injection, mixed content (HTTP in HTTPS), and - * outdated or insecure libraries." - * @type string $canonical_name - * The canonical name of the finding. It's either - * "organizations/{organization_id}/sources/{source_id}", - * "folders/{folder_id}/sources/{source_id}" or - * "projects/{project_number}/sources/{source_id}", - * depending on the closest CRM ancestor of the resource associated with the - * finding. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\Source::initOnce(); - parent::__construct($data); - } - - /** - * The relative resource name of this source. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name - * Example: - * "organizations/{organization_id}/sources/{source_id}" - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The relative resource name of this source. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name - * Example: - * "organizations/{organization_id}/sources/{source_id}" - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The source's display name. - * A source's display name must be unique amongst its siblings, for example, - * two sources with the same parent can't share the same display name. - * The display name must have a length between 1 and 64 characters - * (inclusive). - * - * Generated from protobuf field string display_name = 2; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The source's display name. - * A source's display name must be unique amongst its siblings, for example, - * two sources with the same parent can't share the same display name. - * The display name must have a length between 1 and 64 characters - * (inclusive). - * - * 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; - } - - /** - * The description of the source (max of 1024 characters). - * Example: - * "Web Security Scanner is a web security scanner for common - * vulnerabilities in App Engine applications. It can automatically - * scan and detect four common vulnerabilities, including cross-site-scripting - * (XSS), Flash injection, mixed content (HTTP in HTTPS), and - * outdated or insecure libraries." - * - * Generated from protobuf field string description = 3; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * The description of the source (max of 1024 characters). - * Example: - * "Web Security Scanner is a web security scanner for common - * vulnerabilities in App Engine applications. It can automatically - * scan and detect four common vulnerabilities, including cross-site-scripting - * (XSS), Flash injection, mixed content (HTTP in HTTPS), and - * outdated or insecure libraries." - * - * Generated from protobuf field string description = 3; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * The canonical name of the finding. It's either - * "organizations/{organization_id}/sources/{source_id}", - * "folders/{folder_id}/sources/{source_id}" or - * "projects/{project_number}/sources/{source_id}", - * depending on the closest CRM ancestor of the resource associated with the - * finding. - * - * Generated from protobuf field string canonical_name = 14; - * @return string - */ - public function getCanonicalName() - { - return $this->canonical_name; - } - - /** - * The canonical name of the finding. It's either - * "organizations/{organization_id}/sources/{source_id}", - * "folders/{folder_id}/sources/{source_id}" or - * "projects/{project_number}/sources/{source_id}", - * depending on the closest CRM ancestor of the resource associated with the - * finding. - * - * Generated from protobuf field string canonical_name = 14; - * @param string $var - * @return $this - */ - public function setCanonicalName($var) - { - GPBUtil::checkString($var, True); - $this->canonical_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/UpdateBigQueryExportRequest.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/UpdateBigQueryExportRequest.php deleted file mode 100644 index 46ca095a0bf4..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/UpdateBigQueryExportRequest.php +++ /dev/null @@ -1,125 +0,0 @@ -google.cloud.securitycenter.v1.UpdateBigQueryExportRequest - */ -class UpdateBigQueryExportRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The BigQuery export being updated. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.BigQueryExport big_query_export = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $big_query_export = null; - /** - * The list of fields to be updated. - * If empty all mutable fields will be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\SecurityCenter\V1\BigQueryExport $big_query_export - * Required. The BigQuery export being updated. - * @type \Google\Protobuf\FieldMask $update_mask - * The list of fields to be updated. - * If empty all mutable fields will be updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The BigQuery export being updated. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.BigQueryExport big_query_export = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\SecurityCenter\V1\BigQueryExport|null - */ - public function getBigQueryExport() - { - return $this->big_query_export; - } - - public function hasBigQueryExport() - { - return isset($this->big_query_export); - } - - public function clearBigQueryExport() - { - unset($this->big_query_export); - } - - /** - * Required. The BigQuery export being updated. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.BigQueryExport big_query_export = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\SecurityCenter\V1\BigQueryExport $var - * @return $this - */ - public function setBigQueryExport($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\BigQueryExport::class); - $this->big_query_export = $var; - - return $this; - } - - /** - * The list of fields to be updated. - * If empty all mutable fields will be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * The list of fields to be updated. - * If empty all mutable fields will be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/UpdateExternalSystemRequest.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/UpdateExternalSystemRequest.php deleted file mode 100644 index 36a5808fa31f..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/UpdateExternalSystemRequest.php +++ /dev/null @@ -1,125 +0,0 @@ -google.cloud.securitycenter.v1.UpdateExternalSystemRequest - */ -class UpdateExternalSystemRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The external system resource to update. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.ExternalSystem external_system = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $external_system = null; - /** - * The FieldMask to use when updating the external system resource. - * If empty all mutable fields will be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\SecurityCenter\V1\ExternalSystem $external_system - * Required. The external system resource to update. - * @type \Google\Protobuf\FieldMask $update_mask - * The FieldMask to use when updating the external system resource. - * If empty all mutable fields will be updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The external system resource to update. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.ExternalSystem external_system = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\SecurityCenter\V1\ExternalSystem|null - */ - public function getExternalSystem() - { - return $this->external_system; - } - - public function hasExternalSystem() - { - return isset($this->external_system); - } - - public function clearExternalSystem() - { - unset($this->external_system); - } - - /** - * Required. The external system resource to update. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.ExternalSystem external_system = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\SecurityCenter\V1\ExternalSystem $var - * @return $this - */ - public function setExternalSystem($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\ExternalSystem::class); - $this->external_system = $var; - - return $this; - } - - /** - * The FieldMask to use when updating the external system resource. - * If empty all mutable fields will be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * The FieldMask to use when updating the external system resource. - * If empty all mutable fields will be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/UpdateFindingRequest.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/UpdateFindingRequest.php deleted file mode 100644 index 135264ee18ba..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/UpdateFindingRequest.php +++ /dev/null @@ -1,157 +0,0 @@ -google.cloud.securitycenter.v1.UpdateFindingRequest - */ -class UpdateFindingRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The finding resource to update or create if it does not already - * exist. parent, security_marks, and update_time will be ignored. - * In the case of creation, the finding id portion of the name must be - * alphanumeric and less than or equal to 32 characters and greater than 0 - * characters in length. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Finding finding = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $finding = null; - /** - * The FieldMask to use when updating the finding resource. This field should - * not be specified when creating a finding. - * When updating a finding, an empty mask is treated as updating all mutable - * fields and replacing source_properties. Individual source_properties can - * be added/updated by using "source_properties." in the field - * mask. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\SecurityCenter\V1\Finding $finding - * Required. The finding resource to update or create if it does not already - * exist. parent, security_marks, and update_time will be ignored. - * In the case of creation, the finding id portion of the name must be - * alphanumeric and less than or equal to 32 characters and greater than 0 - * characters in length. - * @type \Google\Protobuf\FieldMask $update_mask - * The FieldMask to use when updating the finding resource. This field should - * not be specified when creating a finding. - * When updating a finding, an empty mask is treated as updating all mutable - * fields and replacing source_properties. Individual source_properties can - * be added/updated by using "source_properties." in the field - * mask. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The finding resource to update or create if it does not already - * exist. parent, security_marks, and update_time will be ignored. - * In the case of creation, the finding id portion of the name must be - * alphanumeric and less than or equal to 32 characters and greater than 0 - * characters in length. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Finding finding = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\SecurityCenter\V1\Finding|null - */ - public function getFinding() - { - return $this->finding; - } - - public function hasFinding() - { - return isset($this->finding); - } - - public function clearFinding() - { - unset($this->finding); - } - - /** - * Required. The finding resource to update or create if it does not already - * exist. parent, security_marks, and update_time will be ignored. - * In the case of creation, the finding id portion of the name must be - * alphanumeric and less than or equal to 32 characters and greater than 0 - * characters in length. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Finding finding = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\SecurityCenter\V1\Finding $var - * @return $this - */ - public function setFinding($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\Finding::class); - $this->finding = $var; - - return $this; - } - - /** - * The FieldMask to use when updating the finding resource. This field should - * not be specified when creating a finding. - * When updating a finding, an empty mask is treated as updating all mutable - * fields and replacing source_properties. Individual source_properties can - * be added/updated by using "source_properties." in the field - * mask. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * The FieldMask to use when updating the finding resource. This field should - * not be specified when creating a finding. - * When updating a finding, an empty mask is treated as updating all mutable - * fields and replacing source_properties. Individual source_properties can - * be added/updated by using "source_properties." in the field - * mask. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/UpdateMuteConfigRequest.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/UpdateMuteConfigRequest.php deleted file mode 100644 index 11bbba4166da..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/UpdateMuteConfigRequest.php +++ /dev/null @@ -1,125 +0,0 @@ -google.cloud.securitycenter.v1.UpdateMuteConfigRequest - */ -class UpdateMuteConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The mute config being updated. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.MuteConfig mute_config = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $mute_config = null; - /** - * The list of fields to be updated. - * If empty all mutable fields will be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\SecurityCenter\V1\MuteConfig $mute_config - * Required. The mute config being updated. - * @type \Google\Protobuf\FieldMask $update_mask - * The list of fields to be updated. - * If empty all mutable fields will be updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The mute config being updated. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.MuteConfig mute_config = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\SecurityCenter\V1\MuteConfig|null - */ - public function getMuteConfig() - { - return $this->mute_config; - } - - public function hasMuteConfig() - { - return isset($this->mute_config); - } - - public function clearMuteConfig() - { - unset($this->mute_config); - } - - /** - * Required. The mute config being updated. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.MuteConfig mute_config = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\SecurityCenter\V1\MuteConfig $var - * @return $this - */ - public function setMuteConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\MuteConfig::class); - $this->mute_config = $var; - - return $this; - } - - /** - * The list of fields to be updated. - * If empty all mutable fields will be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * The list of fields to be updated. - * If empty all mutable fields will be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/UpdateNotificationConfigRequest.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/UpdateNotificationConfigRequest.php deleted file mode 100644 index f1bfc5f55bed..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/UpdateNotificationConfigRequest.php +++ /dev/null @@ -1,125 +0,0 @@ -google.cloud.securitycenter.v1.UpdateNotificationConfigRequest - */ -class UpdateNotificationConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The notification config to update. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.NotificationConfig notification_config = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $notification_config = null; - /** - * The FieldMask to use when updating the notification config. - * If empty all mutable fields will be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\SecurityCenter\V1\NotificationConfig $notification_config - * Required. The notification config to update. - * @type \Google\Protobuf\FieldMask $update_mask - * The FieldMask to use when updating the notification config. - * If empty all mutable fields will be updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The notification config to update. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.NotificationConfig notification_config = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\SecurityCenter\V1\NotificationConfig|null - */ - public function getNotificationConfig() - { - return $this->notification_config; - } - - public function hasNotificationConfig() - { - return isset($this->notification_config); - } - - public function clearNotificationConfig() - { - unset($this->notification_config); - } - - /** - * Required. The notification config to update. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.NotificationConfig notification_config = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\SecurityCenter\V1\NotificationConfig $var - * @return $this - */ - public function setNotificationConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\NotificationConfig::class); - $this->notification_config = $var; - - return $this; - } - - /** - * The FieldMask to use when updating the notification config. - * If empty all mutable fields will be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * The FieldMask to use when updating the notification config. - * If empty all mutable fields will be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/UpdateOrganizationSettingsRequest.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/UpdateOrganizationSettingsRequest.php deleted file mode 100644 index 4c599cb317bc..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/UpdateOrganizationSettingsRequest.php +++ /dev/null @@ -1,125 +0,0 @@ -google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest - */ -class UpdateOrganizationSettingsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The organization settings resource to update. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.OrganizationSettings organization_settings = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $organization_settings = null; - /** - * The FieldMask to use when updating the settings resource. - * If empty all mutable fields will be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\SecurityCenter\V1\OrganizationSettings $organization_settings - * Required. The organization settings resource to update. - * @type \Google\Protobuf\FieldMask $update_mask - * The FieldMask to use when updating the settings resource. - * If empty all mutable fields will be updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The organization settings resource to update. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.OrganizationSettings organization_settings = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\SecurityCenter\V1\OrganizationSettings|null - */ - public function getOrganizationSettings() - { - return $this->organization_settings; - } - - public function hasOrganizationSettings() - { - return isset($this->organization_settings); - } - - public function clearOrganizationSettings() - { - unset($this->organization_settings); - } - - /** - * Required. The organization settings resource to update. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.OrganizationSettings organization_settings = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\SecurityCenter\V1\OrganizationSettings $var - * @return $this - */ - public function setOrganizationSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\OrganizationSettings::class); - $this->organization_settings = $var; - - return $this; - } - - /** - * The FieldMask to use when updating the settings resource. - * If empty all mutable fields will be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * The FieldMask to use when updating the settings resource. - * If empty all mutable fields will be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/UpdateSecurityMarksRequest.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/UpdateSecurityMarksRequest.php deleted file mode 100644 index ea41825873de..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/UpdateSecurityMarksRequest.php +++ /dev/null @@ -1,189 +0,0 @@ -google.cloud.securitycenter.v1.UpdateSecurityMarksRequest - */ -class UpdateSecurityMarksRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The security marks resource to update. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.SecurityMarks security_marks = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $security_marks = null; - /** - * The FieldMask to use when updating the security marks resource. - * The field mask must not contain duplicate fields. - * If empty or set to "marks", all marks will be replaced. Individual - * marks can be updated using "marks.". - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - /** - * The time at which the updated SecurityMarks take effect. - * If not set uses current server time. Updates will be applied to the - * SecurityMarks that are active immediately preceding this time. Must be - * earlier or equal to the server time. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 3; - */ - protected $start_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\SecurityCenter\V1\SecurityMarks $security_marks - * Required. The security marks resource to update. - * @type \Google\Protobuf\FieldMask $update_mask - * The FieldMask to use when updating the security marks resource. - * The field mask must not contain duplicate fields. - * If empty or set to "marks", all marks will be replaced. Individual - * marks can be updated using "marks.". - * @type \Google\Protobuf\Timestamp $start_time - * The time at which the updated SecurityMarks take effect. - * If not set uses current server time. Updates will be applied to the - * SecurityMarks that are active immediately preceding this time. Must be - * earlier or equal to the server time. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The security marks resource to update. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.SecurityMarks security_marks = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\SecurityCenter\V1\SecurityMarks|null - */ - public function getSecurityMarks() - { - return $this->security_marks; - } - - public function hasSecurityMarks() - { - return isset($this->security_marks); - } - - public function clearSecurityMarks() - { - unset($this->security_marks); - } - - /** - * Required. The security marks resource to update. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.SecurityMarks security_marks = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\SecurityCenter\V1\SecurityMarks $var - * @return $this - */ - public function setSecurityMarks($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\SecurityMarks::class); - $this->security_marks = $var; - - return $this; - } - - /** - * The FieldMask to use when updating the security marks resource. - * The field mask must not contain duplicate fields. - * If empty or set to "marks", all marks will be replaced. Individual - * marks can be updated using "marks.". - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * The FieldMask to use when updating the security marks resource. - * The field mask must not contain duplicate fields. - * If empty or set to "marks", all marks will be replaced. Individual - * marks can be updated using "marks.". - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * The time at which the updated SecurityMarks take effect. - * If not set uses current server time. Updates will be applied to the - * SecurityMarks that are active immediately preceding this time. Must be - * earlier or equal to the server time. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * The time at which the updated SecurityMarks take effect. - * If not set uses current server time. Updates will be applied to the - * SecurityMarks that are active immediately preceding this time. Must be - * earlier or equal to the server time. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/UpdateSourceRequest.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/UpdateSourceRequest.php deleted file mode 100644 index 26ff9ea1462b..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/UpdateSourceRequest.php +++ /dev/null @@ -1,125 +0,0 @@ -google.cloud.securitycenter.v1.UpdateSourceRequest - */ -class UpdateSourceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The source resource to update. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Source source = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $source = null; - /** - * The FieldMask to use when updating the source resource. - * If empty all mutable fields will be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\SecurityCenter\V1\Source $source - * Required. The source resource to update. - * @type \Google\Protobuf\FieldMask $update_mask - * The FieldMask to use when updating the source resource. - * If empty all mutable fields will be updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The source resource to update. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Source source = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\SecurityCenter\V1\Source|null - */ - public function getSource() - { - return $this->source; - } - - public function hasSource() - { - return isset($this->source); - } - - public function clearSource() - { - unset($this->source); - } - - /** - * Required. The source resource to update. - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Source source = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\SecurityCenter\V1\Source $var - * @return $this - */ - public function setSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\Source::class); - $this->source = $var; - - return $this; - } - - /** - * The FieldMask to use when updating the source resource. - * If empty all mutable fields will be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * The FieldMask to use when updating the source resource. - * If empty all mutable fields will be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Vulnerability.php b/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Vulnerability.php deleted file mode 100644 index a8e652cc2dc8..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/proto/src/Google/Cloud/SecurityCenter/V1/Vulnerability.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.securitycenter.v1.Vulnerability - */ -class Vulnerability extends \Google\Protobuf\Internal\Message -{ - /** - * CVE stands for Common Vulnerabilities and Exposures - * (https://cve.mitre.org/about/) - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Cve cve = 1; - */ - protected $cve = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\SecurityCenter\V1\Cve $cve - * CVE stands for Common Vulnerabilities and Exposures - * (https://cve.mitre.org/about/) - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1\Vulnerability::initOnce(); - parent::__construct($data); - } - - /** - * CVE stands for Common Vulnerabilities and Exposures - * (https://cve.mitre.org/about/) - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Cve cve = 1; - * @return \Google\Cloud\SecurityCenter\V1\Cve|null - */ - public function getCve() - { - return $this->cve; - } - - public function hasCve() - { - return isset($this->cve); - } - - public function clearCve() - { - unset($this->cve); - } - - /** - * CVE stands for Common Vulnerabilities and Exposures - * (https://cve.mitre.org/about/) - * - * Generated from protobuf field .google.cloud.securitycenter.v1.Cve cve = 1; - * @param \Google\Cloud\SecurityCenter\V1\Cve $var - * @return $this - */ - public function setCve($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\Cve::class); - $this->cve = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/bulk_mute_findings.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/bulk_mute_findings.php deleted file mode 100644 index 8433dbdf73ca..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/bulk_mute_findings.php +++ /dev/null @@ -1,81 +0,0 @@ -bulkMuteFindings($parent); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var BulkMuteFindingsResponse $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 -{ - $parent = '[PARENT]'; - - bulk_mute_findings_sample($parent); -} -// [END securitycenter_v1_generated_SecurityCenter_BulkMuteFindings_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/create_big_query_export.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/create_big_query_export.php deleted file mode 100644 index 21e1a9e72a04..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/create_big_query_export.php +++ /dev/null @@ -1,80 +0,0 @@ -createBigQueryExport( - $formattedParent, - $bigQueryExport, - $bigQueryExportId - ); - 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 -{ - $formattedParent = SecurityCenterClient::projectName('[PROJECT]'); - $bigQueryExportId = '[BIG_QUERY_EXPORT_ID]'; - - create_big_query_export_sample($formattedParent, $bigQueryExportId); -} -// [END securitycenter_v1_generated_SecurityCenter_CreateBigQueryExport_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/create_finding.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/create_finding.php deleted file mode 100644 index 97ba3b3d3852..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/create_finding.php +++ /dev/null @@ -1,75 +0,0 @@ -createFinding($formattedParent, $findingId, $finding); - 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 -{ - $formattedParent = SecurityCenterClient::sourceName('[ORGANIZATION]', '[SOURCE]'); - $findingId = '[FINDING_ID]'; - - create_finding_sample($formattedParent, $findingId); -} -// [END securitycenter_v1_generated_SecurityCenter_CreateFinding_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/create_mute_config.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/create_mute_config.php deleted file mode 100644 index 3788910af6ee..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/create_mute_config.php +++ /dev/null @@ -1,101 +0,0 @@ -setFilter($muteConfigFilter); - - // Call the API and handle any network failures. - try { - /** @var MuteConfig $response */ - $response = $securityCenterClient->createMuteConfig($formattedParent, $muteConfig, $muteConfigId); - 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 -{ - $formattedParent = SecurityCenterClient::projectName('[PROJECT]'); - $muteConfigFilter = '[FILTER]'; - $muteConfigId = '[MUTE_CONFIG_ID]'; - - create_mute_config_sample($formattedParent, $muteConfigFilter, $muteConfigId); -} -// [END securitycenter_v1_generated_SecurityCenter_CreateMuteConfig_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/create_notification_config.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/create_notification_config.php deleted file mode 100644 index ceeeaa05202f..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/create_notification_config.php +++ /dev/null @@ -1,80 +0,0 @@ -createNotificationConfig( - $formattedParent, - $configId, - $notificationConfig - ); - 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 -{ - $formattedParent = SecurityCenterClient::projectName('[PROJECT]'); - $configId = '[CONFIG_ID]'; - - create_notification_config_sample($formattedParent, $configId); -} -// [END securitycenter_v1_generated_SecurityCenter_CreateNotificationConfig_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/create_source.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/create_source.php deleted file mode 100644 index 84030ced073c..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/create_source.php +++ /dev/null @@ -1,70 +0,0 @@ -createSource($formattedParent, $source); - 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 -{ - $formattedParent = SecurityCenterClient::organizationName('[ORGANIZATION]'); - - create_source_sample($formattedParent); -} -// [END securitycenter_v1_generated_SecurityCenter_CreateSource_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/delete_big_query_export.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/delete_big_query_export.php deleted file mode 100644 index 7fa5495df72d..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/delete_big_query_export.php +++ /dev/null @@ -1,67 +0,0 @@ -deleteBigQueryExport($formattedName); - printf('Call completed successfully.' . PHP_EOL); - } 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 = SecurityCenterClient::bigQueryExportName('[ORGANIZATION]', '[EXPORT]'); - - delete_big_query_export_sample($formattedName); -} -// [END securitycenter_v1_generated_SecurityCenter_DeleteBigQueryExport_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/delete_mute_config.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/delete_mute_config.php deleted file mode 100644 index 0f3c310a1135..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/delete_mute_config.php +++ /dev/null @@ -1,67 +0,0 @@ -deleteMuteConfig($formattedName); - printf('Call completed successfully.' . PHP_EOL); - } 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 = SecurityCenterClient::muteConfigName('[ORGANIZATION]', '[MUTE_CONFIG]'); - - delete_mute_config_sample($formattedName); -} -// [END securitycenter_v1_generated_SecurityCenter_DeleteMuteConfig_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/delete_notification_config.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/delete_notification_config.php deleted file mode 100644 index eea667f7f412..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/delete_notification_config.php +++ /dev/null @@ -1,70 +0,0 @@ -deleteNotificationConfig($formattedName); - printf('Call completed successfully.' . PHP_EOL); - } 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 = SecurityCenterClient::notificationConfigName( - '[ORGANIZATION]', - '[NOTIFICATION_CONFIG]' - ); - - delete_notification_config_sample($formattedName); -} -// [END securitycenter_v1_generated_SecurityCenter_DeleteNotificationConfig_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/get_big_query_export.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/get_big_query_export.php deleted file mode 100644 index a0f6d7e6b097..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/get_big_query_export.php +++ /dev/null @@ -1,69 +0,0 @@ -getBigQueryExport($formattedName); - 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 = SecurityCenterClient::bigQueryExportName('[ORGANIZATION]', '[EXPORT]'); - - get_big_query_export_sample($formattedName); -} -// [END securitycenter_v1_generated_SecurityCenter_GetBigQueryExport_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/get_iam_policy.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/get_iam_policy.php deleted file mode 100644 index 188ae37c7c32..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/get_iam_policy.php +++ /dev/null @@ -1,66 +0,0 @@ -getIamPolicy($resource); - 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 -{ - $resource = '[RESOURCE]'; - - get_iam_policy_sample($resource); -} -// [END securitycenter_v1_generated_SecurityCenter_GetIamPolicy_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/get_mute_config.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/get_mute_config.php deleted file mode 100644 index 4e91da3b91b9..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/get_mute_config.php +++ /dev/null @@ -1,69 +0,0 @@ -getMuteConfig($formattedName); - 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 = SecurityCenterClient::muteConfigName('[ORGANIZATION]', '[MUTE_CONFIG]'); - - get_mute_config_sample($formattedName); -} -// [END securitycenter_v1_generated_SecurityCenter_GetMuteConfig_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/get_notification_config.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/get_notification_config.php deleted file mode 100644 index 87b2ce209daf..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/get_notification_config.php +++ /dev/null @@ -1,72 +0,0 @@ -getNotificationConfig($formattedName); - 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 = SecurityCenterClient::notificationConfigName( - '[ORGANIZATION]', - '[NOTIFICATION_CONFIG]' - ); - - get_notification_config_sample($formattedName); -} -// [END securitycenter_v1_generated_SecurityCenter_GetNotificationConfig_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/get_organization_settings.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/get_organization_settings.php deleted file mode 100644 index 537925cb86e2..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/get_organization_settings.php +++ /dev/null @@ -1,67 +0,0 @@ -getOrganizationSettings($formattedName); - 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 = SecurityCenterClient::organizationSettingsName('[ORGANIZATION]'); - - get_organization_settings_sample($formattedName); -} -// [END securitycenter_v1_generated_SecurityCenter_GetOrganizationSettings_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/get_source.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/get_source.php deleted file mode 100644 index 55f019cb6d5c..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/get_source.php +++ /dev/null @@ -1,67 +0,0 @@ -getSource($formattedName); - 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 = SecurityCenterClient::sourceName('[ORGANIZATION]', '[SOURCE]'); - - get_source_sample($formattedName); -} -// [END securitycenter_v1_generated_SecurityCenter_GetSource_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/group_assets.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/group_assets.php deleted file mode 100644 index 39e8f21c5d5b..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/group_assets.php +++ /dev/null @@ -1,93 +0,0 @@ -groupAssets($formattedParent, $groupBy); - - /** @var GroupResult $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 = SecurityCenterClient::projectName('[PROJECT]'); - $groupBy = '[GROUP_BY]'; - - group_assets_sample($formattedParent, $groupBy); -} -// [END securitycenter_v1_generated_SecurityCenter_GroupAssets_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/group_findings.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/group_findings.php deleted file mode 100644 index 6564953c8496..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/group_findings.php +++ /dev/null @@ -1,99 +0,0 @@ -groupFindings($formattedParent, $groupBy); - - /** @var GroupResult $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 = SecurityCenterClient::sourceName('[ORGANIZATION]', '[SOURCE]'); - $groupBy = '[GROUP_BY]'; - - group_findings_sample($formattedParent, $groupBy); -} -// [END securitycenter_v1_generated_SecurityCenter_GroupFindings_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/list_assets.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/list_assets.php deleted file mode 100644 index 539028714e34..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/list_assets.php +++ /dev/null @@ -1,75 +0,0 @@ -listAssets($formattedParent); - - /** @var ListAssetsResult $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 = SecurityCenterClient::projectName('[PROJECT]'); - - list_assets_sample($formattedParent); -} -// [END securitycenter_v1_generated_SecurityCenter_ListAssets_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/list_big_query_exports.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/list_big_query_exports.php deleted file mode 100644 index ecc07211a529..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/list_big_query_exports.php +++ /dev/null @@ -1,77 +0,0 @@ -listBigQueryExports($formattedParent); - - /** @var BigQueryExport $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 = SecurityCenterClient::projectName('[PROJECT]'); - - list_big_query_exports_sample($formattedParent); -} -// [END securitycenter_v1_generated_SecurityCenter_ListBigQueryExports_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/list_findings.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/list_findings.php deleted file mode 100644 index e508f6bc9f36..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/list_findings.php +++ /dev/null @@ -1,80 +0,0 @@ -listFindings($formattedParent); - - /** @var ListFindingsResult $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 = SecurityCenterClient::sourceName('[ORGANIZATION]', '[SOURCE]'); - - list_findings_sample($formattedParent); -} -// [END securitycenter_v1_generated_SecurityCenter_ListFindings_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/list_mute_configs.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/list_mute_configs.php deleted file mode 100644 index 9d0fed13bc8e..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/list_mute_configs.php +++ /dev/null @@ -1,73 +0,0 @@ -listMuteConfigs($formattedParent); - - /** @var MuteConfig $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 = SecurityCenterClient::projectName('[PROJECT]'); - - list_mute_configs_sample($formattedParent); -} -// [END securitycenter_v1_generated_SecurityCenter_ListMuteConfigs_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/list_notification_configs.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/list_notification_configs.php deleted file mode 100644 index 256e9d5ee709..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/list_notification_configs.php +++ /dev/null @@ -1,73 +0,0 @@ -listNotificationConfigs($formattedParent); - - /** @var NotificationConfig $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 = SecurityCenterClient::projectName('[PROJECT]'); - - list_notification_configs_sample($formattedParent); -} -// [END securitycenter_v1_generated_SecurityCenter_ListNotificationConfigs_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/list_sources.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/list_sources.php deleted file mode 100644 index c5c57702ede3..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/list_sources.php +++ /dev/null @@ -1,73 +0,0 @@ -listSources($formattedParent); - - /** @var Source $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 = SecurityCenterClient::projectName('[PROJECT]'); - - list_sources_sample($formattedParent); -} -// [END securitycenter_v1_generated_SecurityCenter_ListSources_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/run_asset_discovery.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/run_asset_discovery.php deleted file mode 100644 index bef4f5e1dcf0..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/run_asset_discovery.php +++ /dev/null @@ -1,84 +0,0 @@ -runAssetDiscovery($formattedParent); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var RunAssetDiscoveryResponse $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 -{ - $formattedParent = SecurityCenterClient::organizationName('[ORGANIZATION]'); - - run_asset_discovery_sample($formattedParent); -} -// [END securitycenter_v1_generated_SecurityCenter_RunAssetDiscovery_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/set_finding_state.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/set_finding_state.php deleted file mode 100644 index 8486f2d6bdc8..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/set_finding_state.php +++ /dev/null @@ -1,78 +0,0 @@ -setFindingState($formattedName, $state, $startTime); - 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 = SecurityCenterClient::findingName('[ORGANIZATION]', '[SOURCE]', '[FINDING]'); - $state = State::STATE_UNSPECIFIED; - - set_finding_state_sample($formattedName, $state); -} -// [END securitycenter_v1_generated_SecurityCenter_SetFindingState_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/set_iam_policy.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/set_iam_policy.php deleted file mode 100644 index a7dc78a3c23d..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/set_iam_policy.php +++ /dev/null @@ -1,69 +0,0 @@ -setIamPolicy($resource, $policy); - 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 -{ - $resource = '[RESOURCE]'; - - set_iam_policy_sample($resource); -} -// [END securitycenter_v1_generated_SecurityCenter_SetIamPolicy_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/set_mute.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/set_mute.php deleted file mode 100644 index 7493e122f959..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/set_mute.php +++ /dev/null @@ -1,74 +0,0 @@ -setMute($formattedName, $mute); - 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 = SecurityCenterClient::findingName('[ORGANIZATION]', '[SOURCE]', '[FINDING]'); - $mute = Mute::MUTE_UNSPECIFIED; - - set_mute_sample($formattedName, $mute); -} -// [END securitycenter_v1_generated_SecurityCenter_SetMute_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/test_iam_permissions.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/test_iam_permissions.php deleted file mode 100644 index 3cf842ef28ea..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/test_iam_permissions.php +++ /dev/null @@ -1,74 +0,0 @@ -testIamPermissions($resource, $permissions); - 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 -{ - $resource = '[RESOURCE]'; - $permissionsElement = '[PERMISSIONS]'; - - test_iam_permissions_sample($resource, $permissionsElement); -} -// [END securitycenter_v1_generated_SecurityCenter_TestIamPermissions_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/update_big_query_export.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/update_big_query_export.php deleted file mode 100644 index 60e826e18b3c..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/update_big_query_export.php +++ /dev/null @@ -1,56 +0,0 @@ -updateBigQueryExport($bigQueryExport); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END securitycenter_v1_generated_SecurityCenter_UpdateBigQueryExport_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/update_external_system.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/update_external_system.php deleted file mode 100644 index ac4a3880ee24..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/update_external_system.php +++ /dev/null @@ -1,56 +0,0 @@ -updateExternalSystem($externalSystem); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END securitycenter_v1_generated_SecurityCenter_UpdateExternalSystem_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/update_finding.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/update_finding.php deleted file mode 100644 index 3645d5e4038c..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/update_finding.php +++ /dev/null @@ -1,57 +0,0 @@ -updateFinding($finding); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END securitycenter_v1_generated_SecurityCenter_UpdateFinding_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/update_mute_config.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/update_mute_config.php deleted file mode 100644 index 0c88b6d13cf2..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/update_mute_config.php +++ /dev/null @@ -1,88 +0,0 @@ -setFilter($muteConfigFilter); - - // Call the API and handle any network failures. - try { - /** @var MuteConfig $response */ - $response = $securityCenterClient->updateMuteConfig($muteConfig); - 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 -{ - $muteConfigFilter = '[FILTER]'; - - update_mute_config_sample($muteConfigFilter); -} -// [END securitycenter_v1_generated_SecurityCenter_UpdateMuteConfig_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/update_notification_config.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/update_notification_config.php deleted file mode 100644 index 493ce8bc4af1..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/update_notification_config.php +++ /dev/null @@ -1,58 +0,0 @@ -updateNotificationConfig($notificationConfig); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END securitycenter_v1_generated_SecurityCenter_UpdateNotificationConfig_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/update_organization_settings.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/update_organization_settings.php deleted file mode 100644 index 6c247225516d..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/update_organization_settings.php +++ /dev/null @@ -1,56 +0,0 @@ -updateOrganizationSettings($organizationSettings); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END securitycenter_v1_generated_SecurityCenter_UpdateOrganizationSettings_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/update_security_marks.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/update_security_marks.php deleted file mode 100644 index bf664ce827d8..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/update_security_marks.php +++ /dev/null @@ -1,56 +0,0 @@ -updateSecurityMarks($securityMarks); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END securitycenter_v1_generated_SecurityCenter_UpdateSecurityMarks_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/update_source.php b/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/update_source.php deleted file mode 100644 index 3dc638b49c8a..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/samples/V1/SecurityCenterClient/update_source.php +++ /dev/null @@ -1,56 +0,0 @@ -updateSource($source); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END securitycenter_v1_generated_SecurityCenter_UpdateSource_sync] diff --git a/owl-bot-staging/SecurityCenter/v1/src/V1/Gapic/SecurityCenterGapicClient.php b/owl-bot-staging/SecurityCenter/v1/src/V1/Gapic/SecurityCenterGapicClient.php deleted file mode 100644 index ce5d74e0fc08..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/src/V1/Gapic/SecurityCenterGapicClient.php +++ /dev/null @@ -1,3937 +0,0 @@ -bulkMuteFindings($parent); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $securityCenterClient->bulkMuteFindings($parent); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $securityCenterClient->resumeOperation($operationName, 'bulkMuteFindings'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $securityCenterClient->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To - * assist with these names, this class includes a format method for each type of - * name, and additionally a parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - */ -class SecurityCenterGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.securitycenter.v1.SecurityCenter'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'securitycenter.googleapis.com'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static $bigQueryExportNameTemplate; - - private static $externalSystemNameTemplate; - - private static $findingNameTemplate; - - private static $folderNameTemplate; - - private static $folderAssetSecurityMarksNameTemplate; - - private static $folderExportNameTemplate; - - private static $folderMuteConfigNameTemplate; - - private static $folderNotificationConfigNameTemplate; - - private static $folderSourceNameTemplate; - - private static $folderSourceFindingNameTemplate; - - private static $folderSourceFindingExternalsystemNameTemplate; - - private static $folderSourceFindingSecurityMarksNameTemplate; - - private static $muteConfigNameTemplate; - - private static $notificationConfigNameTemplate; - - private static $organizationNameTemplate; - - private static $organizationAssetSecurityMarksNameTemplate; - - private static $organizationExportNameTemplate; - - private static $organizationMuteConfigNameTemplate; - - private static $organizationNotificationConfigNameTemplate; - - private static $organizationSettingsNameTemplate; - - private static $organizationSourceNameTemplate; - - private static $organizationSourceFindingNameTemplate; - - private static $organizationSourceFindingExternalsystemNameTemplate; - - private static $organizationSourceFindingSecurityMarksNameTemplate; - - private static $projectNameTemplate; - - private static $projectAssetSecurityMarksNameTemplate; - - private static $projectExportNameTemplate; - - private static $projectMuteConfigNameTemplate; - - private static $projectNotificationConfigNameTemplate; - - private static $projectSourceNameTemplate; - - private static $projectSourceFindingNameTemplate; - - private static $projectSourceFindingExternalsystemNameTemplate; - - private static $projectSourceFindingSecurityMarksNameTemplate; - - private static $securityMarksNameTemplate; - - private static $sourceNameTemplate; - - private static $topicNameTemplate; - - private static $pathTemplateMap; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/security_center_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/security_center_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/security_center_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/security_center_rest_client_config.php', - ], - ], - ]; - } - - private static function getBigQueryExportNameTemplate() - { - if (self::$bigQueryExportNameTemplate == null) { - self::$bigQueryExportNameTemplate = new PathTemplate('organizations/{organization}/bigQueryExports/{export}'); - } - - return self::$bigQueryExportNameTemplate; - } - - private static function getExternalSystemNameTemplate() - { - if (self::$externalSystemNameTemplate == null) { - self::$externalSystemNameTemplate = new PathTemplate('organizations/{organization}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}'); - } - - return self::$externalSystemNameTemplate; - } - - private static function getFindingNameTemplate() - { - if (self::$findingNameTemplate == null) { - self::$findingNameTemplate = new PathTemplate('organizations/{organization}/sources/{source}/findings/{finding}'); - } - - return self::$findingNameTemplate; - } - - private static function getFolderNameTemplate() - { - if (self::$folderNameTemplate == null) { - self::$folderNameTemplate = new PathTemplate('folders/{folder}'); - } - - return self::$folderNameTemplate; - } - - private static function getFolderAssetSecurityMarksNameTemplate() - { - if (self::$folderAssetSecurityMarksNameTemplate == null) { - self::$folderAssetSecurityMarksNameTemplate = new PathTemplate('folders/{folder}/assets/{asset}/securityMarks'); - } - - return self::$folderAssetSecurityMarksNameTemplate; - } - - private static function getFolderExportNameTemplate() - { - if (self::$folderExportNameTemplate == null) { - self::$folderExportNameTemplate = new PathTemplate('folders/{folder}/bigQueryExports/{export}'); - } - - return self::$folderExportNameTemplate; - } - - private static function getFolderMuteConfigNameTemplate() - { - if (self::$folderMuteConfigNameTemplate == null) { - self::$folderMuteConfigNameTemplate = new PathTemplate('folders/{folder}/muteConfigs/{mute_config}'); - } - - return self::$folderMuteConfigNameTemplate; - } - - private static function getFolderNotificationConfigNameTemplate() - { - if (self::$folderNotificationConfigNameTemplate == null) { - self::$folderNotificationConfigNameTemplate = new PathTemplate('folders/{folder}/notificationConfigs/{notification_config}'); - } - - return self::$folderNotificationConfigNameTemplate; - } - - private static function getFolderSourceNameTemplate() - { - if (self::$folderSourceNameTemplate == null) { - self::$folderSourceNameTemplate = new PathTemplate('folders/{folder}/sources/{source}'); - } - - return self::$folderSourceNameTemplate; - } - - private static function getFolderSourceFindingNameTemplate() - { - if (self::$folderSourceFindingNameTemplate == null) { - self::$folderSourceFindingNameTemplate = new PathTemplate('folders/{folder}/sources/{source}/findings/{finding}'); - } - - return self::$folderSourceFindingNameTemplate; - } - - private static function getFolderSourceFindingExternalsystemNameTemplate() - { - if (self::$folderSourceFindingExternalsystemNameTemplate == null) { - self::$folderSourceFindingExternalsystemNameTemplate = new PathTemplate('folders/{folder}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}'); - } - - return self::$folderSourceFindingExternalsystemNameTemplate; - } - - private static function getFolderSourceFindingSecurityMarksNameTemplate() - { - if (self::$folderSourceFindingSecurityMarksNameTemplate == null) { - self::$folderSourceFindingSecurityMarksNameTemplate = new PathTemplate('folders/{folder}/sources/{source}/findings/{finding}/securityMarks'); - } - - return self::$folderSourceFindingSecurityMarksNameTemplate; - } - - private static function getMuteConfigNameTemplate() - { - if (self::$muteConfigNameTemplate == null) { - self::$muteConfigNameTemplate = new PathTemplate('organizations/{organization}/muteConfigs/{mute_config}'); - } - - return self::$muteConfigNameTemplate; - } - - private static function getNotificationConfigNameTemplate() - { - if (self::$notificationConfigNameTemplate == null) { - self::$notificationConfigNameTemplate = new PathTemplate('organizations/{organization}/notificationConfigs/{notification_config}'); - } - - return self::$notificationConfigNameTemplate; - } - - private static function getOrganizationNameTemplate() - { - if (self::$organizationNameTemplate == null) { - self::$organizationNameTemplate = new PathTemplate('organizations/{organization}'); - } - - return self::$organizationNameTemplate; - } - - private static function getOrganizationAssetSecurityMarksNameTemplate() - { - if (self::$organizationAssetSecurityMarksNameTemplate == null) { - self::$organizationAssetSecurityMarksNameTemplate = new PathTemplate('organizations/{organization}/assets/{asset}/securityMarks'); - } - - return self::$organizationAssetSecurityMarksNameTemplate; - } - - private static function getOrganizationExportNameTemplate() - { - if (self::$organizationExportNameTemplate == null) { - self::$organizationExportNameTemplate = new PathTemplate('organizations/{organization}/bigQueryExports/{export}'); - } - - return self::$organizationExportNameTemplate; - } - - private static function getOrganizationMuteConfigNameTemplate() - { - if (self::$organizationMuteConfigNameTemplate == null) { - self::$organizationMuteConfigNameTemplate = new PathTemplate('organizations/{organization}/muteConfigs/{mute_config}'); - } - - return self::$organizationMuteConfigNameTemplate; - } - - private static function getOrganizationNotificationConfigNameTemplate() - { - if (self::$organizationNotificationConfigNameTemplate == null) { - self::$organizationNotificationConfigNameTemplate = new PathTemplate('organizations/{organization}/notificationConfigs/{notification_config}'); - } - - return self::$organizationNotificationConfigNameTemplate; - } - - private static function getOrganizationSettingsNameTemplate() - { - if (self::$organizationSettingsNameTemplate == null) { - self::$organizationSettingsNameTemplate = new PathTemplate('organizations/{organization}/organizationSettings'); - } - - return self::$organizationSettingsNameTemplate; - } - - private static function getOrganizationSourceNameTemplate() - { - if (self::$organizationSourceNameTemplate == null) { - self::$organizationSourceNameTemplate = new PathTemplate('organizations/{organization}/sources/{source}'); - } - - return self::$organizationSourceNameTemplate; - } - - private static function getOrganizationSourceFindingNameTemplate() - { - if (self::$organizationSourceFindingNameTemplate == null) { - self::$organizationSourceFindingNameTemplate = new PathTemplate('organizations/{organization}/sources/{source}/findings/{finding}'); - } - - return self::$organizationSourceFindingNameTemplate; - } - - private static function getOrganizationSourceFindingExternalsystemNameTemplate() - { - if (self::$organizationSourceFindingExternalsystemNameTemplate == null) { - self::$organizationSourceFindingExternalsystemNameTemplate = new PathTemplate('organizations/{organization}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}'); - } - - return self::$organizationSourceFindingExternalsystemNameTemplate; - } - - private static function getOrganizationSourceFindingSecurityMarksNameTemplate() - { - if (self::$organizationSourceFindingSecurityMarksNameTemplate == null) { - self::$organizationSourceFindingSecurityMarksNameTemplate = new PathTemplate('organizations/{organization}/sources/{source}/findings/{finding}/securityMarks'); - } - - return self::$organizationSourceFindingSecurityMarksNameTemplate; - } - - private static function getProjectNameTemplate() - { - if (self::$projectNameTemplate == null) { - self::$projectNameTemplate = new PathTemplate('projects/{project}'); - } - - return self::$projectNameTemplate; - } - - private static function getProjectAssetSecurityMarksNameTemplate() - { - if (self::$projectAssetSecurityMarksNameTemplate == null) { - self::$projectAssetSecurityMarksNameTemplate = new PathTemplate('projects/{project}/assets/{asset}/securityMarks'); - } - - return self::$projectAssetSecurityMarksNameTemplate; - } - - private static function getProjectExportNameTemplate() - { - if (self::$projectExportNameTemplate == null) { - self::$projectExportNameTemplate = new PathTemplate('projects/{project}/bigQueryExports/{export}'); - } - - return self::$projectExportNameTemplate; - } - - private static function getProjectMuteConfigNameTemplate() - { - if (self::$projectMuteConfigNameTemplate == null) { - self::$projectMuteConfigNameTemplate = new PathTemplate('projects/{project}/muteConfigs/{mute_config}'); - } - - return self::$projectMuteConfigNameTemplate; - } - - private static function getProjectNotificationConfigNameTemplate() - { - if (self::$projectNotificationConfigNameTemplate == null) { - self::$projectNotificationConfigNameTemplate = new PathTemplate('projects/{project}/notificationConfigs/{notification_config}'); - } - - return self::$projectNotificationConfigNameTemplate; - } - - private static function getProjectSourceNameTemplate() - { - if (self::$projectSourceNameTemplate == null) { - self::$projectSourceNameTemplate = new PathTemplate('projects/{project}/sources/{source}'); - } - - return self::$projectSourceNameTemplate; - } - - private static function getProjectSourceFindingNameTemplate() - { - if (self::$projectSourceFindingNameTemplate == null) { - self::$projectSourceFindingNameTemplate = new PathTemplate('projects/{project}/sources/{source}/findings/{finding}'); - } - - return self::$projectSourceFindingNameTemplate; - } - - private static function getProjectSourceFindingExternalsystemNameTemplate() - { - if (self::$projectSourceFindingExternalsystemNameTemplate == null) { - self::$projectSourceFindingExternalsystemNameTemplate = new PathTemplate('projects/{project}/sources/{source}/findings/{finding}/externalSystems/{externalsystem}'); - } - - return self::$projectSourceFindingExternalsystemNameTemplate; - } - - private static function getProjectSourceFindingSecurityMarksNameTemplate() - { - if (self::$projectSourceFindingSecurityMarksNameTemplate == null) { - self::$projectSourceFindingSecurityMarksNameTemplate = new PathTemplate('projects/{project}/sources/{source}/findings/{finding}/securityMarks'); - } - - return self::$projectSourceFindingSecurityMarksNameTemplate; - } - - private static function getSecurityMarksNameTemplate() - { - if (self::$securityMarksNameTemplate == null) { - self::$securityMarksNameTemplate = new PathTemplate('organizations/{organization}/assets/{asset}/securityMarks'); - } - - return self::$securityMarksNameTemplate; - } - - private static function getSourceNameTemplate() - { - if (self::$sourceNameTemplate == null) { - self::$sourceNameTemplate = new PathTemplate('organizations/{organization}/sources/{source}'); - } - - return self::$sourceNameTemplate; - } - - private static function getTopicNameTemplate() - { - if (self::$topicNameTemplate == null) { - self::$topicNameTemplate = new PathTemplate('projects/{project}/topics/{topic}'); - } - - return self::$topicNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'bigQueryExport' => self::getBigQueryExportNameTemplate(), - 'externalSystem' => self::getExternalSystemNameTemplate(), - 'finding' => self::getFindingNameTemplate(), - 'folder' => self::getFolderNameTemplate(), - 'folderAssetSecurityMarks' => self::getFolderAssetSecurityMarksNameTemplate(), - 'folderExport' => self::getFolderExportNameTemplate(), - 'folderMuteConfig' => self::getFolderMuteConfigNameTemplate(), - 'folderNotificationConfig' => self::getFolderNotificationConfigNameTemplate(), - 'folderSource' => self::getFolderSourceNameTemplate(), - 'folderSourceFinding' => self::getFolderSourceFindingNameTemplate(), - 'folderSourceFindingExternalsystem' => self::getFolderSourceFindingExternalsystemNameTemplate(), - 'folderSourceFindingSecurityMarks' => self::getFolderSourceFindingSecurityMarksNameTemplate(), - 'muteConfig' => self::getMuteConfigNameTemplate(), - 'notificationConfig' => self::getNotificationConfigNameTemplate(), - 'organization' => self::getOrganizationNameTemplate(), - 'organizationAssetSecurityMarks' => self::getOrganizationAssetSecurityMarksNameTemplate(), - 'organizationExport' => self::getOrganizationExportNameTemplate(), - 'organizationMuteConfig' => self::getOrganizationMuteConfigNameTemplate(), - 'organizationNotificationConfig' => self::getOrganizationNotificationConfigNameTemplate(), - 'organizationSettings' => self::getOrganizationSettingsNameTemplate(), - 'organizationSource' => self::getOrganizationSourceNameTemplate(), - 'organizationSourceFinding' => self::getOrganizationSourceFindingNameTemplate(), - 'organizationSourceFindingExternalsystem' => self::getOrganizationSourceFindingExternalsystemNameTemplate(), - 'organizationSourceFindingSecurityMarks' => self::getOrganizationSourceFindingSecurityMarksNameTemplate(), - 'project' => self::getProjectNameTemplate(), - 'projectAssetSecurityMarks' => self::getProjectAssetSecurityMarksNameTemplate(), - 'projectExport' => self::getProjectExportNameTemplate(), - 'projectMuteConfig' => self::getProjectMuteConfigNameTemplate(), - 'projectNotificationConfig' => self::getProjectNotificationConfigNameTemplate(), - 'projectSource' => self::getProjectSourceNameTemplate(), - 'projectSourceFinding' => self::getProjectSourceFindingNameTemplate(), - 'projectSourceFindingExternalsystem' => self::getProjectSourceFindingExternalsystemNameTemplate(), - 'projectSourceFindingSecurityMarks' => self::getProjectSourceFindingSecurityMarksNameTemplate(), - 'securityMarks' => self::getSecurityMarksNameTemplate(), - 'source' => self::getSourceNameTemplate(), - 'topic' => self::getTopicNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a - * big_query_export resource. - * - * @param string $organization - * @param string $export - * - * @return string The formatted big_query_export resource. - */ - public static function bigQueryExportName($organization, $export) - { - return self::getBigQueryExportNameTemplate()->render([ - 'organization' => $organization, - 'export' => $export, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * external_system resource. - * - * @param string $organization - * @param string $source - * @param string $finding - * @param string $externalsystem - * - * @return string The formatted external_system resource. - */ - public static function externalSystemName($organization, $source, $finding, $externalsystem) - { - return self::getExternalSystemNameTemplate()->render([ - 'organization' => $organization, - 'source' => $source, - 'finding' => $finding, - 'externalsystem' => $externalsystem, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a finding - * resource. - * - * @param string $organization - * @param string $source - * @param string $finding - * - * @return string The formatted finding resource. - */ - public static function findingName($organization, $source, $finding) - { - return self::getFindingNameTemplate()->render([ - 'organization' => $organization, - 'source' => $source, - 'finding' => $finding, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a folder - * resource. - * - * @param string $folder - * - * @return string The formatted folder resource. - */ - public static function folderName($folder) - { - return self::getFolderNameTemplate()->render([ - 'folder' => $folder, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_asset_securityMarks resource. - * - * @param string $folder - * @param string $asset - * - * @return string The formatted folder_asset_securityMarks resource. - */ - public static function folderAssetSecurityMarksName($folder, $asset) - { - return self::getFolderAssetSecurityMarksNameTemplate()->render([ - 'folder' => $folder, - 'asset' => $asset, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_export resource. - * - * @param string $folder - * @param string $export - * - * @return string The formatted folder_export resource. - */ - public static function folderExportName($folder, $export) - { - return self::getFolderExportNameTemplate()->render([ - 'folder' => $folder, - 'export' => $export, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_mute_config resource. - * - * @param string $folder - * @param string $muteConfig - * - * @return string The formatted folder_mute_config resource. - */ - public static function folderMuteConfigName($folder, $muteConfig) - { - return self::getFolderMuteConfigNameTemplate()->render([ - 'folder' => $folder, - 'mute_config' => $muteConfig, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_notification_config resource. - * - * @param string $folder - * @param string $notificationConfig - * - * @return string The formatted folder_notification_config resource. - */ - public static function folderNotificationConfigName($folder, $notificationConfig) - { - return self::getFolderNotificationConfigNameTemplate()->render([ - 'folder' => $folder, - 'notification_config' => $notificationConfig, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_source resource. - * - * @param string $folder - * @param string $source - * - * @return string The formatted folder_source resource. - */ - public static function folderSourceName($folder, $source) - { - return self::getFolderSourceNameTemplate()->render([ - 'folder' => $folder, - 'source' => $source, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_source_finding resource. - * - * @param string $folder - * @param string $source - * @param string $finding - * - * @return string The formatted folder_source_finding resource. - */ - public static function folderSourceFindingName($folder, $source, $finding) - { - return self::getFolderSourceFindingNameTemplate()->render([ - 'folder' => $folder, - 'source' => $source, - 'finding' => $finding, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_source_finding_externalsystem resource. - * - * @param string $folder - * @param string $source - * @param string $finding - * @param string $externalsystem - * - * @return string The formatted folder_source_finding_externalsystem resource. - */ - public static function folderSourceFindingExternalsystemName($folder, $source, $finding, $externalsystem) - { - return self::getFolderSourceFindingExternalsystemNameTemplate()->render([ - 'folder' => $folder, - 'source' => $source, - 'finding' => $finding, - 'externalsystem' => $externalsystem, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_source_finding_securityMarks resource. - * - * @param string $folder - * @param string $source - * @param string $finding - * - * @return string The formatted folder_source_finding_securityMarks resource. - */ - public static function folderSourceFindingSecurityMarksName($folder, $source, $finding) - { - return self::getFolderSourceFindingSecurityMarksNameTemplate()->render([ - 'folder' => $folder, - 'source' => $source, - 'finding' => $finding, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a mute_config - * resource. - * - * @param string $organization - * @param string $muteConfig - * - * @return string The formatted mute_config resource. - */ - public static function muteConfigName($organization, $muteConfig) - { - return self::getMuteConfigNameTemplate()->render([ - 'organization' => $organization, - 'mute_config' => $muteConfig, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * notification_config resource. - * - * @param string $organization - * @param string $notificationConfig - * - * @return string The formatted notification_config resource. - */ - public static function notificationConfigName($organization, $notificationConfig) - { - return self::getNotificationConfigNameTemplate()->render([ - 'organization' => $organization, - 'notification_config' => $notificationConfig, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a organization - * resource. - * - * @param string $organization - * - * @return string The formatted organization resource. - */ - public static function organizationName($organization) - { - return self::getOrganizationNameTemplate()->render([ - 'organization' => $organization, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_asset_securityMarks resource. - * - * @param string $organization - * @param string $asset - * - * @return string The formatted organization_asset_securityMarks resource. - */ - public static function organizationAssetSecurityMarksName($organization, $asset) - { - return self::getOrganizationAssetSecurityMarksNameTemplate()->render([ - 'organization' => $organization, - 'asset' => $asset, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_export resource. - * - * @param string $organization - * @param string $export - * - * @return string The formatted organization_export resource. - */ - public static function organizationExportName($organization, $export) - { - return self::getOrganizationExportNameTemplate()->render([ - 'organization' => $organization, - 'export' => $export, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_mute_config resource. - * - * @param string $organization - * @param string $muteConfig - * - * @return string The formatted organization_mute_config resource. - */ - public static function organizationMuteConfigName($organization, $muteConfig) - { - return self::getOrganizationMuteConfigNameTemplate()->render([ - 'organization' => $organization, - 'mute_config' => $muteConfig, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_notification_config resource. - * - * @param string $organization - * @param string $notificationConfig - * - * @return string The formatted organization_notification_config resource. - */ - public static function organizationNotificationConfigName($organization, $notificationConfig) - { - return self::getOrganizationNotificationConfigNameTemplate()->render([ - 'organization' => $organization, - 'notification_config' => $notificationConfig, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_settings resource. - * - * @param string $organization - * - * @return string The formatted organization_settings resource. - */ - public static function organizationSettingsName($organization) - { - return self::getOrganizationSettingsNameTemplate()->render([ - 'organization' => $organization, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_source resource. - * - * @param string $organization - * @param string $source - * - * @return string The formatted organization_source resource. - */ - public static function organizationSourceName($organization, $source) - { - return self::getOrganizationSourceNameTemplate()->render([ - 'organization' => $organization, - 'source' => $source, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_source_finding resource. - * - * @param string $organization - * @param string $source - * @param string $finding - * - * @return string The formatted organization_source_finding resource. - */ - public static function organizationSourceFindingName($organization, $source, $finding) - { - return self::getOrganizationSourceFindingNameTemplate()->render([ - 'organization' => $organization, - 'source' => $source, - 'finding' => $finding, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_source_finding_externalsystem resource. - * - * @param string $organization - * @param string $source - * @param string $finding - * @param string $externalsystem - * - * @return string The formatted organization_source_finding_externalsystem resource. - */ - public static function organizationSourceFindingExternalsystemName($organization, $source, $finding, $externalsystem) - { - return self::getOrganizationSourceFindingExternalsystemNameTemplate()->render([ - 'organization' => $organization, - 'source' => $source, - 'finding' => $finding, - 'externalsystem' => $externalsystem, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_source_finding_securityMarks resource. - * - * @param string $organization - * @param string $source - * @param string $finding - * - * @return string The formatted organization_source_finding_securityMarks resource. - */ - public static function organizationSourceFindingSecurityMarksName($organization, $source, $finding) - { - return self::getOrganizationSourceFindingSecurityMarksNameTemplate()->render([ - 'organization' => $organization, - 'source' => $source, - 'finding' => $finding, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a project - * resource. - * - * @param string $project - * - * @return string The formatted project resource. - */ - public static function projectName($project) - { - return self::getProjectNameTemplate()->render([ - 'project' => $project, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_asset_securityMarks resource. - * - * @param string $project - * @param string $asset - * - * @return string The formatted project_asset_securityMarks resource. - */ - public static function projectAssetSecurityMarksName($project, $asset) - { - return self::getProjectAssetSecurityMarksNameTemplate()->render([ - 'project' => $project, - 'asset' => $asset, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_export resource. - * - * @param string $project - * @param string $export - * - * @return string The formatted project_export resource. - */ - public static function projectExportName($project, $export) - { - return self::getProjectExportNameTemplate()->render([ - 'project' => $project, - 'export' => $export, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_mute_config resource. - * - * @param string $project - * @param string $muteConfig - * - * @return string The formatted project_mute_config resource. - */ - public static function projectMuteConfigName($project, $muteConfig) - { - return self::getProjectMuteConfigNameTemplate()->render([ - 'project' => $project, - 'mute_config' => $muteConfig, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_notification_config resource. - * - * @param string $project - * @param string $notificationConfig - * - * @return string The formatted project_notification_config resource. - */ - public static function projectNotificationConfigName($project, $notificationConfig) - { - return self::getProjectNotificationConfigNameTemplate()->render([ - 'project' => $project, - 'notification_config' => $notificationConfig, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_source resource. - * - * @param string $project - * @param string $source - * - * @return string The formatted project_source resource. - */ - public static function projectSourceName($project, $source) - { - return self::getProjectSourceNameTemplate()->render([ - 'project' => $project, - 'source' => $source, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_source_finding resource. - * - * @param string $project - * @param string $source - * @param string $finding - * - * @return string The formatted project_source_finding resource. - */ - public static function projectSourceFindingName($project, $source, $finding) - { - return self::getProjectSourceFindingNameTemplate()->render([ - 'project' => $project, - 'source' => $source, - 'finding' => $finding, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_source_finding_externalsystem resource. - * - * @param string $project - * @param string $source - * @param string $finding - * @param string $externalsystem - * - * @return string The formatted project_source_finding_externalsystem resource. - */ - public static function projectSourceFindingExternalsystemName($project, $source, $finding, $externalsystem) - { - return self::getProjectSourceFindingExternalsystemNameTemplate()->render([ - 'project' => $project, - 'source' => $source, - 'finding' => $finding, - 'externalsystem' => $externalsystem, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_source_finding_securityMarks resource. - * - * @param string $project - * @param string $source - * @param string $finding - * - * @return string The formatted project_source_finding_securityMarks resource. - */ - public static function projectSourceFindingSecurityMarksName($project, $source, $finding) - { - return self::getProjectSourceFindingSecurityMarksNameTemplate()->render([ - 'project' => $project, - 'source' => $source, - 'finding' => $finding, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * security_marks resource. - * - * @param string $organization - * @param string $asset - * - * @return string The formatted security_marks resource. - */ - public static function securityMarksName($organization, $asset) - { - return self::getSecurityMarksNameTemplate()->render([ - 'organization' => $organization, - 'asset' => $asset, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a source - * resource. - * - * @param string $organization - * @param string $source - * - * @return string The formatted source resource. - */ - public static function sourceName($organization, $source) - { - return self::getSourceNameTemplate()->render([ - 'organization' => $organization, - 'source' => $source, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a topic - * resource. - * - * @param string $project - * @param string $topic - * - * @return string The formatted topic resource. - */ - public static function topicName($project, $topic) - { - return self::getTopicNameTemplate()->render([ - 'project' => $project, - 'topic' => $topic, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - bigQueryExport: organizations/{organization}/bigQueryExports/{export} - * - externalSystem: organizations/{organization}/sources/{source}/findings/{finding}/externalSystems/{externalsystem} - * - finding: organizations/{organization}/sources/{source}/findings/{finding} - * - folder: folders/{folder} - * - folderAssetSecurityMarks: folders/{folder}/assets/{asset}/securityMarks - * - folderExport: folders/{folder}/bigQueryExports/{export} - * - folderMuteConfig: folders/{folder}/muteConfigs/{mute_config} - * - folderNotificationConfig: folders/{folder}/notificationConfigs/{notification_config} - * - folderSource: folders/{folder}/sources/{source} - * - folderSourceFinding: folders/{folder}/sources/{source}/findings/{finding} - * - folderSourceFindingExternalsystem: folders/{folder}/sources/{source}/findings/{finding}/externalSystems/{externalsystem} - * - folderSourceFindingSecurityMarks: folders/{folder}/sources/{source}/findings/{finding}/securityMarks - * - muteConfig: organizations/{organization}/muteConfigs/{mute_config} - * - notificationConfig: organizations/{organization}/notificationConfigs/{notification_config} - * - organization: organizations/{organization} - * - organizationAssetSecurityMarks: organizations/{organization}/assets/{asset}/securityMarks - * - organizationExport: organizations/{organization}/bigQueryExports/{export} - * - organizationMuteConfig: organizations/{organization}/muteConfigs/{mute_config} - * - organizationNotificationConfig: organizations/{organization}/notificationConfigs/{notification_config} - * - organizationSettings: organizations/{organization}/organizationSettings - * - organizationSource: organizations/{organization}/sources/{source} - * - organizationSourceFinding: organizations/{organization}/sources/{source}/findings/{finding} - * - organizationSourceFindingExternalsystem: organizations/{organization}/sources/{source}/findings/{finding}/externalSystems/{externalsystem} - * - organizationSourceFindingSecurityMarks: organizations/{organization}/sources/{source}/findings/{finding}/securityMarks - * - project: projects/{project} - * - projectAssetSecurityMarks: projects/{project}/assets/{asset}/securityMarks - * - projectExport: projects/{project}/bigQueryExports/{export} - * - projectMuteConfig: projects/{project}/muteConfigs/{mute_config} - * - projectNotificationConfig: projects/{project}/notificationConfigs/{notification_config} - * - projectSource: projects/{project}/sources/{source} - * - projectSourceFinding: projects/{project}/sources/{source}/findings/{finding} - * - projectSourceFindingExternalsystem: projects/{project}/sources/{source}/findings/{finding}/externalSystems/{externalsystem} - * - projectSourceFindingSecurityMarks: projects/{project}/sources/{source}/findings/{finding}/securityMarks - * - securityMarks: organizations/{organization}/assets/{asset}/securityMarks - * - source: organizations/{organization}/sources/{source} - * - topic: projects/{project}/topics/{topic} - * - * 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($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * 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 = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Constructor. - * - * @param array $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 'securitycenter.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @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. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** - * Kicks off an LRO to bulk mute findings for a parent based on a filter. The - * parent can be either an organization, folder or project. The findings - * matched by the filter will be muted after the LRO is done. - * - * Sample code: - * ``` - * $securityCenterClient = new SecurityCenterClient(); - * try { - * $parent = 'parent'; - * $operationResponse = $securityCenterClient->bulkMuteFindings($parent); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $securityCenterClient->bulkMuteFindings($parent); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $securityCenterClient->resumeOperation($operationName, 'bulkMuteFindings'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $securityCenterClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent, at which bulk action needs to be applied. Its format - * is "organizations/[organization_id]", "folders/[folder_id]", - * "projects/[project_id]". - * @param array $optionalArgs { - * Optional. - * - * @type string $filter - * Expression that identifies findings that should be updated. - * The expression is a list of zero or more restrictions combined - * via logical operators `AND` and `OR`. Parentheses are supported, and `OR` - * has higher precedence than `AND`. - * - * Restrictions have the form ` ` and may have a - * `-` character in front of them to indicate negation. The fields map to - * those defined in the corresponding resource. - * - * The supported operators are: - * - * * `=` for all value types. - * * `>`, `<`, `>=`, `<=` for integer values. - * * `:`, meaning substring matching, for strings. - * - * The supported value types are: - * - * * string literals in quotes. - * * integer literals without quotes. - * * boolean literals `true` and `false` without quotes. - * @type string $muteAnnotation - * This can be a mute configuration name or any identifier for mute/unmute - * of findings based on the filter. - * @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 \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function bulkMuteFindings($parent, array $optionalArgs = []) - { - $request = new BulkMuteFindingsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['muteAnnotation'])) { - $request->setMuteAnnotation($optionalArgs['muteAnnotation']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('BulkMuteFindings', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Creates a BigQuery export. - * - * Sample code: - * ``` - * $securityCenterClient = new SecurityCenterClient(); - * try { - * $formattedParent = $securityCenterClient->projectName('[PROJECT]'); - * $bigQueryExport = new BigQueryExport(); - * $bigQueryExportId = 'big_query_export_id'; - * $response = $securityCenterClient->createBigQueryExport($formattedParent, $bigQueryExport, $bigQueryExportId); - * } finally { - * $securityCenterClient->close(); - * } - * ``` - * - * @param string $parent Required. The name of the parent resource of the new BigQuery export. Its - * format is "organizations/[organization_id]", "folders/[folder_id]", or - * "projects/[project_id]". - * @param BigQueryExport $bigQueryExport Required. The BigQuery export being created. - * @param string $bigQueryExportId Required. Unique identifier provided by the client within the parent scope. - * It must consist of lower case letters, numbers, and hyphen, with the first - * character a letter, the last a letter or a number, and a 63 character - * maximum. - * @param array $optionalArgs { - * 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 \Google\Cloud\SecurityCenter\V1\BigQueryExport - * - * @throws ApiException if the remote call fails - */ - public function createBigQueryExport($parent, $bigQueryExport, $bigQueryExportId, array $optionalArgs = []) - { - $request = new CreateBigQueryExportRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setBigQueryExport($bigQueryExport); - $request->setBigQueryExportId($bigQueryExportId); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateBigQueryExport', BigQueryExport::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates a finding. The corresponding source must exist for finding creation - * to succeed. - * - * Sample code: - * ``` - * $securityCenterClient = new SecurityCenterClient(); - * try { - * $formattedParent = $securityCenterClient->sourceName('[ORGANIZATION]', '[SOURCE]'); - * $findingId = 'finding_id'; - * $finding = new Finding(); - * $response = $securityCenterClient->createFinding($formattedParent, $findingId, $finding); - * } finally { - * $securityCenterClient->close(); - * } - * ``` - * - * @param string $parent Required. Resource name of the new finding's parent. Its format should be - * "organizations/[organization_id]/sources/[source_id]". - * @param string $findingId Required. Unique identifier provided by the client within the parent scope. - * It must be alphanumeric and less than or equal to 32 characters and - * greater than 0 characters in length. - * @param Finding $finding Required. The Finding being created. The name and security_marks will be - * ignored as they are both output only fields on this resource. - * @param array $optionalArgs { - * 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 \Google\Cloud\SecurityCenter\V1\Finding - * - * @throws ApiException if the remote call fails - */ - public function createFinding($parent, $findingId, $finding, array $optionalArgs = []) - { - $request = new CreateFindingRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setFindingId($findingId); - $request->setFinding($finding); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateFinding', Finding::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates a mute config. - * - * Sample code: - * ``` - * $securityCenterClient = new SecurityCenterClient(); - * try { - * $formattedParent = $securityCenterClient->projectName('[PROJECT]'); - * $muteConfig = new MuteConfig(); - * $muteConfigId = 'mute_config_id'; - * $response = $securityCenterClient->createMuteConfig($formattedParent, $muteConfig, $muteConfigId); - * } finally { - * $securityCenterClient->close(); - * } - * ``` - * - * @param string $parent Required. Resource name of the new mute configs's parent. Its format is - * "organizations/[organization_id]", "folders/[folder_id]", or - * "projects/[project_id]". - * @param MuteConfig $muteConfig Required. The mute config being created. - * @param string $muteConfigId Required. Unique identifier provided by the client within the parent scope. - * It must consist of lower case letters, numbers, and hyphen, with the first - * character a letter, the last a letter or a number, and a 63 character - * maximum. - * @param array $optionalArgs { - * 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 \Google\Cloud\SecurityCenter\V1\MuteConfig - * - * @throws ApiException if the remote call fails - */ - public function createMuteConfig($parent, $muteConfig, $muteConfigId, array $optionalArgs = []) - { - $request = new CreateMuteConfigRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setMuteConfig($muteConfig); - $request->setMuteConfigId($muteConfigId); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateMuteConfig', MuteConfig::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates a notification config. - * - * Sample code: - * ``` - * $securityCenterClient = new SecurityCenterClient(); - * try { - * $formattedParent = $securityCenterClient->projectName('[PROJECT]'); - * $configId = 'config_id'; - * $notificationConfig = new NotificationConfig(); - * $response = $securityCenterClient->createNotificationConfig($formattedParent, $configId, $notificationConfig); - * } finally { - * $securityCenterClient->close(); - * } - * ``` - * - * @param string $parent Required. Resource name of the new notification config's parent. Its format - * is "organizations/[organization_id]", "folders/[folder_id]", or - * "projects/[project_id]". - * @param string $configId Required. - * Unique identifier provided by the client within the parent scope. - * It must be between 1 and 128 characters and contain alphanumeric - * characters, underscores, or hyphens only. - * @param NotificationConfig $notificationConfig Required. The notification config being created. The name and the service - * account will be ignored as they are both output only fields on this - * resource. - * @param array $optionalArgs { - * 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 \Google\Cloud\SecurityCenter\V1\NotificationConfig - * - * @throws ApiException if the remote call fails - */ - public function createNotificationConfig($parent, $configId, $notificationConfig, array $optionalArgs = []) - { - $request = new CreateNotificationConfigRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setConfigId($configId); - $request->setNotificationConfig($notificationConfig); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateNotificationConfig', NotificationConfig::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates a source. - * - * Sample code: - * ``` - * $securityCenterClient = new SecurityCenterClient(); - * try { - * $formattedParent = $securityCenterClient->organizationName('[ORGANIZATION]'); - * $source = new Source(); - * $response = $securityCenterClient->createSource($formattedParent, $source); - * } finally { - * $securityCenterClient->close(); - * } - * ``` - * - * @param string $parent Required. Resource name of the new source's parent. Its format should be - * "organizations/[organization_id]". - * @param Source $source Required. The Source being created, only the display_name and description - * will be used. All other fields will be ignored. - * @param array $optionalArgs { - * 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 \Google\Cloud\SecurityCenter\V1\Source - * - * @throws ApiException if the remote call fails - */ - public function createSource($parent, $source, array $optionalArgs = []) - { - $request = new CreateSourceRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setSource($source); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateSource', Source::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes an existing BigQuery export. - * - * Sample code: - * ``` - * $securityCenterClient = new SecurityCenterClient(); - * try { - * $formattedName = $securityCenterClient->bigQueryExportName('[ORGANIZATION]', '[EXPORT]'); - * $securityCenterClient->deleteBigQueryExport($formattedName); - * } finally { - * $securityCenterClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the BigQuery export to delete. Its format is - * organizations/{organization}/bigQueryExports/{export_id}, - * folders/{folder}/bigQueryExports/{export_id}, or - * projects/{project}/bigQueryExports/{export_id} - * @param array $optionalArgs { - * 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. - * } - * - * @throws ApiException if the remote call fails - */ - public function deleteBigQueryExport($name, array $optionalArgs = []) - { - $request = new DeleteBigQueryExportRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteBigQueryExport', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes an existing mute config. - * - * Sample code: - * ``` - * $securityCenterClient = new SecurityCenterClient(); - * try { - * $formattedName = $securityCenterClient->muteConfigName('[ORGANIZATION]', '[MUTE_CONFIG]'); - * $securityCenterClient->deleteMuteConfig($formattedName); - * } finally { - * $securityCenterClient->close(); - * } - * ``` - * - * @param string $name Required. Name of the mute config to delete. Its format is - * organizations/{organization}/muteConfigs/{config_id}, - * folders/{folder}/muteConfigs/{config_id}, or - * projects/{project}/muteConfigs/{config_id} - * @param array $optionalArgs { - * 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. - * } - * - * @throws ApiException if the remote call fails - */ - public function deleteMuteConfig($name, array $optionalArgs = []) - { - $request = new DeleteMuteConfigRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteMuteConfig', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes a notification config. - * - * Sample code: - * ``` - * $securityCenterClient = new SecurityCenterClient(); - * try { - * $formattedName = $securityCenterClient->notificationConfigName('[ORGANIZATION]', '[NOTIFICATION_CONFIG]'); - * $securityCenterClient->deleteNotificationConfig($formattedName); - * } finally { - * $securityCenterClient->close(); - * } - * ``` - * - * @param string $name Required. Name of the notification config to delete. Its format is - * "organizations/[organization_id]/notificationConfigs/[config_id]", - * "folders/[folder_id]/notificationConfigs/[config_id]", - * or "projects/[project_id]/notificationConfigs/[config_id]". - * @param array $optionalArgs { - * 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. - * } - * - * @throws ApiException if the remote call fails - */ - public function deleteNotificationConfig($name, array $optionalArgs = []) - { - $request = new DeleteNotificationConfigRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteNotificationConfig', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets a BigQuery export. - * - * Sample code: - * ``` - * $securityCenterClient = new SecurityCenterClient(); - * try { - * $formattedName = $securityCenterClient->bigQueryExportName('[ORGANIZATION]', '[EXPORT]'); - * $response = $securityCenterClient->getBigQueryExport($formattedName); - * } finally { - * $securityCenterClient->close(); - * } - * ``` - * - * @param string $name Required. Name of the BigQuery export to retrieve. Its format is - * organizations/{organization}/bigQueryExports/{export_id}, - * folders/{folder}/bigQueryExports/{export_id}, or - * projects/{project}/bigQueryExports/{export_id} - * @param array $optionalArgs { - * 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 \Google\Cloud\SecurityCenter\V1\BigQueryExport - * - * @throws ApiException if the remote call fails - */ - public function getBigQueryExport($name, array $optionalArgs = []) - { - $request = new GetBigQueryExportRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetBigQueryExport', BigQueryExport::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets the access control policy on the specified Source. - * - * Sample code: - * ``` - * $securityCenterClient = new SecurityCenterClient(); - * try { - * $resource = 'resource'; - * $response = $securityCenterClient->getIamPolicy($resource); - * } finally { - * $securityCenterClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being requested. - * See the operation documentation for the appropriate value for this field. - * @param array $optionalArgs { - * Optional. - * - * @type GetPolicyOptions $options - * OPTIONAL: A `GetPolicyOptions` object for specifying options to - * `GetIamPolicy`. - * @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 \Google\Cloud\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - */ - public function getIamPolicy($resource, array $optionalArgs = []) - { - $request = new GetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $requestParamHeaders['resource'] = $resource; - if (isset($optionalArgs['options'])) { - $request->setOptions($optionalArgs['options']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets a mute config. - * - * Sample code: - * ``` - * $securityCenterClient = new SecurityCenterClient(); - * try { - * $formattedName = $securityCenterClient->muteConfigName('[ORGANIZATION]', '[MUTE_CONFIG]'); - * $response = $securityCenterClient->getMuteConfig($formattedName); - * } finally { - * $securityCenterClient->close(); - * } - * ``` - * - * @param string $name Required. Name of the mute config to retrieve. Its format is - * organizations/{organization}/muteConfigs/{config_id}, - * folders/{folder}/muteConfigs/{config_id}, or - * projects/{project}/muteConfigs/{config_id} - * @param array $optionalArgs { - * 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 \Google\Cloud\SecurityCenter\V1\MuteConfig - * - * @throws ApiException if the remote call fails - */ - public function getMuteConfig($name, array $optionalArgs = []) - { - $request = new GetMuteConfigRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetMuteConfig', MuteConfig::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets a notification config. - * - * Sample code: - * ``` - * $securityCenterClient = new SecurityCenterClient(); - * try { - * $formattedName = $securityCenterClient->notificationConfigName('[ORGANIZATION]', '[NOTIFICATION_CONFIG]'); - * $response = $securityCenterClient->getNotificationConfig($formattedName); - * } finally { - * $securityCenterClient->close(); - * } - * ``` - * - * @param string $name Required. Name of the notification config to get. Its format is - * "organizations/[organization_id]/notificationConfigs/[config_id]", - * "folders/[folder_id]/notificationConfigs/[config_id]", - * or "projects/[project_id]/notificationConfigs/[config_id]". - * @param array $optionalArgs { - * 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 \Google\Cloud\SecurityCenter\V1\NotificationConfig - * - * @throws ApiException if the remote call fails - */ - public function getNotificationConfig($name, array $optionalArgs = []) - { - $request = new GetNotificationConfigRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetNotificationConfig', NotificationConfig::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets the settings for an organization. - * - * Sample code: - * ``` - * $securityCenterClient = new SecurityCenterClient(); - * try { - * $formattedName = $securityCenterClient->organizationSettingsName('[ORGANIZATION]'); - * $response = $securityCenterClient->getOrganizationSettings($formattedName); - * } finally { - * $securityCenterClient->close(); - * } - * ``` - * - * @param string $name Required. Name of the organization to get organization settings for. Its - * format is "organizations/[organization_id]/organizationSettings". - * @param array $optionalArgs { - * 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 \Google\Cloud\SecurityCenter\V1\OrganizationSettings - * - * @throws ApiException if the remote call fails - */ - public function getOrganizationSettings($name, array $optionalArgs = []) - { - $request = new GetOrganizationSettingsRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetOrganizationSettings', OrganizationSettings::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets a source. - * - * Sample code: - * ``` - * $securityCenterClient = new SecurityCenterClient(); - * try { - * $formattedName = $securityCenterClient->sourceName('[ORGANIZATION]', '[SOURCE]'); - * $response = $securityCenterClient->getSource($formattedName); - * } finally { - * $securityCenterClient->close(); - * } - * ``` - * - * @param string $name Required. Relative resource name of the source. Its format is - * "organizations/[organization_id]/source/[source_id]". - * @param array $optionalArgs { - * 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 \Google\Cloud\SecurityCenter\V1\Source - * - * @throws ApiException if the remote call fails - */ - public function getSource($name, array $optionalArgs = []) - { - $request = new GetSourceRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetSource', Source::class, $optionalArgs, $request)->wait(); - } - - /** - * Filters an organization's assets and groups them by their specified - * properties. - * - * Sample code: - * ``` - * $securityCenterClient = new SecurityCenterClient(); - * try { - * $formattedParent = $securityCenterClient->projectName('[PROJECT]'); - * $groupBy = 'group_by'; - * // Iterate over pages of elements - * $pagedResponse = $securityCenterClient->groupAssets($formattedParent, $groupBy); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $securityCenterClient->groupAssets($formattedParent, $groupBy); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $securityCenterClient->close(); - * } - * ``` - * - * @param string $parent Required. The name of the parent to group the assets by. Its format is - * "organizations/[organization_id]", "folders/[folder_id]", or - * "projects/[project_id]". - * @param string $groupBy Required. Expression that defines what assets fields to use for grouping. - * The string value should follow SQL syntax: comma separated list of fields. - * For example: - * "security_center_properties.resource_project,security_center_properties.project". - * - * The following fields are supported when compare_duration is not set: - * - * * security_center_properties.resource_project - * * security_center_properties.resource_project_display_name - * * security_center_properties.resource_type - * * security_center_properties.resource_parent - * * security_center_properties.resource_parent_display_name - * - * The following fields are supported when compare_duration is set: - * - * * security_center_properties.resource_type - * * security_center_properties.resource_project_display_name - * * security_center_properties.resource_parent_display_name - * @param array $optionalArgs { - * Optional. - * - * @type string $filter - * Expression that defines the filter to apply across assets. - * The expression is a list of zero or more restrictions combined via logical - * operators `AND` and `OR`. - * Parentheses are supported, and `OR` has higher precedence than `AND`. - * - * Restrictions have the form ` ` and may have a `-` - * character in front of them to indicate negation. The fields map to those - * defined in the Asset resource. Examples include: - * - * * name - * * security_center_properties.resource_name - * * resource_properties.a_property - * * security_marks.marks.marka - * - * The supported operators are: - * - * * `=` for all value types. - * * `>`, `<`, `>=`, `<=` for integer values. - * * `:`, meaning substring matching, for strings. - * - * The supported value types are: - * - * * string literals in quotes. - * * integer literals without quotes. - * * boolean literals `true` and `false` without quotes. - * - * The following field and operator combinations are supported: - * - * * name: `=` - * * update_time: `=`, `>`, `<`, `>=`, `<=` - * - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `update_time = "2019-06-10T16:07:18-07:00"` - * `update_time = 1560208038000` - * - * * create_time: `=`, `>`, `<`, `>=`, `<=` - * - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `create_time = "2019-06-10T16:07:18-07:00"` - * `create_time = 1560208038000` - * - * * iam_policy.policy_blob: `=`, `:` - * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - * * security_marks.marks: `=`, `:` - * * security_center_properties.resource_name: `=`, `:` - * * security_center_properties.resource_display_name: `=`, `:` - * * security_center_properties.resource_type: `=`, `:` - * * security_center_properties.resource_parent: `=`, `:` - * * security_center_properties.resource_parent_display_name: `=`, `:` - * * security_center_properties.resource_project: `=`, `:` - * * security_center_properties.resource_project_display_name: `=`, `:` - * * security_center_properties.resource_owners: `=`, `:` - * - * For example, `resource_properties.size = 100` is a valid filter string. - * - * Use a partial match on the empty string to filter based on a property - * existing: `resource_properties.my_property : ""` - * - * Use a negated partial match on the empty string to filter based on a - * property not existing: `-resource_properties.my_property : ""` - * @type Duration $compareDuration - * When compare_duration is set, the GroupResult's "state_change" property is - * updated to indicate whether the asset was added, removed, or remained - * present during the compare_duration period of time that precedes the - * read_time. This is the time between (read_time - compare_duration) and - * read_time. - * - * The state change value is derived based on the presence of the asset at the - * two points in time. Intermediate state changes between the two times don't - * affect the result. For example, the results aren't affected if the asset is - * removed and re-created again. - * - * Possible "state_change" values when compare_duration is specified: - * - * * "ADDED": indicates that the asset was not present at the start of - * compare_duration, but present at reference_time. - * * "REMOVED": indicates that the asset was present at the start of - * compare_duration, but not present at reference_time. - * * "ACTIVE": indicates that the asset was present at both the - * start and the end of the time period defined by - * compare_duration and reference_time. - * - * If compare_duration is not specified, then the only possible state_change - * is "UNUSED", which will be the state_change set for all assets present at - * read_time. - * - * If this field is set then `state_change` must be a specified field in - * `group_by`. - * @type Timestamp $readTime - * Time used as a reference point when filtering assets. The filter is limited - * to assets existing at the supplied time and their values are those at that - * specific time. Absence of this field will default to the API's version of - * NOW. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @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 \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function groupAssets($parent, $groupBy, array $optionalArgs = []) - { - $request = new GroupAssetsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setGroupBy($groupBy); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['compareDuration'])) { - $request->setCompareDuration($optionalArgs['compareDuration']); - } - - if (isset($optionalArgs['readTime'])) { - $request->setReadTime($optionalArgs['readTime']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('GroupAssets', $optionalArgs, GroupAssetsResponse::class, $request); - } - - /** - * Filters an organization or source's findings and groups them by their - * specified properties. - * - * To group across all sources provide a `-` as the source id. - * Example: /v1/organizations/{organization_id}/sources/-/findings, - * /v1/folders/{folder_id}/sources/-/findings, - * /v1/projects/{project_id}/sources/-/findings - * - * Sample code: - * ``` - * $securityCenterClient = new SecurityCenterClient(); - * try { - * $formattedParent = $securityCenterClient->sourceName('[ORGANIZATION]', '[SOURCE]'); - * $groupBy = 'group_by'; - * // Iterate over pages of elements - * $pagedResponse = $securityCenterClient->groupFindings($formattedParent, $groupBy); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $securityCenterClient->groupFindings($formattedParent, $groupBy); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $securityCenterClient->close(); - * } - * ``` - * - * @param string $parent Required. Name of the source to groupBy. Its format is - * "organizations/[organization_id]/sources/[source_id]", - * folders/[folder_id]/sources/[source_id], or - * projects/[project_id]/sources/[source_id]. To groupBy across all sources - * provide a source_id of `-`. For example: - * organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-, - * or projects/{project_id}/sources/- - * @param string $groupBy Required. Expression that defines what assets fields to use for grouping - * (including `state_change`). The string value should follow SQL syntax: - * comma separated list of fields. For example: "parent,resource_name". - * - * The following fields are supported: - * - * * resource_name - * * category - * * state - * * parent - * * severity - * - * The following fields are supported when compare_duration is set: - * - * * state_change - * @param array $optionalArgs { - * Optional. - * - * @type string $filter - * Expression that defines the filter to apply across findings. - * The expression is a list of one or more restrictions combined via logical - * operators `AND` and `OR`. - * Parentheses are supported, and `OR` has higher precedence than `AND`. - * - * Restrictions have the form ` ` and may have a `-` - * character in front of them to indicate negation. Examples include: - * - * * name - * * source_properties.a_property - * * security_marks.marks.marka - * - * The supported operators are: - * - * * `=` for all value types. - * * `>`, `<`, `>=`, `<=` for integer values. - * * `:`, meaning substring matching, for strings. - * - * The supported value types are: - * - * * string literals in quotes. - * * integer literals without quotes. - * * boolean literals `true` and `false` without quotes. - * - * The following field and operator combinations are supported: - * - * * name: `=` - * * parent: `=`, `:` - * * resource_name: `=`, `:` - * * state: `=`, `:` - * * category: `=`, `:` - * * external_uri: `=`, `:` - * * event_time: `=`, `>`, `<`, `>=`, `<=` - * - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `event_time = "2019-06-10T16:07:18-07:00"` - * `event_time = 1560208038000` - * - * * severity: `=`, `:` - * * workflow_state: `=`, `:` - * * security_marks.marks: `=`, `:` - * * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - * - * For example, `source_properties.size = 100` is a valid filter string. - * - * Use a partial match on the empty string to filter based on a property - * existing: `source_properties.my_property : ""` - * - * Use a negated partial match on the empty string to filter based on a - * property not existing: `-source_properties.my_property : ""` - * - * * resource: - * * resource.name: `=`, `:` - * * resource.parent_name: `=`, `:` - * * resource.parent_display_name: `=`, `:` - * * resource.project_name: `=`, `:` - * * resource.project_display_name: `=`, `:` - * * resource.type: `=`, `:` - * @type Timestamp $readTime - * Time used as a reference point when filtering findings. The filter is - * limited to findings existing at the supplied time and their values are - * those at that specific time. Absence of this field will default to the - * API's version of NOW. - * @type Duration $compareDuration - * When compare_duration is set, the GroupResult's "state_change" attribute is - * updated to indicate whether the finding had its state changed, the - * finding's state remained unchanged, or if the finding was added during the - * compare_duration period of time that precedes the read_time. This is the - * time between (read_time - compare_duration) and read_time. - * - * The state_change value is derived based on the presence and state of the - * finding at the two points in time. Intermediate state changes between the - * two times don't affect the result. For example, the results aren't affected - * if the finding is made inactive and then active again. - * - * Possible "state_change" values when compare_duration is specified: - * - * * "CHANGED": indicates that the finding was present and matched the given - * filter at the start of compare_duration, but changed its - * state at read_time. - * * "UNCHANGED": indicates that the finding was present and matched the given - * filter at the start of compare_duration and did not change - * state at read_time. - * * "ADDED": indicates that the finding did not match the given filter or - * was not present at the start of compare_duration, but was - * present at read_time. - * * "REMOVED": indicates that the finding was present and matched the - * filter at the start of compare_duration, but did not match - * the filter at read_time. - * - * If compare_duration is not specified, then the only possible state_change - * is "UNUSED", which will be the state_change set for all findings present - * at read_time. - * - * If this field is set then `state_change` must be a specified field in - * `group_by`. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @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 \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function groupFindings($parent, $groupBy, array $optionalArgs = []) - { - $request = new GroupFindingsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setGroupBy($groupBy); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['readTime'])) { - $request->setReadTime($optionalArgs['readTime']); - } - - if (isset($optionalArgs['compareDuration'])) { - $request->setCompareDuration($optionalArgs['compareDuration']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('GroupFindings', $optionalArgs, GroupFindingsResponse::class, $request); - } - - /** - * Lists an organization's assets. - * - * Sample code: - * ``` - * $securityCenterClient = new SecurityCenterClient(); - * try { - * $formattedParent = $securityCenterClient->projectName('[PROJECT]'); - * // Iterate over pages of elements - * $pagedResponse = $securityCenterClient->listAssets($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $securityCenterClient->listAssets($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $securityCenterClient->close(); - * } - * ``` - * - * @param string $parent Required. The name of the parent resource that contains the assets. The - * value that you can specify on parent depends on the method in which you - * specify parent. You can specify one of the following values: - * "organizations/[organization_id]", "folders/[folder_id]", or - * "projects/[project_id]". - * @param array $optionalArgs { - * Optional. - * - * @type string $filter - * Expression that defines the filter to apply across assets. - * The expression is a list of zero or more restrictions combined via logical - * operators `AND` and `OR`. - * Parentheses are supported, and `OR` has higher precedence than `AND`. - * - * Restrictions have the form ` ` and may have a `-` - * character in front of them to indicate negation. The fields map to those - * defined in the Asset resource. Examples include: - * - * * name - * * security_center_properties.resource_name - * * resource_properties.a_property - * * security_marks.marks.marka - * - * The supported operators are: - * - * * `=` for all value types. - * * `>`, `<`, `>=`, `<=` for integer values. - * * `:`, meaning substring matching, for strings. - * - * The supported value types are: - * - * * string literals in quotes. - * * integer literals without quotes. - * * boolean literals `true` and `false` without quotes. - * - * The following are the allowed field and operator combinations: - * - * * name: `=` - * * update_time: `=`, `>`, `<`, `>=`, `<=` - * - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `update_time = "2019-06-10T16:07:18-07:00"` - * `update_time = 1560208038000` - * - * * create_time: `=`, `>`, `<`, `>=`, `<=` - * - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `create_time = "2019-06-10T16:07:18-07:00"` - * `create_time = 1560208038000` - * - * * iam_policy.policy_blob: `=`, `:` - * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - * * security_marks.marks: `=`, `:` - * * security_center_properties.resource_name: `=`, `:` - * * security_center_properties.resource_display_name: `=`, `:` - * * security_center_properties.resource_type: `=`, `:` - * * security_center_properties.resource_parent: `=`, `:` - * * security_center_properties.resource_parent_display_name: `=`, `:` - * * security_center_properties.resource_project: `=`, `:` - * * security_center_properties.resource_project_display_name: `=`, `:` - * * security_center_properties.resource_owners: `=`, `:` - * - * For example, `resource_properties.size = 100` is a valid filter string. - * - * Use a partial match on the empty string to filter based on a property - * existing: `resource_properties.my_property : ""` - * - * Use a negated partial match on the empty string to filter based on a - * property not existing: `-resource_properties.my_property : ""` - * @type string $orderBy - * Expression that defines what fields and order to use for sorting. The - * string value should follow SQL syntax: comma separated list of fields. For - * example: "name,resource_properties.a_property". The default sorting order - * is ascending. To specify descending order for a field, a suffix " desc" - * should be appended to the field name. For example: "name - * desc,resource_properties.a_property". Redundant space characters in the - * syntax are insignificant. "name desc,resource_properties.a_property" and " - * name desc , resource_properties.a_property " are equivalent. - * - * The following fields are supported: - * name - * update_time - * resource_properties - * security_marks.marks - * security_center_properties.resource_name - * security_center_properties.resource_display_name - * security_center_properties.resource_parent - * security_center_properties.resource_parent_display_name - * security_center_properties.resource_project - * security_center_properties.resource_project_display_name - * security_center_properties.resource_type - * @type Timestamp $readTime - * Time used as a reference point when filtering assets. The filter is limited - * to assets existing at the supplied time and their values are those at that - * specific time. Absence of this field will default to the API's version of - * NOW. - * @type Duration $compareDuration - * When compare_duration is set, the ListAssetsResult's "state_change" - * attribute is updated to indicate whether the asset was added, removed, or - * remained present during the compare_duration period of time that precedes - * the read_time. This is the time between (read_time - compare_duration) and - * read_time. - * - * The state_change value is derived based on the presence of the asset at the - * two points in time. Intermediate state changes between the two times don't - * affect the result. For example, the results aren't affected if the asset is - * removed and re-created again. - * - * Possible "state_change" values when compare_duration is specified: - * - * * "ADDED": indicates that the asset was not present at the start of - * compare_duration, but present at read_time. - * * "REMOVED": indicates that the asset was present at the start of - * compare_duration, but not present at read_time. - * * "ACTIVE": indicates that the asset was present at both the - * start and the end of the time period defined by - * compare_duration and read_time. - * - * If compare_duration is not specified, then the only possible state_change - * is "UNUSED", which will be the state_change set for all assets present at - * read_time. - * @type FieldMask $fieldMask - * A field mask to specify the ListAssetsResult fields to be listed in the - * response. - * An empty field mask will list all fields. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @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 \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listAssets($parent, array $optionalArgs = []) - { - $request = new ListAssetsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - if (isset($optionalArgs['readTime'])) { - $request->setReadTime($optionalArgs['readTime']); - } - - if (isset($optionalArgs['compareDuration'])) { - $request->setCompareDuration($optionalArgs['compareDuration']); - } - - if (isset($optionalArgs['fieldMask'])) { - $request->setFieldMask($optionalArgs['fieldMask']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListAssets', $optionalArgs, ListAssetsResponse::class, $request); - } - - /** - * Lists BigQuery exports. Note that when requesting BigQuery exports at a - * given level all exports under that level are also returned e.g. if - * requesting BigQuery exports under a folder, then all BigQuery exports - * immediately under the folder plus the ones created under the projects - * within the folder are returned. - * - * Sample code: - * ``` - * $securityCenterClient = new SecurityCenterClient(); - * try { - * $formattedParent = $securityCenterClient->projectName('[PROJECT]'); - * // Iterate over pages of elements - * $pagedResponse = $securityCenterClient->listBigQueryExports($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $securityCenterClient->listBigQueryExports($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $securityCenterClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent, which owns the collection of BigQuery exports. Its - * format is "organizations/[organization_id]", "folders/[folder_id]", - * "projects/[project_id]". - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @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 \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listBigQueryExports($parent, array $optionalArgs = []) - { - $request = new ListBigQueryExportsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListBigQueryExports', $optionalArgs, ListBigQueryExportsResponse::class, $request); - } - - /** - * Lists an organization or source's findings. - * - * To list across all sources provide a `-` as the source id. - * Example: /v1/organizations/{organization_id}/sources/-/findings - * - * Sample code: - * ``` - * $securityCenterClient = new SecurityCenterClient(); - * try { - * $formattedParent = $securityCenterClient->sourceName('[ORGANIZATION]', '[SOURCE]'); - * // Iterate over pages of elements - * $pagedResponse = $securityCenterClient->listFindings($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $securityCenterClient->listFindings($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $securityCenterClient->close(); - * } - * ``` - * - * @param string $parent Required. Name of the source the findings belong to. Its format is - * "organizations/[organization_id]/sources/[source_id], - * folders/[folder_id]/sources/[source_id], or - * projects/[project_id]/sources/[source_id]". To list across all sources - * provide a source_id of `-`. For example: - * organizations/{organization_id}/sources/-, folders/{folder_id}/sources/- or - * projects/{projects_id}/sources/- - * @param array $optionalArgs { - * Optional. - * - * @type string $filter - * Expression that defines the filter to apply across findings. - * The expression is a list of one or more restrictions combined via logical - * operators `AND` and `OR`. - * Parentheses are supported, and `OR` has higher precedence than `AND`. - * - * Restrictions have the form ` ` and may have a `-` - * character in front of them to indicate negation. Examples include: - * - * * name - * * source_properties.a_property - * * security_marks.marks.marka - * - * The supported operators are: - * - * * `=` for all value types. - * * `>`, `<`, `>=`, `<=` for integer values. - * * `:`, meaning substring matching, for strings. - * - * The supported value types are: - * - * * string literals in quotes. - * * integer literals without quotes. - * * boolean literals `true` and `false` without quotes. - * - * The following field and operator combinations are supported: - * - * * name: `=` - * * parent: `=`, `:` - * * resource_name: `=`, `:` - * * state: `=`, `:` - * * category: `=`, `:` - * * external_uri: `=`, `:` - * * event_time: `=`, `>`, `<`, `>=`, `<=` - * - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `event_time = "2019-06-10T16:07:18-07:00"` - * `event_time = 1560208038000` - * - * * severity: `=`, `:` - * * workflow_state: `=`, `:` - * * security_marks.marks: `=`, `:` - * * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - * - * For example, `source_properties.size = 100` is a valid filter string. - * - * Use a partial match on the empty string to filter based on a property - * existing: `source_properties.my_property : ""` - * - * Use a negated partial match on the empty string to filter based on a - * property not existing: `-source_properties.my_property : ""` - * - * * resource: - * * resource.name: `=`, `:` - * * resource.parent_name: `=`, `:` - * * resource.parent_display_name: `=`, `:` - * * resource.project_name: `=`, `:` - * * resource.project_display_name: `=`, `:` - * * resource.type: `=`, `:` - * * resource.folders.resource_folder: `=`, `:` - * * resource.display_name: `=`, `:` - * @type string $orderBy - * Expression that defines what fields and order to use for sorting. The - * string value should follow SQL syntax: comma separated list of fields. For - * example: "name,resource_properties.a_property". The default sorting order - * is ascending. To specify descending order for a field, a suffix " desc" - * should be appended to the field name. For example: "name - * desc,source_properties.a_property". Redundant space characters in the - * syntax are insignificant. "name desc,source_properties.a_property" and " - * name desc , source_properties.a_property " are equivalent. - * - * The following fields are supported: - * name - * parent - * state - * category - * resource_name - * event_time - * source_properties - * security_marks.marks - * @type Timestamp $readTime - * Time used as a reference point when filtering findings. The filter is - * limited to findings existing at the supplied time and their values are - * those at that specific time. Absence of this field will default to the - * API's version of NOW. - * @type Duration $compareDuration - * When compare_duration is set, the ListFindingsResult's "state_change" - * attribute is updated to indicate whether the finding had its state changed, - * the finding's state remained unchanged, or if the finding was added in any - * state during the compare_duration period of time that precedes the - * read_time. This is the time between (read_time - compare_duration) and - * read_time. - * - * The state_change value is derived based on the presence and state of the - * finding at the two points in time. Intermediate state changes between the - * two times don't affect the result. For example, the results aren't affected - * if the finding is made inactive and then active again. - * - * Possible "state_change" values when compare_duration is specified: - * - * * "CHANGED": indicates that the finding was present and matched the given - * filter at the start of compare_duration, but changed its - * state at read_time. - * * "UNCHANGED": indicates that the finding was present and matched the given - * filter at the start of compare_duration and did not change - * state at read_time. - * * "ADDED": indicates that the finding did not match the given filter or - * was not present at the start of compare_duration, but was - * present at read_time. - * * "REMOVED": indicates that the finding was present and matched the - * filter at the start of compare_duration, but did not match - * the filter at read_time. - * - * If compare_duration is not specified, then the only possible state_change - * is "UNUSED", which will be the state_change set for all findings present at - * read_time. - * @type FieldMask $fieldMask - * A field mask to specify the Finding fields to be listed in the response. - * An empty field mask will list all fields. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @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 \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listFindings($parent, array $optionalArgs = []) - { - $request = new ListFindingsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - if (isset($optionalArgs['readTime'])) { - $request->setReadTime($optionalArgs['readTime']); - } - - if (isset($optionalArgs['compareDuration'])) { - $request->setCompareDuration($optionalArgs['compareDuration']); - } - - if (isset($optionalArgs['fieldMask'])) { - $request->setFieldMask($optionalArgs['fieldMask']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListFindings', $optionalArgs, ListFindingsResponse::class, $request); - } - - /** - * Lists mute configs. - * - * Sample code: - * ``` - * $securityCenterClient = new SecurityCenterClient(); - * try { - * $formattedParent = $securityCenterClient->projectName('[PROJECT]'); - * // Iterate over pages of elements - * $pagedResponse = $securityCenterClient->listMuteConfigs($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $securityCenterClient->listMuteConfigs($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $securityCenterClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent, which owns the collection of mute configs. Its format - * is "organizations/[organization_id]", "folders/[folder_id]", - * "projects/[project_id]". - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @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 \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listMuteConfigs($parent, array $optionalArgs = []) - { - $request = new ListMuteConfigsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListMuteConfigs', $optionalArgs, ListMuteConfigsResponse::class, $request); - } - - /** - * Lists notification configs. - * - * Sample code: - * ``` - * $securityCenterClient = new SecurityCenterClient(); - * try { - * $formattedParent = $securityCenterClient->projectName('[PROJECT]'); - * // Iterate over pages of elements - * $pagedResponse = $securityCenterClient->listNotificationConfigs($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $securityCenterClient->listNotificationConfigs($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $securityCenterClient->close(); - * } - * ``` - * - * @param string $parent Required. The name of the parent in which to list the notification - * configurations. Its format is "organizations/[organization_id]", - * "folders/[folder_id]", or "projects/[project_id]". - * @param array $optionalArgs { - * Optional. - * - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @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 \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listNotificationConfigs($parent, array $optionalArgs = []) - { - $request = new ListNotificationConfigsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListNotificationConfigs', $optionalArgs, ListNotificationConfigsResponse::class, $request); - } - - /** - * Lists all sources belonging to an organization. - * - * Sample code: - * ``` - * $securityCenterClient = new SecurityCenterClient(); - * try { - * $formattedParent = $securityCenterClient->projectName('[PROJECT]'); - * // Iterate over pages of elements - * $pagedResponse = $securityCenterClient->listSources($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $securityCenterClient->listSources($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $securityCenterClient->close(); - * } - * ``` - * - * @param string $parent Required. Resource name of the parent of sources to list. Its format should - * be "organizations/[organization_id]", "folders/[folder_id]", or - * "projects/[project_id]". - * @param array $optionalArgs { - * Optional. - * - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @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 \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listSources($parent, array $optionalArgs = []) - { - $request = new ListSourcesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListSources', $optionalArgs, ListSourcesResponse::class, $request); - } - - /** - * Runs asset discovery. The discovery is tracked with a long-running - * operation. - * - * This API can only be called with limited frequency for an organization. If - * it is called too frequently the caller will receive a TOO_MANY_REQUESTS - * error. - * - * Sample code: - * ``` - * $securityCenterClient = new SecurityCenterClient(); - * try { - * $formattedParent = $securityCenterClient->organizationName('[ORGANIZATION]'); - * $operationResponse = $securityCenterClient->runAssetDiscovery($formattedParent); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $securityCenterClient->runAssetDiscovery($formattedParent); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $securityCenterClient->resumeOperation($operationName, 'runAssetDiscovery'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $securityCenterClient->close(); - * } - * ``` - * - * @param string $parent Required. Name of the organization to run asset discovery for. Its format - * is "organizations/[organization_id]". - * @param array $optionalArgs { - * 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 \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function runAssetDiscovery($parent, array $optionalArgs = []) - { - $request = new RunAssetDiscoveryRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('RunAssetDiscovery', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Updates the state of a finding. - * - * Sample code: - * ``` - * $securityCenterClient = new SecurityCenterClient(); - * try { - * $formattedName = $securityCenterClient->findingName('[ORGANIZATION]', '[SOURCE]', '[FINDING]'); - * $state = State::STATE_UNSPECIFIED; - * $startTime = new Timestamp(); - * $response = $securityCenterClient->setFindingState($formattedName, $state, $startTime); - * } finally { - * $securityCenterClient->close(); - * } - * ``` - * - * @param string $name Required. The [relative resource - * name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) - * of the finding. Example: - * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", - * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", - * "projects/{project_id}/sources/{source_id}/findings/{finding_id}". - * @param int $state Required. The desired State of the finding. - * For allowed values, use constants defined on {@see \Google\Cloud\SecurityCenter\V1\Finding\State} - * @param Timestamp $startTime Required. The time at which the updated state takes effect. - * @param array $optionalArgs { - * 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 \Google\Cloud\SecurityCenter\V1\Finding - * - * @throws ApiException if the remote call fails - */ - public function setFindingState($name, $state, $startTime, array $optionalArgs = []) - { - $request = new SetFindingStateRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setState($state); - $request->setStartTime($startTime); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('SetFindingState', Finding::class, $optionalArgs, $request)->wait(); - } - - /** - * Sets the access control policy on the specified Source. - * - * Sample code: - * ``` - * $securityCenterClient = new SecurityCenterClient(); - * try { - * $resource = 'resource'; - * $policy = new Policy(); - * $response = $securityCenterClient->setIamPolicy($resource, $policy); - * } finally { - * $securityCenterClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being specified. - * See the operation documentation for the appropriate value for this field. - * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of - * the policy is limited to a few 10s of KB. An empty policy is a - * valid policy but certain Cloud Platform services (such as Projects) - * might reject them. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - * the fields in the mask will be modified. If no mask is provided, the - * following default mask is used: - * - * `paths: "bindings, etag"` - * @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 \Google\Cloud\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - */ - public function setIamPolicy($resource, $policy, array $optionalArgs = []) - { - $request = new SetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPolicy($policy); - $requestParamHeaders['resource'] = $resource; - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('SetIamPolicy', Policy::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates the mute state of a finding. - * - * Sample code: - * ``` - * $securityCenterClient = new SecurityCenterClient(); - * try { - * $formattedName = $securityCenterClient->findingName('[ORGANIZATION]', '[SOURCE]', '[FINDING]'); - * $mute = Mute::MUTE_UNSPECIFIED; - * $response = $securityCenterClient->setMute($formattedName, $mute); - * } finally { - * $securityCenterClient->close(); - * } - * ``` - * - * @param string $name Required. The [relative resource - * name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) - * of the finding. Example: - * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", - * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}", - * "projects/{project_id}/sources/{source_id}/findings/{finding_id}". - * @param int $mute Required. The desired state of the Mute. - * For allowed values, use constants defined on {@see \Google\Cloud\SecurityCenter\V1\Finding\Mute} - * @param array $optionalArgs { - * 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 \Google\Cloud\SecurityCenter\V1\Finding - * - * @throws ApiException if the remote call fails - */ - public function setMute($name, $mute, array $optionalArgs = []) - { - $request = new SetMuteRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setMute($mute); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('SetMute', Finding::class, $optionalArgs, $request)->wait(); - } - - /** - * Returns the permissions that a caller has on the specified source. - * - * Sample code: - * ``` - * $securityCenterClient = new SecurityCenterClient(); - * try { - * $resource = 'resource'; - * $permissions = []; - * $response = $securityCenterClient->testIamPermissions($resource, $permissions); - * } finally { - * $securityCenterClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see - * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * @param array $optionalArgs { - * 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 \Google\Cloud\Iam\V1\TestIamPermissionsResponse - * - * @throws ApiException if the remote call fails - */ - public function testIamPermissions($resource, $permissions, array $optionalArgs = []) - { - $request = new TestIamPermissionsRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPermissions($permissions); - $requestParamHeaders['resource'] = $resource; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates a BigQuery export. - * - * Sample code: - * ``` - * $securityCenterClient = new SecurityCenterClient(); - * try { - * $bigQueryExport = new BigQueryExport(); - * $response = $securityCenterClient->updateBigQueryExport($bigQueryExport); - * } finally { - * $securityCenterClient->close(); - * } - * ``` - * - * @param BigQueryExport $bigQueryExport Required. The BigQuery export being updated. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * The list of fields to be updated. - * If empty all mutable fields will be updated. - * @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 \Google\Cloud\SecurityCenter\V1\BigQueryExport - * - * @throws ApiException if the remote call fails - */ - public function updateBigQueryExport($bigQueryExport, array $optionalArgs = []) - { - $request = new UpdateBigQueryExportRequest(); - $requestParamHeaders = []; - $request->setBigQueryExport($bigQueryExport); - $requestParamHeaders['big_query_export.name'] = $bigQueryExport->getName(); - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateBigQueryExport', BigQueryExport::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates external system. This is for a given finding. - * - * Sample code: - * ``` - * $securityCenterClient = new SecurityCenterClient(); - * try { - * $externalSystem = new ExternalSystem(); - * $response = $securityCenterClient->updateExternalSystem($externalSystem); - * } finally { - * $securityCenterClient->close(); - * } - * ``` - * - * @param ExternalSystem $externalSystem Required. The external system resource to update. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * The FieldMask to use when updating the external system resource. - * - * If empty all mutable fields will be updated. - * @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 \Google\Cloud\SecurityCenter\V1\ExternalSystem - * - * @throws ApiException if the remote call fails - */ - public function updateExternalSystem($externalSystem, array $optionalArgs = []) - { - $request = new UpdateExternalSystemRequest(); - $requestParamHeaders = []; - $request->setExternalSystem($externalSystem); - $requestParamHeaders['external_system.name'] = $externalSystem->getName(); - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateExternalSystem', ExternalSystem::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates or updates a finding. The corresponding source must exist for a - * finding creation to succeed. - * - * Sample code: - * ``` - * $securityCenterClient = new SecurityCenterClient(); - * try { - * $finding = new Finding(); - * $response = $securityCenterClient->updateFinding($finding); - * } finally { - * $securityCenterClient->close(); - * } - * ``` - * - * @param Finding $finding Required. The finding resource to update or create if it does not already - * exist. parent, security_marks, and update_time will be ignored. - * - * In the case of creation, the finding id portion of the name must be - * alphanumeric and less than or equal to 32 characters and greater than 0 - * characters in length. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * The FieldMask to use when updating the finding resource. This field should - * not be specified when creating a finding. - * - * When updating a finding, an empty mask is treated as updating all mutable - * fields and replacing source_properties. Individual source_properties can - * be added/updated by using "source_properties." in the field - * mask. - * @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 \Google\Cloud\SecurityCenter\V1\Finding - * - * @throws ApiException if the remote call fails - */ - public function updateFinding($finding, array $optionalArgs = []) - { - $request = new UpdateFindingRequest(); - $requestParamHeaders = []; - $request->setFinding($finding); - $requestParamHeaders['finding.name'] = $finding->getName(); - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateFinding', Finding::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates a mute config. - * - * Sample code: - * ``` - * $securityCenterClient = new SecurityCenterClient(); - * try { - * $muteConfig = new MuteConfig(); - * $response = $securityCenterClient->updateMuteConfig($muteConfig); - * } finally { - * $securityCenterClient->close(); - * } - * ``` - * - * @param MuteConfig $muteConfig Required. The mute config being updated. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * The list of fields to be updated. - * If empty all mutable fields will be updated. - * @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 \Google\Cloud\SecurityCenter\V1\MuteConfig - * - * @throws ApiException if the remote call fails - */ - public function updateMuteConfig($muteConfig, array $optionalArgs = []) - { - $request = new UpdateMuteConfigRequest(); - $requestParamHeaders = []; - $request->setMuteConfig($muteConfig); - $requestParamHeaders['mute_config.name'] = $muteConfig->getName(); - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateMuteConfig', MuteConfig::class, $optionalArgs, $request)->wait(); - } - - /** - * - * Updates a notification config. The following update - * fields are allowed: description, pubsub_topic, streaming_config.filter - * - * Sample code: - * ``` - * $securityCenterClient = new SecurityCenterClient(); - * try { - * $notificationConfig = new NotificationConfig(); - * $response = $securityCenterClient->updateNotificationConfig($notificationConfig); - * } finally { - * $securityCenterClient->close(); - * } - * ``` - * - * @param NotificationConfig $notificationConfig Required. The notification config to update. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * The FieldMask to use when updating the notification config. - * - * If empty all mutable fields will be updated. - * @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 \Google\Cloud\SecurityCenter\V1\NotificationConfig - * - * @throws ApiException if the remote call fails - */ - public function updateNotificationConfig($notificationConfig, array $optionalArgs = []) - { - $request = new UpdateNotificationConfigRequest(); - $requestParamHeaders = []; - $request->setNotificationConfig($notificationConfig); - $requestParamHeaders['notification_config.name'] = $notificationConfig->getName(); - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateNotificationConfig', NotificationConfig::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates an organization's settings. - * - * Sample code: - * ``` - * $securityCenterClient = new SecurityCenterClient(); - * try { - * $organizationSettings = new OrganizationSettings(); - * $response = $securityCenterClient->updateOrganizationSettings($organizationSettings); - * } finally { - * $securityCenterClient->close(); - * } - * ``` - * - * @param OrganizationSettings $organizationSettings Required. The organization settings resource to update. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * The FieldMask to use when updating the settings resource. - * - * If empty all mutable fields will be updated. - * @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 \Google\Cloud\SecurityCenter\V1\OrganizationSettings - * - * @throws ApiException if the remote call fails - */ - public function updateOrganizationSettings($organizationSettings, array $optionalArgs = []) - { - $request = new UpdateOrganizationSettingsRequest(); - $requestParamHeaders = []; - $request->setOrganizationSettings($organizationSettings); - $requestParamHeaders['organization_settings.name'] = $organizationSettings->getName(); - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateOrganizationSettings', OrganizationSettings::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates security marks. - * - * Sample code: - * ``` - * $securityCenterClient = new SecurityCenterClient(); - * try { - * $securityMarks = new SecurityMarks(); - * $response = $securityCenterClient->updateSecurityMarks($securityMarks); - * } finally { - * $securityCenterClient->close(); - * } - * ``` - * - * @param SecurityMarks $securityMarks Required. The security marks resource to update. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * The FieldMask to use when updating the security marks resource. - * - * The field mask must not contain duplicate fields. - * If empty or set to "marks", all marks will be replaced. Individual - * marks can be updated using "marks.". - * @type Timestamp $startTime - * The time at which the updated SecurityMarks take effect. - * If not set uses current server time. Updates will be applied to the - * SecurityMarks that are active immediately preceding this time. Must be - * earlier or equal to the server time. - * @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 \Google\Cloud\SecurityCenter\V1\SecurityMarks - * - * @throws ApiException if the remote call fails - */ - public function updateSecurityMarks($securityMarks, array $optionalArgs = []) - { - $request = new UpdateSecurityMarksRequest(); - $requestParamHeaders = []; - $request->setSecurityMarks($securityMarks); - $requestParamHeaders['security_marks.name'] = $securityMarks->getName(); - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - if (isset($optionalArgs['startTime'])) { - $request->setStartTime($optionalArgs['startTime']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateSecurityMarks', SecurityMarks::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates a source. - * - * Sample code: - * ``` - * $securityCenterClient = new SecurityCenterClient(); - * try { - * $source = new Source(); - * $response = $securityCenterClient->updateSource($source); - * } finally { - * $securityCenterClient->close(); - * } - * ``` - * - * @param Source $source Required. The source resource to update. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * The FieldMask to use when updating the source resource. - * - * If empty all mutable fields will be updated. - * @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 \Google\Cloud\SecurityCenter\V1\Source - * - * @throws ApiException if the remote call fails - */ - public function updateSource($source, array $optionalArgs = []) - { - $request = new UpdateSourceRequest(); - $requestParamHeaders = []; - $request->setSource($source); - $requestParamHeaders['source.name'] = $source->getName(); - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateSource', Source::class, $optionalArgs, $request)->wait(); - } -} diff --git a/owl-bot-staging/SecurityCenter/v1/src/V1/SecurityCenterClient.php b/owl-bot-staging/SecurityCenter/v1/src/V1/SecurityCenterClient.php deleted file mode 100644 index 295be9f992ad..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/src/V1/SecurityCenterClient.php +++ /dev/null @@ -1,34 +0,0 @@ - [ - 'google.cloud.securitycenter.v1.SecurityCenter' => [ - 'BulkMuteFindings' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\SecurityCenter\V1\BulkMuteFindingsResponse', - 'metadataReturnType' => '\Google\Protobuf\GPBEmpty', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'RunAssetDiscovery' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\SecurityCenter\V1\RunAssetDiscoveryResponse', - 'metadataReturnType' => '\Google\Protobuf\GPBEmpty', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'GroupAssets' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getGroupByResults', - ], - ], - 'GroupFindings' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getGroupByResults', - ], - ], - 'ListAssets' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getListAssetsResults', - ], - ], - 'ListBigQueryExports' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getBigQueryExports', - ], - ], - 'ListFindings' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getListFindingsResults', - ], - ], - 'ListMuteConfigs' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getMuteConfigs', - ], - ], - 'ListNotificationConfigs' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getNotificationConfigs', - ], - ], - 'ListSources' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getSources', - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/SecurityCenter/v1/src/V1/resources/security_center_rest_client_config.php b/owl-bot-staging/SecurityCenter/v1/src/V1/resources/security_center_rest_client_config.php deleted file mode 100644 index d5913fa340e5..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/src/V1/resources/security_center_rest_client_config.php +++ /dev/null @@ -1,814 +0,0 @@ - [ - 'google.cloud.securitycenter.v1.SecurityCenter' => [ - 'BulkMuteFindings' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=organizations/*}/findings:bulkMute', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=folders/*}/findings:bulkMute', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*}/findings:bulkMute', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateBigQueryExport' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=organizations/*}/bigQueryExports', - 'body' => 'big_query_export', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=folders/*}/bigQueryExports', - 'body' => 'big_query_export', - 'queryParams' => [ - 'big_query_export_id', - ], - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*}/bigQueryExports', - 'body' => 'big_query_export', - 'queryParams' => [ - 'big_query_export_id', - ], - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'big_query_export_id', - ], - ], - 'CreateFinding' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=organizations/*/sources/*}/findings', - 'body' => 'finding', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'finding_id', - ], - ], - 'CreateMuteConfig' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=organizations/*}/muteConfigs', - 'body' => 'mute_config', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=folders/*}/muteConfigs', - 'body' => 'mute_config', - 'queryParams' => [ - 'mute_config_id', - ], - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*}/muteConfigs', - 'body' => 'mute_config', - 'queryParams' => [ - 'mute_config_id', - ], - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'mute_config_id', - ], - ], - 'CreateNotificationConfig' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=organizations/*}/notificationConfigs', - 'body' => 'notification_config', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=folders/*}/notificationConfigs', - 'body' => 'notification_config', - 'queryParams' => [ - 'config_id', - ], - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*}/notificationConfigs', - 'body' => 'notification_config', - 'queryParams' => [ - 'config_id', - ], - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'config_id', - ], - ], - 'CreateSource' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=organizations/*}/sources', - 'body' => 'source', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteBigQueryExport' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=organizations/*/bigQueryExports/*}', - 'additionalBindings' => [ - [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=folders/*/bigQueryExports/*}', - ], - [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/bigQueryExports/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteMuteConfig' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=organizations/*/muteConfigs/*}', - 'additionalBindings' => [ - [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=folders/*/muteConfigs/*}', - ], - [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/muteConfigs/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteNotificationConfig' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=organizations/*/notificationConfigs/*}', - 'additionalBindings' => [ - [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=folders/*/notificationConfigs/*}', - ], - [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/notificationConfigs/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetBigQueryExport' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=organizations/*/bigQueryExports/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=folders/*/bigQueryExports/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/bigQueryExports/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=organizations/*/sources/*}:getIamPolicy', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'GetMuteConfig' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=organizations/*/muteConfigs/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=folders/*/muteConfigs/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/muteConfigs/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetNotificationConfig' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=organizations/*/notificationConfigs/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=folders/*/notificationConfigs/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/notificationConfigs/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOrganizationSettings' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=organizations/*/organizationSettings}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetSource' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=organizations/*/sources/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GroupAssets' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=organizations/*}/assets:group', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=folders/*}/assets:group', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*}/assets:group', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'GroupFindings' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=organizations/*/sources/*}/findings:group', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=folders/*/sources/*}/findings:group', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/sources/*}/findings:group', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListAssets' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=organizations/*}/assets', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=folders/*}/assets', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*}/assets', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListBigQueryExports' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=organizations/*}/bigQueryExports', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=folders/*}/bigQueryExports', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*}/bigQueryExports', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListFindings' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=organizations/*/sources/*}/findings', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=folders/*/sources/*}/findings', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/sources/*}/findings', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListMuteConfigs' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=organizations/*}/muteConfigs', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=folders/*}/muteConfigs', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*}/muteConfigs', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListNotificationConfigs' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=organizations/*}/notificationConfigs', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=folders/*}/notificationConfigs', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*}/notificationConfigs', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListSources' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=organizations/*}/sources', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=folders/*}/sources', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*}/sources', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'RunAssetDiscovery' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=organizations/*}/assets:runDiscovery', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'SetFindingState' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=organizations/*/sources/*/findings/*}:setState', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=folders/*/sources/*/findings/*}:setState', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/sources/*/findings/*}:setState', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=organizations/*/sources/*}:setIamPolicy', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetMute' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=organizations/*/sources/*/findings/*}:setMute', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=folders/*/sources/*/findings/*}:setMute', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/sources/*/findings/*}:setMute', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=organizations/*/sources/*}:testIamPermissions', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'UpdateBigQueryExport' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{big_query_export.name=organizations/*/bigQueryExports/*}', - 'body' => 'big_query_export', - 'additionalBindings' => [ - [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{big_query_export.name=folders/*/bigQueryExports/*}', - 'body' => 'big_query_export', - ], - [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{big_query_export.name=projects/*/bigQueryExports/*}', - 'body' => 'big_query_export', - ], - ], - 'placeholders' => [ - 'big_query_export.name' => [ - 'getters' => [ - 'getBigQueryExport', - 'getName', - ], - ], - ], - ], - 'UpdateExternalSystem' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{external_system.name=organizations/*/sources/*/findings/*/externalSystems/*}', - 'body' => 'external_system', - 'additionalBindings' => [ - [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{external_system.name=folders/*/sources/*/findings/*/externalSystems/*}', - 'body' => 'external_system', - ], - [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{external_system.name=projects/*/sources/*/findings/*/externalSystems/*}', - 'body' => 'external_system', - ], - ], - 'placeholders' => [ - 'external_system.name' => [ - 'getters' => [ - 'getExternalSystem', - 'getName', - ], - ], - ], - ], - 'UpdateFinding' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{finding.name=organizations/*/sources/*/findings/*}', - 'body' => 'finding', - 'additionalBindings' => [ - [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{finding.name=folders/*/sources/*/findings/*}', - 'body' => 'finding', - ], - [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{finding.name=projects/*/sources/*/findings/*}', - 'body' => 'finding', - ], - ], - 'placeholders' => [ - 'finding.name' => [ - 'getters' => [ - 'getFinding', - 'getName', - ], - ], - ], - ], - 'UpdateMuteConfig' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{mute_config.name=organizations/*/muteConfigs/*}', - 'body' => 'mute_config', - 'additionalBindings' => [ - [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{mute_config.name=folders/*/muteConfigs/*}', - 'body' => 'mute_config', - ], - [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{mute_config.name=projects/*/muteConfigs/*}', - 'body' => 'mute_config', - ], - ], - 'placeholders' => [ - 'mute_config.name' => [ - 'getters' => [ - 'getMuteConfig', - 'getName', - ], - ], - ], - ], - 'UpdateNotificationConfig' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{notification_config.name=organizations/*/notificationConfigs/*}', - 'body' => 'notification_config', - 'additionalBindings' => [ - [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{notification_config.name=folders/*/notificationConfigs/*}', - 'body' => 'notification_config', - ], - [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{notification_config.name=projects/*/notificationConfigs/*}', - 'body' => 'notification_config', - ], - ], - 'placeholders' => [ - 'notification_config.name' => [ - 'getters' => [ - 'getNotificationConfig', - 'getName', - ], - ], - ], - ], - 'UpdateOrganizationSettings' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{organization_settings.name=organizations/*/organizationSettings}', - 'body' => 'organization_settings', - 'placeholders' => [ - 'organization_settings.name' => [ - 'getters' => [ - 'getOrganizationSettings', - 'getName', - ], - ], - ], - ], - 'UpdateSecurityMarks' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{security_marks.name=organizations/*/assets/*/securityMarks}', - 'body' => 'security_marks', - 'additionalBindings' => [ - [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{security_marks.name=folders/*/assets/*/securityMarks}', - 'body' => 'security_marks', - ], - [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{security_marks.name=projects/*/assets/*/securityMarks}', - 'body' => 'security_marks', - ], - [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{security_marks.name=organizations/*/sources/*/findings/*/securityMarks}', - 'body' => 'security_marks', - ], - [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{security_marks.name=folders/*/sources/*/findings/*/securityMarks}', - 'body' => 'security_marks', - ], - [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{security_marks.name=projects/*/sources/*/findings/*/securityMarks}', - 'body' => 'security_marks', - ], - ], - 'placeholders' => [ - 'security_marks.name' => [ - 'getters' => [ - 'getSecurityMarks', - 'getName', - ], - ], - ], - ], - 'UpdateSource' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{source.name=organizations/*/sources/*}', - 'body' => 'source', - 'placeholders' => [ - 'source.name' => [ - 'getters' => [ - 'getSource', - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=organizations/*/operations/*}:cancel', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=organizations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=organizations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=organizations/*/operations}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/SecurityCenter/v1/tests/Unit/V1/SecurityCenterClientTest.php b/owl-bot-staging/SecurityCenter/v1/tests/Unit/V1/SecurityCenterClientTest.php deleted file mode 100644 index 2d437b434aa8..000000000000 --- a/owl-bot-staging/SecurityCenter/v1/tests/Unit/V1/SecurityCenterClientTest.php +++ /dev/null @@ -1,2674 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return SecurityCenterClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new SecurityCenterClient($options); - } - - /** @test */ - public function bulkMuteFindingsTest() - { - $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/bulkMuteFindingsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new BulkMuteFindingsResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/bulkMuteFindingsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $parent = 'parent-995424086'; - $response = $gapicClient->bulkMuteFindings($parent); - $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.securitycenter.v1.SecurityCenter/BulkMuteFindings', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/bulkMuteFindingsTest'); - $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 bulkMuteFindingsExceptionTest() - { - $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/bulkMuteFindingsTest'); - $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 - $parent = 'parent-995424086'; - $response = $gapicClient->bulkMuteFindings($parent); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/bulkMuteFindingsTest'); - 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 createBigQueryExportTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $description = 'description-1724546052'; - $filter = 'filter-1274492040'; - $dataset = 'dataset1443214456'; - $mostRecentEditor = 'mostRecentEditor-657770475'; - $principal = 'principal-1812041682'; - $expectedResponse = new BigQueryExport(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setFilter($filter); - $expectedResponse->setDataset($dataset); - $expectedResponse->setMostRecentEditor($mostRecentEditor); - $expectedResponse->setPrincipal($principal); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $bigQueryExport = new BigQueryExport(); - $bigQueryExportId = 'bigQueryExportId269737360'; - $response = $gapicClient->createBigQueryExport($formattedParent, $bigQueryExport, $bigQueryExportId); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/CreateBigQueryExport', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getBigQueryExport(); - $this->assertProtobufEquals($bigQueryExport, $actualValue); - $actualValue = $actualRequestObject->getBigQueryExportId(); - $this->assertProtobufEquals($bigQueryExportId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createBigQueryExportExceptionTest() - { - $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->projectName('[PROJECT]'); - $bigQueryExport = new BigQueryExport(); - $bigQueryExportId = 'bigQueryExportId269737360'; - try { - $gapicClient->createBigQueryExport($formattedParent, $bigQueryExport, $bigQueryExportId); - // 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 createFindingTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $parent2 = 'parent21175163357'; - $resourceName = 'resourceName979421212'; - $category = 'category50511102'; - $externalUri = 'externalUri-1385596168'; - $canonicalName = 'canonicalName1385400054'; - $muteInitiator = 'muteInitiator7603081'; - $parentDisplayName = 'parentDisplayName934119773'; - $description = 'description-1724546052'; - $nextSteps = 'nextSteps-921338149'; - $expectedResponse = new Finding(); - $expectedResponse->setName($name); - $expectedResponse->setParent($parent2); - $expectedResponse->setResourceName($resourceName); - $expectedResponse->setCategory($category); - $expectedResponse->setExternalUri($externalUri); - $expectedResponse->setCanonicalName($canonicalName); - $expectedResponse->setMuteInitiator($muteInitiator); - $expectedResponse->setParentDisplayName($parentDisplayName); - $expectedResponse->setDescription($description); - $expectedResponse->setNextSteps($nextSteps); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->sourceName('[ORGANIZATION]', '[SOURCE]'); - $findingId = 'findingId728776081'; - $finding = new Finding(); - $response = $gapicClient->createFinding($formattedParent, $findingId, $finding); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/CreateFinding', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getFindingId(); - $this->assertProtobufEquals($findingId, $actualValue); - $actualValue = $actualRequestObject->getFinding(); - $this->assertProtobufEquals($finding, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createFindingExceptionTest() - { - $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->sourceName('[ORGANIZATION]', '[SOURCE]'); - $findingId = 'findingId728776081'; - $finding = new Finding(); - try { - $gapicClient->createFinding($formattedParent, $findingId, $finding); - // 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 createMuteConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $filter = 'filter-1274492040'; - $mostRecentEditor = 'mostRecentEditor-657770475'; - $expectedResponse = new MuteConfig(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setFilter($filter); - $expectedResponse->setMostRecentEditor($mostRecentEditor); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $muteConfig = new MuteConfig(); - $muteConfigFilter = 'muteConfigFilter-1921414637'; - $muteConfig->setFilter($muteConfigFilter); - $muteConfigId = 'muteConfigId-547860334'; - $response = $gapicClient->createMuteConfig($formattedParent, $muteConfig, $muteConfigId); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/CreateMuteConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getMuteConfig(); - $this->assertProtobufEquals($muteConfig, $actualValue); - $actualValue = $actualRequestObject->getMuteConfigId(); - $this->assertProtobufEquals($muteConfigId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createMuteConfigExceptionTest() - { - $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->projectName('[PROJECT]'); - $muteConfig = new MuteConfig(); - $muteConfigFilter = 'muteConfigFilter-1921414637'; - $muteConfig->setFilter($muteConfigFilter); - $muteConfigId = 'muteConfigId-547860334'; - try { - $gapicClient->createMuteConfig($formattedParent, $muteConfig, $muteConfigId); - // 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 createNotificationConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $description = 'description-1724546052'; - $pubsubTopic = 'pubsubTopic-338126829'; - $serviceAccount = 'serviceAccount-1948028253'; - $expectedResponse = new NotificationConfig(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setPubsubTopic($pubsubTopic); - $expectedResponse->setServiceAccount($serviceAccount); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $configId = 'configId-804450504'; - $notificationConfig = new NotificationConfig(); - $response = $gapicClient->createNotificationConfig($formattedParent, $configId, $notificationConfig); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/CreateNotificationConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getConfigId(); - $this->assertProtobufEquals($configId, $actualValue); - $actualValue = $actualRequestObject->getNotificationConfig(); - $this->assertProtobufEquals($notificationConfig, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createNotificationConfigExceptionTest() - { - $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->projectName('[PROJECT]'); - $configId = 'configId-804450504'; - $notificationConfig = new NotificationConfig(); - try { - $gapicClient->createNotificationConfig($formattedParent, $configId, $notificationConfig); - // 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 createSourceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $canonicalName = 'canonicalName1385400054'; - $expectedResponse = new Source(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setCanonicalName($canonicalName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->organizationName('[ORGANIZATION]'); - $source = new Source(); - $response = $gapicClient->createSource($formattedParent, $source); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/CreateSource', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getSource(); - $this->assertProtobufEquals($source, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createSourceExceptionTest() - { - $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->organizationName('[ORGANIZATION]'); - $source = new Source(); - try { - $gapicClient->createSource($formattedParent, $source); - // 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 deleteBigQueryExportTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->bigQueryExportName('[ORGANIZATION]', '[EXPORT]'); - $gapicClient->deleteBigQueryExport($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/DeleteBigQueryExport', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteBigQueryExportExceptionTest() - { - $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->bigQueryExportName('[ORGANIZATION]', '[EXPORT]'); - try { - $gapicClient->deleteBigQueryExport($formattedName); - // 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 deleteMuteConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->muteConfigName('[ORGANIZATION]', '[MUTE_CONFIG]'); - $gapicClient->deleteMuteConfig($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/DeleteMuteConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteMuteConfigExceptionTest() - { - $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->muteConfigName('[ORGANIZATION]', '[MUTE_CONFIG]'); - try { - $gapicClient->deleteMuteConfig($formattedName); - // 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 deleteNotificationConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->notificationConfigName('[ORGANIZATION]', '[NOTIFICATION_CONFIG]'); - $gapicClient->deleteNotificationConfig($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/DeleteNotificationConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteNotificationConfigExceptionTest() - { - $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->notificationConfigName('[ORGANIZATION]', '[NOTIFICATION_CONFIG]'); - try { - $gapicClient->deleteNotificationConfig($formattedName); - // 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 getBigQueryExportTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $filter = 'filter-1274492040'; - $dataset = 'dataset1443214456'; - $mostRecentEditor = 'mostRecentEditor-657770475'; - $principal = 'principal-1812041682'; - $expectedResponse = new BigQueryExport(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setFilter($filter); - $expectedResponse->setDataset($dataset); - $expectedResponse->setMostRecentEditor($mostRecentEditor); - $expectedResponse->setPrincipal($principal); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->bigQueryExportName('[ORGANIZATION]', '[EXPORT]'); - $response = $gapicClient->getBigQueryExport($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/GetBigQueryExport', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getBigQueryExportExceptionTest() - { - $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->bigQueryExportName('[ORGANIZATION]', '[EXPORT]'); - try { - $gapicClient->getBigQueryExport($formattedName); - // 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 getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $response = $gapicClient->getIamPolicy($resource); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $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 - $resource = 'resource-341064690'; - try { - $gapicClient->getIamPolicy($resource); - // 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 getMuteConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $filter = 'filter-1274492040'; - $mostRecentEditor = 'mostRecentEditor-657770475'; - $expectedResponse = new MuteConfig(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setFilter($filter); - $expectedResponse->setMostRecentEditor($mostRecentEditor); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->muteConfigName('[ORGANIZATION]', '[MUTE_CONFIG]'); - $response = $gapicClient->getMuteConfig($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/GetMuteConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getMuteConfigExceptionTest() - { - $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->muteConfigName('[ORGANIZATION]', '[MUTE_CONFIG]'); - try { - $gapicClient->getMuteConfig($formattedName); - // 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 getNotificationConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $pubsubTopic = 'pubsubTopic-338126829'; - $serviceAccount = 'serviceAccount-1948028253'; - $expectedResponse = new NotificationConfig(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setPubsubTopic($pubsubTopic); - $expectedResponse->setServiceAccount($serviceAccount); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->notificationConfigName('[ORGANIZATION]', '[NOTIFICATION_CONFIG]'); - $response = $gapicClient->getNotificationConfig($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/GetNotificationConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getNotificationConfigExceptionTest() - { - $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->notificationConfigName('[ORGANIZATION]', '[NOTIFICATION_CONFIG]'); - try { - $gapicClient->getNotificationConfig($formattedName); - // 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 getOrganizationSettingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $enableAssetDiscovery = false; - $expectedResponse = new OrganizationSettings(); - $expectedResponse->setName($name2); - $expectedResponse->setEnableAssetDiscovery($enableAssetDiscovery); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->organizationSettingsName('[ORGANIZATION]'); - $response = $gapicClient->getOrganizationSettings($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/GetOrganizationSettings', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getOrganizationSettingsExceptionTest() - { - $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->organizationSettingsName('[ORGANIZATION]'); - try { - $gapicClient->getOrganizationSettings($formattedName); - // 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 getSourceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $canonicalName = 'canonicalName1385400054'; - $expectedResponse = new Source(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setCanonicalName($canonicalName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->sourceName('[ORGANIZATION]', '[SOURCE]'); - $response = $gapicClient->getSource($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/GetSource', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSourceExceptionTest() - { - $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->sourceName('[ORGANIZATION]', '[SOURCE]'); - try { - $gapicClient->getSource($formattedName); - // 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 groupAssetsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $totalSize = 705419236; - $groupByResultsElement = new GroupResult(); - $groupByResults = [ - $groupByResultsElement, - ]; - $expectedResponse = new GroupAssetsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTotalSize($totalSize); - $expectedResponse->setGroupByResults($groupByResults); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $groupBy = 'groupBy506361367'; - $response = $gapicClient->groupAssets($formattedParent, $groupBy); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getGroupByResults()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/GroupAssets', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getGroupBy(); - $this->assertProtobufEquals($groupBy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function groupAssetsExceptionTest() - { - $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->projectName('[PROJECT]'); - $groupBy = 'groupBy506361367'; - try { - $gapicClient->groupAssets($formattedParent, $groupBy); - // 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 groupFindingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $totalSize = 705419236; - $groupByResultsElement = new GroupResult(); - $groupByResults = [ - $groupByResultsElement, - ]; - $expectedResponse = new GroupFindingsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTotalSize($totalSize); - $expectedResponse->setGroupByResults($groupByResults); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->sourceName('[ORGANIZATION]', '[SOURCE]'); - $groupBy = 'groupBy506361367'; - $response = $gapicClient->groupFindings($formattedParent, $groupBy); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getGroupByResults()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/GroupFindings', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getGroupBy(); - $this->assertProtobufEquals($groupBy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function groupFindingsExceptionTest() - { - $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->sourceName('[ORGANIZATION]', '[SOURCE]'); - $groupBy = 'groupBy506361367'; - try { - $gapicClient->groupFindings($formattedParent, $groupBy); - // 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 listAssetsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $totalSize = 705419236; - $listAssetsResultsElement = new ListAssetsResult(); - $listAssetsResults = [ - $listAssetsResultsElement, - ]; - $expectedResponse = new ListAssetsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTotalSize($totalSize); - $expectedResponse->setListAssetsResults($listAssetsResults); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $response = $gapicClient->listAssets($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getListAssetsResults()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/ListAssets', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAssetsExceptionTest() - { - $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->projectName('[PROJECT]'); - try { - $gapicClient->listAssets($formattedParent); - // 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 listBigQueryExportsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $bigQueryExportsElement = new BigQueryExport(); - $bigQueryExports = [ - $bigQueryExportsElement, - ]; - $expectedResponse = new ListBigQueryExportsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setBigQueryExports($bigQueryExports); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $response = $gapicClient->listBigQueryExports($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getBigQueryExports()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/ListBigQueryExports', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listBigQueryExportsExceptionTest() - { - $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->projectName('[PROJECT]'); - try { - $gapicClient->listBigQueryExports($formattedParent); - // 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 listFindingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $totalSize = 705419236; - $listFindingsResultsElement = new ListFindingsResult(); - $listFindingsResults = [ - $listFindingsResultsElement, - ]; - $expectedResponse = new ListFindingsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTotalSize($totalSize); - $expectedResponse->setListFindingsResults($listFindingsResults); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->sourceName('[ORGANIZATION]', '[SOURCE]'); - $response = $gapicClient->listFindings($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getListFindingsResults()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/ListFindings', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listFindingsExceptionTest() - { - $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->sourceName('[ORGANIZATION]', '[SOURCE]'); - try { - $gapicClient->listFindings($formattedParent); - // 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 listMuteConfigsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $muteConfigsElement = new MuteConfig(); - $muteConfigs = [ - $muteConfigsElement, - ]; - $expectedResponse = new ListMuteConfigsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setMuteConfigs($muteConfigs); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $response = $gapicClient->listMuteConfigs($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getMuteConfigs()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/ListMuteConfigs', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listMuteConfigsExceptionTest() - { - $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->projectName('[PROJECT]'); - try { - $gapicClient->listMuteConfigs($formattedParent); - // 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 listNotificationConfigsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $notificationConfigsElement = new NotificationConfig(); - $notificationConfigs = [ - $notificationConfigsElement, - ]; - $expectedResponse = new ListNotificationConfigsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setNotificationConfigs($notificationConfigs); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $response = $gapicClient->listNotificationConfigs($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getNotificationConfigs()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/ListNotificationConfigs', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listNotificationConfigsExceptionTest() - { - $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->projectName('[PROJECT]'); - try { - $gapicClient->listNotificationConfigs($formattedParent); - // 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 listSourcesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $sourcesElement = new Source(); - $sources = [ - $sourcesElement, - ]; - $expectedResponse = new ListSourcesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setSources($sources); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $response = $gapicClient->listSources($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getSources()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/ListSources', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSourcesExceptionTest() - { - $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->projectName('[PROJECT]'); - try { - $gapicClient->listSources($formattedParent); - // 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 runAssetDiscoveryTest() - { - $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/runAssetDiscoveryTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new RunAssetDiscoveryResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/runAssetDiscoveryTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->organizationName('[ORGANIZATION]'); - $response = $gapicClient->runAssetDiscovery($formattedParent); - $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.securitycenter.v1.SecurityCenter/RunAssetDiscovery', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/runAssetDiscoveryTest'); - $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 runAssetDiscoveryExceptionTest() - { - $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/runAssetDiscoveryTest'); - $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 - $formattedParent = $gapicClient->organizationName('[ORGANIZATION]'); - $response = $gapicClient->runAssetDiscovery($formattedParent); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/runAssetDiscoveryTest'); - 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 setFindingStateTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $parent = 'parent-995424086'; - $resourceName = 'resourceName979421212'; - $category = 'category50511102'; - $externalUri = 'externalUri-1385596168'; - $canonicalName = 'canonicalName1385400054'; - $muteInitiator = 'muteInitiator7603081'; - $parentDisplayName = 'parentDisplayName934119773'; - $description = 'description-1724546052'; - $nextSteps = 'nextSteps-921338149'; - $expectedResponse = new Finding(); - $expectedResponse->setName($name2); - $expectedResponse->setParent($parent); - $expectedResponse->setResourceName($resourceName); - $expectedResponse->setCategory($category); - $expectedResponse->setExternalUri($externalUri); - $expectedResponse->setCanonicalName($canonicalName); - $expectedResponse->setMuteInitiator($muteInitiator); - $expectedResponse->setParentDisplayName($parentDisplayName); - $expectedResponse->setDescription($description); - $expectedResponse->setNextSteps($nextSteps); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->findingName('[ORGANIZATION]', '[SOURCE]', '[FINDING]'); - $state = State::STATE_UNSPECIFIED; - $startTime = new Timestamp(); - $response = $gapicClient->setFindingState($formattedName, $state, $startTime); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/SetFindingState', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getState(); - $this->assertProtobufEquals($state, $actualValue); - $actualValue = $actualRequestObject->getStartTime(); - $this->assertProtobufEquals($startTime, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setFindingStateExceptionTest() - { - $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->findingName('[ORGANIZATION]', '[SOURCE]', '[FINDING]'); - $state = State::STATE_UNSPECIFIED; - $startTime = new Timestamp(); - try { - $gapicClient->setFindingState($formattedName, $state, $startTime); - // 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 setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $response = $gapicClient->setIamPolicy($resource, $policy); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $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 - $resource = 'resource-341064690'; - $policy = new Policy(); - try { - $gapicClient->setIamPolicy($resource, $policy); - // 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 setMuteTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $parent = 'parent-995424086'; - $resourceName = 'resourceName979421212'; - $category = 'category50511102'; - $externalUri = 'externalUri-1385596168'; - $canonicalName = 'canonicalName1385400054'; - $muteInitiator = 'muteInitiator7603081'; - $parentDisplayName = 'parentDisplayName934119773'; - $description = 'description-1724546052'; - $nextSteps = 'nextSteps-921338149'; - $expectedResponse = new Finding(); - $expectedResponse->setName($name2); - $expectedResponse->setParent($parent); - $expectedResponse->setResourceName($resourceName); - $expectedResponse->setCategory($category); - $expectedResponse->setExternalUri($externalUri); - $expectedResponse->setCanonicalName($canonicalName); - $expectedResponse->setMuteInitiator($muteInitiator); - $expectedResponse->setParentDisplayName($parentDisplayName); - $expectedResponse->setDescription($description); - $expectedResponse->setNextSteps($nextSteps); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->findingName('[ORGANIZATION]', '[SOURCE]', '[FINDING]'); - $mute = Mute::MUTE_UNSPECIFIED; - $response = $gapicClient->setMute($formattedName, $mute); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/SetMute', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getMute(); - $this->assertProtobufEquals($mute, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setMuteExceptionTest() - { - $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->findingName('[ORGANIZATION]', '[SOURCE]', '[FINDING]'); - $mute = Mute::MUTE_UNSPECIFIED; - try { - $gapicClient->setMute($formattedName, $mute); - // 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 testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $response = $gapicClient->testIamPermissions($resource, $permissions); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $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 - $resource = 'resource-341064690'; - $permissions = []; - try { - $gapicClient->testIamPermissions($resource, $permissions); - // 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 updateBigQueryExportTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $description = 'description-1724546052'; - $filter = 'filter-1274492040'; - $dataset = 'dataset1443214456'; - $mostRecentEditor = 'mostRecentEditor-657770475'; - $principal = 'principal-1812041682'; - $expectedResponse = new BigQueryExport(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setFilter($filter); - $expectedResponse->setDataset($dataset); - $expectedResponse->setMostRecentEditor($mostRecentEditor); - $expectedResponse->setPrincipal($principal); - $transport->addResponse($expectedResponse); - // Mock request - $bigQueryExport = new BigQueryExport(); - $response = $gapicClient->updateBigQueryExport($bigQueryExport); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/UpdateBigQueryExport', $actualFuncCall); - $actualValue = $actualRequestObject->getBigQueryExport(); - $this->assertProtobufEquals($bigQueryExport, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateBigQueryExportExceptionTest() - { - $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 - $bigQueryExport = new BigQueryExport(); - try { - $gapicClient->updateBigQueryExport($bigQueryExport); - // 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 updateExternalSystemTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $externalUid = 'externalUid-1385596452'; - $status = 'status-892481550'; - $expectedResponse = new ExternalSystem(); - $expectedResponse->setName($name); - $expectedResponse->setExternalUid($externalUid); - $expectedResponse->setStatus($status); - $transport->addResponse($expectedResponse); - // Mock request - $externalSystem = new ExternalSystem(); - $response = $gapicClient->updateExternalSystem($externalSystem); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/UpdateExternalSystem', $actualFuncCall); - $actualValue = $actualRequestObject->getExternalSystem(); - $this->assertProtobufEquals($externalSystem, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateExternalSystemExceptionTest() - { - $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 - $externalSystem = new ExternalSystem(); - try { - $gapicClient->updateExternalSystem($externalSystem); - // 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 updateFindingTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $parent = 'parent-995424086'; - $resourceName = 'resourceName979421212'; - $category = 'category50511102'; - $externalUri = 'externalUri-1385596168'; - $canonicalName = 'canonicalName1385400054'; - $muteInitiator = 'muteInitiator7603081'; - $parentDisplayName = 'parentDisplayName934119773'; - $description = 'description-1724546052'; - $nextSteps = 'nextSteps-921338149'; - $expectedResponse = new Finding(); - $expectedResponse->setName($name); - $expectedResponse->setParent($parent); - $expectedResponse->setResourceName($resourceName); - $expectedResponse->setCategory($category); - $expectedResponse->setExternalUri($externalUri); - $expectedResponse->setCanonicalName($canonicalName); - $expectedResponse->setMuteInitiator($muteInitiator); - $expectedResponse->setParentDisplayName($parentDisplayName); - $expectedResponse->setDescription($description); - $expectedResponse->setNextSteps($nextSteps); - $transport->addResponse($expectedResponse); - // Mock request - $finding = new Finding(); - $response = $gapicClient->updateFinding($finding); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/UpdateFinding', $actualFuncCall); - $actualValue = $actualRequestObject->getFinding(); - $this->assertProtobufEquals($finding, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateFindingExceptionTest() - { - $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 - $finding = new Finding(); - try { - $gapicClient->updateFinding($finding); - // 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 updateMuteConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $filter = 'filter-1274492040'; - $mostRecentEditor = 'mostRecentEditor-657770475'; - $expectedResponse = new MuteConfig(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setFilter($filter); - $expectedResponse->setMostRecentEditor($mostRecentEditor); - $transport->addResponse($expectedResponse); - // Mock request - $muteConfig = new MuteConfig(); - $muteConfigFilter = 'muteConfigFilter-1921414637'; - $muteConfig->setFilter($muteConfigFilter); - $response = $gapicClient->updateMuteConfig($muteConfig); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/UpdateMuteConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getMuteConfig(); - $this->assertProtobufEquals($muteConfig, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateMuteConfigExceptionTest() - { - $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 - $muteConfig = new MuteConfig(); - $muteConfigFilter = 'muteConfigFilter-1921414637'; - $muteConfig->setFilter($muteConfigFilter); - try { - $gapicClient->updateMuteConfig($muteConfig); - // 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 updateNotificationConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $description = 'description-1724546052'; - $pubsubTopic = 'pubsubTopic-338126829'; - $serviceAccount = 'serviceAccount-1948028253'; - $expectedResponse = new NotificationConfig(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setPubsubTopic($pubsubTopic); - $expectedResponse->setServiceAccount($serviceAccount); - $transport->addResponse($expectedResponse); - // Mock request - $notificationConfig = new NotificationConfig(); - $response = $gapicClient->updateNotificationConfig($notificationConfig); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/UpdateNotificationConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getNotificationConfig(); - $this->assertProtobufEquals($notificationConfig, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateNotificationConfigExceptionTest() - { - $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 - $notificationConfig = new NotificationConfig(); - try { - $gapicClient->updateNotificationConfig($notificationConfig); - // 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 updateOrganizationSettingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $enableAssetDiscovery = false; - $expectedResponse = new OrganizationSettings(); - $expectedResponse->setName($name); - $expectedResponse->setEnableAssetDiscovery($enableAssetDiscovery); - $transport->addResponse($expectedResponse); - // Mock request - $organizationSettings = new OrganizationSettings(); - $response = $gapicClient->updateOrganizationSettings($organizationSettings); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/UpdateOrganizationSettings', $actualFuncCall); - $actualValue = $actualRequestObject->getOrganizationSettings(); - $this->assertProtobufEquals($organizationSettings, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateOrganizationSettingsExceptionTest() - { - $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 - $organizationSettings = new OrganizationSettings(); - try { - $gapicClient->updateOrganizationSettings($organizationSettings); - // 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 updateSecurityMarksTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $canonicalName = 'canonicalName1385400054'; - $expectedResponse = new SecurityMarks(); - $expectedResponse->setName($name); - $expectedResponse->setCanonicalName($canonicalName); - $transport->addResponse($expectedResponse); - // Mock request - $securityMarks = new SecurityMarks(); - $response = $gapicClient->updateSecurityMarks($securityMarks); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/UpdateSecurityMarks', $actualFuncCall); - $actualValue = $actualRequestObject->getSecurityMarks(); - $this->assertProtobufEquals($securityMarks, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateSecurityMarksExceptionTest() - { - $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 - $securityMarks = new SecurityMarks(); - try { - $gapicClient->updateSecurityMarks($securityMarks); - // 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 updateSourceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $canonicalName = 'canonicalName1385400054'; - $expectedResponse = new Source(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setCanonicalName($canonicalName); - $transport->addResponse($expectedResponse); - // Mock request - $source = new Source(); - $response = $gapicClient->updateSource($source); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycenter.v1.SecurityCenter/UpdateSource', $actualFuncCall); - $actualValue = $actualRequestObject->getSource(); - $this->assertProtobufEquals($source, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateSourceExceptionTest() - { - $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 - $source = new Source(); - try { - $gapicClient->updateSource($source); - // 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()); - } -} diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/Asset.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/Asset.php deleted file mode 100644 index 77eff788a24d..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/Asset.php +++ /dev/null @@ -1,60 +0,0 @@ -internalAddGeneratedFile( - ' - -1google/cloud/securitycenter/v1p1beta1/asset.proto%google.cloud.securitycenter.v1p1beta12google/cloud/securitycenter/v1p1beta1/folder.proto:google/cloud/securitycenter/v1p1beta1/security_marks.protogoogle/protobuf/struct.protogoogle/protobuf/timestamp.proto" -Asset -name ( i -security_center_properties ( 2E.google.cloud.securitycenter.v1p1beta1.Asset.SecurityCenterPropertiesa -resource_properties ( 2D.google.cloud.securitycenter.v1p1beta1.Asset.ResourcePropertiesEntryL -security_marks ( 24.google.cloud.securitycenter.v1p1beta1.SecurityMarks/ - create_time ( 2.google.protobuf.Timestamp/ - update_time - ( 2.google.protobuf.TimestampJ - -iam_policy ( 26.google.cloud.securitycenter.v1p1beta1.Asset.IamPolicy -canonical_name (  -SecurityCenterProperties - resource_name (  - resource_type (  -resource_parent (  -resource_project (  -resource_owners (  -resource_display_name ( $ -resource_parent_display_name ( % -resource_project_display_name ( > -folders - ( 2-.google.cloud.securitycenter.v1p1beta1.Folder - IamPolicy - policy_blob ( Q -ResourcePropertiesEntry -key ( % -value ( 2.google.protobuf.Value:8:A -#securitycenter.googleapis.com/Asset+organizations/{organization}/assets/{asset}folders/{folder}/assets/{asset}!projects/{project}/assets/{asset}B -)com.google.cloud.securitycenter.v1p1beta1PZSgoogle.golang.org/genproto/googleapis/cloud/securitycenter/v1p1beta1;securitycenter%Google.Cloud.SecurityCenter.V1P1Beta1%Google\\Cloud\\SecurityCenter\\V1p1beta1(Google::Cloud::SecurityCenter::V1p1beta1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/Finding.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/Finding.php deleted file mode 100644 index 505a1190ca23794b030ca008068eed17cef2e29f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2389 zcmbVO-EP}96rSz;ICN{cLQ{CbfN@!aI>0KyX|WZ`vdw>S4K%S^yBRtdFld=}xGIuB z(ZSrpFSJM53+!S8w(GvbfE|*O61Q36)i)N&^L;%0&N)2%_WR&8Kwsh}^(ZHTj_`1X z#VN%B_l58HE*?(DW6H7Pp9RdN+{C!v#>ed*Zq!@7F8~_)Q|?e3PkevkQp<7u>BtJH zGv!Ro9O?sXc!QO;%29M1QsJANWZD5`ZY<_?=DdF zPs*KgRZ{IE805&~`la z9Kn1KOF-LmXlWN~PHB5T@Ij3O96Q&M0)aUFmOP$TvX|R7rXHM0p(E^P z5mwb4q^uPxHKWzf-(MB6WZGc+uXVH@)tGS$t;musrf{mXVdT+TKsc0mF|Ed%=yvS( zK$&IKbPcV_RHwxi80PmLn|j9^)G(tx&91~61(bE*f8z65aaGaYMYrfLy7mTe*%a5* z>;T=-xjTU429yg%!{R#5lyZCZ|GTle*&qianuaI%%y^FSiz*khuyJnbW5xHGDurt1 z?@Gon5u)cH<3LJZ+)#8|v9od1%p{c!3*{V6K@AN+Hv(EH8^R9qMlRk4>-^p~G5z%^ zc@cyNZrnq8hj_ln9OCLA=YeoztBp3hSL&5Rnb&j{Wy}s*Jtyvzs)Why-HW|Q4tXM1 z?evq>_7k+KBfp96bbFOvWAO60+iBEVhpk4v@QH!YTBX)&oiqw5NXu;NI2xt5pQCIy zcDIP`b{i*+7p>l__wazJ!E~!uc?JwwwDPpod|F6L-XrL3FOLctV;yClwSO$E*ngzn zRen#QojCHkuSMQNxrQb*NGqt zk9~JUxtvlT%b~so8GojZ09f?36t4PD3hjdbaWJk=iB9ULZdAY%-zCt?;ds`BdMbvN zUXqgB@D$iz)biK#PE)mgQ?(K^E|Z#iL6}L~|1GxbNAH8Aw`j{gybz+t#=CS$Q`)xT pwCzPw+fGb}Ys&ja50VT2E8T-HwQPBZG3SbQtt@p@oufHI{{kO-7i<6k diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/Folder.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/Folder.php deleted file mode 100644 index 638d4b7923b9..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/Folder.php +++ /dev/null @@ -1,30 +0,0 @@ -internalAddGeneratedFile( - ' - -2google/cloud/securitycenter/v1p1beta1/folder.proto%google.cloud.securitycenter.v1p1beta1"G -Folder -resource_folder ( $ -resource_folder_display_name ( B -)com.google.cloud.securitycenter.v1p1beta1B FolderProtoPZSgoogle.golang.org/genproto/googleapis/cloud/securitycenter/v1p1beta1;securitycenter%Google.Cloud.SecurityCenter.V1P1Beta1%Google\\Cloud\\SecurityCenter\\V1p1beta1(Google::Cloud::SecurityCenter::V1p1Beta1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/NotificationConfig.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/NotificationConfig.php deleted file mode 100644 index 235ef45bda37bfcff7d518dada683d7d2efaf111..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1740 zcmbtU-A)rh80Alt0fDTEsi?_-5K5xE7L6B+i2b)0mPRT@vq>|ZPM0yu%w~3$1W2!a z7azcDuYC%yc?7SVon5vq1tr>>w%>kpzVDnpb6)QF2R?WNtAr7OB6Nz#bX~@&ck@Mti#< z!_l@dIL+L7SxwqG*qi?yF{jHN0sbG zGB$#vU6_q`wC#~4x1kgv8JrHGATkteOYa>4^wM9>B`W59>QpH4It6lojwlzl-DlMY zx$5XUlDzCoPiZNhyrK#5e5aH0tSIYb)6Jqi*TI)tVCO$QW30shrZ$~9Y&tVF-O{~e z4)Uob5)QHJR=!OEW7IUp9GHsim>GxT*%{*wnC&EQQ5hjKp^F~?AVPG|LfIQ$ZOoz?^bx5Vl*A`xIxUqHzWIEB_GOj~^sc6rI3S7t?A+eZ~W@ z5D;-hF=-);dB|kuhCVv^Ge2n%uoy@|&>>}Ra`7_L>hbJm?cbN)J4cM~+MBVZWw3Ce zXv~A@F7?!Hh}B$q4rcmfm%!cfe!1RkH9t1Wt@ri4M!8t4)XJsBF=H0otkmkITD`hB zZuideC*bLYR~)OI>M$y+QQ^WxjGpMg39Qq>zrCR}iYcfTHjp8SQoX_gxUK8QNu}_8 z0&FPlucuvO{L^0I43~R|xu)8~atYJXXZ30PB|f)?`G1{QtLk_(bv&Bq@mSQUYo_t| zBwiVZx-$-~9_Rt^8_kDJYXATM diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/NotificationMessage.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/NotificationMessage.php deleted file mode 100644 index e7bba59150d4ec5200d00c9dfe53f3ac02079a69..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1383 zcmbu9O>fgM7{_UO8JJtSRGc1Q(^3f%m2q+@u&%7^u(e_n2NbDt9VfGt*^%Q+8mM20 z55j?u!ig_{gzcnRs|``0r^Zn$T;;qeML{Lr0r2bSAI zh^8dZ;b@6}SmM!V1m>3&vy@ZFwaHCkljl<|xaK6~pG@0*h)J3=!?_w87lPV)!Cn{( z%DfJgOdGqINi(KCEDD|2$(gBz2ex%V(s0Ofs(7ZQnwU_G6Q=8V+Y_%-rL{O7gICsw z@s%R`pjE+^vjZrm3nhB4ZVQ;#|H8i>W4O;n#6^PfWviFuf8f1ml{~Hmy3sv*#j8Q> zMo~SNeIqun?!@-BjeguhZ~j+ht*w&aJDvKgI`wOvK76rWB31QQO8D{D26}Lf0$YIE zE5fHz#5|c=!M7XG@b0yC(MDX(zTGqj_n-UzT7~-6i@m#H5O){lv~M~_uqI>iN`nn_ zo1GiW4t_RJ$5?*7`;*4UT7&yZjGGxedm3D z;r%_gQ~cWd-xhIUwIu2-QAUPlO;qdWd($hC7&|7$t5A&V(AgbV{mynR!l$MAmc05~ NpSsA>ICC^d=ofWn);0hD diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/OrganizationSettings.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/OrganizationSettings.php deleted file mode 100644 index 3787430f994393dde0362e105e0b579b62735fb3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1583 zcmb_c-A>yu7+nk6k720F5JFrakAW!CmZTlm?Me11yu+k9P8(Y2G^8z8NxskLobSiy&Aa#{1}|U}Q_Ovd1K7KO@&v<}GszH( zU@z(SF^7nq#U#Sqgs|R$?amQw)LTc-)ltC`j<5|w#=;0&C}K%q35*g>ky0n^o$8z0N{gp{?7rH8at@!8ZGvx)K=q%8Z){``rrsZOa(~Qxf7X7?g2ibgHs-->x<1PVSSUX+ zR>2acelNnF+6gSZfC$9SF~3+Ys`z6g21~aB9%8gl!sQtipWAlKd&x1UNinM_Wqrh0 z)3_^Ni(qkDz<37c)cT)dBs~%crGG~0KL-nhq9_sRH92De*18wAzx;1qW@|)qs8|dG zfIf=?%(a%8RLfc$Je^Eh1uLy~?cliE>a@MXPQBqBx4TZG*4l41>ZJ!p3C!!b3Ut~B zpGpN|4m@gnR43|internalAddGeneratedFile( - ' - -4google/cloud/securitycenter/v1p1beta1/resource.proto%google.cloud.securitycenter.v1p1beta12google/cloud/securitycenter/v1p1beta1/folder.proto" -Resource -name (  -project (  -project_display_name (  -parent (  -parent_display_name ( C -folders ( 2-.google.cloud.securitycenter.v1p1beta1.FolderBAB -)com.google.cloud.securitycenter.v1p1beta1B ResourceProtoPZSgoogle.golang.org/genproto/googleapis/cloud/securitycenter/v1p1beta1;securitycenter%Google.Cloud.SecurityCenter.V1P1Beta1%Google\\Cloud\\SecurityCenter\\V1p1beta1(Google::Cloud::SecurityCenter::V1p1beta1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/RunAssetDiscoveryResponse.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/RunAssetDiscoveryResponse.php deleted file mode 100644 index 87ed299925376d3d0a28ae7e4c0c3361cd68d5b9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1289 zcmb`H-)_?|6vk;`2#lCUrAgbJ8JpG#aMf|=G0@gzr4n7ErsD!ds$9p-EM<1&IFkn2 z3-KsC$}V^VB<%d#sxjb#-n357`JHn;mdj1`{Q@Fp@HgS%=0l3p**Jnd16_GNGC3oOhG% zjA_#Cs7y>rnle2Nc}nFuQx{Xk(nN}sp}Z&nf}EKrgfiIo4u>W!B$@>MoFDWoKkyg$ z!Kbd*J+%Bi0BCIZaGZ$)TgIuXjLRb6D}d&cWV4u4m};WU*CtP=TyV`v%)b~B_Tikw zDKoU&vGYt&&82`gVI(MP@4$j-V>c6NMB9f|yPnn2Xc!Ev5Q4;k!&0hvqNVaoD8>=f zwfgo+d#5aGaeNNjMUNQYYH}ZHm9d-EAyiCfO6=u*Tfk-gEBK9=b$3o?Zr==r@%2>K zkbJ1u?|3=FK^WE@ADN|S*EMX#ZE*DfeE476(Ap|UDBmlzxL2s&tBoHGuzu&Aw@$#4 zRgtYVV57afdxZW8itYp=-_lwy!K1JgZmns^Pj=TUa=yyu-chCO#tr-&vEi5C G5`bT#+pppP diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/SecurityMarks.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/SecurityMarks.php deleted file mode 100644 index 6a8c600957ce..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/SecurityMarks.php +++ /dev/null @@ -1,37 +0,0 @@ -internalAddGeneratedFile( - ' - -:google/cloud/securitycenter/v1p1beta1/security_marks.proto%google.cloud.securitycenter.v1p1beta1" - SecurityMarks -name ( N -marks ( 2?.google.cloud.securitycenter.v1p1beta1.SecurityMarks.MarksEntry -canonical_name ( , - -MarksEntry -key (  -value ( :8:A -+securitycenter.googleapis.com/SecurityMarks9organizations/{organization}/assets/{asset}/securityMarksNorganizations/{organization}/sources/{source}/findings/{finding}/securityMarks-folders/{folder}/assets/{asset}/securityMarks/projects/{project}/assets/{asset}/securityMarksBfolders/{folder}/sources/{source}/findings/{finding}/securityMarksDprojects/{project}/sources/{source}/findings/{finding}/securityMarksB -)com.google.cloud.securitycenter.v1p1beta1PZSgoogle.golang.org/genproto/googleapis/cloud/securitycenter/v1p1beta1;securitycenter%Google.Cloud.SecurityCenter.V1P1Beta1%Google\\Cloud\\SecurityCenter\\V1p1beta1(Google::Cloud::SecurityCenter::V1p1beta1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/SecuritycenterService.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/SecuritycenterService.php deleted file mode 100644 index ef97e18ab73f501c8d22d3b75d8dfa070a6a4be6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 15638 zcmdrTTWlOxwX=?s_&N{w+HPF;k?k~ToYdK^H-)C-JT!iX#*P~&DVUYEw zGn?X87KloGR3H`ggMNSjfhqywC4__o;w1r6e?U+qWIm{%5)z+?57dIhxv!Z!yR*A9 zj`IQei0!%eoO|A{xpVGf{bn6Knw>Xo(=~jvl3m-(`ZvvN-F1AY?9{SrjcV0&vt?(a zZq-aTm(9*x$u3>FmYtosbnOuU^_+%VHnr@!!u&boIDvj$&V%ItZH_Q(Wq%HM4r$3Zo`yM&t_fIZ@Bg(rJEqw3Vti57G!bB@vW*= z1`#>-qUm|Yx~XX)+uz-%&GnQ9&Zkz7rRnWI%dnr!P>sC>>ZHMR(Ad{0u z0H(cQY(Z|F5Jj>Vs@#o=3sZPTd$2l5Z zkE}h)*J@z^$~!>-;t0e6bzYj~D?G~Z^#?eTVBI8fgfEKXHdtilwgJ(C?+_*&?C@wv z;H$z?gH>PnJ=>suUqM6Dt_c-5&&gNKk2N4N;B#ni-Eg618BwyzSl`t6J9_3l{V{Y* zNS;;LIYvD=ke7o}J-9QS&_2E}(gRQX3ptLVi__;gc~b<7 z`i_E*GOAlswP0YOiGj0}fdYDhdY8P( zbT*?_bZQknIB)u`3%h;J3+Q1uM>YUar-_pmA{=SduAW4N&K$)dRF}{IoE25D7Qvp% z?bKH?2+zAtqfX0pPY^uWs1OGrJY2${z50(kD$Z0`EkD_F+c)fA7RRep0ZY=91xN9s-MoFA$k^%dVwbIEGj2d zWkf4Xhn+Z!(>&8<2hAr`<X=TEpbg|2{!M;H5Xns+KvcsGn2N z!C$|AR=<@&_mTteVyYQH`yCes zJ3*?62Hm?9nsTIeB~2ZvvT2ryi|lh`3+dXMvJy!_OgSI=%r=C)xPI2rU=5_m zI#sVJFMUWjWtY4p>w)3TMIJ$_i;8Y{^VR6T6*SOt;3VobNc&CWO@CoLAup`zsG$R7 z5N(#qHw}B81*t=Y8wqhlXrW`?7J1}W2>NM?T|JNbr9Z*p_FiAQzA`&Aa1ZW7z52`y z{Hox7wD0Qd;*}flM~3Xtr>|YQF+0$semBE>@9t*n|0{3!=3X>Jv=oYr`@;qrt`UEz zvS~)MM=YhVfM(p(2Be2~+be#(hk1O{kr%@jn6%cZTVPy|^^Mitm5l5k*hc$B!_3>; z=XUutD5~k?fHV_5qd!s5e(?k!kQ*XAgbqN3@`73ROSG+I1;T@9NIZpMU%h5*vQ<`M z52AiH%U};l-sr;*ph5mH0zoR*J`7p2N+)C92%;TA(yTd0q146p0R^JS^n$)LPeaN< z)OUSJ{Fw=ZO^+OG_NZ?w=sxH|xgpU|74~*=dwrUAcEuCuc<0uRW5Nrlmxftd1Rg3p znNX`7oY{!z{}5nueb&pd*-nS9fsGF;Xe8#v92-FGT1BaT7G_-6>+nXmdB!CTqjuzp zjPpF|Z&2*4U}%?GgMvZ*4wSBpp7zs>HnSy0=FThE9a8)Q1wFzjjvHeLQ!JrjCvLLK z3xLUl#uazO4(WasCIO7@=!_*CeKCP1^=^h`hs69=L8F`)ewBc}rxVh979A2k%ZA!q zY)O4`MMk` z(bW%j=S8qWxT^B9NfTrCZT)`E7hi%Q_Bj8wWlb!=9{j@$8eyEYMkzd(N~x^~gj9AO z$<#L#DxoFysqPZm%FA;A_DbK=;->f8`Y|r9VB|k8!}9lC+xjTq7PE+dp`ej=WAVhI zYllFHu61BTUqGvKR4h-Qiim}jO3f}1ClfHCZJibr_>17kFq{rv<6~9m9Nv+^+t{4E zD2N(v+QVMut5>-(pOaN3D#{kRxMu<_Hh$u)rQR0HoS=m^jlmk;r5avtO01(!)fS{x2_mTL7Zj)bUKOOu1Ic$*R!8k9qQ zz$VMB_^ITKF$lp*%3PsQ;!op9u81W*G)LhYZ)W&Jm(6l;Qd^-@U@`xpRqklg>=*%M zt+M(h76IQ-)F))WVu7jItG4oV7~^T{^>9*yi$Dn#pG#^Rghg>A^pSJ|r2c`4>&J>32}AMXip{Bk=q6*+av-|S zz~^E!Rw%}f(A)Z9o_HuRFd4*(Qg8Fm|mcWw2(9stDqN=sPhtaw_f^B`6P(DsaljMIs zR>WU}o&+Qov;-|ZiM%Le*`_D?$WD6_kW@ebHL=5@lNo2X1MzPZgs;IRI-*`=7=3*?eI$b#17F9P}50K0hB90QFr>nsW zEZchc+aO0V-Uuhk_-8PQVPb4e$ce`Z?GOl+BrX10Nl?Gcw6j)tMwV#IU?dl-D0w3v z&5(c;Kb?txdQ`^2M>G);emx^*uW_9$UJ(A)C0a8f#-R{mOj;|(;ZR>;f;0=4WkJfR zF1#%rD@u7QghKjt$(9yBm4_fJZx1lzKS7XXjIvTFaqTPv33;UK%Acpv>|CKB3xL%) z@y5gJA7U`UAUF60v(<rp6!dPW!;qI0>9s;60+)H`y1qr{U$gUv=D#DR@D060ZCv^P6R5b%j^Y>rM@> z^yEN|`E}C+ NJK1-wTWAZR{{l5IXD|Q& diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/Source.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/Source.php deleted file mode 100644 index 1634a1df8533..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Securitycenter/V1P1Beta1/Source.php +++ /dev/null @@ -1,34 +0,0 @@ -internalAddGeneratedFile( - ' - -2google/cloud/securitycenter/v1p1beta1/source.proto%google.cloud.securitycenter.v1p1beta1" -Source -name (  - display_name (  - description (  -canonical_name ( :A -$securitycenter.googleapis.com/Source-organizations/{organization}/sources/{source}!folders/{folder}/sources/{source}#projects/{project}/sources/{source}B -)com.google.cloud.securitycenter.v1p1beta1PZSgoogle.golang.org/genproto/googleapis/cloud/securitycenter/v1p1beta1;securitycenter%Google.Cloud.SecurityCenter.V1P1Beta1%Google\\Cloud\\SecurityCenter\\V1p1beta1(Google::Cloud::SecurityCenter::V1p1beta1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Asset.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Asset.php deleted file mode 100644 index 0f552c3e99a7..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Asset.php +++ /dev/null @@ -1,412 +0,0 @@ -google.cloud.securitycenter.v1p1beta1.Asset - */ -class Asset extends \Google\Protobuf\Internal\Message -{ - /** - * The relative resource name of this asset. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name - * Example: - * "organizations/{organization_id}/assets/{asset_id}". - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Security Command Center managed properties. These properties are managed by - * Security Command Center and cannot be modified by the user. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Asset.SecurityCenterProperties security_center_properties = 2; - */ - protected $security_center_properties = null; - /** - * Resource managed properties. These properties are managed and defined by - * the Google Cloud resource and cannot be modified by the user. - * - * Generated from protobuf field map resource_properties = 7; - */ - private $resource_properties; - /** - * User specified security marks. These marks are entirely managed by the user - * and come from the SecurityMarks resource that belongs to the asset. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.SecurityMarks security_marks = 8; - */ - protected $security_marks = null; - /** - * The time at which the asset was created in Security Command Center. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 9; - */ - protected $create_time = null; - /** - * The time at which the asset was last updated or added in Cloud SCC. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 10; - */ - protected $update_time = null; - /** - * Cloud IAM Policy information associated with the Google Cloud resource - * described by the Security Command Center asset. This information is managed - * and defined by the Google Cloud resource and cannot be modified by the - * user. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Asset.IamPolicy iam_policy = 11; - */ - protected $iam_policy = null; - /** - * The canonical name of the resource. It's either - * "organizations/{organization_id}/assets/{asset_id}", - * "folders/{folder_id}/assets/{asset_id}" or - * "projects/{project_number}/assets/{asset_id}", depending on the closest CRM - * ancestor of the resource. - * - * Generated from protobuf field string canonical_name = 13; - */ - protected $canonical_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The relative resource name of this asset. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name - * Example: - * "organizations/{organization_id}/assets/{asset_id}". - * @type \Google\Cloud\SecurityCenter\V1p1beta1\Asset\SecurityCenterProperties $security_center_properties - * Security Command Center managed properties. These properties are managed by - * Security Command Center and cannot be modified by the user. - * @type array|\Google\Protobuf\Internal\MapField $resource_properties - * Resource managed properties. These properties are managed and defined by - * the Google Cloud resource and cannot be modified by the user. - * @type \Google\Cloud\SecurityCenter\V1p1beta1\SecurityMarks $security_marks - * User specified security marks. These marks are entirely managed by the user - * and come from the SecurityMarks resource that belongs to the asset. - * @type \Google\Protobuf\Timestamp $create_time - * The time at which the asset was created in Security Command Center. - * @type \Google\Protobuf\Timestamp $update_time - * The time at which the asset was last updated or added in Cloud SCC. - * @type \Google\Cloud\SecurityCenter\V1p1beta1\Asset\IamPolicy $iam_policy - * Cloud IAM Policy information associated with the Google Cloud resource - * described by the Security Command Center asset. This information is managed - * and defined by the Google Cloud resource and cannot be modified by the - * user. - * @type string $canonical_name - * The canonical name of the resource. It's either - * "organizations/{organization_id}/assets/{asset_id}", - * "folders/{folder_id}/assets/{asset_id}" or - * "projects/{project_number}/assets/{asset_id}", depending on the closest CRM - * ancestor of the resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\Asset::initOnce(); - parent::__construct($data); - } - - /** - * The relative resource name of this asset. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name - * Example: - * "organizations/{organization_id}/assets/{asset_id}". - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The relative resource name of this asset. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name - * Example: - * "organizations/{organization_id}/assets/{asset_id}". - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Security Command Center managed properties. These properties are managed by - * Security Command Center and cannot be modified by the user. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Asset.SecurityCenterProperties security_center_properties = 2; - * @return \Google\Cloud\SecurityCenter\V1p1beta1\Asset\SecurityCenterProperties|null - */ - public function getSecurityCenterProperties() - { - return $this->security_center_properties; - } - - public function hasSecurityCenterProperties() - { - return isset($this->security_center_properties); - } - - public function clearSecurityCenterProperties() - { - unset($this->security_center_properties); - } - - /** - * Security Command Center managed properties. These properties are managed by - * Security Command Center and cannot be modified by the user. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Asset.SecurityCenterProperties security_center_properties = 2; - * @param \Google\Cloud\SecurityCenter\V1p1beta1\Asset\SecurityCenterProperties $var - * @return $this - */ - public function setSecurityCenterProperties($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1p1beta1\Asset\SecurityCenterProperties::class); - $this->security_center_properties = $var; - - return $this; - } - - /** - * Resource managed properties. These properties are managed and defined by - * the Google Cloud resource and cannot be modified by the user. - * - * Generated from protobuf field map resource_properties = 7; - * @return \Google\Protobuf\Internal\MapField - */ - public function getResourceProperties() - { - return $this->resource_properties; - } - - /** - * Resource managed properties. These properties are managed and defined by - * the Google Cloud resource and cannot be modified by the user. - * - * Generated from protobuf field map resource_properties = 7; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setResourceProperties($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Value::class); - $this->resource_properties = $arr; - - return $this; - } - - /** - * User specified security marks. These marks are entirely managed by the user - * and come from the SecurityMarks resource that belongs to the asset. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.SecurityMarks security_marks = 8; - * @return \Google\Cloud\SecurityCenter\V1p1beta1\SecurityMarks|null - */ - public function getSecurityMarks() - { - return $this->security_marks; - } - - public function hasSecurityMarks() - { - return isset($this->security_marks); - } - - public function clearSecurityMarks() - { - unset($this->security_marks); - } - - /** - * User specified security marks. These marks are entirely managed by the user - * and come from the SecurityMarks resource that belongs to the asset. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.SecurityMarks security_marks = 8; - * @param \Google\Cloud\SecurityCenter\V1p1beta1\SecurityMarks $var - * @return $this - */ - public function setSecurityMarks($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1p1beta1\SecurityMarks::class); - $this->security_marks = $var; - - return $this; - } - - /** - * The time at which the asset was created in Security Command Center. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 9; - * @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); - } - - /** - * The time at which the asset was created in Security Command Center. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 9; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * The time at which the asset was last updated or added in Cloud SCC. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 10; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * The time at which the asset was last updated or added in Cloud SCC. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 10; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Cloud IAM Policy information associated with the Google Cloud resource - * described by the Security Command Center asset. This information is managed - * and defined by the Google Cloud resource and cannot be modified by the - * user. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Asset.IamPolicy iam_policy = 11; - * @return \Google\Cloud\SecurityCenter\V1p1beta1\Asset\IamPolicy|null - */ - public function getIamPolicy() - { - return $this->iam_policy; - } - - public function hasIamPolicy() - { - return isset($this->iam_policy); - } - - public function clearIamPolicy() - { - unset($this->iam_policy); - } - - /** - * Cloud IAM Policy information associated with the Google Cloud resource - * described by the Security Command Center asset. This information is managed - * and defined by the Google Cloud resource and cannot be modified by the - * user. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Asset.IamPolicy iam_policy = 11; - * @param \Google\Cloud\SecurityCenter\V1p1beta1\Asset\IamPolicy $var - * @return $this - */ - public function setIamPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1p1beta1\Asset\IamPolicy::class); - $this->iam_policy = $var; - - return $this; - } - - /** - * The canonical name of the resource. It's either - * "organizations/{organization_id}/assets/{asset_id}", - * "folders/{folder_id}/assets/{asset_id}" or - * "projects/{project_number}/assets/{asset_id}", depending on the closest CRM - * ancestor of the resource. - * - * Generated from protobuf field string canonical_name = 13; - * @return string - */ - public function getCanonicalName() - { - return $this->canonical_name; - } - - /** - * The canonical name of the resource. It's either - * "organizations/{organization_id}/assets/{asset_id}", - * "folders/{folder_id}/assets/{asset_id}" or - * "projects/{project_number}/assets/{asset_id}", depending on the closest CRM - * ancestor of the resource. - * - * Generated from protobuf field string canonical_name = 13; - * @param string $var - * @return $this - */ - public function setCanonicalName($var) - { - GPBUtil::checkString($var, True); - $this->canonical_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Asset/IamPolicy.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Asset/IamPolicy.php deleted file mode 100644 index c39f062ad72f..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Asset/IamPolicy.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.securitycenter.v1p1beta1.Asset.IamPolicy - */ -class IamPolicy extends \Google\Protobuf\Internal\Message -{ - /** - * The JSON representation of the Policy associated with the asset. - * See https://cloud.google.com/iam/docs/reference/rest/v1/Policy for - * format details. - * - * Generated from protobuf field string policy_blob = 1; - */ - protected $policy_blob = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $policy_blob - * The JSON representation of the Policy associated with the asset. - * See https://cloud.google.com/iam/docs/reference/rest/v1/Policy for - * format details. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\Asset::initOnce(); - parent::__construct($data); - } - - /** - * The JSON representation of the Policy associated with the asset. - * See https://cloud.google.com/iam/docs/reference/rest/v1/Policy for - * format details. - * - * Generated from protobuf field string policy_blob = 1; - * @return string - */ - public function getPolicyBlob() - { - return $this->policy_blob; - } - - /** - * The JSON representation of the Policy associated with the asset. - * See https://cloud.google.com/iam/docs/reference/rest/v1/Policy for - * format details. - * - * Generated from protobuf field string policy_blob = 1; - * @param string $var - * @return $this - */ - public function setPolicyBlob($var) - { - GPBUtil::checkString($var, True); - $this->policy_blob = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(IamPolicy::class, \Google\Cloud\SecurityCenter\V1p1beta1\Asset_IamPolicy::class); - diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Asset/SecurityCenterProperties.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Asset/SecurityCenterProperties.php deleted file mode 100644 index 45ece235170d..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Asset/SecurityCenterProperties.php +++ /dev/null @@ -1,379 +0,0 @@ -google.cloud.securitycenter.v1p1beta1.Asset.SecurityCenterProperties - */ -class SecurityCenterProperties extends \Google\Protobuf\Internal\Message -{ - /** - * The full resource name of the Google Cloud resource this asset - * represents. This field is immutable after create time. See: - * https://cloud.google.com/apis/design/resource_names#full_resource_name - * - * Generated from protobuf field string resource_name = 1; - */ - protected $resource_name = ''; - /** - * The type of the Google Cloud resource. Examples include: APPLICATION, - * PROJECT, and ORGANIZATION. This is a case insensitive field defined by - * Security Command Center and/or the producer of the resource and is - * immutable after create time. - * - * Generated from protobuf field string resource_type = 2; - */ - protected $resource_type = ''; - /** - * The full resource name of the immediate parent of the resource. See: - * https://cloud.google.com/apis/design/resource_names#full_resource_name - * - * Generated from protobuf field string resource_parent = 3; - */ - protected $resource_parent = ''; - /** - * The full resource name of the project the resource belongs to. See: - * https://cloud.google.com/apis/design/resource_names#full_resource_name - * - * Generated from protobuf field string resource_project = 4; - */ - protected $resource_project = ''; - /** - * Owners of the Google Cloud resource. - * - * Generated from protobuf field repeated string resource_owners = 5; - */ - private $resource_owners; - /** - * The user defined display name for this resource. - * - * Generated from protobuf field string resource_display_name = 6; - */ - protected $resource_display_name = ''; - /** - * The user defined display name for the parent of this resource. - * - * Generated from protobuf field string resource_parent_display_name = 7; - */ - protected $resource_parent_display_name = ''; - /** - * The user defined display name for the project of this resource. - * - * Generated from protobuf field string resource_project_display_name = 8; - */ - protected $resource_project_display_name = ''; - /** - * Contains a Folder message for each folder in the assets ancestry. - * The first folder is the deepest nested folder, and the last folder is the - * folder directly under the Organization. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1p1beta1.Folder folders = 10; - */ - private $folders; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $resource_name - * The full resource name of the Google Cloud resource this asset - * represents. This field is immutable after create time. See: - * https://cloud.google.com/apis/design/resource_names#full_resource_name - * @type string $resource_type - * The type of the Google Cloud resource. Examples include: APPLICATION, - * PROJECT, and ORGANIZATION. This is a case insensitive field defined by - * Security Command Center and/or the producer of the resource and is - * immutable after create time. - * @type string $resource_parent - * The full resource name of the immediate parent of the resource. See: - * https://cloud.google.com/apis/design/resource_names#full_resource_name - * @type string $resource_project - * The full resource name of the project the resource belongs to. See: - * https://cloud.google.com/apis/design/resource_names#full_resource_name - * @type array|\Google\Protobuf\Internal\RepeatedField $resource_owners - * Owners of the Google Cloud resource. - * @type string $resource_display_name - * The user defined display name for this resource. - * @type string $resource_parent_display_name - * The user defined display name for the parent of this resource. - * @type string $resource_project_display_name - * The user defined display name for the project of this resource. - * @type array<\Google\Cloud\SecurityCenter\V1p1beta1\Folder>|\Google\Protobuf\Internal\RepeatedField $folders - * Contains a Folder message for each folder in the assets ancestry. - * The first folder is the deepest nested folder, and the last folder is the - * folder directly under the Organization. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\Asset::initOnce(); - parent::__construct($data); - } - - /** - * The full resource name of the Google Cloud resource this asset - * represents. This field is immutable after create time. See: - * https://cloud.google.com/apis/design/resource_names#full_resource_name - * - * Generated from protobuf field string resource_name = 1; - * @return string - */ - public function getResourceName() - { - return $this->resource_name; - } - - /** - * The full resource name of the Google Cloud resource this asset - * represents. This field is immutable after create time. See: - * https://cloud.google.com/apis/design/resource_names#full_resource_name - * - * Generated from protobuf field string resource_name = 1; - * @param string $var - * @return $this - */ - public function setResourceName($var) - { - GPBUtil::checkString($var, True); - $this->resource_name = $var; - - return $this; - } - - /** - * The type of the Google Cloud resource. Examples include: APPLICATION, - * PROJECT, and ORGANIZATION. This is a case insensitive field defined by - * Security Command Center and/or the producer of the resource and is - * immutable after create time. - * - * Generated from protobuf field string resource_type = 2; - * @return string - */ - public function getResourceType() - { - return $this->resource_type; - } - - /** - * The type of the Google Cloud resource. Examples include: APPLICATION, - * PROJECT, and ORGANIZATION. This is a case insensitive field defined by - * Security Command Center and/or the producer of the resource and is - * immutable after create time. - * - * Generated from protobuf field string resource_type = 2; - * @param string $var - * @return $this - */ - public function setResourceType($var) - { - GPBUtil::checkString($var, True); - $this->resource_type = $var; - - return $this; - } - - /** - * The full resource name of the immediate parent of the resource. See: - * https://cloud.google.com/apis/design/resource_names#full_resource_name - * - * Generated from protobuf field string resource_parent = 3; - * @return string - */ - public function getResourceParent() - { - return $this->resource_parent; - } - - /** - * The full resource name of the immediate parent of the resource. See: - * https://cloud.google.com/apis/design/resource_names#full_resource_name - * - * Generated from protobuf field string resource_parent = 3; - * @param string $var - * @return $this - */ - public function setResourceParent($var) - { - GPBUtil::checkString($var, True); - $this->resource_parent = $var; - - return $this; - } - - /** - * The full resource name of the project the resource belongs to. See: - * https://cloud.google.com/apis/design/resource_names#full_resource_name - * - * Generated from protobuf field string resource_project = 4; - * @return string - */ - public function getResourceProject() - { - return $this->resource_project; - } - - /** - * The full resource name of the project the resource belongs to. See: - * https://cloud.google.com/apis/design/resource_names#full_resource_name - * - * Generated from protobuf field string resource_project = 4; - * @param string $var - * @return $this - */ - public function setResourceProject($var) - { - GPBUtil::checkString($var, True); - $this->resource_project = $var; - - return $this; - } - - /** - * Owners of the Google Cloud resource. - * - * Generated from protobuf field repeated string resource_owners = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getResourceOwners() - { - return $this->resource_owners; - } - - /** - * Owners of the Google Cloud resource. - * - * Generated from protobuf field repeated string resource_owners = 5; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setResourceOwners($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->resource_owners = $arr; - - return $this; - } - - /** - * The user defined display name for this resource. - * - * Generated from protobuf field string resource_display_name = 6; - * @return string - */ - public function getResourceDisplayName() - { - return $this->resource_display_name; - } - - /** - * The user defined display name for this resource. - * - * Generated from protobuf field string resource_display_name = 6; - * @param string $var - * @return $this - */ - public function setResourceDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->resource_display_name = $var; - - return $this; - } - - /** - * The user defined display name for the parent of this resource. - * - * Generated from protobuf field string resource_parent_display_name = 7; - * @return string - */ - public function getResourceParentDisplayName() - { - return $this->resource_parent_display_name; - } - - /** - * The user defined display name for the parent of this resource. - * - * Generated from protobuf field string resource_parent_display_name = 7; - * @param string $var - * @return $this - */ - public function setResourceParentDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->resource_parent_display_name = $var; - - return $this; - } - - /** - * The user defined display name for the project of this resource. - * - * Generated from protobuf field string resource_project_display_name = 8; - * @return string - */ - public function getResourceProjectDisplayName() - { - return $this->resource_project_display_name; - } - - /** - * The user defined display name for the project of this resource. - * - * Generated from protobuf field string resource_project_display_name = 8; - * @param string $var - * @return $this - */ - public function setResourceProjectDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->resource_project_display_name = $var; - - return $this; - } - - /** - * Contains a Folder message for each folder in the assets ancestry. - * The first folder is the deepest nested folder, and the last folder is the - * folder directly under the Organization. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1p1beta1.Folder folders = 10; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFolders() - { - return $this->folders; - } - - /** - * Contains a Folder message for each folder in the assets ancestry. - * The first folder is the deepest nested folder, and the last folder is the - * folder directly under the Organization. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1p1beta1.Folder folders = 10; - * @param array<\Google\Cloud\SecurityCenter\V1p1beta1\Folder>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFolders($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1p1beta1\Folder::class); - $this->folders = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SecurityCenterProperties::class, \Google\Cloud\SecurityCenter\V1p1beta1\Asset_SecurityCenterProperties::class); - diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Asset_IamPolicy.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Asset_IamPolicy.php deleted file mode 100644 index 3b0c90b985fb..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Asset_IamPolicy.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.securitycenter.v1p1beta1.CreateFindingRequest - */ -class CreateFindingRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the new finding's parent. Its format should be - * "organizations/[organization_id]/sources/[source_id]". - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Unique identifier provided by the client within the parent scope. - * - * Generated from protobuf field string finding_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $finding_id = ''; - /** - * Required. The Finding being created. The name and security_marks will be ignored as - * they are both output only fields on this resource. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Finding finding = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $finding = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Resource name of the new finding's parent. Its format should be - * "organizations/[organization_id]/sources/[source_id]". - * @type string $finding_id - * Required. Unique identifier provided by the client within the parent scope. - * @type \Google\Cloud\SecurityCenter\V1p1beta1\Finding $finding - * Required. The Finding being created. The name and security_marks will be ignored as - * they are both output only fields on this resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the new finding's parent. Its format should be - * "organizations/[organization_id]/sources/[source_id]". - * - * 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. Resource name of the new finding's parent. Its format should be - * "organizations/[organization_id]/sources/[source_id]". - * - * 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; - } - - /** - * Required. Unique identifier provided by the client within the parent scope. - * - * Generated from protobuf field string finding_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getFindingId() - { - return $this->finding_id; - } - - /** - * Required. Unique identifier provided by the client within the parent scope. - * - * Generated from protobuf field string finding_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setFindingId($var) - { - GPBUtil::checkString($var, True); - $this->finding_id = $var; - - return $this; - } - - /** - * Required. The Finding being created. The name and security_marks will be ignored as - * they are both output only fields on this resource. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Finding finding = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\SecurityCenter\V1p1beta1\Finding|null - */ - public function getFinding() - { - return $this->finding; - } - - public function hasFinding() - { - return isset($this->finding); - } - - public function clearFinding() - { - unset($this->finding); - } - - /** - * Required. The Finding being created. The name and security_marks will be ignored as - * they are both output only fields on this resource. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Finding finding = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\SecurityCenter\V1p1beta1\Finding $var - * @return $this - */ - public function setFinding($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1p1beta1\Finding::class); - $this->finding = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/CreateNotificationConfigRequest.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/CreateNotificationConfigRequest.php deleted file mode 100644 index 350e616be37a..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/CreateNotificationConfigRequest.php +++ /dev/null @@ -1,161 +0,0 @@ -google.cloud.securitycenter.v1p1beta1.CreateNotificationConfigRequest - */ -class CreateNotificationConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the new notification config's parent. Its format is - * "organizations/[organization_id]". - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Unique identifier provided by the client within the parent scope. - * It must be between 1 and 128 characters, and contains alphanumeric - * characters, underscores or hyphens only. - * - * Generated from protobuf field string config_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $config_id = ''; - /** - * Required. The notification config being created. The name and the service account - * will be ignored as they are both output only fields on this resource. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.NotificationConfig notification_config = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $notification_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Resource name of the new notification config's parent. Its format is - * "organizations/[organization_id]". - * @type string $config_id - * Required. Unique identifier provided by the client within the parent scope. - * It must be between 1 and 128 characters, and contains alphanumeric - * characters, underscores or hyphens only. - * @type \Google\Cloud\SecurityCenter\V1p1beta1\NotificationConfig $notification_config - * Required. The notification config being created. The name and the service account - * will be ignored as they are both output only fields on this resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the new notification config's parent. Its format is - * "organizations/[organization_id]". - * - * 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. Resource name of the new notification config's parent. Its format is - * "organizations/[organization_id]". - * - * 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; - } - - /** - * Required. Unique identifier provided by the client within the parent scope. - * It must be between 1 and 128 characters, and contains alphanumeric - * characters, underscores or hyphens only. - * - * Generated from protobuf field string config_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getConfigId() - { - return $this->config_id; - } - - /** - * Required. Unique identifier provided by the client within the parent scope. - * It must be between 1 and 128 characters, and contains alphanumeric - * characters, underscores or hyphens only. - * - * Generated from protobuf field string config_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setConfigId($var) - { - GPBUtil::checkString($var, True); - $this->config_id = $var; - - return $this; - } - - /** - * Required. The notification config being created. The name and the service account - * will be ignored as they are both output only fields on this resource. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.NotificationConfig notification_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\SecurityCenter\V1p1beta1\NotificationConfig|null - */ - public function getNotificationConfig() - { - return $this->notification_config; - } - - public function hasNotificationConfig() - { - return isset($this->notification_config); - } - - public function clearNotificationConfig() - { - unset($this->notification_config); - } - - /** - * Required. The notification config being created. The name and the service account - * will be ignored as they are both output only fields on this resource. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.NotificationConfig notification_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\SecurityCenter\V1p1beta1\NotificationConfig $var - * @return $this - */ - public function setNotificationConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1p1beta1\NotificationConfig::class); - $this->notification_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/CreateSourceRequest.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/CreateSourceRequest.php deleted file mode 100644 index b9856ab4564a..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/CreateSourceRequest.php +++ /dev/null @@ -1,119 +0,0 @@ -google.cloud.securitycenter.v1p1beta1.CreateSourceRequest - */ -class CreateSourceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the new source's parent. Its format should be - * "organizations/[organization_id]". - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The Source being created, only the display_name and description will be - * used. All other fields will be ignored. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $source = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Resource name of the new source's parent. Its format should be - * "organizations/[organization_id]". - * @type \Google\Cloud\SecurityCenter\V1p1beta1\Source $source - * Required. The Source being created, only the display_name and description will be - * used. All other fields will be ignored. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the new source's parent. Its format should be - * "organizations/[organization_id]". - * - * 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. Resource name of the new source's parent. Its format should be - * "organizations/[organization_id]". - * - * 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; - } - - /** - * Required. The Source being created, only the display_name and description will be - * used. All other fields will be ignored. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\SecurityCenter\V1p1beta1\Source|null - */ - public function getSource() - { - return $this->source; - } - - public function hasSource() - { - return isset($this->source); - } - - public function clearSource() - { - unset($this->source); - } - - /** - * Required. The Source being created, only the display_name and description will be - * used. All other fields will be ignored. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\SecurityCenter\V1p1beta1\Source $var - * @return $this - */ - public function setSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1p1beta1\Source::class); - $this->source = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/DeleteNotificationConfigRequest.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/DeleteNotificationConfigRequest.php deleted file mode 100644 index 677c4d41b9bf..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/DeleteNotificationConfigRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.securitycenter.v1p1beta1.DeleteNotificationConfigRequest - */ -class DeleteNotificationConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the notification config to delete. Its format is - * "organizations/[organization_id]/notificationConfigs/[config_id]". - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the notification config to delete. Its format is - * "organizations/[organization_id]/notificationConfigs/[config_id]". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the notification config to delete. Its format is - * "organizations/[organization_id]/notificationConfigs/[config_id]". - * - * 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 notification config to delete. Its format is - * "organizations/[organization_id]/notificationConfigs/[config_id]". - * - * 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/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Finding.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Finding.php deleted file mode 100644 index 572c4c7113fd..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Finding.php +++ /dev/null @@ -1,603 +0,0 @@ -google.cloud.securitycenter.v1p1beta1.Finding - */ -class Finding extends \Google\Protobuf\Internal\Message -{ - /** - * The relative resource name of this finding. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name - * Example: - * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}" - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The relative resource name of the source the finding belongs to. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name - * This field is immutable after creation time. - * For example: - * "organizations/{organization_id}/sources/{source_id}" - * - * Generated from protobuf field string parent = 2; - */ - protected $parent = ''; - /** - * For findings on Google Cloud resources, the full resource - * name of the Google Cloud resource this finding is for. See: - * https://cloud.google.com/apis/design/resource_names#full_resource_name - * When the finding is for a non-Google Cloud resource, the resourceName can - * be a customer or partner defined string. This field is immutable after - * creation time. - * - * Generated from protobuf field string resource_name = 3; - */ - protected $resource_name = ''; - /** - * The state of the finding. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Finding.State state = 4; - */ - protected $state = 0; - /** - * The additional taxonomy group within findings from a given source. - * This field is immutable after creation time. - * Example: "XSS_FLASH_INJECTION" - * - * Generated from protobuf field string category = 5; - */ - protected $category = ''; - /** - * The URI that, if available, points to a web page outside of Security - * Command Center where additional information about the finding can be found. - * This field is guaranteed to be either empty or a well formed URL. - * - * Generated from protobuf field string external_uri = 6; - */ - protected $external_uri = ''; - /** - * Source specific properties. These properties are managed by the source - * that writes the finding. The key names in the source_properties map must be - * between 1 and 255 characters, and must start with a letter and contain - * alphanumeric characters or underscores only. - * - * Generated from protobuf field map source_properties = 7; - */ - private $source_properties; - /** - * Output only. User specified security marks. These marks are entirely - * managed by the user and come from the SecurityMarks resource that belongs - * to the finding. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.SecurityMarks security_marks = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $security_marks = null; - /** - * The time at which the event took place, or when an update to the finding - * occurred. For example, if the finding represents an open firewall it would - * capture the time the detector believes the firewall became open. The - * accuracy is determined by the detector. If the finding were to be resolved - * afterward, this time would reflect when the finding was resolved. Must not - * be set to a value greater than the current timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp event_time = 9; - */ - protected $event_time = null; - /** - * The time at which the finding was created in Security Command Center. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 10; - */ - protected $create_time = null; - /** - * The severity of the finding. This field is managed by the source that - * writes the finding. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Finding.Severity severity = 13; - */ - protected $severity = 0; - /** - * The canonical name of the finding. It's either - * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", - * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}" or - * "projects/{project_number}/sources/{source_id}/findings/{finding_id}", - * depending on the closest CRM ancestor of the resource associated with the - * finding. - * - * Generated from protobuf field string canonical_name = 14; - */ - protected $canonical_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The relative resource name of this finding. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name - * Example: - * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}" - * @type string $parent - * The relative resource name of the source the finding belongs to. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name - * This field is immutable after creation time. - * For example: - * "organizations/{organization_id}/sources/{source_id}" - * @type string $resource_name - * For findings on Google Cloud resources, the full resource - * name of the Google Cloud resource this finding is for. See: - * https://cloud.google.com/apis/design/resource_names#full_resource_name - * When the finding is for a non-Google Cloud resource, the resourceName can - * be a customer or partner defined string. This field is immutable after - * creation time. - * @type int $state - * The state of the finding. - * @type string $category - * The additional taxonomy group within findings from a given source. - * This field is immutable after creation time. - * Example: "XSS_FLASH_INJECTION" - * @type string $external_uri - * The URI that, if available, points to a web page outside of Security - * Command Center where additional information about the finding can be found. - * This field is guaranteed to be either empty or a well formed URL. - * @type array|\Google\Protobuf\Internal\MapField $source_properties - * Source specific properties. These properties are managed by the source - * that writes the finding. The key names in the source_properties map must be - * between 1 and 255 characters, and must start with a letter and contain - * alphanumeric characters or underscores only. - * @type \Google\Cloud\SecurityCenter\V1p1beta1\SecurityMarks $security_marks - * Output only. User specified security marks. These marks are entirely - * managed by the user and come from the SecurityMarks resource that belongs - * to the finding. - * @type \Google\Protobuf\Timestamp $event_time - * The time at which the event took place, or when an update to the finding - * occurred. For example, if the finding represents an open firewall it would - * capture the time the detector believes the firewall became open. The - * accuracy is determined by the detector. If the finding were to be resolved - * afterward, this time would reflect when the finding was resolved. Must not - * be set to a value greater than the current timestamp. - * @type \Google\Protobuf\Timestamp $create_time - * The time at which the finding was created in Security Command Center. - * @type int $severity - * The severity of the finding. This field is managed by the source that - * writes the finding. - * @type string $canonical_name - * The canonical name of the finding. It's either - * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", - * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}" or - * "projects/{project_number}/sources/{source_id}/findings/{finding_id}", - * depending on the closest CRM ancestor of the resource associated with the - * finding. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\Finding::initOnce(); - parent::__construct($data); - } - - /** - * The relative resource name of this finding. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name - * Example: - * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}" - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The relative resource name of this finding. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name - * Example: - * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}" - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The relative resource name of the source the finding belongs to. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name - * This field is immutable after creation time. - * For example: - * "organizations/{organization_id}/sources/{source_id}" - * - * Generated from protobuf field string parent = 2; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * The relative resource name of the source the finding belongs to. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name - * This field is immutable after creation time. - * For example: - * "organizations/{organization_id}/sources/{source_id}" - * - * Generated from protobuf field string parent = 2; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * For findings on Google Cloud resources, the full resource - * name of the Google Cloud resource this finding is for. See: - * https://cloud.google.com/apis/design/resource_names#full_resource_name - * When the finding is for a non-Google Cloud resource, the resourceName can - * be a customer or partner defined string. This field is immutable after - * creation time. - * - * Generated from protobuf field string resource_name = 3; - * @return string - */ - public function getResourceName() - { - return $this->resource_name; - } - - /** - * For findings on Google Cloud resources, the full resource - * name of the Google Cloud resource this finding is for. See: - * https://cloud.google.com/apis/design/resource_names#full_resource_name - * When the finding is for a non-Google Cloud resource, the resourceName can - * be a customer or partner defined string. This field is immutable after - * creation time. - * - * Generated from protobuf field string resource_name = 3; - * @param string $var - * @return $this - */ - public function setResourceName($var) - { - GPBUtil::checkString($var, True); - $this->resource_name = $var; - - return $this; - } - - /** - * The state of the finding. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Finding.State state = 4; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The state of the finding. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Finding.State state = 4; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1p1beta1\Finding\State::class); - $this->state = $var; - - return $this; - } - - /** - * The additional taxonomy group within findings from a given source. - * This field is immutable after creation time. - * Example: "XSS_FLASH_INJECTION" - * - * Generated from protobuf field string category = 5; - * @return string - */ - public function getCategory() - { - return $this->category; - } - - /** - * The additional taxonomy group within findings from a given source. - * This field is immutable after creation time. - * Example: "XSS_FLASH_INJECTION" - * - * Generated from protobuf field string category = 5; - * @param string $var - * @return $this - */ - public function setCategory($var) - { - GPBUtil::checkString($var, True); - $this->category = $var; - - return $this; - } - - /** - * The URI that, if available, points to a web page outside of Security - * Command Center where additional information about the finding can be found. - * This field is guaranteed to be either empty or a well formed URL. - * - * Generated from protobuf field string external_uri = 6; - * @return string - */ - public function getExternalUri() - { - return $this->external_uri; - } - - /** - * The URI that, if available, points to a web page outside of Security - * Command Center where additional information about the finding can be found. - * This field is guaranteed to be either empty or a well formed URL. - * - * Generated from protobuf field string external_uri = 6; - * @param string $var - * @return $this - */ - public function setExternalUri($var) - { - GPBUtil::checkString($var, True); - $this->external_uri = $var; - - return $this; - } - - /** - * Source specific properties. These properties are managed by the source - * that writes the finding. The key names in the source_properties map must be - * between 1 and 255 characters, and must start with a letter and contain - * alphanumeric characters or underscores only. - * - * Generated from protobuf field map source_properties = 7; - * @return \Google\Protobuf\Internal\MapField - */ - public function getSourceProperties() - { - return $this->source_properties; - } - - /** - * Source specific properties. These properties are managed by the source - * that writes the finding. The key names in the source_properties map must be - * between 1 and 255 characters, and must start with a letter and contain - * alphanumeric characters or underscores only. - * - * Generated from protobuf field map source_properties = 7; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setSourceProperties($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Value::class); - $this->source_properties = $arr; - - return $this; - } - - /** - * Output only. User specified security marks. These marks are entirely - * managed by the user and come from the SecurityMarks resource that belongs - * to the finding. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.SecurityMarks security_marks = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\SecurityCenter\V1p1beta1\SecurityMarks|null - */ - public function getSecurityMarks() - { - return $this->security_marks; - } - - public function hasSecurityMarks() - { - return isset($this->security_marks); - } - - public function clearSecurityMarks() - { - unset($this->security_marks); - } - - /** - * Output only. User specified security marks. These marks are entirely - * managed by the user and come from the SecurityMarks resource that belongs - * to the finding. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.SecurityMarks security_marks = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\SecurityCenter\V1p1beta1\SecurityMarks $var - * @return $this - */ - public function setSecurityMarks($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1p1beta1\SecurityMarks::class); - $this->security_marks = $var; - - return $this; - } - - /** - * The time at which the event took place, or when an update to the finding - * occurred. For example, if the finding represents an open firewall it would - * capture the time the detector believes the firewall became open. The - * accuracy is determined by the detector. If the finding were to be resolved - * afterward, this time would reflect when the finding was resolved. Must not - * be set to a value greater than the current timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp event_time = 9; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEventTime() - { - return $this->event_time; - } - - public function hasEventTime() - { - return isset($this->event_time); - } - - public function clearEventTime() - { - unset($this->event_time); - } - - /** - * The time at which the event took place, or when an update to the finding - * occurred. For example, if the finding represents an open firewall it would - * capture the time the detector believes the firewall became open. The - * accuracy is determined by the detector. If the finding were to be resolved - * afterward, this time would reflect when the finding was resolved. Must not - * be set to a value greater than the current timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp event_time = 9; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEventTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->event_time = $var; - - return $this; - } - - /** - * The time at which the finding was created in Security Command Center. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 10; - * @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); - } - - /** - * The time at which the finding was created in Security Command Center. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 10; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * The severity of the finding. This field is managed by the source that - * writes the finding. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Finding.Severity severity = 13; - * @return int - */ - public function getSeverity() - { - return $this->severity; - } - - /** - * The severity of the finding. This field is managed by the source that - * writes the finding. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Finding.Severity severity = 13; - * @param int $var - * @return $this - */ - public function setSeverity($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1p1beta1\Finding\Severity::class); - $this->severity = $var; - - return $this; - } - - /** - * The canonical name of the finding. It's either - * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", - * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}" or - * "projects/{project_number}/sources/{source_id}/findings/{finding_id}", - * depending on the closest CRM ancestor of the resource associated with the - * finding. - * - * Generated from protobuf field string canonical_name = 14; - * @return string - */ - public function getCanonicalName() - { - return $this->canonical_name; - } - - /** - * The canonical name of the finding. It's either - * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}", - * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}" or - * "projects/{project_number}/sources/{source_id}/findings/{finding_id}", - * depending on the closest CRM ancestor of the resource associated with the - * finding. - * - * Generated from protobuf field string canonical_name = 14; - * @param string $var - * @return $this - */ - public function setCanonicalName($var) - { - GPBUtil::checkString($var, True); - $this->canonical_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Finding/Severity.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Finding/Severity.php deleted file mode 100644 index 7b66c33d8bd0..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Finding/Severity.php +++ /dev/null @@ -1,79 +0,0 @@ -google.cloud.securitycenter.v1p1beta1.Finding.Severity - */ -class Severity -{ - /** - * No severity specified. The default value. - * - * Generated from protobuf enum SEVERITY_UNSPECIFIED = 0; - */ - const SEVERITY_UNSPECIFIED = 0; - /** - * Critical severity. - * - * Generated from protobuf enum CRITICAL = 1; - */ - const CRITICAL = 1; - /** - * High severity. - * - * Generated from protobuf enum HIGH = 2; - */ - const HIGH = 2; - /** - * Medium severity. - * - * Generated from protobuf enum MEDIUM = 3; - */ - const MEDIUM = 3; - /** - * Low severity. - * - * Generated from protobuf enum LOW = 4; - */ - const LOW = 4; - - private static $valueToName = [ - self::SEVERITY_UNSPECIFIED => 'SEVERITY_UNSPECIFIED', - self::CRITICAL => 'CRITICAL', - self::HIGH => 'HIGH', - self::MEDIUM => 'MEDIUM', - self::LOW => 'LOW', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Severity::class, \Google\Cloud\SecurityCenter\V1p1beta1\Finding_Severity::class); - diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Finding/State.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Finding/State.php deleted file mode 100644 index 188e804f89de..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Finding/State.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.securitycenter.v1p1beta1.Finding.State - */ -class State -{ - /** - * Unspecified state. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The finding requires attention and has not been addressed yet. - * - * Generated from protobuf enum ACTIVE = 1; - */ - const ACTIVE = 1; - /** - * The finding has been fixed, triaged as a non-issue or otherwise addressed - * and is no longer active. - * - * Generated from protobuf enum INACTIVE = 2; - */ - const INACTIVE = 2; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::ACTIVE => 'ACTIVE', - self::INACTIVE => 'INACTIVE', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\SecurityCenter\V1p1beta1\Finding_State::class); - diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Finding_Severity.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Finding_Severity.php deleted file mode 100644 index 57d9bc75735a..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Finding_Severity.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.securitycenter.v1p1beta1.Folder - */ -class Folder extends \Google\Protobuf\Internal\Message -{ - /** - * Full resource name of this folder. See: - * https://cloud.google.com/apis/design/resource_names#full_resource_name - * - * Generated from protobuf field string resource_folder = 1; - */ - protected $resource_folder = ''; - /** - * The user defined display name for this folder. - * - * Generated from protobuf field string resource_folder_display_name = 2; - */ - protected $resource_folder_display_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $resource_folder - * Full resource name of this folder. See: - * https://cloud.google.com/apis/design/resource_names#full_resource_name - * @type string $resource_folder_display_name - * The user defined display name for this folder. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\Folder::initOnce(); - parent::__construct($data); - } - - /** - * Full resource name of this folder. See: - * https://cloud.google.com/apis/design/resource_names#full_resource_name - * - * Generated from protobuf field string resource_folder = 1; - * @return string - */ - public function getResourceFolder() - { - return $this->resource_folder; - } - - /** - * Full resource name of this folder. See: - * https://cloud.google.com/apis/design/resource_names#full_resource_name - * - * Generated from protobuf field string resource_folder = 1; - * @param string $var - * @return $this - */ - public function setResourceFolder($var) - { - GPBUtil::checkString($var, True); - $this->resource_folder = $var; - - return $this; - } - - /** - * The user defined display name for this folder. - * - * Generated from protobuf field string resource_folder_display_name = 2; - * @return string - */ - public function getResourceFolderDisplayName() - { - return $this->resource_folder_display_name; - } - - /** - * The user defined display name for this folder. - * - * Generated from protobuf field string resource_folder_display_name = 2; - * @param string $var - * @return $this - */ - public function setResourceFolderDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->resource_folder_display_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/GetNotificationConfigRequest.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/GetNotificationConfigRequest.php deleted file mode 100644 index b612d7b962c2..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/GetNotificationConfigRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.securitycenter.v1p1beta1.GetNotificationConfigRequest - */ -class GetNotificationConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the notification config to get. Its format is - * "organizations/[organization_id]/notificationConfigs/[config_id]". - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the notification config to get. Its format is - * "organizations/[organization_id]/notificationConfigs/[config_id]". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the notification config to get. Its format is - * "organizations/[organization_id]/notificationConfigs/[config_id]". - * - * 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 notification config to get. Its format is - * "organizations/[organization_id]/notificationConfigs/[config_id]". - * - * 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/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/GetOrganizationSettingsRequest.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/GetOrganizationSettingsRequest.php deleted file mode 100644 index 1f0cdc6d247d..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/GetOrganizationSettingsRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.securitycenter.v1p1beta1.GetOrganizationSettingsRequest - */ -class GetOrganizationSettingsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the organization to get organization settings for. Its format is - * "organizations/[organization_id]/organizationSettings". - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the organization to get organization settings for. Its format is - * "organizations/[organization_id]/organizationSettings". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the organization to get organization settings for. Its format is - * "organizations/[organization_id]/organizationSettings". - * - * 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 organization to get organization settings for. Its format is - * "organizations/[organization_id]/organizationSettings". - * - * 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/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/GetSourceRequest.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/GetSourceRequest.php deleted file mode 100644 index 4372471b4525..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/GetSourceRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.securitycenter.v1p1beta1.GetSourceRequest - */ -class GetSourceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Relative resource name of the source. Its format is - * "organizations/[organization_id]/source/[source_id]". - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Relative resource name of the source. Its format is - * "organizations/[organization_id]/source/[source_id]". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Relative resource name of the source. Its format is - * "organizations/[organization_id]/source/[source_id]". - * - * 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. Relative resource name of the source. Its format is - * "organizations/[organization_id]/source/[source_id]". - * - * 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/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/GroupAssetsRequest.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/GroupAssetsRequest.php deleted file mode 100644 index 22d91ed7c020..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/GroupAssetsRequest.php +++ /dev/null @@ -1,643 +0,0 @@ -google.cloud.securitycenter.v1p1beta1.GroupAssetsRequest - */ -class GroupAssetsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the organization to groupBy. Its format is - * "organizations/[organization_id], folders/[folder_id], or - * projects/[project_id]". - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Expression that defines the filter to apply across assets. - * The expression is a list of zero or more restrictions combined via logical - * operators `AND` and `OR`. - * Parentheses are supported, and `OR` has higher precedence than `AND`. - * Restrictions have the form ` ` and may have a `-` - * character in front of them to indicate negation. The fields map to those - * defined in the Asset resource. Examples include: - * * name - * * security_center_properties.resource_name - * * resource_properties.a_property - * * security_marks.marks.marka - * The supported operators are: - * * `=` for all value types. - * * `>`, `<`, `>=`, `<=` for integer values. - * * `:`, meaning substring matching, for strings. - * The supported value types are: - * * string literals in quotes. - * * integer literals without quotes. - * * boolean literals `true` and `false` without quotes. - * The following field and operator combinations are supported: - * * name: `=` - * * update_time: `=`, `>`, `<`, `>=`, `<=` - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `update_time = "2019-06-10T16:07:18-07:00"` - * `update_time = 1560208038000` - * * create_time: `=`, `>`, `<`, `>=`, `<=` - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `create_time = "2019-06-10T16:07:18-07:00"` - * `create_time = 1560208038000` - * * iam_policy.policy_blob: `=`, `:` - * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - * * security_marks.marks: `=`, `:` - * * security_center_properties.resource_name: `=`, `:` - * * security_center_properties.resource_name_display_name: `=`, `:` - * * security_center_properties.resource_type: `=`, `:` - * * security_center_properties.resource_parent: `=`, `:` - * * security_center_properties.resource_parent_display_name: `=`, `:` - * * security_center_properties.resource_project: `=`, `:` - * * security_center_properties.resource_project_display_name: `=`, `:` - * * security_center_properties.resource_owners: `=`, `:` - * For example, `resource_properties.size = 100` is a valid filter string. - * Use a partial match on the empty string to filter based on a property - * existing: `resource_properties.my_property : ""` - * Use a negated partial match on the empty string to filter based on a - * property not existing: `-resource_properties.my_property : ""` - * - * Generated from protobuf field string filter = 2; - */ - protected $filter = ''; - /** - * Required. Expression that defines what assets fields to use for grouping. The string - * value should follow SQL syntax: comma separated list of fields. For - * example: - * "security_center_properties.resource_project,security_center_properties.project". - * The following fields are supported when compare_duration is not set: - * * security_center_properties.resource_project - * * security_center_properties.resource_project_display_name - * * security_center_properties.resource_type - * * security_center_properties.resource_parent - * * security_center_properties.resource_parent_display_name - * The following fields are supported when compare_duration is set: - * * security_center_properties.resource_type - * * security_center_properties.resource_project_display_name - * * security_center_properties.resource_parent_display_name - * - * Generated from protobuf field string group_by = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $group_by = ''; - /** - * When compare_duration is set, the GroupResult's "state_change" property is - * updated to indicate whether the asset was added, removed, or remained - * present during the compare_duration period of time that precedes the - * read_time. This is the time between (read_time - compare_duration) and - * read_time. - * The state change value is derived based on the presence of the asset at the - * two points in time. Intermediate state changes between the two times don't - * affect the result. For example, the results aren't affected if the asset is - * removed and re-created again. - * Possible "state_change" values when compare_duration is specified: - * * "ADDED": indicates that the asset was not present at the start of - * compare_duration, but present at reference_time. - * * "REMOVED": indicates that the asset was present at the start of - * compare_duration, but not present at reference_time. - * * "ACTIVE": indicates that the asset was present at both the - * start and the end of the time period defined by - * compare_duration and reference_time. - * If compare_duration is not specified, then the only possible state_change - * is "UNUSED", which will be the state_change set for all assets present at - * read_time. - * If this field is set then `state_change` must be a specified field in - * `group_by`. - * - * Generated from protobuf field .google.protobuf.Duration compare_duration = 4; - */ - protected $compare_duration = null; - /** - * Time used as a reference point when filtering assets. The filter is limited - * to assets existing at the supplied time and their values are those at that - * specific time. Absence of this field will default to the API's version of - * NOW. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 5; - */ - protected $read_time = null; - /** - * The value returned by the last `GroupAssetsResponse`; indicates - * that this is a continuation of a prior `GroupAssets` call, and that the - * system should return the next page of data. - * - * Generated from protobuf field string page_token = 7; - */ - protected $page_token = ''; - /** - * The maximum number of results to return in a single response. Default is - * 10, minimum is 1, maximum is 1000. - * - * Generated from protobuf field int32 page_size = 8; - */ - protected $page_size = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Name of the organization to groupBy. Its format is - * "organizations/[organization_id], folders/[folder_id], or - * projects/[project_id]". - * @type string $filter - * Expression that defines the filter to apply across assets. - * The expression is a list of zero or more restrictions combined via logical - * operators `AND` and `OR`. - * Parentheses are supported, and `OR` has higher precedence than `AND`. - * Restrictions have the form ` ` and may have a `-` - * character in front of them to indicate negation. The fields map to those - * defined in the Asset resource. Examples include: - * * name - * * security_center_properties.resource_name - * * resource_properties.a_property - * * security_marks.marks.marka - * The supported operators are: - * * `=` for all value types. - * * `>`, `<`, `>=`, `<=` for integer values. - * * `:`, meaning substring matching, for strings. - * The supported value types are: - * * string literals in quotes. - * * integer literals without quotes. - * * boolean literals `true` and `false` without quotes. - * The following field and operator combinations are supported: - * * name: `=` - * * update_time: `=`, `>`, `<`, `>=`, `<=` - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `update_time = "2019-06-10T16:07:18-07:00"` - * `update_time = 1560208038000` - * * create_time: `=`, `>`, `<`, `>=`, `<=` - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `create_time = "2019-06-10T16:07:18-07:00"` - * `create_time = 1560208038000` - * * iam_policy.policy_blob: `=`, `:` - * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - * * security_marks.marks: `=`, `:` - * * security_center_properties.resource_name: `=`, `:` - * * security_center_properties.resource_name_display_name: `=`, `:` - * * security_center_properties.resource_type: `=`, `:` - * * security_center_properties.resource_parent: `=`, `:` - * * security_center_properties.resource_parent_display_name: `=`, `:` - * * security_center_properties.resource_project: `=`, `:` - * * security_center_properties.resource_project_display_name: `=`, `:` - * * security_center_properties.resource_owners: `=`, `:` - * For example, `resource_properties.size = 100` is a valid filter string. - * Use a partial match on the empty string to filter based on a property - * existing: `resource_properties.my_property : ""` - * Use a negated partial match on the empty string to filter based on a - * property not existing: `-resource_properties.my_property : ""` - * @type string $group_by - * Required. Expression that defines what assets fields to use for grouping. The string - * value should follow SQL syntax: comma separated list of fields. For - * example: - * "security_center_properties.resource_project,security_center_properties.project". - * The following fields are supported when compare_duration is not set: - * * security_center_properties.resource_project - * * security_center_properties.resource_project_display_name - * * security_center_properties.resource_type - * * security_center_properties.resource_parent - * * security_center_properties.resource_parent_display_name - * The following fields are supported when compare_duration is set: - * * security_center_properties.resource_type - * * security_center_properties.resource_project_display_name - * * security_center_properties.resource_parent_display_name - * @type \Google\Protobuf\Duration $compare_duration - * When compare_duration is set, the GroupResult's "state_change" property is - * updated to indicate whether the asset was added, removed, or remained - * present during the compare_duration period of time that precedes the - * read_time. This is the time between (read_time - compare_duration) and - * read_time. - * The state change value is derived based on the presence of the asset at the - * two points in time. Intermediate state changes between the two times don't - * affect the result. For example, the results aren't affected if the asset is - * removed and re-created again. - * Possible "state_change" values when compare_duration is specified: - * * "ADDED": indicates that the asset was not present at the start of - * compare_duration, but present at reference_time. - * * "REMOVED": indicates that the asset was present at the start of - * compare_duration, but not present at reference_time. - * * "ACTIVE": indicates that the asset was present at both the - * start and the end of the time period defined by - * compare_duration and reference_time. - * If compare_duration is not specified, then the only possible state_change - * is "UNUSED", which will be the state_change set for all assets present at - * read_time. - * If this field is set then `state_change` must be a specified field in - * `group_by`. - * @type \Google\Protobuf\Timestamp $read_time - * Time used as a reference point when filtering assets. The filter is limited - * to assets existing at the supplied time and their values are those at that - * specific time. Absence of this field will default to the API's version of - * NOW. - * @type string $page_token - * The value returned by the last `GroupAssetsResponse`; indicates - * that this is a continuation of a prior `GroupAssets` call, and that the - * system should return the next page of data. - * @type int $page_size - * The maximum number of results to return in a single response. Default is - * 10, minimum is 1, maximum is 1000. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the organization to groupBy. Its format is - * "organizations/[organization_id], folders/[folder_id], or - * projects/[project_id]". - * - * 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. Name of the organization to groupBy. Its format is - * "organizations/[organization_id], folders/[folder_id], or - * projects/[project_id]". - * - * 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; - } - - /** - * Expression that defines the filter to apply across assets. - * The expression is a list of zero or more restrictions combined via logical - * operators `AND` and `OR`. - * Parentheses are supported, and `OR` has higher precedence than `AND`. - * Restrictions have the form ` ` and may have a `-` - * character in front of them to indicate negation. The fields map to those - * defined in the Asset resource. Examples include: - * * name - * * security_center_properties.resource_name - * * resource_properties.a_property - * * security_marks.marks.marka - * The supported operators are: - * * `=` for all value types. - * * `>`, `<`, `>=`, `<=` for integer values. - * * `:`, meaning substring matching, for strings. - * The supported value types are: - * * string literals in quotes. - * * integer literals without quotes. - * * boolean literals `true` and `false` without quotes. - * The following field and operator combinations are supported: - * * name: `=` - * * update_time: `=`, `>`, `<`, `>=`, `<=` - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `update_time = "2019-06-10T16:07:18-07:00"` - * `update_time = 1560208038000` - * * create_time: `=`, `>`, `<`, `>=`, `<=` - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `create_time = "2019-06-10T16:07:18-07:00"` - * `create_time = 1560208038000` - * * iam_policy.policy_blob: `=`, `:` - * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - * * security_marks.marks: `=`, `:` - * * security_center_properties.resource_name: `=`, `:` - * * security_center_properties.resource_name_display_name: `=`, `:` - * * security_center_properties.resource_type: `=`, `:` - * * security_center_properties.resource_parent: `=`, `:` - * * security_center_properties.resource_parent_display_name: `=`, `:` - * * security_center_properties.resource_project: `=`, `:` - * * security_center_properties.resource_project_display_name: `=`, `:` - * * security_center_properties.resource_owners: `=`, `:` - * For example, `resource_properties.size = 100` is a valid filter string. - * Use a partial match on the empty string to filter based on a property - * existing: `resource_properties.my_property : ""` - * Use a negated partial match on the empty string to filter based on a - * property not existing: `-resource_properties.my_property : ""` - * - * Generated from protobuf field string filter = 2; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Expression that defines the filter to apply across assets. - * The expression is a list of zero or more restrictions combined via logical - * operators `AND` and `OR`. - * Parentheses are supported, and `OR` has higher precedence than `AND`. - * Restrictions have the form ` ` and may have a `-` - * character in front of them to indicate negation. The fields map to those - * defined in the Asset resource. Examples include: - * * name - * * security_center_properties.resource_name - * * resource_properties.a_property - * * security_marks.marks.marka - * The supported operators are: - * * `=` for all value types. - * * `>`, `<`, `>=`, `<=` for integer values. - * * `:`, meaning substring matching, for strings. - * The supported value types are: - * * string literals in quotes. - * * integer literals without quotes. - * * boolean literals `true` and `false` without quotes. - * The following field and operator combinations are supported: - * * name: `=` - * * update_time: `=`, `>`, `<`, `>=`, `<=` - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `update_time = "2019-06-10T16:07:18-07:00"` - * `update_time = 1560208038000` - * * create_time: `=`, `>`, `<`, `>=`, `<=` - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `create_time = "2019-06-10T16:07:18-07:00"` - * `create_time = 1560208038000` - * * iam_policy.policy_blob: `=`, `:` - * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - * * security_marks.marks: `=`, `:` - * * security_center_properties.resource_name: `=`, `:` - * * security_center_properties.resource_name_display_name: `=`, `:` - * * security_center_properties.resource_type: `=`, `:` - * * security_center_properties.resource_parent: `=`, `:` - * * security_center_properties.resource_parent_display_name: `=`, `:` - * * security_center_properties.resource_project: `=`, `:` - * * security_center_properties.resource_project_display_name: `=`, `:` - * * security_center_properties.resource_owners: `=`, `:` - * For example, `resource_properties.size = 100` is a valid filter string. - * Use a partial match on the empty string to filter based on a property - * existing: `resource_properties.my_property : ""` - * Use a negated partial match on the empty string to filter based on a - * property not existing: `-resource_properties.my_property : ""` - * - * Generated from protobuf field string filter = 2; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Required. Expression that defines what assets fields to use for grouping. The string - * value should follow SQL syntax: comma separated list of fields. For - * example: - * "security_center_properties.resource_project,security_center_properties.project". - * The following fields are supported when compare_duration is not set: - * * security_center_properties.resource_project - * * security_center_properties.resource_project_display_name - * * security_center_properties.resource_type - * * security_center_properties.resource_parent - * * security_center_properties.resource_parent_display_name - * The following fields are supported when compare_duration is set: - * * security_center_properties.resource_type - * * security_center_properties.resource_project_display_name - * * security_center_properties.resource_parent_display_name - * - * Generated from protobuf field string group_by = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getGroupBy() - { - return $this->group_by; - } - - /** - * Required. Expression that defines what assets fields to use for grouping. The string - * value should follow SQL syntax: comma separated list of fields. For - * example: - * "security_center_properties.resource_project,security_center_properties.project". - * The following fields are supported when compare_duration is not set: - * * security_center_properties.resource_project - * * security_center_properties.resource_project_display_name - * * security_center_properties.resource_type - * * security_center_properties.resource_parent - * * security_center_properties.resource_parent_display_name - * The following fields are supported when compare_duration is set: - * * security_center_properties.resource_type - * * security_center_properties.resource_project_display_name - * * security_center_properties.resource_parent_display_name - * - * Generated from protobuf field string group_by = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setGroupBy($var) - { - GPBUtil::checkString($var, True); - $this->group_by = $var; - - return $this; - } - - /** - * When compare_duration is set, the GroupResult's "state_change" property is - * updated to indicate whether the asset was added, removed, or remained - * present during the compare_duration period of time that precedes the - * read_time. This is the time between (read_time - compare_duration) and - * read_time. - * The state change value is derived based on the presence of the asset at the - * two points in time. Intermediate state changes between the two times don't - * affect the result. For example, the results aren't affected if the asset is - * removed and re-created again. - * Possible "state_change" values when compare_duration is specified: - * * "ADDED": indicates that the asset was not present at the start of - * compare_duration, but present at reference_time. - * * "REMOVED": indicates that the asset was present at the start of - * compare_duration, but not present at reference_time. - * * "ACTIVE": indicates that the asset was present at both the - * start and the end of the time period defined by - * compare_duration and reference_time. - * If compare_duration is not specified, then the only possible state_change - * is "UNUSED", which will be the state_change set for all assets present at - * read_time. - * If this field is set then `state_change` must be a specified field in - * `group_by`. - * - * Generated from protobuf field .google.protobuf.Duration compare_duration = 4; - * @return \Google\Protobuf\Duration|null - */ - public function getCompareDuration() - { - return $this->compare_duration; - } - - public function hasCompareDuration() - { - return isset($this->compare_duration); - } - - public function clearCompareDuration() - { - unset($this->compare_duration); - } - - /** - * When compare_duration is set, the GroupResult's "state_change" property is - * updated to indicate whether the asset was added, removed, or remained - * present during the compare_duration period of time that precedes the - * read_time. This is the time between (read_time - compare_duration) and - * read_time. - * The state change value is derived based on the presence of the asset at the - * two points in time. Intermediate state changes between the two times don't - * affect the result. For example, the results aren't affected if the asset is - * removed and re-created again. - * Possible "state_change" values when compare_duration is specified: - * * "ADDED": indicates that the asset was not present at the start of - * compare_duration, but present at reference_time. - * * "REMOVED": indicates that the asset was present at the start of - * compare_duration, but not present at reference_time. - * * "ACTIVE": indicates that the asset was present at both the - * start and the end of the time period defined by - * compare_duration and reference_time. - * If compare_duration is not specified, then the only possible state_change - * is "UNUSED", which will be the state_change set for all assets present at - * read_time. - * If this field is set then `state_change` must be a specified field in - * `group_by`. - * - * Generated from protobuf field .google.protobuf.Duration compare_duration = 4; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setCompareDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->compare_duration = $var; - - return $this; - } - - /** - * Time used as a reference point when filtering assets. The filter is limited - * to assets existing at the supplied time and their values are those at that - * specific time. Absence of this field will default to the API's version of - * NOW. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 5; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->read_time; - } - - public function hasReadTime() - { - return isset($this->read_time); - } - - public function clearReadTime() - { - unset($this->read_time); - } - - /** - * Time used as a reference point when filtering assets. The filter is limited - * to assets existing at the supplied time and their values are those at that - * specific time. Absence of this field will default to the API's version of - * NOW. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 5; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->read_time = $var; - - return $this; - } - - /** - * The value returned by the last `GroupAssetsResponse`; indicates - * that this is a continuation of a prior `GroupAssets` call, and that the - * system should return the next page of data. - * - * Generated from protobuf field string page_token = 7; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The value returned by the last `GroupAssetsResponse`; indicates - * that this is a continuation of a prior `GroupAssets` call, and that the - * system should return the next page of data. - * - * Generated from protobuf field string page_token = 7; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * The maximum number of results to return in a single response. Default is - * 10, minimum is 1, maximum is 1000. - * - * Generated from protobuf field int32 page_size = 8; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of results to return in a single response. Default is - * 10, minimum is 1, maximum is 1000. - * - * Generated from protobuf field int32 page_size = 8; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/GroupAssetsResponse.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/GroupAssetsResponse.php deleted file mode 100644 index e617f28d43a0..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/GroupAssetsResponse.php +++ /dev/null @@ -1,191 +0,0 @@ -google.cloud.securitycenter.v1p1beta1.GroupAssetsResponse - */ -class GroupAssetsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Group results. There exists an element for each existing unique - * combination of property/values. The element contains a count for the number - * of times those specific property/values appear. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1p1beta1.GroupResult group_by_results = 1; - */ - private $group_by_results; - /** - * Time used for executing the groupBy request. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 2; - */ - protected $read_time = null; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results. - * - * Generated from protobuf field string next_page_token = 3; - */ - protected $next_page_token = ''; - /** - * The total number of results matching the query. - * - * Generated from protobuf field int32 total_size = 4; - */ - protected $total_size = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\SecurityCenter\V1p1beta1\GroupResult>|\Google\Protobuf\Internal\RepeatedField $group_by_results - * Group results. There exists an element for each existing unique - * combination of property/values. The element contains a count for the number - * of times those specific property/values appear. - * @type \Google\Protobuf\Timestamp $read_time - * Time used for executing the groupBy request. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results. - * @type int $total_size - * The total number of results matching the query. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Group results. There exists an element for each existing unique - * combination of property/values. The element contains a count for the number - * of times those specific property/values appear. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1p1beta1.GroupResult group_by_results = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getGroupByResults() - { - return $this->group_by_results; - } - - /** - * Group results. There exists an element for each existing unique - * combination of property/values. The element contains a count for the number - * of times those specific property/values appear. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1p1beta1.GroupResult group_by_results = 1; - * @param array<\Google\Cloud\SecurityCenter\V1p1beta1\GroupResult>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setGroupByResults($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1p1beta1\GroupResult::class); - $this->group_by_results = $arr; - - return $this; - } - - /** - * Time used for executing the groupBy request. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->read_time; - } - - public function hasReadTime() - { - return isset($this->read_time); - } - - public function clearReadTime() - { - unset($this->read_time); - } - - /** - * Time used for executing the groupBy request. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->read_time = $var; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results. - * - * Generated from protobuf field string next_page_token = 3; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results. - * - * Generated from protobuf field string next_page_token = 3; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * The total number of results matching the query. - * - * Generated from protobuf field int32 total_size = 4; - * @return int - */ - public function getTotalSize() - { - return $this->total_size; - } - - /** - * The total number of results matching the query. - * - * Generated from protobuf field int32 total_size = 4; - * @param int $var - * @return $this - */ - public function setTotalSize($var) - { - GPBUtil::checkInt32($var); - $this->total_size = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/GroupFindingsRequest.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/GroupFindingsRequest.php deleted file mode 100644 index 1d1532312f30..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/GroupFindingsRequest.php +++ /dev/null @@ -1,627 +0,0 @@ -google.cloud.securitycenter.v1p1beta1.GroupFindingsRequest - */ -class GroupFindingsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the source to groupBy. Its format is - * "organizations/[organization_id]/sources/[source_id]", - * folders/[folder_id]/sources/[source_id], or - * projects/[project_id]/sources/[source_id]. To groupBy across all sources - * provide a source_id of `-`. For example: - * organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-, - * or projects/{project_id}/sources/- - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Expression that defines the filter to apply across findings. - * The expression is a list of one or more restrictions combined via logical - * operators `AND` and `OR`. - * Parentheses are supported, and `OR` has higher precedence than `AND`. - * Restrictions have the form ` ` and may have a `-` - * character in front of them to indicate negation. Examples include: - * * name - * * source_properties.a_property - * * security_marks.marks.marka - * The supported operators are: - * * `=` for all value types. - * * `>`, `<`, `>=`, `<=` for integer values. - * * `:`, meaning substring matching, for strings. - * The supported value types are: - * * string literals in quotes. - * * integer literals without quotes. - * * boolean literals `true` and `false` without quotes. - * The following field and operator combinations are supported: - * * name: `=` - * * parent: `=`, `:` - * * resource_name: `=`, `:` - * * state: `=`, `:` - * * category: `=`, `:` - * * external_uri: `=`, `:` - * * event_time: `=`, `>`, `<`, `>=`, `<=` - * * severity: `=`, `:` - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `event_time = "2019-06-10T16:07:18-07:00"` - * `event_time = 1560208038000` - * * security_marks.marks: `=`, `:` - * * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - * For example, `source_properties.size = 100` is a valid filter string. - * Use a partial match on the empty string to filter based on a property - * existing: `source_properties.my_property : ""` - * Use a negated partial match on the empty string to filter based on a - * property not existing: `-source_properties.my_property : ""` - * - * Generated from protobuf field string filter = 2; - */ - protected $filter = ''; - /** - * Required. Expression that defines what assets fields to use for grouping (including - * `state_change`). The string value should follow SQL syntax: comma separated - * list of fields. For example: "parent,resource_name". - * The following fields are supported: - * * resource_name - * * category - * * state - * * parent - * * severity - * The following fields are supported when compare_duration is set: - * * state_change - * - * Generated from protobuf field string group_by = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $group_by = ''; - /** - * Time used as a reference point when filtering findings. The filter is - * limited to findings existing at the supplied time and their values are - * those at that specific time. Absence of this field will default to the - * API's version of NOW. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; - */ - protected $read_time = null; - /** - * When compare_duration is set, the GroupResult's "state_change" attribute is - * updated to indicate whether the finding had its state changed, the - * finding's state remained unchanged, or if the finding was added during the - * compare_duration period of time that precedes the read_time. This is the - * time between (read_time - compare_duration) and read_time. - * The state_change value is derived based on the presence and state of the - * finding at the two points in time. Intermediate state changes between the - * two times don't affect the result. For example, the results aren't affected - * if the finding is made inactive and then active again. - * Possible "state_change" values when compare_duration is specified: - * * "CHANGED": indicates that the finding was present and matched the given - * filter at the start of compare_duration, but changed its - * state at read_time. - * * "UNCHANGED": indicates that the finding was present and matched the given - * filter at the start of compare_duration and did not change - * state at read_time. - * * "ADDED": indicates that the finding did not match the given filter or - * was not present at the start of compare_duration, but was - * present at read_time. - * * "REMOVED": indicates that the finding was present and matched the - * filter at the start of compare_duration, but did not match - * the filter at read_time. - * If compare_duration is not specified, then the only possible state_change - * is "UNUSED", which will be the state_change set for all findings present - * at read_time. - * If this field is set then `state_change` must be a specified field in - * `group_by`. - * - * Generated from protobuf field .google.protobuf.Duration compare_duration = 5; - */ - protected $compare_duration = null; - /** - * The value returned by the last `GroupFindingsResponse`; indicates - * that this is a continuation of a prior `GroupFindings` call, and - * that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 7; - */ - protected $page_token = ''; - /** - * The maximum number of results to return in a single response. Default is - * 10, minimum is 1, maximum is 1000. - * - * Generated from protobuf field int32 page_size = 8; - */ - protected $page_size = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Name of the source to groupBy. Its format is - * "organizations/[organization_id]/sources/[source_id]", - * folders/[folder_id]/sources/[source_id], or - * projects/[project_id]/sources/[source_id]. To groupBy across all sources - * provide a source_id of `-`. For example: - * organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-, - * or projects/{project_id}/sources/- - * @type string $filter - * Expression that defines the filter to apply across findings. - * The expression is a list of one or more restrictions combined via logical - * operators `AND` and `OR`. - * Parentheses are supported, and `OR` has higher precedence than `AND`. - * Restrictions have the form ` ` and may have a `-` - * character in front of them to indicate negation. Examples include: - * * name - * * source_properties.a_property - * * security_marks.marks.marka - * The supported operators are: - * * `=` for all value types. - * * `>`, `<`, `>=`, `<=` for integer values. - * * `:`, meaning substring matching, for strings. - * The supported value types are: - * * string literals in quotes. - * * integer literals without quotes. - * * boolean literals `true` and `false` without quotes. - * The following field and operator combinations are supported: - * * name: `=` - * * parent: `=`, `:` - * * resource_name: `=`, `:` - * * state: `=`, `:` - * * category: `=`, `:` - * * external_uri: `=`, `:` - * * event_time: `=`, `>`, `<`, `>=`, `<=` - * * severity: `=`, `:` - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `event_time = "2019-06-10T16:07:18-07:00"` - * `event_time = 1560208038000` - * * security_marks.marks: `=`, `:` - * * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - * For example, `source_properties.size = 100` is a valid filter string. - * Use a partial match on the empty string to filter based on a property - * existing: `source_properties.my_property : ""` - * Use a negated partial match on the empty string to filter based on a - * property not existing: `-source_properties.my_property : ""` - * @type string $group_by - * Required. Expression that defines what assets fields to use for grouping (including - * `state_change`). The string value should follow SQL syntax: comma separated - * list of fields. For example: "parent,resource_name". - * The following fields are supported: - * * resource_name - * * category - * * state - * * parent - * * severity - * The following fields are supported when compare_duration is set: - * * state_change - * @type \Google\Protobuf\Timestamp $read_time - * Time used as a reference point when filtering findings. The filter is - * limited to findings existing at the supplied time and their values are - * those at that specific time. Absence of this field will default to the - * API's version of NOW. - * @type \Google\Protobuf\Duration $compare_duration - * When compare_duration is set, the GroupResult's "state_change" attribute is - * updated to indicate whether the finding had its state changed, the - * finding's state remained unchanged, or if the finding was added during the - * compare_duration period of time that precedes the read_time. This is the - * time between (read_time - compare_duration) and read_time. - * The state_change value is derived based on the presence and state of the - * finding at the two points in time. Intermediate state changes between the - * two times don't affect the result. For example, the results aren't affected - * if the finding is made inactive and then active again. - * Possible "state_change" values when compare_duration is specified: - * * "CHANGED": indicates that the finding was present and matched the given - * filter at the start of compare_duration, but changed its - * state at read_time. - * * "UNCHANGED": indicates that the finding was present and matched the given - * filter at the start of compare_duration and did not change - * state at read_time. - * * "ADDED": indicates that the finding did not match the given filter or - * was not present at the start of compare_duration, but was - * present at read_time. - * * "REMOVED": indicates that the finding was present and matched the - * filter at the start of compare_duration, but did not match - * the filter at read_time. - * If compare_duration is not specified, then the only possible state_change - * is "UNUSED", which will be the state_change set for all findings present - * at read_time. - * If this field is set then `state_change` must be a specified field in - * `group_by`. - * @type string $page_token - * The value returned by the last `GroupFindingsResponse`; indicates - * that this is a continuation of a prior `GroupFindings` call, and - * that the system should return the next page of data. - * @type int $page_size - * The maximum number of results to return in a single response. Default is - * 10, minimum is 1, maximum is 1000. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the source to groupBy. Its format is - * "organizations/[organization_id]/sources/[source_id]", - * folders/[folder_id]/sources/[source_id], or - * projects/[project_id]/sources/[source_id]. To groupBy across all sources - * provide a source_id of `-`. For example: - * organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-, - * or projects/{project_id}/sources/- - * - * 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. Name of the source to groupBy. Its format is - * "organizations/[organization_id]/sources/[source_id]", - * folders/[folder_id]/sources/[source_id], or - * projects/[project_id]/sources/[source_id]. To groupBy across all sources - * provide a source_id of `-`. For example: - * organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-, - * or projects/{project_id}/sources/- - * - * 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; - } - - /** - * Expression that defines the filter to apply across findings. - * The expression is a list of one or more restrictions combined via logical - * operators `AND` and `OR`. - * Parentheses are supported, and `OR` has higher precedence than `AND`. - * Restrictions have the form ` ` and may have a `-` - * character in front of them to indicate negation. Examples include: - * * name - * * source_properties.a_property - * * security_marks.marks.marka - * The supported operators are: - * * `=` for all value types. - * * `>`, `<`, `>=`, `<=` for integer values. - * * `:`, meaning substring matching, for strings. - * The supported value types are: - * * string literals in quotes. - * * integer literals without quotes. - * * boolean literals `true` and `false` without quotes. - * The following field and operator combinations are supported: - * * name: `=` - * * parent: `=`, `:` - * * resource_name: `=`, `:` - * * state: `=`, `:` - * * category: `=`, `:` - * * external_uri: `=`, `:` - * * event_time: `=`, `>`, `<`, `>=`, `<=` - * * severity: `=`, `:` - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `event_time = "2019-06-10T16:07:18-07:00"` - * `event_time = 1560208038000` - * * security_marks.marks: `=`, `:` - * * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - * For example, `source_properties.size = 100` is a valid filter string. - * Use a partial match on the empty string to filter based on a property - * existing: `source_properties.my_property : ""` - * Use a negated partial match on the empty string to filter based on a - * property not existing: `-source_properties.my_property : ""` - * - * Generated from protobuf field string filter = 2; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Expression that defines the filter to apply across findings. - * The expression is a list of one or more restrictions combined via logical - * operators `AND` and `OR`. - * Parentheses are supported, and `OR` has higher precedence than `AND`. - * Restrictions have the form ` ` and may have a `-` - * character in front of them to indicate negation. Examples include: - * * name - * * source_properties.a_property - * * security_marks.marks.marka - * The supported operators are: - * * `=` for all value types. - * * `>`, `<`, `>=`, `<=` for integer values. - * * `:`, meaning substring matching, for strings. - * The supported value types are: - * * string literals in quotes. - * * integer literals without quotes. - * * boolean literals `true` and `false` without quotes. - * The following field and operator combinations are supported: - * * name: `=` - * * parent: `=`, `:` - * * resource_name: `=`, `:` - * * state: `=`, `:` - * * category: `=`, `:` - * * external_uri: `=`, `:` - * * event_time: `=`, `>`, `<`, `>=`, `<=` - * * severity: `=`, `:` - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `event_time = "2019-06-10T16:07:18-07:00"` - * `event_time = 1560208038000` - * * security_marks.marks: `=`, `:` - * * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - * For example, `source_properties.size = 100` is a valid filter string. - * Use a partial match on the empty string to filter based on a property - * existing: `source_properties.my_property : ""` - * Use a negated partial match on the empty string to filter based on a - * property not existing: `-source_properties.my_property : ""` - * - * Generated from protobuf field string filter = 2; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Required. Expression that defines what assets fields to use for grouping (including - * `state_change`). The string value should follow SQL syntax: comma separated - * list of fields. For example: "parent,resource_name". - * The following fields are supported: - * * resource_name - * * category - * * state - * * parent - * * severity - * The following fields are supported when compare_duration is set: - * * state_change - * - * Generated from protobuf field string group_by = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getGroupBy() - { - return $this->group_by; - } - - /** - * Required. Expression that defines what assets fields to use for grouping (including - * `state_change`). The string value should follow SQL syntax: comma separated - * list of fields. For example: "parent,resource_name". - * The following fields are supported: - * * resource_name - * * category - * * state - * * parent - * * severity - * The following fields are supported when compare_duration is set: - * * state_change - * - * Generated from protobuf field string group_by = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setGroupBy($var) - { - GPBUtil::checkString($var, True); - $this->group_by = $var; - - return $this; - } - - /** - * Time used as a reference point when filtering findings. The filter is - * limited to findings existing at the supplied time and their values are - * those at that specific time. Absence of this field will default to the - * API's version of NOW. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->read_time; - } - - public function hasReadTime() - { - return isset($this->read_time); - } - - public function clearReadTime() - { - unset($this->read_time); - } - - /** - * Time used as a reference point when filtering findings. The filter is - * limited to findings existing at the supplied time and their values are - * those at that specific time. Absence of this field will default to the - * API's version of NOW. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->read_time = $var; - - return $this; - } - - /** - * When compare_duration is set, the GroupResult's "state_change" attribute is - * updated to indicate whether the finding had its state changed, the - * finding's state remained unchanged, or if the finding was added during the - * compare_duration period of time that precedes the read_time. This is the - * time between (read_time - compare_duration) and read_time. - * The state_change value is derived based on the presence and state of the - * finding at the two points in time. Intermediate state changes between the - * two times don't affect the result. For example, the results aren't affected - * if the finding is made inactive and then active again. - * Possible "state_change" values when compare_duration is specified: - * * "CHANGED": indicates that the finding was present and matched the given - * filter at the start of compare_duration, but changed its - * state at read_time. - * * "UNCHANGED": indicates that the finding was present and matched the given - * filter at the start of compare_duration and did not change - * state at read_time. - * * "ADDED": indicates that the finding did not match the given filter or - * was not present at the start of compare_duration, but was - * present at read_time. - * * "REMOVED": indicates that the finding was present and matched the - * filter at the start of compare_duration, but did not match - * the filter at read_time. - * If compare_duration is not specified, then the only possible state_change - * is "UNUSED", which will be the state_change set for all findings present - * at read_time. - * If this field is set then `state_change` must be a specified field in - * `group_by`. - * - * Generated from protobuf field .google.protobuf.Duration compare_duration = 5; - * @return \Google\Protobuf\Duration|null - */ - public function getCompareDuration() - { - return $this->compare_duration; - } - - public function hasCompareDuration() - { - return isset($this->compare_duration); - } - - public function clearCompareDuration() - { - unset($this->compare_duration); - } - - /** - * When compare_duration is set, the GroupResult's "state_change" attribute is - * updated to indicate whether the finding had its state changed, the - * finding's state remained unchanged, or if the finding was added during the - * compare_duration period of time that precedes the read_time. This is the - * time between (read_time - compare_duration) and read_time. - * The state_change value is derived based on the presence and state of the - * finding at the two points in time. Intermediate state changes between the - * two times don't affect the result. For example, the results aren't affected - * if the finding is made inactive and then active again. - * Possible "state_change" values when compare_duration is specified: - * * "CHANGED": indicates that the finding was present and matched the given - * filter at the start of compare_duration, but changed its - * state at read_time. - * * "UNCHANGED": indicates that the finding was present and matched the given - * filter at the start of compare_duration and did not change - * state at read_time. - * * "ADDED": indicates that the finding did not match the given filter or - * was not present at the start of compare_duration, but was - * present at read_time. - * * "REMOVED": indicates that the finding was present and matched the - * filter at the start of compare_duration, but did not match - * the filter at read_time. - * If compare_duration is not specified, then the only possible state_change - * is "UNUSED", which will be the state_change set for all findings present - * at read_time. - * If this field is set then `state_change` must be a specified field in - * `group_by`. - * - * Generated from protobuf field .google.protobuf.Duration compare_duration = 5; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setCompareDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->compare_duration = $var; - - return $this; - } - - /** - * The value returned by the last `GroupFindingsResponse`; indicates - * that this is a continuation of a prior `GroupFindings` call, and - * that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 7; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The value returned by the last `GroupFindingsResponse`; indicates - * that this is a continuation of a prior `GroupFindings` call, and - * that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 7; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * The maximum number of results to return in a single response. Default is - * 10, minimum is 1, maximum is 1000. - * - * Generated from protobuf field int32 page_size = 8; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of results to return in a single response. Default is - * 10, minimum is 1, maximum is 1000. - * - * Generated from protobuf field int32 page_size = 8; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/GroupFindingsResponse.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/GroupFindingsResponse.php deleted file mode 100644 index 08e112996742..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/GroupFindingsResponse.php +++ /dev/null @@ -1,191 +0,0 @@ -google.cloud.securitycenter.v1p1beta1.GroupFindingsResponse - */ -class GroupFindingsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Group results. There exists an element for each existing unique - * combination of property/values. The element contains a count for the number - * of times those specific property/values appear. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1p1beta1.GroupResult group_by_results = 1; - */ - private $group_by_results; - /** - * Time used for executing the groupBy request. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 2; - */ - protected $read_time = null; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results. - * - * Generated from protobuf field string next_page_token = 3; - */ - protected $next_page_token = ''; - /** - * The total number of results matching the query. - * - * Generated from protobuf field int32 total_size = 4; - */ - protected $total_size = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\SecurityCenter\V1p1beta1\GroupResult>|\Google\Protobuf\Internal\RepeatedField $group_by_results - * Group results. There exists an element for each existing unique - * combination of property/values. The element contains a count for the number - * of times those specific property/values appear. - * @type \Google\Protobuf\Timestamp $read_time - * Time used for executing the groupBy request. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results. - * @type int $total_size - * The total number of results matching the query. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Group results. There exists an element for each existing unique - * combination of property/values. The element contains a count for the number - * of times those specific property/values appear. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1p1beta1.GroupResult group_by_results = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getGroupByResults() - { - return $this->group_by_results; - } - - /** - * Group results. There exists an element for each existing unique - * combination of property/values. The element contains a count for the number - * of times those specific property/values appear. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1p1beta1.GroupResult group_by_results = 1; - * @param array<\Google\Cloud\SecurityCenter\V1p1beta1\GroupResult>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setGroupByResults($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1p1beta1\GroupResult::class); - $this->group_by_results = $arr; - - return $this; - } - - /** - * Time used for executing the groupBy request. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->read_time; - } - - public function hasReadTime() - { - return isset($this->read_time); - } - - public function clearReadTime() - { - unset($this->read_time); - } - - /** - * Time used for executing the groupBy request. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->read_time = $var; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results. - * - * Generated from protobuf field string next_page_token = 3; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results. - * - * Generated from protobuf field string next_page_token = 3; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * The total number of results matching the query. - * - * Generated from protobuf field int32 total_size = 4; - * @return int - */ - public function getTotalSize() - { - return $this->total_size; - } - - /** - * The total number of results matching the query. - * - * Generated from protobuf field int32 total_size = 4; - * @param int $var - * @return $this - */ - public function setTotalSize($var) - { - GPBUtil::checkInt32($var); - $this->total_size = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/GroupResult.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/GroupResult.php deleted file mode 100644 index 5abaf409e1ce..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/GroupResult.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.securitycenter.v1p1beta1.GroupResult - */ -class GroupResult extends \Google\Protobuf\Internal\Message -{ - /** - * Properties matching the groupBy fields in the request. - * - * Generated from protobuf field map properties = 1; - */ - private $properties; - /** - * Total count of resources for the given properties. - * - * Generated from protobuf field int64 count = 2; - */ - protected $count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\MapField $properties - * Properties matching the groupBy fields in the request. - * @type int|string $count - * Total count of resources for the given properties. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Properties matching the groupBy fields in the request. - * - * Generated from protobuf field map properties = 1; - * @return \Google\Protobuf\Internal\MapField - */ - public function getProperties() - { - return $this->properties; - } - - /** - * Properties matching the groupBy fields in the request. - * - * Generated from protobuf field map properties = 1; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setProperties($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Value::class); - $this->properties = $arr; - - return $this; - } - - /** - * Total count of resources for the given properties. - * - * Generated from protobuf field int64 count = 2; - * @return int|string - */ - public function getCount() - { - return $this->count; - } - - /** - * Total count of resources for the given properties. - * - * Generated from protobuf field int64 count = 2; - * @param int|string $var - * @return $this - */ - public function setCount($var) - { - GPBUtil::checkInt64($var); - $this->count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListAssetsRequest.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListAssetsRequest.php deleted file mode 100644 index a0a4531e7d95..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListAssetsRequest.php +++ /dev/null @@ -1,711 +0,0 @@ -google.cloud.securitycenter.v1p1beta1.ListAssetsRequest - */ -class ListAssetsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the organization assets should belong to. Its format is - * "organizations/[organization_id], folders/[folder_id], or - * projects/[project_id]". - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Expression that defines the filter to apply across assets. - * The expression is a list of zero or more restrictions combined via logical - * operators `AND` and `OR`. - * Parentheses are supported, and `OR` has higher precedence than `AND`. - * Restrictions have the form ` ` and may have a `-` - * character in front of them to indicate negation. The fields map to those - * defined in the Asset resource. Examples include: - * * name - * * security_center_properties.resource_name - * * resource_properties.a_property - * * security_marks.marks.marka - * The supported operators are: - * * `=` for all value types. - * * `>`, `<`, `>=`, `<=` for integer values. - * * `:`, meaning substring matching, for strings. - * The supported value types are: - * * string literals in quotes. - * * integer literals without quotes. - * * boolean literals `true` and `false` without quotes. - * The following are the allowed field and operator combinations: - * * name: `=` - * * update_time: `=`, `>`, `<`, `>=`, `<=` - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `update_time = "2019-06-10T16:07:18-07:00"` - * `update_time = 1560208038000` - * * create_time: `=`, `>`, `<`, `>=`, `<=` - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `create_time = "2019-06-10T16:07:18-07:00"` - * `create_time = 1560208038000` - * * iam_policy.policy_blob: `=`, `:` - * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - * * security_marks.marks: `=`, `:` - * * security_center_properties.resource_name: `=`, `:` - * * security_center_properties.resource_display_name: `=`, `:` - * * security_center_properties.resource_type: `=`, `:` - * * security_center_properties.resource_parent: `=`, `:` - * * security_center_properties.resource_parent_display_name: `=`, `:` - * * security_center_properties.resource_project: `=`, `:` - * * security_center_properties.resource_project_display_name: `=`, `:` - * * security_center_properties.resource_owners: `=`, `:` - * For example, `resource_properties.size = 100` is a valid filter string. - * Use a partial match on the empty string to filter based on a property - * existing: `resource_properties.my_property : ""` - * Use a negated partial match on the empty string to filter based on a - * property not existing: `-resource_properties.my_property : ""` - * - * Generated from protobuf field string filter = 2; - */ - protected $filter = ''; - /** - * Expression that defines what fields and order to use for sorting. The - * string value should follow SQL syntax: comma separated list of fields. For - * example: "name,resource_properties.a_property". The default sorting order - * is ascending. To specify descending order for a field, a suffix " desc" - * should be appended to the field name. For example: "name - * desc,resource_properties.a_property". Redundant space characters in the - * syntax are insignificant. "name desc,resource_properties.a_property" and " - * name desc , resource_properties.a_property " are equivalent. - * The following fields are supported: - * name - * update_time - * resource_properties - * security_marks.marks - * security_center_properties.resource_name - * security_center_properties.resource_display_name - * security_center_properties.resource_parent - * security_center_properties.resource_parent_display_name - * security_center_properties.resource_project - * security_center_properties.resource_project_display_name - * security_center_properties.resource_type - * - * Generated from protobuf field string order_by = 3; - */ - protected $order_by = ''; - /** - * Time used as a reference point when filtering assets. The filter is limited - * to assets existing at the supplied time and their values are those at that - * specific time. Absence of this field will default to the API's version of - * NOW. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; - */ - protected $read_time = null; - /** - * When compare_duration is set, the ListAssetsResult's "state_change" - * attribute is updated to indicate whether the asset was added, removed, or - * remained present during the compare_duration period of time that precedes - * the read_time. This is the time between (read_time - compare_duration) and - * read_time. - * The state_change value is derived based on the presence of the asset at the - * two points in time. Intermediate state changes between the two times don't - * affect the result. For example, the results aren't affected if the asset is - * removed and re-created again. - * Possible "state_change" values when compare_duration is specified: - * * "ADDED": indicates that the asset was not present at the start of - * compare_duration, but present at read_time. - * * "REMOVED": indicates that the asset was present at the start of - * compare_duration, but not present at read_time. - * * "ACTIVE": indicates that the asset was present at both the - * start and the end of the time period defined by - * compare_duration and read_time. - * If compare_duration is not specified, then the only possible state_change - * is "UNUSED", which will be the state_change set for all assets present at - * read_time. - * - * Generated from protobuf field .google.protobuf.Duration compare_duration = 5; - */ - protected $compare_duration = null; - /** - * A field mask to specify the ListAssetsResult fields to be listed in the - * response. - * An empty field mask will list all fields. - * - * Generated from protobuf field .google.protobuf.FieldMask field_mask = 7; - */ - protected $field_mask = null; - /** - * The value returned by the last `ListAssetsResponse`; indicates - * that this is a continuation of a prior `ListAssets` call, and - * that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 8; - */ - protected $page_token = ''; - /** - * The maximum number of results to return in a single response. Default is - * 10, minimum is 1, maximum is 1000. - * - * Generated from protobuf field int32 page_size = 9; - */ - protected $page_size = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Name of the organization assets should belong to. Its format is - * "organizations/[organization_id], folders/[folder_id], or - * projects/[project_id]". - * @type string $filter - * Expression that defines the filter to apply across assets. - * The expression is a list of zero or more restrictions combined via logical - * operators `AND` and `OR`. - * Parentheses are supported, and `OR` has higher precedence than `AND`. - * Restrictions have the form ` ` and may have a `-` - * character in front of them to indicate negation. The fields map to those - * defined in the Asset resource. Examples include: - * * name - * * security_center_properties.resource_name - * * resource_properties.a_property - * * security_marks.marks.marka - * The supported operators are: - * * `=` for all value types. - * * `>`, `<`, `>=`, `<=` for integer values. - * * `:`, meaning substring matching, for strings. - * The supported value types are: - * * string literals in quotes. - * * integer literals without quotes. - * * boolean literals `true` and `false` without quotes. - * The following are the allowed field and operator combinations: - * * name: `=` - * * update_time: `=`, `>`, `<`, `>=`, `<=` - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `update_time = "2019-06-10T16:07:18-07:00"` - * `update_time = 1560208038000` - * * create_time: `=`, `>`, `<`, `>=`, `<=` - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `create_time = "2019-06-10T16:07:18-07:00"` - * `create_time = 1560208038000` - * * iam_policy.policy_blob: `=`, `:` - * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - * * security_marks.marks: `=`, `:` - * * security_center_properties.resource_name: `=`, `:` - * * security_center_properties.resource_display_name: `=`, `:` - * * security_center_properties.resource_type: `=`, `:` - * * security_center_properties.resource_parent: `=`, `:` - * * security_center_properties.resource_parent_display_name: `=`, `:` - * * security_center_properties.resource_project: `=`, `:` - * * security_center_properties.resource_project_display_name: `=`, `:` - * * security_center_properties.resource_owners: `=`, `:` - * For example, `resource_properties.size = 100` is a valid filter string. - * Use a partial match on the empty string to filter based on a property - * existing: `resource_properties.my_property : ""` - * Use a negated partial match on the empty string to filter based on a - * property not existing: `-resource_properties.my_property : ""` - * @type string $order_by - * Expression that defines what fields and order to use for sorting. The - * string value should follow SQL syntax: comma separated list of fields. For - * example: "name,resource_properties.a_property". The default sorting order - * is ascending. To specify descending order for a field, a suffix " desc" - * should be appended to the field name. For example: "name - * desc,resource_properties.a_property". Redundant space characters in the - * syntax are insignificant. "name desc,resource_properties.a_property" and " - * name desc , resource_properties.a_property " are equivalent. - * The following fields are supported: - * name - * update_time - * resource_properties - * security_marks.marks - * security_center_properties.resource_name - * security_center_properties.resource_display_name - * security_center_properties.resource_parent - * security_center_properties.resource_parent_display_name - * security_center_properties.resource_project - * security_center_properties.resource_project_display_name - * security_center_properties.resource_type - * @type \Google\Protobuf\Timestamp $read_time - * Time used as a reference point when filtering assets. The filter is limited - * to assets existing at the supplied time and their values are those at that - * specific time. Absence of this field will default to the API's version of - * NOW. - * @type \Google\Protobuf\Duration $compare_duration - * When compare_duration is set, the ListAssetsResult's "state_change" - * attribute is updated to indicate whether the asset was added, removed, or - * remained present during the compare_duration period of time that precedes - * the read_time. This is the time between (read_time - compare_duration) and - * read_time. - * The state_change value is derived based on the presence of the asset at the - * two points in time. Intermediate state changes between the two times don't - * affect the result. For example, the results aren't affected if the asset is - * removed and re-created again. - * Possible "state_change" values when compare_duration is specified: - * * "ADDED": indicates that the asset was not present at the start of - * compare_duration, but present at read_time. - * * "REMOVED": indicates that the asset was present at the start of - * compare_duration, but not present at read_time. - * * "ACTIVE": indicates that the asset was present at both the - * start and the end of the time period defined by - * compare_duration and read_time. - * If compare_duration is not specified, then the only possible state_change - * is "UNUSED", which will be the state_change set for all assets present at - * read_time. - * @type \Google\Protobuf\FieldMask $field_mask - * A field mask to specify the ListAssetsResult fields to be listed in the - * response. - * An empty field mask will list all fields. - * @type string $page_token - * The value returned by the last `ListAssetsResponse`; indicates - * that this is a continuation of a prior `ListAssets` call, and - * that the system should return the next page of data. - * @type int $page_size - * The maximum number of results to return in a single response. Default is - * 10, minimum is 1, maximum is 1000. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the organization assets should belong to. Its format is - * "organizations/[organization_id], folders/[folder_id], or - * projects/[project_id]". - * - * 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. Name of the organization assets should belong to. Its format is - * "organizations/[organization_id], folders/[folder_id], or - * projects/[project_id]". - * - * 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; - } - - /** - * Expression that defines the filter to apply across assets. - * The expression is a list of zero or more restrictions combined via logical - * operators `AND` and `OR`. - * Parentheses are supported, and `OR` has higher precedence than `AND`. - * Restrictions have the form ` ` and may have a `-` - * character in front of them to indicate negation. The fields map to those - * defined in the Asset resource. Examples include: - * * name - * * security_center_properties.resource_name - * * resource_properties.a_property - * * security_marks.marks.marka - * The supported operators are: - * * `=` for all value types. - * * `>`, `<`, `>=`, `<=` for integer values. - * * `:`, meaning substring matching, for strings. - * The supported value types are: - * * string literals in quotes. - * * integer literals without quotes. - * * boolean literals `true` and `false` without quotes. - * The following are the allowed field and operator combinations: - * * name: `=` - * * update_time: `=`, `>`, `<`, `>=`, `<=` - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `update_time = "2019-06-10T16:07:18-07:00"` - * `update_time = 1560208038000` - * * create_time: `=`, `>`, `<`, `>=`, `<=` - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `create_time = "2019-06-10T16:07:18-07:00"` - * `create_time = 1560208038000` - * * iam_policy.policy_blob: `=`, `:` - * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - * * security_marks.marks: `=`, `:` - * * security_center_properties.resource_name: `=`, `:` - * * security_center_properties.resource_display_name: `=`, `:` - * * security_center_properties.resource_type: `=`, `:` - * * security_center_properties.resource_parent: `=`, `:` - * * security_center_properties.resource_parent_display_name: `=`, `:` - * * security_center_properties.resource_project: `=`, `:` - * * security_center_properties.resource_project_display_name: `=`, `:` - * * security_center_properties.resource_owners: `=`, `:` - * For example, `resource_properties.size = 100` is a valid filter string. - * Use a partial match on the empty string to filter based on a property - * existing: `resource_properties.my_property : ""` - * Use a negated partial match on the empty string to filter based on a - * property not existing: `-resource_properties.my_property : ""` - * - * Generated from protobuf field string filter = 2; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Expression that defines the filter to apply across assets. - * The expression is a list of zero or more restrictions combined via logical - * operators `AND` and `OR`. - * Parentheses are supported, and `OR` has higher precedence than `AND`. - * Restrictions have the form ` ` and may have a `-` - * character in front of them to indicate negation. The fields map to those - * defined in the Asset resource. Examples include: - * * name - * * security_center_properties.resource_name - * * resource_properties.a_property - * * security_marks.marks.marka - * The supported operators are: - * * `=` for all value types. - * * `>`, `<`, `>=`, `<=` for integer values. - * * `:`, meaning substring matching, for strings. - * The supported value types are: - * * string literals in quotes. - * * integer literals without quotes. - * * boolean literals `true` and `false` without quotes. - * The following are the allowed field and operator combinations: - * * name: `=` - * * update_time: `=`, `>`, `<`, `>=`, `<=` - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `update_time = "2019-06-10T16:07:18-07:00"` - * `update_time = 1560208038000` - * * create_time: `=`, `>`, `<`, `>=`, `<=` - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `create_time = "2019-06-10T16:07:18-07:00"` - * `create_time = 1560208038000` - * * iam_policy.policy_blob: `=`, `:` - * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - * * security_marks.marks: `=`, `:` - * * security_center_properties.resource_name: `=`, `:` - * * security_center_properties.resource_display_name: `=`, `:` - * * security_center_properties.resource_type: `=`, `:` - * * security_center_properties.resource_parent: `=`, `:` - * * security_center_properties.resource_parent_display_name: `=`, `:` - * * security_center_properties.resource_project: `=`, `:` - * * security_center_properties.resource_project_display_name: `=`, `:` - * * security_center_properties.resource_owners: `=`, `:` - * For example, `resource_properties.size = 100` is a valid filter string. - * Use a partial match on the empty string to filter based on a property - * existing: `resource_properties.my_property : ""` - * Use a negated partial match on the empty string to filter based on a - * property not existing: `-resource_properties.my_property : ""` - * - * Generated from protobuf field string filter = 2; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Expression that defines what fields and order to use for sorting. The - * string value should follow SQL syntax: comma separated list of fields. For - * example: "name,resource_properties.a_property". The default sorting order - * is ascending. To specify descending order for a field, a suffix " desc" - * should be appended to the field name. For example: "name - * desc,resource_properties.a_property". Redundant space characters in the - * syntax are insignificant. "name desc,resource_properties.a_property" and " - * name desc , resource_properties.a_property " are equivalent. - * The following fields are supported: - * name - * update_time - * resource_properties - * security_marks.marks - * security_center_properties.resource_name - * security_center_properties.resource_display_name - * security_center_properties.resource_parent - * security_center_properties.resource_parent_display_name - * security_center_properties.resource_project - * security_center_properties.resource_project_display_name - * security_center_properties.resource_type - * - * Generated from protobuf field string order_by = 3; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Expression that defines what fields and order to use for sorting. The - * string value should follow SQL syntax: comma separated list of fields. For - * example: "name,resource_properties.a_property". The default sorting order - * is ascending. To specify descending order for a field, a suffix " desc" - * should be appended to the field name. For example: "name - * desc,resource_properties.a_property". Redundant space characters in the - * syntax are insignificant. "name desc,resource_properties.a_property" and " - * name desc , resource_properties.a_property " are equivalent. - * The following fields are supported: - * name - * update_time - * resource_properties - * security_marks.marks - * security_center_properties.resource_name - * security_center_properties.resource_display_name - * security_center_properties.resource_parent - * security_center_properties.resource_parent_display_name - * security_center_properties.resource_project - * security_center_properties.resource_project_display_name - * security_center_properties.resource_type - * - * Generated from protobuf field string order_by = 3; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - - /** - * Time used as a reference point when filtering assets. The filter is limited - * to assets existing at the supplied time and their values are those at that - * specific time. Absence of this field will default to the API's version of - * NOW. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->read_time; - } - - public function hasReadTime() - { - return isset($this->read_time); - } - - public function clearReadTime() - { - unset($this->read_time); - } - - /** - * Time used as a reference point when filtering assets. The filter is limited - * to assets existing at the supplied time and their values are those at that - * specific time. Absence of this field will default to the API's version of - * NOW. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->read_time = $var; - - return $this; - } - - /** - * When compare_duration is set, the ListAssetsResult's "state_change" - * attribute is updated to indicate whether the asset was added, removed, or - * remained present during the compare_duration period of time that precedes - * the read_time. This is the time between (read_time - compare_duration) and - * read_time. - * The state_change value is derived based on the presence of the asset at the - * two points in time. Intermediate state changes between the two times don't - * affect the result. For example, the results aren't affected if the asset is - * removed and re-created again. - * Possible "state_change" values when compare_duration is specified: - * * "ADDED": indicates that the asset was not present at the start of - * compare_duration, but present at read_time. - * * "REMOVED": indicates that the asset was present at the start of - * compare_duration, but not present at read_time. - * * "ACTIVE": indicates that the asset was present at both the - * start and the end of the time period defined by - * compare_duration and read_time. - * If compare_duration is not specified, then the only possible state_change - * is "UNUSED", which will be the state_change set for all assets present at - * read_time. - * - * Generated from protobuf field .google.protobuf.Duration compare_duration = 5; - * @return \Google\Protobuf\Duration|null - */ - public function getCompareDuration() - { - return $this->compare_duration; - } - - public function hasCompareDuration() - { - return isset($this->compare_duration); - } - - public function clearCompareDuration() - { - unset($this->compare_duration); - } - - /** - * When compare_duration is set, the ListAssetsResult's "state_change" - * attribute is updated to indicate whether the asset was added, removed, or - * remained present during the compare_duration period of time that precedes - * the read_time. This is the time between (read_time - compare_duration) and - * read_time. - * The state_change value is derived based on the presence of the asset at the - * two points in time. Intermediate state changes between the two times don't - * affect the result. For example, the results aren't affected if the asset is - * removed and re-created again. - * Possible "state_change" values when compare_duration is specified: - * * "ADDED": indicates that the asset was not present at the start of - * compare_duration, but present at read_time. - * * "REMOVED": indicates that the asset was present at the start of - * compare_duration, but not present at read_time. - * * "ACTIVE": indicates that the asset was present at both the - * start and the end of the time period defined by - * compare_duration and read_time. - * If compare_duration is not specified, then the only possible state_change - * is "UNUSED", which will be the state_change set for all assets present at - * read_time. - * - * Generated from protobuf field .google.protobuf.Duration compare_duration = 5; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setCompareDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->compare_duration = $var; - - return $this; - } - - /** - * A field mask to specify the ListAssetsResult fields to be listed in the - * response. - * An empty field mask will list all fields. - * - * Generated from protobuf field .google.protobuf.FieldMask field_mask = 7; - * @return \Google\Protobuf\FieldMask|null - */ - public function getFieldMask() - { - return $this->field_mask; - } - - public function hasFieldMask() - { - return isset($this->field_mask); - } - - public function clearFieldMask() - { - unset($this->field_mask); - } - - /** - * A field mask to specify the ListAssetsResult fields to be listed in the - * response. - * An empty field mask will list all fields. - * - * Generated from protobuf field .google.protobuf.FieldMask field_mask = 7; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setFieldMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->field_mask = $var; - - return $this; - } - - /** - * The value returned by the last `ListAssetsResponse`; indicates - * that this is a continuation of a prior `ListAssets` call, and - * that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 8; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The value returned by the last `ListAssetsResponse`; indicates - * that this is a continuation of a prior `ListAssets` call, and - * that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 8; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * The maximum number of results to return in a single response. Default is - * 10, minimum is 1, maximum is 1000. - * - * Generated from protobuf field int32 page_size = 9; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of results to return in a single response. Default is - * 10, minimum is 1, maximum is 1000. - * - * Generated from protobuf field int32 page_size = 9; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListAssetsResponse.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListAssetsResponse.php deleted file mode 100644 index c1c510821ecf..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListAssetsResponse.php +++ /dev/null @@ -1,183 +0,0 @@ -google.cloud.securitycenter.v1p1beta1.ListAssetsResponse - */ -class ListAssetsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Assets matching the list request. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1p1beta1.ListAssetsResponse.ListAssetsResult list_assets_results = 1; - */ - private $list_assets_results; - /** - * Time used for executing the list request. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 2; - */ - protected $read_time = null; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results. - * - * Generated from protobuf field string next_page_token = 3; - */ - protected $next_page_token = ''; - /** - * The total number of assets matching the query. - * - * Generated from protobuf field int32 total_size = 4; - */ - protected $total_size = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\SecurityCenter\V1p1beta1\ListAssetsResponse\ListAssetsResult>|\Google\Protobuf\Internal\RepeatedField $list_assets_results - * Assets matching the list request. - * @type \Google\Protobuf\Timestamp $read_time - * Time used for executing the list request. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results. - * @type int $total_size - * The total number of assets matching the query. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Assets matching the list request. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1p1beta1.ListAssetsResponse.ListAssetsResult list_assets_results = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getListAssetsResults() - { - return $this->list_assets_results; - } - - /** - * Assets matching the list request. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1p1beta1.ListAssetsResponse.ListAssetsResult list_assets_results = 1; - * @param array<\Google\Cloud\SecurityCenter\V1p1beta1\ListAssetsResponse\ListAssetsResult>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setListAssetsResults($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1p1beta1\ListAssetsResponse\ListAssetsResult::class); - $this->list_assets_results = $arr; - - return $this; - } - - /** - * Time used for executing the list request. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->read_time; - } - - public function hasReadTime() - { - return isset($this->read_time); - } - - public function clearReadTime() - { - unset($this->read_time); - } - - /** - * Time used for executing the list request. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->read_time = $var; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results. - * - * Generated from protobuf field string next_page_token = 3; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results. - * - * Generated from protobuf field string next_page_token = 3; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * The total number of assets matching the query. - * - * Generated from protobuf field int32 total_size = 4; - * @return int - */ - public function getTotalSize() - { - return $this->total_size; - } - - /** - * The total number of assets matching the query. - * - * Generated from protobuf field int32 total_size = 4; - * @param int $var - * @return $this - */ - public function setTotalSize($var) - { - GPBUtil::checkInt32($var); - $this->total_size = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListAssetsResponse/ListAssetsResult.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListAssetsResponse/ListAssetsResult.php deleted file mode 100644 index 4e9003862dd2..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListAssetsResponse/ListAssetsResult.php +++ /dev/null @@ -1,114 +0,0 @@ -google.cloud.securitycenter.v1p1beta1.ListAssetsResponse.ListAssetsResult - */ -class ListAssetsResult extends \Google\Protobuf\Internal\Message -{ - /** - * Asset matching the search request. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Asset asset = 1; - */ - protected $asset = null; - /** - * State change of the asset between the points in time. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.ListAssetsResponse.ListAssetsResult.StateChange state_change = 2; - */ - protected $state_change = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\SecurityCenter\V1p1beta1\Asset $asset - * Asset matching the search request. - * @type int $state_change - * State change of the asset between the points in time. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Asset matching the search request. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Asset asset = 1; - * @return \Google\Cloud\SecurityCenter\V1p1beta1\Asset|null - */ - public function getAsset() - { - return $this->asset; - } - - public function hasAsset() - { - return isset($this->asset); - } - - public function clearAsset() - { - unset($this->asset); - } - - /** - * Asset matching the search request. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Asset asset = 1; - * @param \Google\Cloud\SecurityCenter\V1p1beta1\Asset $var - * @return $this - */ - public function setAsset($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1p1beta1\Asset::class); - $this->asset = $var; - - return $this; - } - - /** - * State change of the asset between the points in time. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.ListAssetsResponse.ListAssetsResult.StateChange state_change = 2; - * @return int - */ - public function getStateChange() - { - return $this->state_change; - } - - /** - * State change of the asset between the points in time. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.ListAssetsResponse.ListAssetsResult.StateChange state_change = 2; - * @param int $var - * @return $this - */ - public function setStateChange($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1p1beta1\ListAssetsResponse\ListAssetsResult\StateChange::class); - $this->state_change = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ListAssetsResult::class, \Google\Cloud\SecurityCenter\V1p1beta1\ListAssetsResponse_ListAssetsResult::class); - diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListAssetsResponse/ListAssetsResult/StateChange.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListAssetsResponse/ListAssetsResult/StateChange.php deleted file mode 100644 index 2ef0a7011948..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListAssetsResponse/ListAssetsResult/StateChange.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.securitycenter.v1p1beta1.ListAssetsResponse.ListAssetsResult.StateChange - */ -class StateChange -{ - /** - * State change is unused, this is the canonical default for this enum. - * - * Generated from protobuf enum UNUSED = 0; - */ - const UNUSED = 0; - /** - * Asset was added between the points in time. - * - * Generated from protobuf enum ADDED = 1; - */ - const ADDED = 1; - /** - * Asset was removed between the points in time. - * - * Generated from protobuf enum REMOVED = 2; - */ - const REMOVED = 2; - /** - * Asset was present at both point(s) in time. - * - * Generated from protobuf enum ACTIVE = 3; - */ - const ACTIVE = 3; - - private static $valueToName = [ - self::UNUSED => 'UNUSED', - self::ADDED => 'ADDED', - self::REMOVED => 'REMOVED', - self::ACTIVE => 'ACTIVE', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(StateChange::class, \Google\Cloud\SecurityCenter\V1p1beta1\ListAssetsResponse_ListAssetsResult_StateChange::class); - diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListAssetsResponse_ListAssetsResult.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListAssetsResponse_ListAssetsResult.php deleted file mode 100644 index 4dbc0b0f898e..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListAssetsResponse_ListAssetsResult.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.securitycenter.v1p1beta1.ListFindingsRequest - */ -class ListFindingsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the source the findings belong to. Its format is - * "organizations/[organization_id]/sources/[source_id], - * folders/[folder_id]/sources/[source_id], or - * projects/[project_id]/sources/[source_id]". To list across all sources - * provide a source_id of `-`. For example: - * organizations/{organization_id}/sources/-, folders/{folder_id}/sources/- or - * projects/{projects_id}/sources/- - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Expression that defines the filter to apply across findings. - * The expression is a list of one or more restrictions combined via logical - * operators `AND` and `OR`. - * Parentheses are supported, and `OR` has higher precedence than `AND`. - * Restrictions have the form ` ` and may have a `-` - * character in front of them to indicate negation. Examples include: - * * name - * * source_properties.a_property - * * security_marks.marks.marka - * The supported operators are: - * * `=` for all value types. - * * `>`, `<`, `>=`, `<=` for integer values. - * * `:`, meaning substring matching, for strings. - * The supported value types are: - * * string literals in quotes. - * * integer literals without quotes. - * * boolean literals `true` and `false` without quotes. - * The following field and operator combinations are supported: - * * name: `=` - * * parent: `=`, `:` - * * resource_name: `=`, `:` - * * state: `=`, `:` - * * category: `=`, `:` - * * external_uri: `=`, `:` - * * event_time: `=`, `>`, `<`, `>=`, `<=` - * * severity: `=`, `:` - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `event_time = "2019-06-10T16:07:18-07:00"` - * `event_time = 1560208038000` - * security_marks.marks: `=`, `:` - * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - * For example, `source_properties.size = 100` is a valid filter string. - * Use a partial match on the empty string to filter based on a property - * existing: `source_properties.my_property : ""` - * Use a negated partial match on the empty string to filter based on a - * property not existing: `-source_properties.my_property : ""` - * - * Generated from protobuf field string filter = 2; - */ - protected $filter = ''; - /** - * Expression that defines what fields and order to use for sorting. The - * string value should follow SQL syntax: comma separated list of fields. For - * example: "name,resource_properties.a_property". The default sorting order - * is ascending. To specify descending order for a field, a suffix " desc" - * should be appended to the field name. For example: "name - * desc,source_properties.a_property". Redundant space characters in the - * syntax are insignificant. "name desc,source_properties.a_property" and " - * name desc , source_properties.a_property " are equivalent. - * The following fields are supported: - * name - * parent - * state - * category - * resource_name - * event_time - * source_properties - * security_marks.marks - * - * Generated from protobuf field string order_by = 3; - */ - protected $order_by = ''; - /** - * Time used as a reference point when filtering findings. The filter is - * limited to findings existing at the supplied time and their values are - * those at that specific time. Absence of this field will default to the - * API's version of NOW. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; - */ - protected $read_time = null; - /** - * When compare_duration is set, the ListFindingsResult's "state_change" - * attribute is updated to indicate whether the finding had its state changed, - * the finding's state remained unchanged, or if the finding was added in any - * state during the compare_duration period of time that precedes the - * read_time. This is the time between (read_time - compare_duration) and - * read_time. - * The state_change value is derived based on the presence and state of the - * finding at the two points in time. Intermediate state changes between the - * two times don't affect the result. For example, the results aren't affected - * if the finding is made inactive and then active again. - * Possible "state_change" values when compare_duration is specified: - * * "CHANGED": indicates that the finding was present and matched the given - * filter at the start of compare_duration, but changed its - * state at read_time. - * * "UNCHANGED": indicates that the finding was present and matched the given - * filter at the start of compare_duration and did not change - * state at read_time. - * * "ADDED": indicates that the finding did not match the given filter or - * was not present at the start of compare_duration, but was - * present at read_time. - * * "REMOVED": indicates that the finding was present and matched the - * filter at the start of compare_duration, but did not match - * the filter at read_time. - * If compare_duration is not specified, then the only possible state_change - * is "UNUSED", which will be the state_change set for all findings present at - * read_time. - * - * Generated from protobuf field .google.protobuf.Duration compare_duration = 5; - */ - protected $compare_duration = null; - /** - * A field mask to specify the Finding fields to be listed in the response. - * An empty field mask will list all fields. - * - * Generated from protobuf field .google.protobuf.FieldMask field_mask = 7; - */ - protected $field_mask = null; - /** - * The value returned by the last `ListFindingsResponse`; indicates - * that this is a continuation of a prior `ListFindings` call, and - * that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 8; - */ - protected $page_token = ''; - /** - * The maximum number of results to return in a single response. Default is - * 10, minimum is 1, maximum is 1000. - * - * Generated from protobuf field int32 page_size = 9; - */ - protected $page_size = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Name of the source the findings belong to. Its format is - * "organizations/[organization_id]/sources/[source_id], - * folders/[folder_id]/sources/[source_id], or - * projects/[project_id]/sources/[source_id]". To list across all sources - * provide a source_id of `-`. For example: - * organizations/{organization_id}/sources/-, folders/{folder_id}/sources/- or - * projects/{projects_id}/sources/- - * @type string $filter - * Expression that defines the filter to apply across findings. - * The expression is a list of one or more restrictions combined via logical - * operators `AND` and `OR`. - * Parentheses are supported, and `OR` has higher precedence than `AND`. - * Restrictions have the form ` ` and may have a `-` - * character in front of them to indicate negation. Examples include: - * * name - * * source_properties.a_property - * * security_marks.marks.marka - * The supported operators are: - * * `=` for all value types. - * * `>`, `<`, `>=`, `<=` for integer values. - * * `:`, meaning substring matching, for strings. - * The supported value types are: - * * string literals in quotes. - * * integer literals without quotes. - * * boolean literals `true` and `false` without quotes. - * The following field and operator combinations are supported: - * * name: `=` - * * parent: `=`, `:` - * * resource_name: `=`, `:` - * * state: `=`, `:` - * * category: `=`, `:` - * * external_uri: `=`, `:` - * * event_time: `=`, `>`, `<`, `>=`, `<=` - * * severity: `=`, `:` - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `event_time = "2019-06-10T16:07:18-07:00"` - * `event_time = 1560208038000` - * security_marks.marks: `=`, `:` - * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - * For example, `source_properties.size = 100` is a valid filter string. - * Use a partial match on the empty string to filter based on a property - * existing: `source_properties.my_property : ""` - * Use a negated partial match on the empty string to filter based on a - * property not existing: `-source_properties.my_property : ""` - * @type string $order_by - * Expression that defines what fields and order to use for sorting. The - * string value should follow SQL syntax: comma separated list of fields. For - * example: "name,resource_properties.a_property". The default sorting order - * is ascending. To specify descending order for a field, a suffix " desc" - * should be appended to the field name. For example: "name - * desc,source_properties.a_property". Redundant space characters in the - * syntax are insignificant. "name desc,source_properties.a_property" and " - * name desc , source_properties.a_property " are equivalent. - * The following fields are supported: - * name - * parent - * state - * category - * resource_name - * event_time - * source_properties - * security_marks.marks - * @type \Google\Protobuf\Timestamp $read_time - * Time used as a reference point when filtering findings. The filter is - * limited to findings existing at the supplied time and their values are - * those at that specific time. Absence of this field will default to the - * API's version of NOW. - * @type \Google\Protobuf\Duration $compare_duration - * When compare_duration is set, the ListFindingsResult's "state_change" - * attribute is updated to indicate whether the finding had its state changed, - * the finding's state remained unchanged, or if the finding was added in any - * state during the compare_duration period of time that precedes the - * read_time. This is the time between (read_time - compare_duration) and - * read_time. - * The state_change value is derived based on the presence and state of the - * finding at the two points in time. Intermediate state changes between the - * two times don't affect the result. For example, the results aren't affected - * if the finding is made inactive and then active again. - * Possible "state_change" values when compare_duration is specified: - * * "CHANGED": indicates that the finding was present and matched the given - * filter at the start of compare_duration, but changed its - * state at read_time. - * * "UNCHANGED": indicates that the finding was present and matched the given - * filter at the start of compare_duration and did not change - * state at read_time. - * * "ADDED": indicates that the finding did not match the given filter or - * was not present at the start of compare_duration, but was - * present at read_time. - * * "REMOVED": indicates that the finding was present and matched the - * filter at the start of compare_duration, but did not match - * the filter at read_time. - * If compare_duration is not specified, then the only possible state_change - * is "UNUSED", which will be the state_change set for all findings present at - * read_time. - * @type \Google\Protobuf\FieldMask $field_mask - * A field mask to specify the Finding fields to be listed in the response. - * An empty field mask will list all fields. - * @type string $page_token - * The value returned by the last `ListFindingsResponse`; indicates - * that this is a continuation of a prior `ListFindings` call, and - * that the system should return the next page of data. - * @type int $page_size - * The maximum number of results to return in a single response. Default is - * 10, minimum is 1, maximum is 1000. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the source the findings belong to. Its format is - * "organizations/[organization_id]/sources/[source_id], - * folders/[folder_id]/sources/[source_id], or - * projects/[project_id]/sources/[source_id]". To list across all sources - * provide a source_id of `-`. For example: - * organizations/{organization_id}/sources/-, folders/{folder_id}/sources/- or - * projects/{projects_id}/sources/- - * - * 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. Name of the source the findings belong to. Its format is - * "organizations/[organization_id]/sources/[source_id], - * folders/[folder_id]/sources/[source_id], or - * projects/[project_id]/sources/[source_id]". To list across all sources - * provide a source_id of `-`. For example: - * organizations/{organization_id}/sources/-, folders/{folder_id}/sources/- or - * projects/{projects_id}/sources/- - * - * 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; - } - - /** - * Expression that defines the filter to apply across findings. - * The expression is a list of one or more restrictions combined via logical - * operators `AND` and `OR`. - * Parentheses are supported, and `OR` has higher precedence than `AND`. - * Restrictions have the form ` ` and may have a `-` - * character in front of them to indicate negation. Examples include: - * * name - * * source_properties.a_property - * * security_marks.marks.marka - * The supported operators are: - * * `=` for all value types. - * * `>`, `<`, `>=`, `<=` for integer values. - * * `:`, meaning substring matching, for strings. - * The supported value types are: - * * string literals in quotes. - * * integer literals without quotes. - * * boolean literals `true` and `false` without quotes. - * The following field and operator combinations are supported: - * * name: `=` - * * parent: `=`, `:` - * * resource_name: `=`, `:` - * * state: `=`, `:` - * * category: `=`, `:` - * * external_uri: `=`, `:` - * * event_time: `=`, `>`, `<`, `>=`, `<=` - * * severity: `=`, `:` - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `event_time = "2019-06-10T16:07:18-07:00"` - * `event_time = 1560208038000` - * security_marks.marks: `=`, `:` - * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - * For example, `source_properties.size = 100` is a valid filter string. - * Use a partial match on the empty string to filter based on a property - * existing: `source_properties.my_property : ""` - * Use a negated partial match on the empty string to filter based on a - * property not existing: `-source_properties.my_property : ""` - * - * Generated from protobuf field string filter = 2; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Expression that defines the filter to apply across findings. - * The expression is a list of one or more restrictions combined via logical - * operators `AND` and `OR`. - * Parentheses are supported, and `OR` has higher precedence than `AND`. - * Restrictions have the form ` ` and may have a `-` - * character in front of them to indicate negation. Examples include: - * * name - * * source_properties.a_property - * * security_marks.marks.marka - * The supported operators are: - * * `=` for all value types. - * * `>`, `<`, `>=`, `<=` for integer values. - * * `:`, meaning substring matching, for strings. - * The supported value types are: - * * string literals in quotes. - * * integer literals without quotes. - * * boolean literals `true` and `false` without quotes. - * The following field and operator combinations are supported: - * * name: `=` - * * parent: `=`, `:` - * * resource_name: `=`, `:` - * * state: `=`, `:` - * * category: `=`, `:` - * * external_uri: `=`, `:` - * * event_time: `=`, `>`, `<`, `>=`, `<=` - * * severity: `=`, `:` - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `event_time = "2019-06-10T16:07:18-07:00"` - * `event_time = 1560208038000` - * security_marks.marks: `=`, `:` - * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - * For example, `source_properties.size = 100` is a valid filter string. - * Use a partial match on the empty string to filter based on a property - * existing: `source_properties.my_property : ""` - * Use a negated partial match on the empty string to filter based on a - * property not existing: `-source_properties.my_property : ""` - * - * Generated from protobuf field string filter = 2; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Expression that defines what fields and order to use for sorting. The - * string value should follow SQL syntax: comma separated list of fields. For - * example: "name,resource_properties.a_property". The default sorting order - * is ascending. To specify descending order for a field, a suffix " desc" - * should be appended to the field name. For example: "name - * desc,source_properties.a_property". Redundant space characters in the - * syntax are insignificant. "name desc,source_properties.a_property" and " - * name desc , source_properties.a_property " are equivalent. - * The following fields are supported: - * name - * parent - * state - * category - * resource_name - * event_time - * source_properties - * security_marks.marks - * - * Generated from protobuf field string order_by = 3; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Expression that defines what fields and order to use for sorting. The - * string value should follow SQL syntax: comma separated list of fields. For - * example: "name,resource_properties.a_property". The default sorting order - * is ascending. To specify descending order for a field, a suffix " desc" - * should be appended to the field name. For example: "name - * desc,source_properties.a_property". Redundant space characters in the - * syntax are insignificant. "name desc,source_properties.a_property" and " - * name desc , source_properties.a_property " are equivalent. - * The following fields are supported: - * name - * parent - * state - * category - * resource_name - * event_time - * source_properties - * security_marks.marks - * - * Generated from protobuf field string order_by = 3; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - - /** - * Time used as a reference point when filtering findings. The filter is - * limited to findings existing at the supplied time and their values are - * those at that specific time. Absence of this field will default to the - * API's version of NOW. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->read_time; - } - - public function hasReadTime() - { - return isset($this->read_time); - } - - public function clearReadTime() - { - unset($this->read_time); - } - - /** - * Time used as a reference point when filtering findings. The filter is - * limited to findings existing at the supplied time and their values are - * those at that specific time. Absence of this field will default to the - * API's version of NOW. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->read_time = $var; - - return $this; - } - - /** - * When compare_duration is set, the ListFindingsResult's "state_change" - * attribute is updated to indicate whether the finding had its state changed, - * the finding's state remained unchanged, or if the finding was added in any - * state during the compare_duration period of time that precedes the - * read_time. This is the time between (read_time - compare_duration) and - * read_time. - * The state_change value is derived based on the presence and state of the - * finding at the two points in time. Intermediate state changes between the - * two times don't affect the result. For example, the results aren't affected - * if the finding is made inactive and then active again. - * Possible "state_change" values when compare_duration is specified: - * * "CHANGED": indicates that the finding was present and matched the given - * filter at the start of compare_duration, but changed its - * state at read_time. - * * "UNCHANGED": indicates that the finding was present and matched the given - * filter at the start of compare_duration and did not change - * state at read_time. - * * "ADDED": indicates that the finding did not match the given filter or - * was not present at the start of compare_duration, but was - * present at read_time. - * * "REMOVED": indicates that the finding was present and matched the - * filter at the start of compare_duration, but did not match - * the filter at read_time. - * If compare_duration is not specified, then the only possible state_change - * is "UNUSED", which will be the state_change set for all findings present at - * read_time. - * - * Generated from protobuf field .google.protobuf.Duration compare_duration = 5; - * @return \Google\Protobuf\Duration|null - */ - public function getCompareDuration() - { - return $this->compare_duration; - } - - public function hasCompareDuration() - { - return isset($this->compare_duration); - } - - public function clearCompareDuration() - { - unset($this->compare_duration); - } - - /** - * When compare_duration is set, the ListFindingsResult's "state_change" - * attribute is updated to indicate whether the finding had its state changed, - * the finding's state remained unchanged, or if the finding was added in any - * state during the compare_duration period of time that precedes the - * read_time. This is the time between (read_time - compare_duration) and - * read_time. - * The state_change value is derived based on the presence and state of the - * finding at the two points in time. Intermediate state changes between the - * two times don't affect the result. For example, the results aren't affected - * if the finding is made inactive and then active again. - * Possible "state_change" values when compare_duration is specified: - * * "CHANGED": indicates that the finding was present and matched the given - * filter at the start of compare_duration, but changed its - * state at read_time. - * * "UNCHANGED": indicates that the finding was present and matched the given - * filter at the start of compare_duration and did not change - * state at read_time. - * * "ADDED": indicates that the finding did not match the given filter or - * was not present at the start of compare_duration, but was - * present at read_time. - * * "REMOVED": indicates that the finding was present and matched the - * filter at the start of compare_duration, but did not match - * the filter at read_time. - * If compare_duration is not specified, then the only possible state_change - * is "UNUSED", which will be the state_change set for all findings present at - * read_time. - * - * Generated from protobuf field .google.protobuf.Duration compare_duration = 5; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setCompareDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->compare_duration = $var; - - return $this; - } - - /** - * A field mask to specify the Finding fields to be listed in the response. - * An empty field mask will list all fields. - * - * Generated from protobuf field .google.protobuf.FieldMask field_mask = 7; - * @return \Google\Protobuf\FieldMask|null - */ - public function getFieldMask() - { - return $this->field_mask; - } - - public function hasFieldMask() - { - return isset($this->field_mask); - } - - public function clearFieldMask() - { - unset($this->field_mask); - } - - /** - * A field mask to specify the Finding fields to be listed in the response. - * An empty field mask will list all fields. - * - * Generated from protobuf field .google.protobuf.FieldMask field_mask = 7; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setFieldMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->field_mask = $var; - - return $this; - } - - /** - * The value returned by the last `ListFindingsResponse`; indicates - * that this is a continuation of a prior `ListFindings` call, and - * that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 8; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The value returned by the last `ListFindingsResponse`; indicates - * that this is a continuation of a prior `ListFindings` call, and - * that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 8; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * The maximum number of results to return in a single response. Default is - * 10, minimum is 1, maximum is 1000. - * - * Generated from protobuf field int32 page_size = 9; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of results to return in a single response. Default is - * 10, minimum is 1, maximum is 1000. - * - * Generated from protobuf field int32 page_size = 9; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListFindingsResponse.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListFindingsResponse.php deleted file mode 100644 index d9166aab0298..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListFindingsResponse.php +++ /dev/null @@ -1,183 +0,0 @@ -google.cloud.securitycenter.v1p1beta1.ListFindingsResponse - */ -class ListFindingsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Findings matching the list request. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1p1beta1.ListFindingsResponse.ListFindingsResult list_findings_results = 1; - */ - private $list_findings_results; - /** - * Time used for executing the list request. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 2; - */ - protected $read_time = null; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results. - * - * Generated from protobuf field string next_page_token = 3; - */ - protected $next_page_token = ''; - /** - * The total number of findings matching the query. - * - * Generated from protobuf field int32 total_size = 4; - */ - protected $total_size = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\SecurityCenter\V1p1beta1\ListFindingsResponse\ListFindingsResult>|\Google\Protobuf\Internal\RepeatedField $list_findings_results - * Findings matching the list request. - * @type \Google\Protobuf\Timestamp $read_time - * Time used for executing the list request. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results. - * @type int $total_size - * The total number of findings matching the query. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Findings matching the list request. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1p1beta1.ListFindingsResponse.ListFindingsResult list_findings_results = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getListFindingsResults() - { - return $this->list_findings_results; - } - - /** - * Findings matching the list request. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1p1beta1.ListFindingsResponse.ListFindingsResult list_findings_results = 1; - * @param array<\Google\Cloud\SecurityCenter\V1p1beta1\ListFindingsResponse\ListFindingsResult>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setListFindingsResults($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1p1beta1\ListFindingsResponse\ListFindingsResult::class); - $this->list_findings_results = $arr; - - return $this; - } - - /** - * Time used for executing the list request. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->read_time; - } - - public function hasReadTime() - { - return isset($this->read_time); - } - - public function clearReadTime() - { - unset($this->read_time); - } - - /** - * Time used for executing the list request. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->read_time = $var; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results. - * - * Generated from protobuf field string next_page_token = 3; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results. - * - * Generated from protobuf field string next_page_token = 3; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * The total number of findings matching the query. - * - * Generated from protobuf field int32 total_size = 4; - * @return int - */ - public function getTotalSize() - { - return $this->total_size; - } - - /** - * The total number of findings matching the query. - * - * Generated from protobuf field int32 total_size = 4; - * @param int $var - * @return $this - */ - public function setTotalSize($var) - { - GPBUtil::checkInt32($var); - $this->total_size = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListFindingsResponse/ListFindingsResult.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListFindingsResponse/ListFindingsResult.php deleted file mode 100644 index af44be50fcb1..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListFindingsResponse/ListFindingsResult.php +++ /dev/null @@ -1,158 +0,0 @@ -google.cloud.securitycenter.v1p1beta1.ListFindingsResponse.ListFindingsResult - */ -class ListFindingsResult extends \Google\Protobuf\Internal\Message -{ - /** - * Finding matching the search request. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Finding finding = 1; - */ - protected $finding = null; - /** - * State change of the finding between the points in time. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.ListFindingsResponse.ListFindingsResult.StateChange state_change = 2; - */ - protected $state_change = 0; - /** - * Output only. Resource that is associated with this finding. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.ListFindingsResponse.ListFindingsResult.Resource resource = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $resource = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\SecurityCenter\V1p1beta1\Finding $finding - * Finding matching the search request. - * @type int $state_change - * State change of the finding between the points in time. - * @type \Google\Cloud\SecurityCenter\V1p1beta1\ListFindingsResponse\ListFindingsResult\Resource $resource - * Output only. Resource that is associated with this finding. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Finding matching the search request. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Finding finding = 1; - * @return \Google\Cloud\SecurityCenter\V1p1beta1\Finding|null - */ - public function getFinding() - { - return $this->finding; - } - - public function hasFinding() - { - return isset($this->finding); - } - - public function clearFinding() - { - unset($this->finding); - } - - /** - * Finding matching the search request. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Finding finding = 1; - * @param \Google\Cloud\SecurityCenter\V1p1beta1\Finding $var - * @return $this - */ - public function setFinding($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1p1beta1\Finding::class); - $this->finding = $var; - - return $this; - } - - /** - * State change of the finding between the points in time. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.ListFindingsResponse.ListFindingsResult.StateChange state_change = 2; - * @return int - */ - public function getStateChange() - { - return $this->state_change; - } - - /** - * State change of the finding between the points in time. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.ListFindingsResponse.ListFindingsResult.StateChange state_change = 2; - * @param int $var - * @return $this - */ - public function setStateChange($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1p1beta1\ListFindingsResponse\ListFindingsResult\StateChange::class); - $this->state_change = $var; - - return $this; - } - - /** - * Output only. Resource that is associated with this finding. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.ListFindingsResponse.ListFindingsResult.Resource resource = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\SecurityCenter\V1p1beta1\ListFindingsResponse\ListFindingsResult\Resource|null - */ - public function getResource() - { - return $this->resource; - } - - public function hasResource() - { - return isset($this->resource); - } - - public function clearResource() - { - unset($this->resource); - } - - /** - * Output only. Resource that is associated with this finding. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.ListFindingsResponse.ListFindingsResult.Resource resource = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\SecurityCenter\V1p1beta1\ListFindingsResponse\ListFindingsResult\Resource $var - * @return $this - */ - public function setResource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1p1beta1\ListFindingsResponse\ListFindingsResult\Resource::class); - $this->resource = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ListFindingsResult::class, \Google\Cloud\SecurityCenter\V1p1beta1\ListFindingsResponse_ListFindingsResult::class); - diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListFindingsResponse/ListFindingsResult/Resource.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListFindingsResponse/ListFindingsResult/Resource.php deleted file mode 100644 index 64280eb4f994..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListFindingsResponse/ListFindingsResult/Resource.php +++ /dev/null @@ -1,253 +0,0 @@ -google.cloud.securitycenter.v1p1beta1.ListFindingsResponse.ListFindingsResult.Resource - */ -class Resource extends \Google\Protobuf\Internal\Message -{ - /** - * The full resource name of the resource. See: - * https://cloud.google.com/apis/design/resource_names#full_resource_name - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The full resource name of project that the resource belongs to. - * - * Generated from protobuf field string project_name = 2; - */ - protected $project_name = ''; - /** - * The human readable name of project that the resource belongs to. - * - * Generated from protobuf field string project_display_name = 3; - */ - protected $project_display_name = ''; - /** - * The full resource name of resource's parent. - * - * Generated from protobuf field string parent_name = 4; - */ - protected $parent_name = ''; - /** - * The human readable name of resource's parent. - * - * Generated from protobuf field string parent_display_name = 5; - */ - protected $parent_display_name = ''; - /** - * Contains a Folder message for each folder in the assets ancestry. - * The first folder is the deepest nested folder, and the last folder is - * the folder directly under the Organization. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1p1beta1.Folder folders = 10; - */ - private $folders; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The full resource name of the resource. See: - * https://cloud.google.com/apis/design/resource_names#full_resource_name - * @type string $project_name - * The full resource name of project that the resource belongs to. - * @type string $project_display_name - * The human readable name of project that the resource belongs to. - * @type string $parent_name - * The full resource name of resource's parent. - * @type string $parent_display_name - * The human readable name of resource's parent. - * @type array<\Google\Cloud\SecurityCenter\V1p1beta1\Folder>|\Google\Protobuf\Internal\RepeatedField $folders - * Contains a Folder message for each folder in the assets ancestry. - * The first folder is the deepest nested folder, and the last folder is - * the folder directly under the Organization. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * The full resource name of the resource. See: - * https://cloud.google.com/apis/design/resource_names#full_resource_name - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The full resource name of the resource. See: - * https://cloud.google.com/apis/design/resource_names#full_resource_name - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The full resource name of project that the resource belongs to. - * - * Generated from protobuf field string project_name = 2; - * @return string - */ - public function getProjectName() - { - return $this->project_name; - } - - /** - * The full resource name of project that the resource belongs to. - * - * Generated from protobuf field string project_name = 2; - * @param string $var - * @return $this - */ - public function setProjectName($var) - { - GPBUtil::checkString($var, True); - $this->project_name = $var; - - return $this; - } - - /** - * The human readable name of project that the resource belongs to. - * - * Generated from protobuf field string project_display_name = 3; - * @return string - */ - public function getProjectDisplayName() - { - return $this->project_display_name; - } - - /** - * The human readable name of project that the resource belongs to. - * - * Generated from protobuf field string project_display_name = 3; - * @param string $var - * @return $this - */ - public function setProjectDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->project_display_name = $var; - - return $this; - } - - /** - * The full resource name of resource's parent. - * - * Generated from protobuf field string parent_name = 4; - * @return string - */ - public function getParentName() - { - return $this->parent_name; - } - - /** - * The full resource name of resource's parent. - * - * Generated from protobuf field string parent_name = 4; - * @param string $var - * @return $this - */ - public function setParentName($var) - { - GPBUtil::checkString($var, True); - $this->parent_name = $var; - - return $this; - } - - /** - * The human readable name of resource's parent. - * - * Generated from protobuf field string parent_display_name = 5; - * @return string - */ - public function getParentDisplayName() - { - return $this->parent_display_name; - } - - /** - * The human readable name of resource's parent. - * - * Generated from protobuf field string parent_display_name = 5; - * @param string $var - * @return $this - */ - public function setParentDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->parent_display_name = $var; - - return $this; - } - - /** - * Contains a Folder message for each folder in the assets ancestry. - * The first folder is the deepest nested folder, and the last folder is - * the folder directly under the Organization. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1p1beta1.Folder folders = 10; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFolders() - { - return $this->folders; - } - - /** - * Contains a Folder message for each folder in the assets ancestry. - * The first folder is the deepest nested folder, and the last folder is - * the folder directly under the Organization. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1p1beta1.Folder folders = 10; - * @param array<\Google\Cloud\SecurityCenter\V1p1beta1\Folder>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFolders($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1p1beta1\Folder::class); - $this->folders = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Resource::class, \Google\Cloud\SecurityCenter\V1p1beta1\ListFindingsResponse_ListFindingsResult_Resource::class); - diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListFindingsResponse/ListFindingsResult/StateChange.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListFindingsResponse/ListFindingsResult/StateChange.php deleted file mode 100644 index 4f8ad2507ab2..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListFindingsResponse/ListFindingsResult/StateChange.php +++ /dev/null @@ -1,87 +0,0 @@ -google.cloud.securitycenter.v1p1beta1.ListFindingsResponse.ListFindingsResult.StateChange - */ -class StateChange -{ - /** - * State change is unused, this is the canonical default for this enum. - * - * Generated from protobuf enum UNUSED = 0; - */ - const UNUSED = 0; - /** - * The finding has changed state in some way between the points in time - * and existed at both points. - * - * Generated from protobuf enum CHANGED = 1; - */ - const CHANGED = 1; - /** - * The finding has not changed state between the points in time and - * existed at both points. - * - * Generated from protobuf enum UNCHANGED = 2; - */ - const UNCHANGED = 2; - /** - * The finding was created between the points in time. - * - * Generated from protobuf enum ADDED = 3; - */ - const ADDED = 3; - /** - * The finding at timestamp does not match the filter specified, but it - * did at timestamp - compare_duration. - * - * Generated from protobuf enum REMOVED = 4; - */ - const REMOVED = 4; - - private static $valueToName = [ - self::UNUSED => 'UNUSED', - self::CHANGED => 'CHANGED', - self::UNCHANGED => 'UNCHANGED', - self::ADDED => 'ADDED', - self::REMOVED => 'REMOVED', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(StateChange::class, \Google\Cloud\SecurityCenter\V1p1beta1\ListFindingsResponse_ListFindingsResult_StateChange::class); - diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListFindingsResponse_ListFindingsResult.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListFindingsResponse_ListFindingsResult.php deleted file mode 100644 index ff39857548e4..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListFindingsResponse_ListFindingsResult.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.securitycenter.v1p1beta1.ListNotificationConfigsRequest - */ -class ListNotificationConfigsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the organization to list notification configs. - * Its format is "organizations/[organization_id]". - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The value returned by the last `ListNotificationConfigsResponse`; indicates - * that this is a continuation of a prior `ListNotificationConfigs` call, and - * that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 2; - */ - protected $page_token = ''; - /** - * The maximum number of results to return in a single response. Default is - * 10, minimum is 1, maximum is 1000. - * - * Generated from protobuf field int32 page_size = 3; - */ - protected $page_size = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Name of the organization to list notification configs. - * Its format is "organizations/[organization_id]". - * @type string $page_token - * The value returned by the last `ListNotificationConfigsResponse`; indicates - * that this is a continuation of a prior `ListNotificationConfigs` call, and - * that the system should return the next page of data. - * @type int $page_size - * The maximum number of results to return in a single response. Default is - * 10, minimum is 1, maximum is 1000. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the organization to list notification configs. - * Its format is "organizations/[organization_id]". - * - * 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. Name of the organization to list notification configs. - * Its format is "organizations/[organization_id]". - * - * 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; - } - - /** - * The value returned by the last `ListNotificationConfigsResponse`; indicates - * that this is a continuation of a prior `ListNotificationConfigs` call, and - * that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 2; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The value returned by the last `ListNotificationConfigsResponse`; indicates - * that this is a continuation of a prior `ListNotificationConfigs` call, and - * that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 2; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * The maximum number of results to return in a single response. Default is - * 10, minimum is 1, maximum is 1000. - * - * Generated from protobuf field int32 page_size = 3; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of results to return in a single response. Default is - * 10, minimum is 1, maximum is 1000. - * - * Generated from protobuf field int32 page_size = 3; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListNotificationConfigsResponse.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListNotificationConfigsResponse.php deleted file mode 100644 index 89c6439423d1..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListNotificationConfigsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.securitycenter.v1p1beta1.ListNotificationConfigsResponse - */ -class ListNotificationConfigsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Notification configs belonging to the requested parent. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1p1beta1.NotificationConfig notification_configs = 1; - */ - private $notification_configs; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\SecurityCenter\V1p1beta1\NotificationConfig>|\Google\Protobuf\Internal\RepeatedField $notification_configs - * Notification configs belonging to the requested parent. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Notification configs belonging to the requested parent. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1p1beta1.NotificationConfig notification_configs = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNotificationConfigs() - { - return $this->notification_configs; - } - - /** - * Notification configs belonging to the requested parent. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1p1beta1.NotificationConfig notification_configs = 1; - * @param array<\Google\Cloud\SecurityCenter\V1p1beta1\NotificationConfig>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNotificationConfigs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1p1beta1\NotificationConfig::class); - $this->notification_configs = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results. - * - * Generated from protobuf field string next_page_token = 2; - * @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/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListSourcesRequest.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListSourcesRequest.php deleted file mode 100644 index 9a7274d12191..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListSourcesRequest.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.securitycenter.v1p1beta1.ListSourcesRequest - */ -class ListSourcesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the parent of sources to list. Its format should be - * "organizations/[organization_id], folders/[folder_id], or - * projects/[project_id]". - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The value returned by the last `ListSourcesResponse`; indicates - * that this is a continuation of a prior `ListSources` call, and - * that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 2; - */ - protected $page_token = ''; - /** - * The maximum number of results to return in a single response. Default is - * 10, minimum is 1, maximum is 1000. - * - * Generated from protobuf field int32 page_size = 7; - */ - protected $page_size = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Resource name of the parent of sources to list. Its format should be - * "organizations/[organization_id], folders/[folder_id], or - * projects/[project_id]". - * @type string $page_token - * The value returned by the last `ListSourcesResponse`; indicates - * that this is a continuation of a prior `ListSources` call, and - * that the system should return the next page of data. - * @type int $page_size - * The maximum number of results to return in a single response. Default is - * 10, minimum is 1, maximum is 1000. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the parent of sources to list. Its format should be - * "organizations/[organization_id], folders/[folder_id], or - * projects/[project_id]". - * - * 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. Resource name of the parent of sources to list. Its format should be - * "organizations/[organization_id], folders/[folder_id], or - * projects/[project_id]". - * - * 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; - } - - /** - * The value returned by the last `ListSourcesResponse`; indicates - * that this is a continuation of a prior `ListSources` call, and - * that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 2; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The value returned by the last `ListSourcesResponse`; indicates - * that this is a continuation of a prior `ListSources` call, and - * that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 2; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * The maximum number of results to return in a single response. Default is - * 10, minimum is 1, maximum is 1000. - * - * Generated from protobuf field int32 page_size = 7; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of results to return in a single response. Default is - * 10, minimum is 1, maximum is 1000. - * - * Generated from protobuf field int32 page_size = 7; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListSourcesResponse.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListSourcesResponse.php deleted file mode 100644 index da561e81ec42..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/ListSourcesResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.securitycenter.v1p1beta1.ListSourcesResponse - */ -class ListSourcesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Sources belonging to the requested parent. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1p1beta1.Source sources = 1; - */ - private $sources; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\SecurityCenter\V1p1beta1\Source>|\Google\Protobuf\Internal\RepeatedField $sources - * Sources belonging to the requested parent. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Sources belonging to the requested parent. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1p1beta1.Source sources = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSources() - { - return $this->sources; - } - - /** - * Sources belonging to the requested parent. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1p1beta1.Source sources = 1; - * @param array<\Google\Cloud\SecurityCenter\V1p1beta1\Source>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSources($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1p1beta1\Source::class); - $this->sources = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results. - * - * Generated from protobuf field string next_page_token = 2; - * @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/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/NotificationConfig.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/NotificationConfig.php deleted file mode 100644 index 4c365622d5b1..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/NotificationConfig.php +++ /dev/null @@ -1,268 +0,0 @@ -google.cloud.securitycenter.v1p1beta1.NotificationConfig - */ -class NotificationConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The relative resource name of this notification config. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name - * Example: - * "organizations/{organization_id}/notificationConfigs/notify_public_bucket". - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The description of the notification config (max of 1024 characters). - * - * Generated from protobuf field string description = 2; - */ - protected $description = ''; - /** - * The type of events the config is for, e.g. FINDING. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.NotificationConfig.EventType event_type = 3; - */ - protected $event_type = 0; - /** - * The Pub/Sub topic to send notifications to. Its format is - * "projects/[project_id]/topics/[topic]". - * - * Generated from protobuf field string pubsub_topic = 4 [(.google.api.resource_reference) = { - */ - protected $pubsub_topic = ''; - /** - * Output only. The service account that needs "pubsub.topics.publish" - * permission to publish to the Pub/Sub topic. - * - * Generated from protobuf field string service_account = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $service_account = ''; - protected $notify_config; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The relative resource name of this notification config. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name - * Example: - * "organizations/{organization_id}/notificationConfigs/notify_public_bucket". - * @type string $description - * The description of the notification config (max of 1024 characters). - * @type int $event_type - * The type of events the config is for, e.g. FINDING. - * @type string $pubsub_topic - * The Pub/Sub topic to send notifications to. Its format is - * "projects/[project_id]/topics/[topic]". - * @type string $service_account - * Output only. The service account that needs "pubsub.topics.publish" - * permission to publish to the Pub/Sub topic. - * @type \Google\Cloud\SecurityCenter\V1p1beta1\NotificationConfig\StreamingConfig $streaming_config - * The config for triggering streaming-based notifications. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\NotificationConfig::initOnce(); - parent::__construct($data); - } - - /** - * The relative resource name of this notification config. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name - * Example: - * "organizations/{organization_id}/notificationConfigs/notify_public_bucket". - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The relative resource name of this notification config. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name - * Example: - * "organizations/{organization_id}/notificationConfigs/notify_public_bucket". - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The description of the notification config (max of 1024 characters). - * - * Generated from protobuf field string description = 2; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * The description of the notification config (max of 1024 characters). - * - * Generated from protobuf field string description = 2; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * The type of events the config is for, e.g. FINDING. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.NotificationConfig.EventType event_type = 3; - * @return int - */ - public function getEventType() - { - return $this->event_type; - } - - /** - * The type of events the config is for, e.g. FINDING. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.NotificationConfig.EventType event_type = 3; - * @param int $var - * @return $this - */ - public function setEventType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1p1beta1\NotificationConfig\EventType::class); - $this->event_type = $var; - - return $this; - } - - /** - * The Pub/Sub topic to send notifications to. Its format is - * "projects/[project_id]/topics/[topic]". - * - * Generated from protobuf field string pubsub_topic = 4 [(.google.api.resource_reference) = { - * @return string - */ - public function getPubsubTopic() - { - return $this->pubsub_topic; - } - - /** - * The Pub/Sub topic to send notifications to. Its format is - * "projects/[project_id]/topics/[topic]". - * - * Generated from protobuf field string pubsub_topic = 4 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setPubsubTopic($var) - { - GPBUtil::checkString($var, True); - $this->pubsub_topic = $var; - - return $this; - } - - /** - * Output only. The service account that needs "pubsub.topics.publish" - * permission to publish to the Pub/Sub topic. - * - * Generated from protobuf field string service_account = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getServiceAccount() - { - return $this->service_account; - } - - /** - * Output only. The service account that needs "pubsub.topics.publish" - * permission to publish to the Pub/Sub topic. - * - * Generated from protobuf field string service_account = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setServiceAccount($var) - { - GPBUtil::checkString($var, True); - $this->service_account = $var; - - return $this; - } - - /** - * The config for triggering streaming-based notifications. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig streaming_config = 6; - * @return \Google\Cloud\SecurityCenter\V1p1beta1\NotificationConfig\StreamingConfig|null - */ - public function getStreamingConfig() - { - return $this->readOneof(6); - } - - public function hasStreamingConfig() - { - return $this->hasOneof(6); - } - - /** - * The config for triggering streaming-based notifications. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig streaming_config = 6; - * @param \Google\Cloud\SecurityCenter\V1p1beta1\NotificationConfig\StreamingConfig $var - * @return $this - */ - public function setStreamingConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1p1beta1\NotificationConfig\StreamingConfig::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * @return string - */ - public function getNotifyConfig() - { - return $this->whichOneof("notify_config"); - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/NotificationConfig/EventType.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/NotificationConfig/EventType.php deleted file mode 100644 index 0b27a01f5961..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/NotificationConfig/EventType.php +++ /dev/null @@ -1,57 +0,0 @@ -google.cloud.securitycenter.v1p1beta1.NotificationConfig.EventType - */ -class EventType -{ - /** - * Unspecified event type. - * - * Generated from protobuf enum EVENT_TYPE_UNSPECIFIED = 0; - */ - const EVENT_TYPE_UNSPECIFIED = 0; - /** - * Events for findings. - * - * Generated from protobuf enum FINDING = 1; - */ - const FINDING = 1; - - private static $valueToName = [ - self::EVENT_TYPE_UNSPECIFIED => 'EVENT_TYPE_UNSPECIFIED', - self::FINDING => 'FINDING', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(EventType::class, \Google\Cloud\SecurityCenter\V1p1beta1\NotificationConfig_EventType::class); - diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/NotificationConfig/StreamingConfig.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/NotificationConfig/StreamingConfig.php deleted file mode 100644 index 448267a7d500..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/NotificationConfig/StreamingConfig.php +++ /dev/null @@ -1,131 +0,0 @@ -google.cloud.securitycenter.v1p1beta1.NotificationConfig.StreamingConfig - */ -class StreamingConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Expression that defines the filter to apply across create/update events - * of assets or findings as specified by the event type. The expression is a - * list of zero or more restrictions combined via logical operators `AND` - * and `OR`. Parentheses are supported, and `OR` has higher precedence than - * `AND`. - * Restrictions have the form ` ` and may have a - * `-` character in front of them to indicate negation. The fields map to - * those defined in the corresponding resource. - * The supported operators are: - * * `=` for all value types. - * * `>`, `<`, `>=`, `<=` for integer values. - * * `:`, meaning substring matching, for strings. - * The supported value types are: - * * string literals in quotes. - * * integer literals without quotes. - * * boolean literals `true` and `false` without quotes. - * - * Generated from protobuf field string filter = 1; - */ - protected $filter = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $filter - * Expression that defines the filter to apply across create/update events - * of assets or findings as specified by the event type. The expression is a - * list of zero or more restrictions combined via logical operators `AND` - * and `OR`. Parentheses are supported, and `OR` has higher precedence than - * `AND`. - * Restrictions have the form ` ` and may have a - * `-` character in front of them to indicate negation. The fields map to - * those defined in the corresponding resource. - * The supported operators are: - * * `=` for all value types. - * * `>`, `<`, `>=`, `<=` for integer values. - * * `:`, meaning substring matching, for strings. - * The supported value types are: - * * string literals in quotes. - * * integer literals without quotes. - * * boolean literals `true` and `false` without quotes. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\NotificationConfig::initOnce(); - parent::__construct($data); - } - - /** - * Expression that defines the filter to apply across create/update events - * of assets or findings as specified by the event type. The expression is a - * list of zero or more restrictions combined via logical operators `AND` - * and `OR`. Parentheses are supported, and `OR` has higher precedence than - * `AND`. - * Restrictions have the form ` ` and may have a - * `-` character in front of them to indicate negation. The fields map to - * those defined in the corresponding resource. - * The supported operators are: - * * `=` for all value types. - * * `>`, `<`, `>=`, `<=` for integer values. - * * `:`, meaning substring matching, for strings. - * The supported value types are: - * * string literals in quotes. - * * integer literals without quotes. - * * boolean literals `true` and `false` without quotes. - * - * Generated from protobuf field string filter = 1; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Expression that defines the filter to apply across create/update events - * of assets or findings as specified by the event type. The expression is a - * list of zero or more restrictions combined via logical operators `AND` - * and `OR`. Parentheses are supported, and `OR` has higher precedence than - * `AND`. - * Restrictions have the form ` ` and may have a - * `-` character in front of them to indicate negation. The fields map to - * those defined in the corresponding resource. - * The supported operators are: - * * `=` for all value types. - * * `>`, `<`, `>=`, `<=` for integer values. - * * `:`, meaning substring matching, for strings. - * The supported value types are: - * * string literals in quotes. - * * integer literals without quotes. - * * boolean literals `true` and `false` without quotes. - * - * Generated from protobuf field string filter = 1; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(StreamingConfig::class, \Google\Cloud\SecurityCenter\V1p1beta1\NotificationConfig_StreamingConfig::class); - diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/NotificationConfig_EventType.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/NotificationConfig_EventType.php deleted file mode 100644 index d30e8b76aedb..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/NotificationConfig_EventType.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.securitycenter.v1p1beta1.NotificationMessage - */ -class NotificationMessage extends \Google\Protobuf\Internal\Message -{ - /** - * Name of the notification config that generated current notification. - * - * Generated from protobuf field string notification_config_name = 1; - */ - protected $notification_config_name = ''; - /** - * The Cloud resource tied to the notification. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Resource resource = 3; - */ - protected $resource = null; - protected $event; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $notification_config_name - * Name of the notification config that generated current notification. - * @type \Google\Cloud\SecurityCenter\V1p1beta1\Finding $finding - * If it's a Finding based notification config, this field will be - * populated. - * @type \Google\Cloud\SecurityCenter\V1p1beta1\Resource $resource - * The Cloud resource tied to the notification. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\NotificationMessage::initOnce(); - parent::__construct($data); - } - - /** - * Name of the notification config that generated current notification. - * - * Generated from protobuf field string notification_config_name = 1; - * @return string - */ - public function getNotificationConfigName() - { - return $this->notification_config_name; - } - - /** - * Name of the notification config that generated current notification. - * - * Generated from protobuf field string notification_config_name = 1; - * @param string $var - * @return $this - */ - public function setNotificationConfigName($var) - { - GPBUtil::checkString($var, True); - $this->notification_config_name = $var; - - return $this; - } - - /** - * If it's a Finding based notification config, this field will be - * populated. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Finding finding = 2; - * @return \Google\Cloud\SecurityCenter\V1p1beta1\Finding|null - */ - public function getFinding() - { - return $this->readOneof(2); - } - - public function hasFinding() - { - return $this->hasOneof(2); - } - - /** - * If it's a Finding based notification config, this field will be - * populated. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Finding finding = 2; - * @param \Google\Cloud\SecurityCenter\V1p1beta1\Finding $var - * @return $this - */ - public function setFinding($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1p1beta1\Finding::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * The Cloud resource tied to the notification. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Resource resource = 3; - * @return \Google\Cloud\SecurityCenter\V1p1beta1\Resource|null - */ - public function getResource() - { - return $this->resource; - } - - public function hasResource() - { - return isset($this->resource); - } - - public function clearResource() - { - unset($this->resource); - } - - /** - * The Cloud resource tied to the notification. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Resource resource = 3; - * @param \Google\Cloud\SecurityCenter\V1p1beta1\Resource $var - * @return $this - */ - public function setResource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1p1beta1\Resource::class); - $this->resource = $var; - - return $this; - } - - /** - * @return string - */ - public function getEvent() - { - return $this->whichOneof("event"); - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/OrganizationSettings.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/OrganizationSettings.php deleted file mode 100644 index ad4b7cd0210c..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/OrganizationSettings.php +++ /dev/null @@ -1,170 +0,0 @@ -google.cloud.securitycenter.v1p1beta1.OrganizationSettings - */ -class OrganizationSettings extends \Google\Protobuf\Internal\Message -{ - /** - * The relative resource name of the settings. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name - * Example: - * "organizations/{organization_id}/organizationSettings". - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * A flag that indicates if Asset Discovery should be enabled. If the flag is - * set to `true`, then discovery of assets will occur. If it is set to `false, - * all historical assets will remain, but discovery of future assets will not - * occur. - * - * Generated from protobuf field bool enable_asset_discovery = 2; - */ - protected $enable_asset_discovery = false; - /** - * The configuration used for Asset Discovery runs. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.OrganizationSettings.AssetDiscoveryConfig asset_discovery_config = 3; - */ - protected $asset_discovery_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The relative resource name of the settings. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name - * Example: - * "organizations/{organization_id}/organizationSettings". - * @type bool $enable_asset_discovery - * A flag that indicates if Asset Discovery should be enabled. If the flag is - * set to `true`, then discovery of assets will occur. If it is set to `false, - * all historical assets will remain, but discovery of future assets will not - * occur. - * @type \Google\Cloud\SecurityCenter\V1p1beta1\OrganizationSettings\AssetDiscoveryConfig $asset_discovery_config - * The configuration used for Asset Discovery runs. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\OrganizationSettings::initOnce(); - parent::__construct($data); - } - - /** - * The relative resource name of the settings. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name - * Example: - * "organizations/{organization_id}/organizationSettings". - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The relative resource name of the settings. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name - * Example: - * "organizations/{organization_id}/organizationSettings". - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * A flag that indicates if Asset Discovery should be enabled. If the flag is - * set to `true`, then discovery of assets will occur. If it is set to `false, - * all historical assets will remain, but discovery of future assets will not - * occur. - * - * Generated from protobuf field bool enable_asset_discovery = 2; - * @return bool - */ - public function getEnableAssetDiscovery() - { - return $this->enable_asset_discovery; - } - - /** - * A flag that indicates if Asset Discovery should be enabled. If the flag is - * set to `true`, then discovery of assets will occur. If it is set to `false, - * all historical assets will remain, but discovery of future assets will not - * occur. - * - * Generated from protobuf field bool enable_asset_discovery = 2; - * @param bool $var - * @return $this - */ - public function setEnableAssetDiscovery($var) - { - GPBUtil::checkBool($var); - $this->enable_asset_discovery = $var; - - return $this; - } - - /** - * The configuration used for Asset Discovery runs. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.OrganizationSettings.AssetDiscoveryConfig asset_discovery_config = 3; - * @return \Google\Cloud\SecurityCenter\V1p1beta1\OrganizationSettings\AssetDiscoveryConfig|null - */ - public function getAssetDiscoveryConfig() - { - return $this->asset_discovery_config; - } - - public function hasAssetDiscoveryConfig() - { - return isset($this->asset_discovery_config); - } - - public function clearAssetDiscoveryConfig() - { - unset($this->asset_discovery_config); - } - - /** - * The configuration used for Asset Discovery runs. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.OrganizationSettings.AssetDiscoveryConfig asset_discovery_config = 3; - * @param \Google\Cloud\SecurityCenter\V1p1beta1\OrganizationSettings\AssetDiscoveryConfig $var - * @return $this - */ - public function setAssetDiscoveryConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1p1beta1\OrganizationSettings\AssetDiscoveryConfig::class); - $this->asset_discovery_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/OrganizationSettings/AssetDiscoveryConfig.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/OrganizationSettings/AssetDiscoveryConfig.php deleted file mode 100644 index c6eb1dfedea0..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/OrganizationSettings/AssetDiscoveryConfig.php +++ /dev/null @@ -1,142 +0,0 @@ -google.cloud.securitycenter.v1p1beta1.OrganizationSettings.AssetDiscoveryConfig - */ -class AssetDiscoveryConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The project ids to use for filtering asset discovery. - * - * Generated from protobuf field repeated string project_ids = 1; - */ - private $project_ids; - /** - * The mode to use for filtering asset discovery. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.OrganizationSettings.AssetDiscoveryConfig.InclusionMode inclusion_mode = 2; - */ - protected $inclusion_mode = 0; - /** - * The folder ids to use for filtering asset discovery. - * It consists of only digits, e.g., 756619654966. - * - * Generated from protobuf field repeated string folder_ids = 3; - */ - private $folder_ids; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $project_ids - * The project ids to use for filtering asset discovery. - * @type int $inclusion_mode - * The mode to use for filtering asset discovery. - * @type array|\Google\Protobuf\Internal\RepeatedField $folder_ids - * The folder ids to use for filtering asset discovery. - * It consists of only digits, e.g., 756619654966. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\OrganizationSettings::initOnce(); - parent::__construct($data); - } - - /** - * The project ids to use for filtering asset discovery. - * - * Generated from protobuf field repeated string project_ids = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getProjectIds() - { - return $this->project_ids; - } - - /** - * The project ids to use for filtering asset discovery. - * - * Generated from protobuf field repeated string project_ids = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setProjectIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->project_ids = $arr; - - return $this; - } - - /** - * The mode to use for filtering asset discovery. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.OrganizationSettings.AssetDiscoveryConfig.InclusionMode inclusion_mode = 2; - * @return int - */ - public function getInclusionMode() - { - return $this->inclusion_mode; - } - - /** - * The mode to use for filtering asset discovery. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.OrganizationSettings.AssetDiscoveryConfig.InclusionMode inclusion_mode = 2; - * @param int $var - * @return $this - */ - public function setInclusionMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1p1beta1\OrganizationSettings\AssetDiscoveryConfig\InclusionMode::class); - $this->inclusion_mode = $var; - - return $this; - } - - /** - * The folder ids to use for filtering asset discovery. - * It consists of only digits, e.g., 756619654966. - * - * Generated from protobuf field repeated string folder_ids = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFolderIds() - { - return $this->folder_ids; - } - - /** - * The folder ids to use for filtering asset discovery. - * It consists of only digits, e.g., 756619654966. - * - * Generated from protobuf field repeated string folder_ids = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFolderIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->folder_ids = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AssetDiscoveryConfig::class, \Google\Cloud\SecurityCenter\V1p1beta1\OrganizationSettings_AssetDiscoveryConfig::class); - diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/OrganizationSettings/AssetDiscoveryConfig/InclusionMode.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/OrganizationSettings/AssetDiscoveryConfig/InclusionMode.php deleted file mode 100644 index 2e218d0692dc..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/OrganizationSettings/AssetDiscoveryConfig/InclusionMode.php +++ /dev/null @@ -1,74 +0,0 @@ -google.cloud.securitycenter.v1p1beta1.OrganizationSettings.AssetDiscoveryConfig.InclusionMode - */ -class InclusionMode -{ - /** - * Unspecified. Setting the mode with this value will disable - * inclusion/exclusion filtering for Asset Discovery. - * - * Generated from protobuf enum INCLUSION_MODE_UNSPECIFIED = 0; - */ - const INCLUSION_MODE_UNSPECIFIED = 0; - /** - * Asset Discovery will capture only the resources within the projects - * specified. All other resources will be ignored. - * - * Generated from protobuf enum INCLUDE_ONLY = 1; - */ - const INCLUDE_ONLY = 1; - /** - * Asset Discovery will ignore all resources under the projects specified. - * All other resources will be retrieved. - * - * Generated from protobuf enum EXCLUDE = 2; - */ - const EXCLUDE = 2; - - private static $valueToName = [ - self::INCLUSION_MODE_UNSPECIFIED => 'INCLUSION_MODE_UNSPECIFIED', - self::INCLUDE_ONLY => 'INCLUDE_ONLY', - self::EXCLUDE => 'EXCLUDE', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(InclusionMode::class, \Google\Cloud\SecurityCenter\V1p1beta1\OrganizationSettings_AssetDiscoveryConfig_InclusionMode::class); - diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/OrganizationSettings_AssetDiscoveryConfig.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/OrganizationSettings_AssetDiscoveryConfig.php deleted file mode 100644 index b2a35ea72cbf..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/OrganizationSettings_AssetDiscoveryConfig.php +++ /dev/null @@ -1,16 +0,0 @@ -google.cloud.securitycenter.v1p1beta1.Resource - */ -class Resource extends \Google\Protobuf\Internal\Message -{ - /** - * The full resource name of the resource. See: - * https://cloud.google.com/apis/design/resource_names#full_resource_name - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The full resource name of project that the resource belongs to. - * - * Generated from protobuf field string project = 2; - */ - protected $project = ''; - /** - * The human readable name of project that the resource belongs to. - * - * Generated from protobuf field string project_display_name = 3; - */ - protected $project_display_name = ''; - /** - * The full resource name of resource's parent. - * - * Generated from protobuf field string parent = 4; - */ - protected $parent = ''; - /** - * The human readable name of resource's parent. - * - * Generated from protobuf field string parent_display_name = 5; - */ - protected $parent_display_name = ''; - /** - * Output only. Contains a Folder message for each folder in the assets ancestry. - * The first folder is the deepest nested folder, and the last folder is the - * folder directly under the Organization. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1p1beta1.Folder folders = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $folders; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The full resource name of the resource. See: - * https://cloud.google.com/apis/design/resource_names#full_resource_name - * @type string $project - * The full resource name of project that the resource belongs to. - * @type string $project_display_name - * The human readable name of project that the resource belongs to. - * @type string $parent - * The full resource name of resource's parent. - * @type string $parent_display_name - * The human readable name of resource's parent. - * @type array<\Google\Cloud\SecurityCenter\V1p1beta1\Folder>|\Google\Protobuf\Internal\RepeatedField $folders - * Output only. Contains a Folder message for each folder in the assets ancestry. - * The first folder is the deepest nested folder, and the last folder is the - * folder directly under the Organization. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\Resource::initOnce(); - parent::__construct($data); - } - - /** - * The full resource name of the resource. See: - * https://cloud.google.com/apis/design/resource_names#full_resource_name - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The full resource name of the resource. See: - * https://cloud.google.com/apis/design/resource_names#full_resource_name - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The full resource name of project that the resource belongs to. - * - * Generated from protobuf field string project = 2; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * The full resource name of project that the resource belongs to. - * - * Generated from protobuf field string project = 2; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - - /** - * The human readable name of project that the resource belongs to. - * - * Generated from protobuf field string project_display_name = 3; - * @return string - */ - public function getProjectDisplayName() - { - return $this->project_display_name; - } - - /** - * The human readable name of project that the resource belongs to. - * - * Generated from protobuf field string project_display_name = 3; - * @param string $var - * @return $this - */ - public function setProjectDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->project_display_name = $var; - - return $this; - } - - /** - * The full resource name of resource's parent. - * - * Generated from protobuf field string parent = 4; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * The full resource name of resource's parent. - * - * Generated from protobuf field string parent = 4; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The human readable name of resource's parent. - * - * Generated from protobuf field string parent_display_name = 5; - * @return string - */ - public function getParentDisplayName() - { - return $this->parent_display_name; - } - - /** - * The human readable name of resource's parent. - * - * Generated from protobuf field string parent_display_name = 5; - * @param string $var - * @return $this - */ - public function setParentDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->parent_display_name = $var; - - return $this; - } - - /** - * Output only. Contains a Folder message for each folder in the assets ancestry. - * The first folder is the deepest nested folder, and the last folder is the - * folder directly under the Organization. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1p1beta1.Folder folders = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFolders() - { - return $this->folders; - } - - /** - * Output only. Contains a Folder message for each folder in the assets ancestry. - * The first folder is the deepest nested folder, and the last folder is the - * folder directly under the Organization. - * - * Generated from protobuf field repeated .google.cloud.securitycenter.v1p1beta1.Folder folders = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\SecurityCenter\V1p1beta1\Folder>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFolders($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1p1beta1\Folder::class); - $this->folders = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/RunAssetDiscoveryRequest.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/RunAssetDiscoveryRequest.php deleted file mode 100644 index 7cf38c3e5319..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/RunAssetDiscoveryRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.securitycenter.v1p1beta1.RunAssetDiscoveryRequest - */ -class RunAssetDiscoveryRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the organization to run asset discovery for. Its format is - * "organizations/[organization_id]". - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Name of the organization to run asset discovery for. Its format is - * "organizations/[organization_id]". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the organization to run asset discovery for. Its format is - * "organizations/[organization_id]". - * - * 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. Name of the organization to run asset discovery for. Its format is - * "organizations/[organization_id]". - * - * 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; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/RunAssetDiscoveryResponse.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/RunAssetDiscoveryResponse.php deleted file mode 100644 index 3e04eb554e2a..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/RunAssetDiscoveryResponse.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.securitycenter.v1p1beta1.RunAssetDiscoveryResponse - */ -class RunAssetDiscoveryResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The state of an asset discovery run. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.RunAssetDiscoveryResponse.State state = 1; - */ - protected $state = 0; - /** - * The duration between asset discovery run start and end - * - * Generated from protobuf field .google.protobuf.Duration duration = 2; - */ - protected $duration = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $state - * The state of an asset discovery run. - * @type \Google\Protobuf\Duration $duration - * The duration between asset discovery run start and end - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\RunAssetDiscoveryResponse::initOnce(); - parent::__construct($data); - } - - /** - * The state of an asset discovery run. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.RunAssetDiscoveryResponse.State state = 1; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The state of an asset discovery run. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.RunAssetDiscoveryResponse.State state = 1; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1p1beta1\RunAssetDiscoveryResponse\State::class); - $this->state = $var; - - return $this; - } - - /** - * The duration between asset discovery run start and end - * - * Generated from protobuf field .google.protobuf.Duration duration = 2; - * @return \Google\Protobuf\Duration|null - */ - public function getDuration() - { - return $this->duration; - } - - public function hasDuration() - { - return isset($this->duration); - } - - public function clearDuration() - { - unset($this->duration); - } - - /** - * The duration between asset discovery run start and end - * - * Generated from protobuf field .google.protobuf.Duration duration = 2; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->duration = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/RunAssetDiscoveryResponse/State.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/RunAssetDiscoveryResponse/State.php deleted file mode 100644 index ca26f2bcbecd..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/RunAssetDiscoveryResponse/State.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.securitycenter.v1p1beta1.RunAssetDiscoveryResponse.State - */ -class State -{ - /** - * Asset discovery run state was unspecified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Asset discovery run completed successfully. - * - * Generated from protobuf enum COMPLETED = 1; - */ - const COMPLETED = 1; - /** - * Asset discovery run was cancelled with tasks still pending, as another - * run for the same organization was started with a higher priority. - * - * Generated from protobuf enum SUPERSEDED = 2; - */ - const SUPERSEDED = 2; - /** - * Asset discovery run was killed and terminated. - * - * Generated from protobuf enum TERMINATED = 3; - */ - const TERMINATED = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::COMPLETED => 'COMPLETED', - self::SUPERSEDED => 'SUPERSEDED', - self::TERMINATED => 'TERMINATED', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\SecurityCenter\V1p1beta1\RunAssetDiscoveryResponse_State::class); - diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/RunAssetDiscoveryResponse_State.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/RunAssetDiscoveryResponse_State.php deleted file mode 100644 index 742ab00f3ac1..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/RunAssetDiscoveryResponse_State.php +++ /dev/null @@ -1,16 +0,0 @@ -_simpleRequest('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/CreateSource', - $argument, - ['\Google\Cloud\SecurityCenter\V1p1beta1\Source', 'decode'], - $metadata, $options); - } - - /** - * Creates a finding. The corresponding source must exist for finding - * creation to succeed. - * @param \Google\Cloud\SecurityCenter\V1p1beta1\CreateFindingRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateFinding(\Google\Cloud\SecurityCenter\V1p1beta1\CreateFindingRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/CreateFinding', - $argument, - ['\Google\Cloud\SecurityCenter\V1p1beta1\Finding', 'decode'], - $metadata, $options); - } - - /** - * Creates a notification config. - * @param \Google\Cloud\SecurityCenter\V1p1beta1\CreateNotificationConfigRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function CreateNotificationConfig(\Google\Cloud\SecurityCenter\V1p1beta1\CreateNotificationConfigRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/CreateNotificationConfig', - $argument, - ['\Google\Cloud\SecurityCenter\V1p1beta1\NotificationConfig', 'decode'], - $metadata, $options); - } - - /** - * Deletes a notification config. - * @param \Google\Cloud\SecurityCenter\V1p1beta1\DeleteNotificationConfigRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function DeleteNotificationConfig(\Google\Cloud\SecurityCenter\V1p1beta1\DeleteNotificationConfigRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/DeleteNotificationConfig', - $argument, - ['\Google\Protobuf\GPBEmpty', 'decode'], - $metadata, $options); - } - - /** - * Gets the access control policy on the specified Source. - * @param \Google\Cloud\Iam\V1\GetIamPolicyRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetIamPolicy(\Google\Cloud\Iam\V1\GetIamPolicyRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/GetIamPolicy', - $argument, - ['\Google\Cloud\Iam\V1\Policy', 'decode'], - $metadata, $options); - } - - /** - * Gets a notification config. - * @param \Google\Cloud\SecurityCenter\V1p1beta1\GetNotificationConfigRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetNotificationConfig(\Google\Cloud\SecurityCenter\V1p1beta1\GetNotificationConfigRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/GetNotificationConfig', - $argument, - ['\Google\Cloud\SecurityCenter\V1p1beta1\NotificationConfig', 'decode'], - $metadata, $options); - } - - /** - * Gets the settings for an organization. - * @param \Google\Cloud\SecurityCenter\V1p1beta1\GetOrganizationSettingsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetOrganizationSettings(\Google\Cloud\SecurityCenter\V1p1beta1\GetOrganizationSettingsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/GetOrganizationSettings', - $argument, - ['\Google\Cloud\SecurityCenter\V1p1beta1\OrganizationSettings', 'decode'], - $metadata, $options); - } - - /** - * Gets a source. - * @param \Google\Cloud\SecurityCenter\V1p1beta1\GetSourceRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GetSource(\Google\Cloud\SecurityCenter\V1p1beta1\GetSourceRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/GetSource', - $argument, - ['\Google\Cloud\SecurityCenter\V1p1beta1\Source', 'decode'], - $metadata, $options); - } - - /** - * Filters an organization's assets and groups them by their specified - * properties. - * @param \Google\Cloud\SecurityCenter\V1p1beta1\GroupAssetsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GroupAssets(\Google\Cloud\SecurityCenter\V1p1beta1\GroupAssetsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/GroupAssets', - $argument, - ['\Google\Cloud\SecurityCenter\V1p1beta1\GroupAssetsResponse', 'decode'], - $metadata, $options); - } - - /** - * Filters an organization or source's findings and groups them by their - * specified properties. - * - * To group across all sources provide a `-` as the source id. - * Example: /v1/organizations/{organization_id}/sources/-/findings, - * /v1/folders/{folder_id}/sources/-/findings, - * /v1/projects/{project_id}/sources/-/findings - * @param \Google\Cloud\SecurityCenter\V1p1beta1\GroupFindingsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function GroupFindings(\Google\Cloud\SecurityCenter\V1p1beta1\GroupFindingsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/GroupFindings', - $argument, - ['\Google\Cloud\SecurityCenter\V1p1beta1\GroupFindingsResponse', 'decode'], - $metadata, $options); - } - - /** - * Lists an organization's assets. - * @param \Google\Cloud\SecurityCenter\V1p1beta1\ListAssetsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListAssets(\Google\Cloud\SecurityCenter\V1p1beta1\ListAssetsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/ListAssets', - $argument, - ['\Google\Cloud\SecurityCenter\V1p1beta1\ListAssetsResponse', 'decode'], - $metadata, $options); - } - - /** - * Lists an organization or source's findings. - * - * To list across all sources provide a `-` as the source id. - * Example: /v1p1beta1/organizations/{organization_id}/sources/-/findings - * @param \Google\Cloud\SecurityCenter\V1p1beta1\ListFindingsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListFindings(\Google\Cloud\SecurityCenter\V1p1beta1\ListFindingsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/ListFindings', - $argument, - ['\Google\Cloud\SecurityCenter\V1p1beta1\ListFindingsResponse', 'decode'], - $metadata, $options); - } - - /** - * Lists notification configs. - * @param \Google\Cloud\SecurityCenter\V1p1beta1\ListNotificationConfigsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListNotificationConfigs(\Google\Cloud\SecurityCenter\V1p1beta1\ListNotificationConfigsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/ListNotificationConfigs', - $argument, - ['\Google\Cloud\SecurityCenter\V1p1beta1\ListNotificationConfigsResponse', 'decode'], - $metadata, $options); - } - - /** - * Lists all sources belonging to an organization. - * @param \Google\Cloud\SecurityCenter\V1p1beta1\ListSourcesRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function ListSources(\Google\Cloud\SecurityCenter\V1p1beta1\ListSourcesRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/ListSources', - $argument, - ['\Google\Cloud\SecurityCenter\V1p1beta1\ListSourcesResponse', 'decode'], - $metadata, $options); - } - - /** - * Runs asset discovery. The discovery is tracked with a long-running - * operation. - * - * This API can only be called with limited frequency for an organization. If - * it is called too frequently the caller will receive a TOO_MANY_REQUESTS - * error. - * @param \Google\Cloud\SecurityCenter\V1p1beta1\RunAssetDiscoveryRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function RunAssetDiscovery(\Google\Cloud\SecurityCenter\V1p1beta1\RunAssetDiscoveryRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/RunAssetDiscovery', - $argument, - ['\Google\LongRunning\Operation', 'decode'], - $metadata, $options); - } - - /** - * Updates the state of a finding. - * @param \Google\Cloud\SecurityCenter\V1p1beta1\SetFindingStateRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function SetFindingState(\Google\Cloud\SecurityCenter\V1p1beta1\SetFindingStateRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/SetFindingState', - $argument, - ['\Google\Cloud\SecurityCenter\V1p1beta1\Finding', 'decode'], - $metadata, $options); - } - - /** - * Sets the access control policy on the specified Source. - * @param \Google\Cloud\Iam\V1\SetIamPolicyRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function SetIamPolicy(\Google\Cloud\Iam\V1\SetIamPolicyRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/SetIamPolicy', - $argument, - ['\Google\Cloud\Iam\V1\Policy', 'decode'], - $metadata, $options); - } - - /** - * Returns the permissions that a caller has on the specified source. - * @param \Google\Cloud\Iam\V1\TestIamPermissionsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function TestIamPermissions(\Google\Cloud\Iam\V1\TestIamPermissionsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/TestIamPermissions', - $argument, - ['\Google\Cloud\Iam\V1\TestIamPermissionsResponse', 'decode'], - $metadata, $options); - } - - /** - * Creates or updates a finding. The corresponding source must exist for a - * finding creation to succeed. - * @param \Google\Cloud\SecurityCenter\V1p1beta1\UpdateFindingRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateFinding(\Google\Cloud\SecurityCenter\V1p1beta1\UpdateFindingRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/UpdateFinding', - $argument, - ['\Google\Cloud\SecurityCenter\V1p1beta1\Finding', 'decode'], - $metadata, $options); - } - - /** - * Updates a notification config. The following update - * fields are allowed: description, pubsub_topic, streaming_config.filter - * @param \Google\Cloud\SecurityCenter\V1p1beta1\UpdateNotificationConfigRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateNotificationConfig(\Google\Cloud\SecurityCenter\V1p1beta1\UpdateNotificationConfigRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/UpdateNotificationConfig', - $argument, - ['\Google\Cloud\SecurityCenter\V1p1beta1\NotificationConfig', 'decode'], - $metadata, $options); - } - - /** - * Updates an organization's settings. - * @param \Google\Cloud\SecurityCenter\V1p1beta1\UpdateOrganizationSettingsRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateOrganizationSettings(\Google\Cloud\SecurityCenter\V1p1beta1\UpdateOrganizationSettingsRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/UpdateOrganizationSettings', - $argument, - ['\Google\Cloud\SecurityCenter\V1p1beta1\OrganizationSettings', 'decode'], - $metadata, $options); - } - - /** - * Updates a source. - * @param \Google\Cloud\SecurityCenter\V1p1beta1\UpdateSourceRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateSource(\Google\Cloud\SecurityCenter\V1p1beta1\UpdateSourceRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/UpdateSource', - $argument, - ['\Google\Cloud\SecurityCenter\V1p1beta1\Source', 'decode'], - $metadata, $options); - } - - /** - * Updates security marks. - * @param \Google\Cloud\SecurityCenter\V1p1beta1\UpdateSecurityMarksRequest $argument input argument - * @param array $metadata metadata - * @param array $options call options - * @return \Grpc\UnaryCall - */ - public function UpdateSecurityMarks(\Google\Cloud\SecurityCenter\V1p1beta1\UpdateSecurityMarksRequest $argument, - $metadata = [], $options = []) { - return $this->_simpleRequest('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/UpdateSecurityMarks', - $argument, - ['\Google\Cloud\SecurityCenter\V1p1beta1\SecurityMarks', 'decode'], - $metadata, $options); - } - -} diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/SecurityMarks.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/SecurityMarks.php deleted file mode 100644 index 764bcfd68bb2..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/SecurityMarks.php +++ /dev/null @@ -1,206 +0,0 @@ -google.cloud.securitycenter.v1p1beta1.SecurityMarks - */ -class SecurityMarks extends \Google\Protobuf\Internal\Message -{ - /** - * The relative resource name of the SecurityMarks. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name - * Examples: - * "organizations/{organization_id}/assets/{asset_id}/securityMarks" - * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks". - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Mutable user specified security marks belonging to the parent resource. - * Constraints are as follows: - * * Keys and values are treated as case insensitive - * * Keys must be between 1 - 256 characters (inclusive) - * * Keys must be letters, numbers, underscores, or dashes - * * Values have leading and trailing whitespace trimmed, remaining - * characters must be between 1 - 4096 characters (inclusive) - * - * Generated from protobuf field map marks = 2; - */ - private $marks; - /** - * The canonical name of the marks. - * Examples: - * "organizations/{organization_id}/assets/{asset_id}/securityMarks" - * "folders/{folder_id}/assets/{asset_id}/securityMarks" - * "projects/{project_number}/assets/{asset_id}/securityMarks" - * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks" - * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks" - * "projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks" - * - * Generated from protobuf field string canonical_name = 3; - */ - protected $canonical_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The relative resource name of the SecurityMarks. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name - * Examples: - * "organizations/{organization_id}/assets/{asset_id}/securityMarks" - * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks". - * @type array|\Google\Protobuf\Internal\MapField $marks - * Mutable user specified security marks belonging to the parent resource. - * Constraints are as follows: - * * Keys and values are treated as case insensitive - * * Keys must be between 1 - 256 characters (inclusive) - * * Keys must be letters, numbers, underscores, or dashes - * * Values have leading and trailing whitespace trimmed, remaining - * characters must be between 1 - 4096 characters (inclusive) - * @type string $canonical_name - * The canonical name of the marks. - * Examples: - * "organizations/{organization_id}/assets/{asset_id}/securityMarks" - * "folders/{folder_id}/assets/{asset_id}/securityMarks" - * "projects/{project_number}/assets/{asset_id}/securityMarks" - * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks" - * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks" - * "projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks" - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\SecurityMarks::initOnce(); - parent::__construct($data); - } - - /** - * The relative resource name of the SecurityMarks. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name - * Examples: - * "organizations/{organization_id}/assets/{asset_id}/securityMarks" - * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks". - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The relative resource name of the SecurityMarks. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name - * Examples: - * "organizations/{organization_id}/assets/{asset_id}/securityMarks" - * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks". - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Mutable user specified security marks belonging to the parent resource. - * Constraints are as follows: - * * Keys and values are treated as case insensitive - * * Keys must be between 1 - 256 characters (inclusive) - * * Keys must be letters, numbers, underscores, or dashes - * * Values have leading and trailing whitespace trimmed, remaining - * characters must be between 1 - 4096 characters (inclusive) - * - * Generated from protobuf field map marks = 2; - * @return \Google\Protobuf\Internal\MapField - */ - public function getMarks() - { - return $this->marks; - } - - /** - * Mutable user specified security marks belonging to the parent resource. - * Constraints are as follows: - * * Keys and values are treated as case insensitive - * * Keys must be between 1 - 256 characters (inclusive) - * * Keys must be letters, numbers, underscores, or dashes - * * Values have leading and trailing whitespace trimmed, remaining - * characters must be between 1 - 4096 characters (inclusive) - * - * Generated from protobuf field map marks = 2; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setMarks($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->marks = $arr; - - return $this; - } - - /** - * The canonical name of the marks. - * Examples: - * "organizations/{organization_id}/assets/{asset_id}/securityMarks" - * "folders/{folder_id}/assets/{asset_id}/securityMarks" - * "projects/{project_number}/assets/{asset_id}/securityMarks" - * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks" - * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks" - * "projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks" - * - * Generated from protobuf field string canonical_name = 3; - * @return string - */ - public function getCanonicalName() - { - return $this->canonical_name; - } - - /** - * The canonical name of the marks. - * Examples: - * "organizations/{organization_id}/assets/{asset_id}/securityMarks" - * "folders/{folder_id}/assets/{asset_id}/securityMarks" - * "projects/{project_number}/assets/{asset_id}/securityMarks" - * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks" - * "folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks" - * "projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks" - * - * Generated from protobuf field string canonical_name = 3; - * @param string $var - * @return $this - */ - public function setCanonicalName($var) - { - GPBUtil::checkString($var, True); - $this->canonical_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/SetFindingStateRequest.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/SetFindingStateRequest.php deleted file mode 100644 index b4da815ef956..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/SetFindingStateRequest.php +++ /dev/null @@ -1,157 +0,0 @@ -google.cloud.securitycenter.v1p1beta1.SetFindingStateRequest - */ -class SetFindingStateRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The relative resource name of the finding. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name - * Example: - * "organizations/{organization_id}/sources/{source_id}/finding/{finding_id}". - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The desired State of the finding. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Finding.State state = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $state = 0; - /** - * Required. The time at which the updated state takes effect. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $start_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The relative resource name of the finding. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name - * Example: - * "organizations/{organization_id}/sources/{source_id}/finding/{finding_id}". - * @type int $state - * Required. The desired State of the finding. - * @type \Google\Protobuf\Timestamp $start_time - * Required. The time at which the updated state takes effect. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The relative resource name of the finding. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name - * Example: - * "organizations/{organization_id}/sources/{source_id}/finding/{finding_id}". - * - * 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. The relative resource name of the finding. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name - * Example: - * "organizations/{organization_id}/sources/{source_id}/finding/{finding_id}". - * - * 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; - } - - /** - * Required. The desired State of the finding. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Finding.State state = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Required. The desired State of the finding. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Finding.State state = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1p1beta1\Finding\State::class); - $this->state = $var; - - return $this; - } - - /** - * Required. The time at which the updated state takes effect. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * Required. The time at which the updated state takes effect. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Source.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Source.php deleted file mode 100644 index 494d5ccd87d0..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/Source.php +++ /dev/null @@ -1,243 +0,0 @@ -google.cloud.securitycenter.v1p1beta1.Source - */ -class Source extends \Google\Protobuf\Internal\Message -{ - /** - * The relative resource name of this source. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name - * Example: - * "organizations/{organization_id}/sources/{source_id}" - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The source's display name. - * A source's display name must be unique amongst its siblings, for example, - * two sources with the same parent can't share the same display name. - * The display name must have a length between 1 and 64 characters - * (inclusive). - * - * Generated from protobuf field string display_name = 2; - */ - protected $display_name = ''; - /** - * The description of the source (max of 1024 characters). - * Example: - * "Web Security Scanner is a web security scanner for common - * vulnerabilities in App Engine applications. It can automatically - * scan and detect four common vulnerabilities, including cross-site-scripting - * (XSS), Flash injection, mixed content (HTTP in HTTPS), and - * outdated/insecure libraries." - * - * Generated from protobuf field string description = 3; - */ - protected $description = ''; - /** - * The canonical name of the finding. It's either - * "organizations/{organization_id}/sources/{source_id}", - * "folders/{folder_id}/sources/{source_id}" or - * "projects/{project_number}/sources/{source_id}", - * depending on the closest CRM ancestor of the resource associated with the - * finding. - * - * Generated from protobuf field string canonical_name = 14; - */ - protected $canonical_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The relative resource name of this source. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name - * Example: - * "organizations/{organization_id}/sources/{source_id}" - * @type string $display_name - * The source's display name. - * A source's display name must be unique amongst its siblings, for example, - * two sources with the same parent can't share the same display name. - * The display name must have a length between 1 and 64 characters - * (inclusive). - * @type string $description - * The description of the source (max of 1024 characters). - * Example: - * "Web Security Scanner is a web security scanner for common - * vulnerabilities in App Engine applications. It can automatically - * scan and detect four common vulnerabilities, including cross-site-scripting - * (XSS), Flash injection, mixed content (HTTP in HTTPS), and - * outdated/insecure libraries." - * @type string $canonical_name - * The canonical name of the finding. It's either - * "organizations/{organization_id}/sources/{source_id}", - * "folders/{folder_id}/sources/{source_id}" or - * "projects/{project_number}/sources/{source_id}", - * depending on the closest CRM ancestor of the resource associated with the - * finding. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\Source::initOnce(); - parent::__construct($data); - } - - /** - * The relative resource name of this source. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name - * Example: - * "organizations/{organization_id}/sources/{source_id}" - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The relative resource name of this source. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name - * Example: - * "organizations/{organization_id}/sources/{source_id}" - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The source's display name. - * A source's display name must be unique amongst its siblings, for example, - * two sources with the same parent can't share the same display name. - * The display name must have a length between 1 and 64 characters - * (inclusive). - * - * Generated from protobuf field string display_name = 2; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The source's display name. - * A source's display name must be unique amongst its siblings, for example, - * two sources with the same parent can't share the same display name. - * The display name must have a length between 1 and 64 characters - * (inclusive). - * - * 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; - } - - /** - * The description of the source (max of 1024 characters). - * Example: - * "Web Security Scanner is a web security scanner for common - * vulnerabilities in App Engine applications. It can automatically - * scan and detect four common vulnerabilities, including cross-site-scripting - * (XSS), Flash injection, mixed content (HTTP in HTTPS), and - * outdated/insecure libraries." - * - * Generated from protobuf field string description = 3; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * The description of the source (max of 1024 characters). - * Example: - * "Web Security Scanner is a web security scanner for common - * vulnerabilities in App Engine applications. It can automatically - * scan and detect four common vulnerabilities, including cross-site-scripting - * (XSS), Flash injection, mixed content (HTTP in HTTPS), and - * outdated/insecure libraries." - * - * Generated from protobuf field string description = 3; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * The canonical name of the finding. It's either - * "organizations/{organization_id}/sources/{source_id}", - * "folders/{folder_id}/sources/{source_id}" or - * "projects/{project_number}/sources/{source_id}", - * depending on the closest CRM ancestor of the resource associated with the - * finding. - * - * Generated from protobuf field string canonical_name = 14; - * @return string - */ - public function getCanonicalName() - { - return $this->canonical_name; - } - - /** - * The canonical name of the finding. It's either - * "organizations/{organization_id}/sources/{source_id}", - * "folders/{folder_id}/sources/{source_id}" or - * "projects/{project_number}/sources/{source_id}", - * depending on the closest CRM ancestor of the resource associated with the - * finding. - * - * Generated from protobuf field string canonical_name = 14; - * @param string $var - * @return $this - */ - public function setCanonicalName($var) - { - GPBUtil::checkString($var, True); - $this->canonical_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/UpdateFindingRequest.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/UpdateFindingRequest.php deleted file mode 100644 index f56a1a74b304..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/UpdateFindingRequest.php +++ /dev/null @@ -1,157 +0,0 @@ -google.cloud.securitycenter.v1p1beta1.UpdateFindingRequest - */ -class UpdateFindingRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The finding resource to update or create if it does not already exist. - * parent, security_marks, and update_time will be ignored. - * In the case of creation, the finding id portion of the name must be - * alphanumeric and less than or equal to 32 characters and greater than 0 - * characters in length. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Finding finding = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $finding = null; - /** - * The FieldMask to use when updating the finding resource. This field should - * not be specified when creating a finding. - * When updating a finding, an empty mask is treated as updating all mutable - * fields and replacing source_properties. Individual source_properties can - * be added/updated by using "source_properties." in the field - * mask. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\SecurityCenter\V1p1beta1\Finding $finding - * Required. The finding resource to update or create if it does not already exist. - * parent, security_marks, and update_time will be ignored. - * In the case of creation, the finding id portion of the name must be - * alphanumeric and less than or equal to 32 characters and greater than 0 - * characters in length. - * @type \Google\Protobuf\FieldMask $update_mask - * The FieldMask to use when updating the finding resource. This field should - * not be specified when creating a finding. - * When updating a finding, an empty mask is treated as updating all mutable - * fields and replacing source_properties. Individual source_properties can - * be added/updated by using "source_properties." in the field - * mask. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The finding resource to update or create if it does not already exist. - * parent, security_marks, and update_time will be ignored. - * In the case of creation, the finding id portion of the name must be - * alphanumeric and less than or equal to 32 characters and greater than 0 - * characters in length. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Finding finding = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\SecurityCenter\V1p1beta1\Finding|null - */ - public function getFinding() - { - return $this->finding; - } - - public function hasFinding() - { - return isset($this->finding); - } - - public function clearFinding() - { - unset($this->finding); - } - - /** - * Required. The finding resource to update or create if it does not already exist. - * parent, security_marks, and update_time will be ignored. - * In the case of creation, the finding id portion of the name must be - * alphanumeric and less than or equal to 32 characters and greater than 0 - * characters in length. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Finding finding = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\SecurityCenter\V1p1beta1\Finding $var - * @return $this - */ - public function setFinding($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1p1beta1\Finding::class); - $this->finding = $var; - - return $this; - } - - /** - * The FieldMask to use when updating the finding resource. This field should - * not be specified when creating a finding. - * When updating a finding, an empty mask is treated as updating all mutable - * fields and replacing source_properties. Individual source_properties can - * be added/updated by using "source_properties." in the field - * mask. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * The FieldMask to use when updating the finding resource. This field should - * not be specified when creating a finding. - * When updating a finding, an empty mask is treated as updating all mutable - * fields and replacing source_properties. Individual source_properties can - * be added/updated by using "source_properties." in the field - * mask. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/UpdateNotificationConfigRequest.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/UpdateNotificationConfigRequest.php deleted file mode 100644 index bbd8b7c55d97..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/UpdateNotificationConfigRequest.php +++ /dev/null @@ -1,125 +0,0 @@ -google.cloud.securitycenter.v1p1beta1.UpdateNotificationConfigRequest - */ -class UpdateNotificationConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The notification config to update. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.NotificationConfig notification_config = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $notification_config = null; - /** - * The FieldMask to use when updating the notification config. - * If empty all mutable fields will be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\SecurityCenter\V1p1beta1\NotificationConfig $notification_config - * Required. The notification config to update. - * @type \Google\Protobuf\FieldMask $update_mask - * The FieldMask to use when updating the notification config. - * If empty all mutable fields will be updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The notification config to update. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.NotificationConfig notification_config = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\SecurityCenter\V1p1beta1\NotificationConfig|null - */ - public function getNotificationConfig() - { - return $this->notification_config; - } - - public function hasNotificationConfig() - { - return isset($this->notification_config); - } - - public function clearNotificationConfig() - { - unset($this->notification_config); - } - - /** - * Required. The notification config to update. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.NotificationConfig notification_config = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\SecurityCenter\V1p1beta1\NotificationConfig $var - * @return $this - */ - public function setNotificationConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1p1beta1\NotificationConfig::class); - $this->notification_config = $var; - - return $this; - } - - /** - * The FieldMask to use when updating the notification config. - * If empty all mutable fields will be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * The FieldMask to use when updating the notification config. - * If empty all mutable fields will be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/UpdateOrganizationSettingsRequest.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/UpdateOrganizationSettingsRequest.php deleted file mode 100644 index ab2d90e1566d..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/UpdateOrganizationSettingsRequest.php +++ /dev/null @@ -1,125 +0,0 @@ -google.cloud.securitycenter.v1p1beta1.UpdateOrganizationSettingsRequest - */ -class UpdateOrganizationSettingsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The organization settings resource to update. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.OrganizationSettings organization_settings = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $organization_settings = null; - /** - * The FieldMask to use when updating the settings resource. - * If empty all mutable fields will be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\SecurityCenter\V1p1beta1\OrganizationSettings $organization_settings - * Required. The organization settings resource to update. - * @type \Google\Protobuf\FieldMask $update_mask - * The FieldMask to use when updating the settings resource. - * If empty all mutable fields will be updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The organization settings resource to update. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.OrganizationSettings organization_settings = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\SecurityCenter\V1p1beta1\OrganizationSettings|null - */ - public function getOrganizationSettings() - { - return $this->organization_settings; - } - - public function hasOrganizationSettings() - { - return isset($this->organization_settings); - } - - public function clearOrganizationSettings() - { - unset($this->organization_settings); - } - - /** - * Required. The organization settings resource to update. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.OrganizationSettings organization_settings = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\SecurityCenter\V1p1beta1\OrganizationSettings $var - * @return $this - */ - public function setOrganizationSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1p1beta1\OrganizationSettings::class); - $this->organization_settings = $var; - - return $this; - } - - /** - * The FieldMask to use when updating the settings resource. - * If empty all mutable fields will be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * The FieldMask to use when updating the settings resource. - * If empty all mutable fields will be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/UpdateSecurityMarksRequest.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/UpdateSecurityMarksRequest.php deleted file mode 100644 index eb9d37881735..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/UpdateSecurityMarksRequest.php +++ /dev/null @@ -1,185 +0,0 @@ -google.cloud.securitycenter.v1p1beta1.UpdateSecurityMarksRequest - */ -class UpdateSecurityMarksRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The security marks resource to update. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.SecurityMarks security_marks = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $security_marks = null; - /** - * The FieldMask to use when updating the security marks resource. - * The field mask must not contain duplicate fields. - * If empty or set to "marks", all marks will be replaced. Individual - * marks can be updated using "marks.". - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - /** - * The time at which the updated SecurityMarks take effect. - * If not set uses current server time. Updates will be applied to the - * SecurityMarks that are active immediately preceding this time. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 3; - */ - protected $start_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\SecurityCenter\V1p1beta1\SecurityMarks $security_marks - * Required. The security marks resource to update. - * @type \Google\Protobuf\FieldMask $update_mask - * The FieldMask to use when updating the security marks resource. - * The field mask must not contain duplicate fields. - * If empty or set to "marks", all marks will be replaced. Individual - * marks can be updated using "marks.". - * @type \Google\Protobuf\Timestamp $start_time - * The time at which the updated SecurityMarks take effect. - * If not set uses current server time. Updates will be applied to the - * SecurityMarks that are active immediately preceding this time. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The security marks resource to update. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.SecurityMarks security_marks = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\SecurityCenter\V1p1beta1\SecurityMarks|null - */ - public function getSecurityMarks() - { - return $this->security_marks; - } - - public function hasSecurityMarks() - { - return isset($this->security_marks); - } - - public function clearSecurityMarks() - { - unset($this->security_marks); - } - - /** - * Required. The security marks resource to update. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.SecurityMarks security_marks = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\SecurityCenter\V1p1beta1\SecurityMarks $var - * @return $this - */ - public function setSecurityMarks($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1p1beta1\SecurityMarks::class); - $this->security_marks = $var; - - return $this; - } - - /** - * The FieldMask to use when updating the security marks resource. - * The field mask must not contain duplicate fields. - * If empty or set to "marks", all marks will be replaced. Individual - * marks can be updated using "marks.". - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * The FieldMask to use when updating the security marks resource. - * The field mask must not contain duplicate fields. - * If empty or set to "marks", all marks will be replaced. Individual - * marks can be updated using "marks.". - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * The time at which the updated SecurityMarks take effect. - * If not set uses current server time. Updates will be applied to the - * SecurityMarks that are active immediately preceding this time. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * The time at which the updated SecurityMarks take effect. - * If not set uses current server time. Updates will be applied to the - * SecurityMarks that are active immediately preceding this time. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/UpdateSourceRequest.php b/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/UpdateSourceRequest.php deleted file mode 100644 index ba5092d0370b..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/proto/src/Google/Cloud/SecurityCenter/V1p1beta1/UpdateSourceRequest.php +++ /dev/null @@ -1,125 +0,0 @@ -google.cloud.securitycenter.v1p1beta1.UpdateSourceRequest - */ -class UpdateSourceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The source resource to update. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Source source = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $source = null; - /** - * The FieldMask to use when updating the source resource. - * If empty all mutable fields will be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\SecurityCenter\V1p1beta1\Source $source - * Required. The source resource to update. - * @type \Google\Protobuf\FieldMask $update_mask - * The FieldMask to use when updating the source resource. - * If empty all mutable fields will be updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securitycenter\V1P1Beta1\SecuritycenterService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The source resource to update. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Source source = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\SecurityCenter\V1p1beta1\Source|null - */ - public function getSource() - { - return $this->source; - } - - public function hasSource() - { - return isset($this->source); - } - - public function clearSource() - { - unset($this->source); - } - - /** - * Required. The source resource to update. - * - * Generated from protobuf field .google.cloud.securitycenter.v1p1beta1.Source source = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\SecurityCenter\V1p1beta1\Source $var - * @return $this - */ - public function setSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1p1beta1\Source::class); - $this->source = $var; - - return $this; - } - - /** - * The FieldMask to use when updating the source resource. - * If empty all mutable fields will be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * The FieldMask to use when updating the source resource. - * If empty all mutable fields will be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/create_finding.php b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/create_finding.php deleted file mode 100644 index 0cff5a2094a8..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/create_finding.php +++ /dev/null @@ -1,73 +0,0 @@ -createFinding($formattedParent, $findingId, $finding); - 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 -{ - $formattedParent = SecurityCenterClient::sourceName('[ORGANIZATION]', '[SOURCE]'); - $findingId = '[FINDING_ID]'; - - create_finding_sample($formattedParent, $findingId); -} -// [END securitycenter_v1p1beta1_generated_SecurityCenter_CreateFinding_sync] diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/create_notification_config.php b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/create_notification_config.php deleted file mode 100644 index bbb4920611b1..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/create_notification_config.php +++ /dev/null @@ -1,78 +0,0 @@ -createNotificationConfig( - $formattedParent, - $configId, - $notificationConfig - ); - 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 -{ - $formattedParent = SecurityCenterClient::organizationName('[ORGANIZATION]'); - $configId = '[CONFIG_ID]'; - - create_notification_config_sample($formattedParent, $configId); -} -// [END securitycenter_v1p1beta1_generated_SecurityCenter_CreateNotificationConfig_sync] diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/create_source.php b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/create_source.php deleted file mode 100644 index 8d5e68ef26f8..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/create_source.php +++ /dev/null @@ -1,70 +0,0 @@ -createSource($formattedParent, $source); - 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 -{ - $formattedParent = SecurityCenterClient::organizationName('[ORGANIZATION]'); - - create_source_sample($formattedParent); -} -// [END securitycenter_v1p1beta1_generated_SecurityCenter_CreateSource_sync] diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/delete_notification_config.php b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/delete_notification_config.php deleted file mode 100644 index 956d07faea1b..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/delete_notification_config.php +++ /dev/null @@ -1,68 +0,0 @@ -deleteNotificationConfig($formattedName); - printf('Call completed successfully.' . PHP_EOL); - } 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 = SecurityCenterClient::notificationConfigName( - '[ORGANIZATION]', - '[NOTIFICATION_CONFIG]' - ); - - delete_notification_config_sample($formattedName); -} -// [END securitycenter_v1p1beta1_generated_SecurityCenter_DeleteNotificationConfig_sync] diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/get_iam_policy.php b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/get_iam_policy.php deleted file mode 100644 index a0ffd5ba3043..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/get_iam_policy.php +++ /dev/null @@ -1,66 +0,0 @@ -getIamPolicy($resource); - 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 -{ - $resource = '[RESOURCE]'; - - get_iam_policy_sample($resource); -} -// [END securitycenter_v1p1beta1_generated_SecurityCenter_GetIamPolicy_sync] diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/get_notification_config.php b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/get_notification_config.php deleted file mode 100644 index df55ee248c5d..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/get_notification_config.php +++ /dev/null @@ -1,70 +0,0 @@ -getNotificationConfig($formattedName); - 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 = SecurityCenterClient::notificationConfigName( - '[ORGANIZATION]', - '[NOTIFICATION_CONFIG]' - ); - - get_notification_config_sample($formattedName); -} -// [END securitycenter_v1p1beta1_generated_SecurityCenter_GetNotificationConfig_sync] diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/get_organization_settings.php b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/get_organization_settings.php deleted file mode 100644 index 6110a3304879..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/get_organization_settings.php +++ /dev/null @@ -1,67 +0,0 @@ -getOrganizationSettings($formattedName); - 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 = SecurityCenterClient::organizationSettingsName('[ORGANIZATION]'); - - get_organization_settings_sample($formattedName); -} -// [END securitycenter_v1p1beta1_generated_SecurityCenter_GetOrganizationSettings_sync] diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/get_source.php b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/get_source.php deleted file mode 100644 index 275a677ab8ac..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/get_source.php +++ /dev/null @@ -1,67 +0,0 @@ -getSource($formattedName); - 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 = SecurityCenterClient::sourceName('[ORGANIZATION]', '[SOURCE]'); - - get_source_sample($formattedName); -} -// [END securitycenter_v1p1beta1_generated_SecurityCenter_GetSource_sync] diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/group_assets.php b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/group_assets.php deleted file mode 100644 index 46fee29f1e52..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/group_assets.php +++ /dev/null @@ -1,93 +0,0 @@ -groupAssets($formattedParent, $groupBy); - - /** @var GroupResult $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 = SecurityCenterClient::projectName('[PROJECT]'); - $groupBy = '[GROUP_BY]'; - - group_assets_sample($formattedParent, $groupBy); -} -// [END securitycenter_v1p1beta1_generated_SecurityCenter_GroupAssets_sync] diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/group_findings.php b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/group_findings.php deleted file mode 100644 index c55257b8e672..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/group_findings.php +++ /dev/null @@ -1,99 +0,0 @@ -groupFindings($formattedParent, $groupBy); - - /** @var GroupResult $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 = SecurityCenterClient::sourceName('[ORGANIZATION]', '[SOURCE]'); - $groupBy = '[GROUP_BY]'; - - group_findings_sample($formattedParent, $groupBy); -} -// [END securitycenter_v1p1beta1_generated_SecurityCenter_GroupFindings_sync] diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/list_assets.php b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/list_assets.php deleted file mode 100644 index 268cf4fa4c5a..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/list_assets.php +++ /dev/null @@ -1,73 +0,0 @@ -listAssets($formattedParent); - - /** @var ListAssetsResult $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 = SecurityCenterClient::projectName('[PROJECT]'); - - list_assets_sample($formattedParent); -} -// [END securitycenter_v1p1beta1_generated_SecurityCenter_ListAssets_sync] diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/list_findings.php b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/list_findings.php deleted file mode 100644 index 56fd573fa7c6..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/list_findings.php +++ /dev/null @@ -1,80 +0,0 @@ -listFindings($formattedParent); - - /** @var ListFindingsResult $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 = SecurityCenterClient::sourceName('[ORGANIZATION]', '[SOURCE]'); - - list_findings_sample($formattedParent); -} -// [END securitycenter_v1p1beta1_generated_SecurityCenter_ListFindings_sync] diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/list_notification_configs.php b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/list_notification_configs.php deleted file mode 100644 index 7335c11f6ba1..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/list_notification_configs.php +++ /dev/null @@ -1,72 +0,0 @@ -listNotificationConfigs($formattedParent); - - /** @var NotificationConfig $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 = SecurityCenterClient::organizationName('[ORGANIZATION]'); - - list_notification_configs_sample($formattedParent); -} -// [END securitycenter_v1p1beta1_generated_SecurityCenter_ListNotificationConfigs_sync] diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/list_sources.php b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/list_sources.php deleted file mode 100644 index 382bcf45583c..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/list_sources.php +++ /dev/null @@ -1,73 +0,0 @@ -listSources($formattedParent); - - /** @var Source $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 = SecurityCenterClient::projectName('[PROJECT]'); - - list_sources_sample($formattedParent); -} -// [END securitycenter_v1p1beta1_generated_SecurityCenter_ListSources_sync] diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/run_asset_discovery.php b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/run_asset_discovery.php deleted file mode 100644 index 4eea12d8f3e3..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/run_asset_discovery.php +++ /dev/null @@ -1,84 +0,0 @@ -runAssetDiscovery($formattedParent); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var RunAssetDiscoveryResponse $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 -{ - $formattedParent = SecurityCenterClient::organizationName('[ORGANIZATION]'); - - run_asset_discovery_sample($formattedParent); -} -// [END securitycenter_v1p1beta1_generated_SecurityCenter_RunAssetDiscovery_sync] diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/set_finding_state.php b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/set_finding_state.php deleted file mode 100644 index 642360d869f3..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/set_finding_state.php +++ /dev/null @@ -1,76 +0,0 @@ -setFindingState($formattedName, $state, $startTime); - 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 = SecurityCenterClient::findingName('[ORGANIZATION]', '[SOURCE]', '[FINDING]'); - $state = State::STATE_UNSPECIFIED; - - set_finding_state_sample($formattedName, $state); -} -// [END securitycenter_v1p1beta1_generated_SecurityCenter_SetFindingState_sync] diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/set_iam_policy.php b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/set_iam_policy.php deleted file mode 100644 index 3834e7c78cb2..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/set_iam_policy.php +++ /dev/null @@ -1,69 +0,0 @@ -setIamPolicy($resource, $policy); - 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 -{ - $resource = '[RESOURCE]'; - - set_iam_policy_sample($resource); -} -// [END securitycenter_v1p1beta1_generated_SecurityCenter_SetIamPolicy_sync] diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/test_iam_permissions.php b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/test_iam_permissions.php deleted file mode 100644 index fabfa4d120da..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/test_iam_permissions.php +++ /dev/null @@ -1,74 +0,0 @@ -testIamPermissions($resource, $permissions); - 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 -{ - $resource = '[RESOURCE]'; - $permissionsElement = '[PERMISSIONS]'; - - test_iam_permissions_sample($resource, $permissionsElement); -} -// [END securitycenter_v1p1beta1_generated_SecurityCenter_TestIamPermissions_sync] diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/update_finding.php b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/update_finding.php deleted file mode 100644 index ce626d9e8231..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/update_finding.php +++ /dev/null @@ -1,57 +0,0 @@ -updateFinding($finding); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END securitycenter_v1p1beta1_generated_SecurityCenter_UpdateFinding_sync] diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/update_notification_config.php b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/update_notification_config.php deleted file mode 100644 index 9a018595b632..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/update_notification_config.php +++ /dev/null @@ -1,57 +0,0 @@ -updateNotificationConfig($notificationConfig); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END securitycenter_v1p1beta1_generated_SecurityCenter_UpdateNotificationConfig_sync] diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/update_organization_settings.php b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/update_organization_settings.php deleted file mode 100644 index 051eebbbec8b..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/update_organization_settings.php +++ /dev/null @@ -1,56 +0,0 @@ -updateOrganizationSettings($organizationSettings); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END securitycenter_v1p1beta1_generated_SecurityCenter_UpdateOrganizationSettings_sync] diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/update_security_marks.php b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/update_security_marks.php deleted file mode 100644 index d34a80d26599..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/update_security_marks.php +++ /dev/null @@ -1,56 +0,0 @@ -updateSecurityMarks($securityMarks); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END securitycenter_v1p1beta1_generated_SecurityCenter_UpdateSecurityMarks_sync] diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/update_source.php b/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/update_source.php deleted file mode 100644 index 70237f1302f4..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/samples/V1p1beta1/SecurityCenterClient/update_source.php +++ /dev/null @@ -1,56 +0,0 @@ -updateSource($source); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END securitycenter_v1p1beta1_generated_SecurityCenter_UpdateSource_sync] diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/src/V1p1beta1/Gapic/SecurityCenterGapicClient.php b/owl-bot-staging/SecurityCenter/v1p1beta1/src/V1p1beta1/Gapic/SecurityCenterGapicClient.php deleted file mode 100644 index 732c61a77095..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/src/V1p1beta1/Gapic/SecurityCenterGapicClient.php +++ /dev/null @@ -1,2798 +0,0 @@ -sourceName('[ORGANIZATION]', '[SOURCE]'); - * $findingId = 'finding_id'; - * $finding = new Finding(); - * $response = $securityCenterClient->createFinding($formattedParent, $findingId, $finding); - * } finally { - * $securityCenterClient->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To - * assist with these names, this class includes a format method for each type of - * name, and additionally a parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - * - * @experimental - */ -class SecurityCenterGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.securitycenter.v1p1beta1.SecurityCenter'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'securitycenter.googleapis.com'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static $findingNameTemplate; - - private static $folderNameTemplate; - - private static $folderAssetSecurityMarksNameTemplate; - - private static $folderSourceNameTemplate; - - private static $folderSourceFindingNameTemplate; - - private static $folderSourceFindingSecurityMarksNameTemplate; - - private static $notificationConfigNameTemplate; - - private static $organizationNameTemplate; - - private static $organizationAssetSecurityMarksNameTemplate; - - private static $organizationSettingsNameTemplate; - - private static $organizationSourceNameTemplate; - - private static $organizationSourceFindingNameTemplate; - - private static $organizationSourceFindingSecurityMarksNameTemplate; - - private static $projectNameTemplate; - - private static $projectAssetSecurityMarksNameTemplate; - - private static $projectSourceNameTemplate; - - private static $projectSourceFindingNameTemplate; - - private static $projectSourceFindingSecurityMarksNameTemplate; - - private static $securityMarksNameTemplate; - - private static $sourceNameTemplate; - - private static $topicNameTemplate; - - private static $pathTemplateMap; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/security_center_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/security_center_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/security_center_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/security_center_rest_client_config.php', - ], - ], - ]; - } - - private static function getFindingNameTemplate() - { - if (self::$findingNameTemplate == null) { - self::$findingNameTemplate = new PathTemplate('organizations/{organization}/sources/{source}/findings/{finding}'); - } - - return self::$findingNameTemplate; - } - - private static function getFolderNameTemplate() - { - if (self::$folderNameTemplate == null) { - self::$folderNameTemplate = new PathTemplate('folders/{folder}'); - } - - return self::$folderNameTemplate; - } - - private static function getFolderAssetSecurityMarksNameTemplate() - { - if (self::$folderAssetSecurityMarksNameTemplate == null) { - self::$folderAssetSecurityMarksNameTemplate = new PathTemplate('folders/{folder}/assets/{asset}/securityMarks'); - } - - return self::$folderAssetSecurityMarksNameTemplate; - } - - private static function getFolderSourceNameTemplate() - { - if (self::$folderSourceNameTemplate == null) { - self::$folderSourceNameTemplate = new PathTemplate('folders/{folder}/sources/{source}'); - } - - return self::$folderSourceNameTemplate; - } - - private static function getFolderSourceFindingNameTemplate() - { - if (self::$folderSourceFindingNameTemplate == null) { - self::$folderSourceFindingNameTemplate = new PathTemplate('folders/{folder}/sources/{source}/findings/{finding}'); - } - - return self::$folderSourceFindingNameTemplate; - } - - private static function getFolderSourceFindingSecurityMarksNameTemplate() - { - if (self::$folderSourceFindingSecurityMarksNameTemplate == null) { - self::$folderSourceFindingSecurityMarksNameTemplate = new PathTemplate('folders/{folder}/sources/{source}/findings/{finding}/securityMarks'); - } - - return self::$folderSourceFindingSecurityMarksNameTemplate; - } - - private static function getNotificationConfigNameTemplate() - { - if (self::$notificationConfigNameTemplate == null) { - self::$notificationConfigNameTemplate = new PathTemplate('organizations/{organization}/notificationConfigs/{notification_config}'); - } - - return self::$notificationConfigNameTemplate; - } - - private static function getOrganizationNameTemplate() - { - if (self::$organizationNameTemplate == null) { - self::$organizationNameTemplate = new PathTemplate('organizations/{organization}'); - } - - return self::$organizationNameTemplate; - } - - private static function getOrganizationAssetSecurityMarksNameTemplate() - { - if (self::$organizationAssetSecurityMarksNameTemplate == null) { - self::$organizationAssetSecurityMarksNameTemplate = new PathTemplate('organizations/{organization}/assets/{asset}/securityMarks'); - } - - return self::$organizationAssetSecurityMarksNameTemplate; - } - - private static function getOrganizationSettingsNameTemplate() - { - if (self::$organizationSettingsNameTemplate == null) { - self::$organizationSettingsNameTemplate = new PathTemplate('organizations/{organization}/organizationSettings'); - } - - return self::$organizationSettingsNameTemplate; - } - - private static function getOrganizationSourceNameTemplate() - { - if (self::$organizationSourceNameTemplate == null) { - self::$organizationSourceNameTemplate = new PathTemplate('organizations/{organization}/sources/{source}'); - } - - return self::$organizationSourceNameTemplate; - } - - private static function getOrganizationSourceFindingNameTemplate() - { - if (self::$organizationSourceFindingNameTemplate == null) { - self::$organizationSourceFindingNameTemplate = new PathTemplate('organizations/{organization}/sources/{source}/findings/{finding}'); - } - - return self::$organizationSourceFindingNameTemplate; - } - - private static function getOrganizationSourceFindingSecurityMarksNameTemplate() - { - if (self::$organizationSourceFindingSecurityMarksNameTemplate == null) { - self::$organizationSourceFindingSecurityMarksNameTemplate = new PathTemplate('organizations/{organization}/sources/{source}/findings/{finding}/securityMarks'); - } - - return self::$organizationSourceFindingSecurityMarksNameTemplate; - } - - private static function getProjectNameTemplate() - { - if (self::$projectNameTemplate == null) { - self::$projectNameTemplate = new PathTemplate('projects/{project}'); - } - - return self::$projectNameTemplate; - } - - private static function getProjectAssetSecurityMarksNameTemplate() - { - if (self::$projectAssetSecurityMarksNameTemplate == null) { - self::$projectAssetSecurityMarksNameTemplate = new PathTemplate('projects/{project}/assets/{asset}/securityMarks'); - } - - return self::$projectAssetSecurityMarksNameTemplate; - } - - private static function getProjectSourceNameTemplate() - { - if (self::$projectSourceNameTemplate == null) { - self::$projectSourceNameTemplate = new PathTemplate('projects/{project}/sources/{source}'); - } - - return self::$projectSourceNameTemplate; - } - - private static function getProjectSourceFindingNameTemplate() - { - if (self::$projectSourceFindingNameTemplate == null) { - self::$projectSourceFindingNameTemplate = new PathTemplate('projects/{project}/sources/{source}/findings/{finding}'); - } - - return self::$projectSourceFindingNameTemplate; - } - - private static function getProjectSourceFindingSecurityMarksNameTemplate() - { - if (self::$projectSourceFindingSecurityMarksNameTemplate == null) { - self::$projectSourceFindingSecurityMarksNameTemplate = new PathTemplate('projects/{project}/sources/{source}/findings/{finding}/securityMarks'); - } - - return self::$projectSourceFindingSecurityMarksNameTemplate; - } - - private static function getSecurityMarksNameTemplate() - { - if (self::$securityMarksNameTemplate == null) { - self::$securityMarksNameTemplate = new PathTemplate('organizations/{organization}/assets/{asset}/securityMarks'); - } - - return self::$securityMarksNameTemplate; - } - - private static function getSourceNameTemplate() - { - if (self::$sourceNameTemplate == null) { - self::$sourceNameTemplate = new PathTemplate('organizations/{organization}/sources/{source}'); - } - - return self::$sourceNameTemplate; - } - - private static function getTopicNameTemplate() - { - if (self::$topicNameTemplate == null) { - self::$topicNameTemplate = new PathTemplate('projects/{project}/topics/{topic}'); - } - - return self::$topicNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'finding' => self::getFindingNameTemplate(), - 'folder' => self::getFolderNameTemplate(), - 'folderAssetSecurityMarks' => self::getFolderAssetSecurityMarksNameTemplate(), - 'folderSource' => self::getFolderSourceNameTemplate(), - 'folderSourceFinding' => self::getFolderSourceFindingNameTemplate(), - 'folderSourceFindingSecurityMarks' => self::getFolderSourceFindingSecurityMarksNameTemplate(), - 'notificationConfig' => self::getNotificationConfigNameTemplate(), - 'organization' => self::getOrganizationNameTemplate(), - 'organizationAssetSecurityMarks' => self::getOrganizationAssetSecurityMarksNameTemplate(), - 'organizationSettings' => self::getOrganizationSettingsNameTemplate(), - 'organizationSource' => self::getOrganizationSourceNameTemplate(), - 'organizationSourceFinding' => self::getOrganizationSourceFindingNameTemplate(), - 'organizationSourceFindingSecurityMarks' => self::getOrganizationSourceFindingSecurityMarksNameTemplate(), - 'project' => self::getProjectNameTemplate(), - 'projectAssetSecurityMarks' => self::getProjectAssetSecurityMarksNameTemplate(), - 'projectSource' => self::getProjectSourceNameTemplate(), - 'projectSourceFinding' => self::getProjectSourceFindingNameTemplate(), - 'projectSourceFindingSecurityMarks' => self::getProjectSourceFindingSecurityMarksNameTemplate(), - 'securityMarks' => self::getSecurityMarksNameTemplate(), - 'source' => self::getSourceNameTemplate(), - 'topic' => self::getTopicNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a finding - * resource. - * - * @param string $organization - * @param string $source - * @param string $finding - * - * @return string The formatted finding resource. - * - * @experimental - */ - public static function findingName($organization, $source, $finding) - { - return self::getFindingNameTemplate()->render([ - 'organization' => $organization, - 'source' => $source, - 'finding' => $finding, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a folder - * resource. - * - * @param string $folder - * - * @return string The formatted folder resource. - * - * @experimental - */ - public static function folderName($folder) - { - return self::getFolderNameTemplate()->render([ - 'folder' => $folder, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_asset_securityMarks resource. - * - * @param string $folder - * @param string $asset - * - * @return string The formatted folder_asset_securityMarks resource. - * - * @experimental - */ - public static function folderAssetSecurityMarksName($folder, $asset) - { - return self::getFolderAssetSecurityMarksNameTemplate()->render([ - 'folder' => $folder, - 'asset' => $asset, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_source resource. - * - * @param string $folder - * @param string $source - * - * @return string The formatted folder_source resource. - * - * @experimental - */ - public static function folderSourceName($folder, $source) - { - return self::getFolderSourceNameTemplate()->render([ - 'folder' => $folder, - 'source' => $source, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_source_finding resource. - * - * @param string $folder - * @param string $source - * @param string $finding - * - * @return string The formatted folder_source_finding resource. - * - * @experimental - */ - public static function folderSourceFindingName($folder, $source, $finding) - { - return self::getFolderSourceFindingNameTemplate()->render([ - 'folder' => $folder, - 'source' => $source, - 'finding' => $finding, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_source_finding_securityMarks resource. - * - * @param string $folder - * @param string $source - * @param string $finding - * - * @return string The formatted folder_source_finding_securityMarks resource. - * - * @experimental - */ - public static function folderSourceFindingSecurityMarksName($folder, $source, $finding) - { - return self::getFolderSourceFindingSecurityMarksNameTemplate()->render([ - 'folder' => $folder, - 'source' => $source, - 'finding' => $finding, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * notification_config resource. - * - * @param string $organization - * @param string $notificationConfig - * - * @return string The formatted notification_config resource. - * - * @experimental - */ - public static function notificationConfigName($organization, $notificationConfig) - { - return self::getNotificationConfigNameTemplate()->render([ - 'organization' => $organization, - 'notification_config' => $notificationConfig, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a organization - * resource. - * - * @param string $organization - * - * @return string The formatted organization resource. - * - * @experimental - */ - public static function organizationName($organization) - { - return self::getOrganizationNameTemplate()->render([ - 'organization' => $organization, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_asset_securityMarks resource. - * - * @param string $organization - * @param string $asset - * - * @return string The formatted organization_asset_securityMarks resource. - * - * @experimental - */ - public static function organizationAssetSecurityMarksName($organization, $asset) - { - return self::getOrganizationAssetSecurityMarksNameTemplate()->render([ - 'organization' => $organization, - 'asset' => $asset, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_settings resource. - * - * @param string $organization - * - * @return string The formatted organization_settings resource. - * - * @experimental - */ - public static function organizationSettingsName($organization) - { - return self::getOrganizationSettingsNameTemplate()->render([ - 'organization' => $organization, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_source resource. - * - * @param string $organization - * @param string $source - * - * @return string The formatted organization_source resource. - * - * @experimental - */ - public static function organizationSourceName($organization, $source) - { - return self::getOrganizationSourceNameTemplate()->render([ - 'organization' => $organization, - 'source' => $source, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_source_finding resource. - * - * @param string $organization - * @param string $source - * @param string $finding - * - * @return string The formatted organization_source_finding resource. - * - * @experimental - */ - public static function organizationSourceFindingName($organization, $source, $finding) - { - return self::getOrganizationSourceFindingNameTemplate()->render([ - 'organization' => $organization, - 'source' => $source, - 'finding' => $finding, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_source_finding_securityMarks resource. - * - * @param string $organization - * @param string $source - * @param string $finding - * - * @return string The formatted organization_source_finding_securityMarks resource. - * - * @experimental - */ - public static function organizationSourceFindingSecurityMarksName($organization, $source, $finding) - { - return self::getOrganizationSourceFindingSecurityMarksNameTemplate()->render([ - 'organization' => $organization, - 'source' => $source, - 'finding' => $finding, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a project - * resource. - * - * @param string $project - * - * @return string The formatted project resource. - * - * @experimental - */ - public static function projectName($project) - { - return self::getProjectNameTemplate()->render([ - 'project' => $project, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_asset_securityMarks resource. - * - * @param string $project - * @param string $asset - * - * @return string The formatted project_asset_securityMarks resource. - * - * @experimental - */ - public static function projectAssetSecurityMarksName($project, $asset) - { - return self::getProjectAssetSecurityMarksNameTemplate()->render([ - 'project' => $project, - 'asset' => $asset, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_source resource. - * - * @param string $project - * @param string $source - * - * @return string The formatted project_source resource. - * - * @experimental - */ - public static function projectSourceName($project, $source) - { - return self::getProjectSourceNameTemplate()->render([ - 'project' => $project, - 'source' => $source, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_source_finding resource. - * - * @param string $project - * @param string $source - * @param string $finding - * - * @return string The formatted project_source_finding resource. - * - * @experimental - */ - public static function projectSourceFindingName($project, $source, $finding) - { - return self::getProjectSourceFindingNameTemplate()->render([ - 'project' => $project, - 'source' => $source, - 'finding' => $finding, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_source_finding_securityMarks resource. - * - * @param string $project - * @param string $source - * @param string $finding - * - * @return string The formatted project_source_finding_securityMarks resource. - * - * @experimental - */ - public static function projectSourceFindingSecurityMarksName($project, $source, $finding) - { - return self::getProjectSourceFindingSecurityMarksNameTemplate()->render([ - 'project' => $project, - 'source' => $source, - 'finding' => $finding, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * security_marks resource. - * - * @param string $organization - * @param string $asset - * - * @return string The formatted security_marks resource. - * - * @experimental - */ - public static function securityMarksName($organization, $asset) - { - return self::getSecurityMarksNameTemplate()->render([ - 'organization' => $organization, - 'asset' => $asset, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a source - * resource. - * - * @param string $organization - * @param string $source - * - * @return string The formatted source resource. - * - * @experimental - */ - public static function sourceName($organization, $source) - { - return self::getSourceNameTemplate()->render([ - 'organization' => $organization, - 'source' => $source, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a topic - * resource. - * - * @param string $project - * @param string $topic - * - * @return string The formatted topic resource. - * - * @experimental - */ - public static function topicName($project, $topic) - { - return self::getTopicNameTemplate()->render([ - 'project' => $project, - 'topic' => $topic, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - finding: organizations/{organization}/sources/{source}/findings/{finding} - * - folder: folders/{folder} - * - folderAssetSecurityMarks: folders/{folder}/assets/{asset}/securityMarks - * - folderSource: folders/{folder}/sources/{source} - * - folderSourceFinding: folders/{folder}/sources/{source}/findings/{finding} - * - folderSourceFindingSecurityMarks: folders/{folder}/sources/{source}/findings/{finding}/securityMarks - * - notificationConfig: organizations/{organization}/notificationConfigs/{notification_config} - * - organization: organizations/{organization} - * - organizationAssetSecurityMarks: organizations/{organization}/assets/{asset}/securityMarks - * - organizationSettings: organizations/{organization}/organizationSettings - * - organizationSource: organizations/{organization}/sources/{source} - * - organizationSourceFinding: organizations/{organization}/sources/{source}/findings/{finding} - * - organizationSourceFindingSecurityMarks: organizations/{organization}/sources/{source}/findings/{finding}/securityMarks - * - project: projects/{project} - * - projectAssetSecurityMarks: projects/{project}/assets/{asset}/securityMarks - * - projectSource: projects/{project}/sources/{source} - * - projectSourceFinding: projects/{project}/sources/{source}/findings/{finding} - * - projectSourceFindingSecurityMarks: projects/{project}/sources/{source}/findings/{finding}/securityMarks - * - securityMarks: organizations/{organization}/assets/{asset}/securityMarks - * - source: organizations/{organization}/sources/{source} - * - topic: projects/{project}/topics/{topic} - * - * 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. - * - * @experimental - */ - public static function parseName($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - * - * @experimental - */ - 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 - * - * @experimental - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Constructor. - * - * @param array $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 'securitycenter.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @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. - * } - * - * @throws ValidationException - * - * @experimental - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** - * Creates a finding. The corresponding source must exist for finding - * creation to succeed. - * - * Sample code: - * ``` - * $securityCenterClient = new SecurityCenterClient(); - * try { - * $formattedParent = $securityCenterClient->sourceName('[ORGANIZATION]', '[SOURCE]'); - * $findingId = 'finding_id'; - * $finding = new Finding(); - * $response = $securityCenterClient->createFinding($formattedParent, $findingId, $finding); - * } finally { - * $securityCenterClient->close(); - * } - * ``` - * - * @param string $parent Required. Resource name of the new finding's parent. Its format should be - * "organizations/[organization_id]/sources/[source_id]". - * @param string $findingId Required. Unique identifier provided by the client within the parent scope. - * @param Finding $finding Required. The Finding being created. The name and security_marks will be ignored as - * they are both output only fields on this resource. - * @param array $optionalArgs { - * 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 \Google\Cloud\SecurityCenter\V1p1beta1\Finding - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function createFinding($parent, $findingId, $finding, array $optionalArgs = []) - { - $request = new CreateFindingRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setFindingId($findingId); - $request->setFinding($finding); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateFinding', Finding::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates a notification config. - * - * Sample code: - * ``` - * $securityCenterClient = new SecurityCenterClient(); - * try { - * $formattedParent = $securityCenterClient->organizationName('[ORGANIZATION]'); - * $configId = 'config_id'; - * $notificationConfig = new NotificationConfig(); - * $response = $securityCenterClient->createNotificationConfig($formattedParent, $configId, $notificationConfig); - * } finally { - * $securityCenterClient->close(); - * } - * ``` - * - * @param string $parent Required. Resource name of the new notification config's parent. Its format is - * "organizations/[organization_id]". - * @param string $configId Required. Unique identifier provided by the client within the parent scope. - * It must be between 1 and 128 characters, and contains alphanumeric - * characters, underscores or hyphens only. - * @param NotificationConfig $notificationConfig Required. The notification config being created. The name and the service account - * will be ignored as they are both output only fields on this resource. - * @param array $optionalArgs { - * 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 \Google\Cloud\SecurityCenter\V1p1beta1\NotificationConfig - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function createNotificationConfig($parent, $configId, $notificationConfig, array $optionalArgs = []) - { - $request = new CreateNotificationConfigRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setConfigId($configId); - $request->setNotificationConfig($notificationConfig); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateNotificationConfig', NotificationConfig::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates a source. - * - * Sample code: - * ``` - * $securityCenterClient = new SecurityCenterClient(); - * try { - * $formattedParent = $securityCenterClient->organizationName('[ORGANIZATION]'); - * $source = new Source(); - * $response = $securityCenterClient->createSource($formattedParent, $source); - * } finally { - * $securityCenterClient->close(); - * } - * ``` - * - * @param string $parent Required. Resource name of the new source's parent. Its format should be - * "organizations/[organization_id]". - * @param Source $source Required. The Source being created, only the display_name and description will be - * used. All other fields will be ignored. - * @param array $optionalArgs { - * 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 \Google\Cloud\SecurityCenter\V1p1beta1\Source - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function createSource($parent, $source, array $optionalArgs = []) - { - $request = new CreateSourceRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setSource($source); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateSource', Source::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes a notification config. - * - * Sample code: - * ``` - * $securityCenterClient = new SecurityCenterClient(); - * try { - * $formattedName = $securityCenterClient->notificationConfigName('[ORGANIZATION]', '[NOTIFICATION_CONFIG]'); - * $securityCenterClient->deleteNotificationConfig($formattedName); - * } finally { - * $securityCenterClient->close(); - * } - * ``` - * - * @param string $name Required. Name of the notification config to delete. Its format is - * "organizations/[organization_id]/notificationConfigs/[config_id]". - * @param array $optionalArgs { - * 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. - * } - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function deleteNotificationConfig($name, array $optionalArgs = []) - { - $request = new DeleteNotificationConfigRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteNotificationConfig', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets the access control policy on the specified Source. - * - * Sample code: - * ``` - * $securityCenterClient = new SecurityCenterClient(); - * try { - * $resource = 'resource'; - * $response = $securityCenterClient->getIamPolicy($resource); - * } finally { - * $securityCenterClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being requested. - * See the operation documentation for the appropriate value for this field. - * @param array $optionalArgs { - * Optional. - * - * @type GetPolicyOptions $options - * OPTIONAL: A `GetPolicyOptions` object for specifying options to - * `GetIamPolicy`. - * @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 \Google\Cloud\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function getIamPolicy($resource, array $optionalArgs = []) - { - $request = new GetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $requestParamHeaders['resource'] = $resource; - if (isset($optionalArgs['options'])) { - $request->setOptions($optionalArgs['options']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets a notification config. - * - * Sample code: - * ``` - * $securityCenterClient = new SecurityCenterClient(); - * try { - * $formattedName = $securityCenterClient->notificationConfigName('[ORGANIZATION]', '[NOTIFICATION_CONFIG]'); - * $response = $securityCenterClient->getNotificationConfig($formattedName); - * } finally { - * $securityCenterClient->close(); - * } - * ``` - * - * @param string $name Required. Name of the notification config to get. Its format is - * "organizations/[organization_id]/notificationConfigs/[config_id]". - * @param array $optionalArgs { - * 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 \Google\Cloud\SecurityCenter\V1p1beta1\NotificationConfig - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function getNotificationConfig($name, array $optionalArgs = []) - { - $request = new GetNotificationConfigRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetNotificationConfig', NotificationConfig::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets the settings for an organization. - * - * Sample code: - * ``` - * $securityCenterClient = new SecurityCenterClient(); - * try { - * $formattedName = $securityCenterClient->organizationSettingsName('[ORGANIZATION]'); - * $response = $securityCenterClient->getOrganizationSettings($formattedName); - * } finally { - * $securityCenterClient->close(); - * } - * ``` - * - * @param string $name Required. Name of the organization to get organization settings for. Its format is - * "organizations/[organization_id]/organizationSettings". - * @param array $optionalArgs { - * 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 \Google\Cloud\SecurityCenter\V1p1beta1\OrganizationSettings - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function getOrganizationSettings($name, array $optionalArgs = []) - { - $request = new GetOrganizationSettingsRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetOrganizationSettings', OrganizationSettings::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets a source. - * - * Sample code: - * ``` - * $securityCenterClient = new SecurityCenterClient(); - * try { - * $formattedName = $securityCenterClient->sourceName('[ORGANIZATION]', '[SOURCE]'); - * $response = $securityCenterClient->getSource($formattedName); - * } finally { - * $securityCenterClient->close(); - * } - * ``` - * - * @param string $name Required. Relative resource name of the source. Its format is - * "organizations/[organization_id]/source/[source_id]". - * @param array $optionalArgs { - * 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 \Google\Cloud\SecurityCenter\V1p1beta1\Source - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function getSource($name, array $optionalArgs = []) - { - $request = new GetSourceRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetSource', Source::class, $optionalArgs, $request)->wait(); - } - - /** - * Filters an organization's assets and groups them by their specified - * properties. - * - * Sample code: - * ``` - * $securityCenterClient = new SecurityCenterClient(); - * try { - * $formattedParent = $securityCenterClient->projectName('[PROJECT]'); - * $groupBy = 'group_by'; - * // Iterate over pages of elements - * $pagedResponse = $securityCenterClient->groupAssets($formattedParent, $groupBy); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $securityCenterClient->groupAssets($formattedParent, $groupBy); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $securityCenterClient->close(); - * } - * ``` - * - * @param string $parent Required. Name of the organization to groupBy. Its format is - * "organizations/[organization_id], folders/[folder_id], or - * projects/[project_id]". - * @param string $groupBy Required. Expression that defines what assets fields to use for grouping. The string - * value should follow SQL syntax: comma separated list of fields. For - * example: - * "security_center_properties.resource_project,security_center_properties.project". - * - * The following fields are supported when compare_duration is not set: - * - * * security_center_properties.resource_project - * * security_center_properties.resource_project_display_name - * * security_center_properties.resource_type - * * security_center_properties.resource_parent - * * security_center_properties.resource_parent_display_name - * - * The following fields are supported when compare_duration is set: - * - * * security_center_properties.resource_type - * * security_center_properties.resource_project_display_name - * * security_center_properties.resource_parent_display_name - * @param array $optionalArgs { - * Optional. - * - * @type string $filter - * Expression that defines the filter to apply across assets. - * The expression is a list of zero or more restrictions combined via logical - * operators `AND` and `OR`. - * Parentheses are supported, and `OR` has higher precedence than `AND`. - * - * Restrictions have the form ` ` and may have a `-` - * character in front of them to indicate negation. The fields map to those - * defined in the Asset resource. Examples include: - * - * * name - * * security_center_properties.resource_name - * * resource_properties.a_property - * * security_marks.marks.marka - * - * The supported operators are: - * - * * `=` for all value types. - * * `>`, `<`, `>=`, `<=` for integer values. - * * `:`, meaning substring matching, for strings. - * - * The supported value types are: - * - * * string literals in quotes. - * * integer literals without quotes. - * * boolean literals `true` and `false` without quotes. - * - * The following field and operator combinations are supported: - * - * * name: `=` - * * update_time: `=`, `>`, `<`, `>=`, `<=` - * - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `update_time = "2019-06-10T16:07:18-07:00"` - * `update_time = 1560208038000` - * - * * create_time: `=`, `>`, `<`, `>=`, `<=` - * - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `create_time = "2019-06-10T16:07:18-07:00"` - * `create_time = 1560208038000` - * - * * iam_policy.policy_blob: `=`, `:` - * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - * * security_marks.marks: `=`, `:` - * * security_center_properties.resource_name: `=`, `:` - * * security_center_properties.resource_name_display_name: `=`, `:` - * * security_center_properties.resource_type: `=`, `:` - * * security_center_properties.resource_parent: `=`, `:` - * * security_center_properties.resource_parent_display_name: `=`, `:` - * * security_center_properties.resource_project: `=`, `:` - * * security_center_properties.resource_project_display_name: `=`, `:` - * * security_center_properties.resource_owners: `=`, `:` - * - * For example, `resource_properties.size = 100` is a valid filter string. - * - * Use a partial match on the empty string to filter based on a property - * existing: `resource_properties.my_property : ""` - * - * Use a negated partial match on the empty string to filter based on a - * property not existing: `-resource_properties.my_property : ""` - * @type Duration $compareDuration - * When compare_duration is set, the GroupResult's "state_change" property is - * updated to indicate whether the asset was added, removed, or remained - * present during the compare_duration period of time that precedes the - * read_time. This is the time between (read_time - compare_duration) and - * read_time. - * - * The state change value is derived based on the presence of the asset at the - * two points in time. Intermediate state changes between the two times don't - * affect the result. For example, the results aren't affected if the asset is - * removed and re-created again. - * - * Possible "state_change" values when compare_duration is specified: - * - * * "ADDED": indicates that the asset was not present at the start of - * compare_duration, but present at reference_time. - * * "REMOVED": indicates that the asset was present at the start of - * compare_duration, but not present at reference_time. - * * "ACTIVE": indicates that the asset was present at both the - * start and the end of the time period defined by - * compare_duration and reference_time. - * - * If compare_duration is not specified, then the only possible state_change - * is "UNUSED", which will be the state_change set for all assets present at - * read_time. - * - * If this field is set then `state_change` must be a specified field in - * `group_by`. - * @type Timestamp $readTime - * Time used as a reference point when filtering assets. The filter is limited - * to assets existing at the supplied time and their values are those at that - * specific time. Absence of this field will default to the API's version of - * NOW. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @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 \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function groupAssets($parent, $groupBy, array $optionalArgs = []) - { - $request = new GroupAssetsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setGroupBy($groupBy); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['compareDuration'])) { - $request->setCompareDuration($optionalArgs['compareDuration']); - } - - if (isset($optionalArgs['readTime'])) { - $request->setReadTime($optionalArgs['readTime']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('GroupAssets', $optionalArgs, GroupAssetsResponse::class, $request); - } - - /** - * Filters an organization or source's findings and groups them by their - * specified properties. - * - * To group across all sources provide a `-` as the source id. - * Example: /v1/organizations/{organization_id}/sources/-/findings, - * /v1/folders/{folder_id}/sources/-/findings, - * /v1/projects/{project_id}/sources/-/findings - * - * Sample code: - * ``` - * $securityCenterClient = new SecurityCenterClient(); - * try { - * $formattedParent = $securityCenterClient->sourceName('[ORGANIZATION]', '[SOURCE]'); - * $groupBy = 'group_by'; - * // Iterate over pages of elements - * $pagedResponse = $securityCenterClient->groupFindings($formattedParent, $groupBy); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $securityCenterClient->groupFindings($formattedParent, $groupBy); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $securityCenterClient->close(); - * } - * ``` - * - * @param string $parent Required. Name of the source to groupBy. Its format is - * "organizations/[organization_id]/sources/[source_id]", - * folders/[folder_id]/sources/[source_id], or - * projects/[project_id]/sources/[source_id]. To groupBy across all sources - * provide a source_id of `-`. For example: - * organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-, - * or projects/{project_id}/sources/- - * @param string $groupBy Required. Expression that defines what assets fields to use for grouping (including - * `state_change`). The string value should follow SQL syntax: comma separated - * list of fields. For example: "parent,resource_name". - * - * The following fields are supported: - * - * * resource_name - * * category - * * state - * * parent - * * severity - * - * The following fields are supported when compare_duration is set: - * - * * state_change - * @param array $optionalArgs { - * Optional. - * - * @type string $filter - * Expression that defines the filter to apply across findings. - * The expression is a list of one or more restrictions combined via logical - * operators `AND` and `OR`. - * Parentheses are supported, and `OR` has higher precedence than `AND`. - * - * Restrictions have the form ` ` and may have a `-` - * character in front of them to indicate negation. Examples include: - * - * * name - * * source_properties.a_property - * * security_marks.marks.marka - * - * The supported operators are: - * - * * `=` for all value types. - * * `>`, `<`, `>=`, `<=` for integer values. - * * `:`, meaning substring matching, for strings. - * - * The supported value types are: - * - * * string literals in quotes. - * * integer literals without quotes. - * * boolean literals `true` and `false` without quotes. - * - * The following field and operator combinations are supported: - * - * * name: `=` - * * parent: `=`, `:` - * * resource_name: `=`, `:` - * * state: `=`, `:` - * * category: `=`, `:` - * * external_uri: `=`, `:` - * * event_time: `=`, `>`, `<`, `>=`, `<=` - * * severity: `=`, `:` - * - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `event_time = "2019-06-10T16:07:18-07:00"` - * `event_time = 1560208038000` - * - * * security_marks.marks: `=`, `:` - * * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - * - * For example, `source_properties.size = 100` is a valid filter string. - * - * Use a partial match on the empty string to filter based on a property - * existing: `source_properties.my_property : ""` - * - * Use a negated partial match on the empty string to filter based on a - * property not existing: `-source_properties.my_property : ""` - * @type Timestamp $readTime - * Time used as a reference point when filtering findings. The filter is - * limited to findings existing at the supplied time and their values are - * those at that specific time. Absence of this field will default to the - * API's version of NOW. - * @type Duration $compareDuration - * When compare_duration is set, the GroupResult's "state_change" attribute is - * updated to indicate whether the finding had its state changed, the - * finding's state remained unchanged, or if the finding was added during the - * compare_duration period of time that precedes the read_time. This is the - * time between (read_time - compare_duration) and read_time. - * - * The state_change value is derived based on the presence and state of the - * finding at the two points in time. Intermediate state changes between the - * two times don't affect the result. For example, the results aren't affected - * if the finding is made inactive and then active again. - * - * Possible "state_change" values when compare_duration is specified: - * - * * "CHANGED": indicates that the finding was present and matched the given - * filter at the start of compare_duration, but changed its - * state at read_time. - * * "UNCHANGED": indicates that the finding was present and matched the given - * filter at the start of compare_duration and did not change - * state at read_time. - * * "ADDED": indicates that the finding did not match the given filter or - * was not present at the start of compare_duration, but was - * present at read_time. - * * "REMOVED": indicates that the finding was present and matched the - * filter at the start of compare_duration, but did not match - * the filter at read_time. - * - * If compare_duration is not specified, then the only possible state_change - * is "UNUSED", which will be the state_change set for all findings present - * at read_time. - * - * If this field is set then `state_change` must be a specified field in - * `group_by`. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @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 \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function groupFindings($parent, $groupBy, array $optionalArgs = []) - { - $request = new GroupFindingsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setGroupBy($groupBy); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['readTime'])) { - $request->setReadTime($optionalArgs['readTime']); - } - - if (isset($optionalArgs['compareDuration'])) { - $request->setCompareDuration($optionalArgs['compareDuration']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('GroupFindings', $optionalArgs, GroupFindingsResponse::class, $request); - } - - /** - * Lists an organization's assets. - * - * Sample code: - * ``` - * $securityCenterClient = new SecurityCenterClient(); - * try { - * $formattedParent = $securityCenterClient->projectName('[PROJECT]'); - * // Iterate over pages of elements - * $pagedResponse = $securityCenterClient->listAssets($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $securityCenterClient->listAssets($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $securityCenterClient->close(); - * } - * ``` - * - * @param string $parent Required. Name of the organization assets should belong to. Its format is - * "organizations/[organization_id], folders/[folder_id], or - * projects/[project_id]". - * @param array $optionalArgs { - * Optional. - * - * @type string $filter - * Expression that defines the filter to apply across assets. - * The expression is a list of zero or more restrictions combined via logical - * operators `AND` and `OR`. - * Parentheses are supported, and `OR` has higher precedence than `AND`. - * - * Restrictions have the form ` ` and may have a `-` - * character in front of them to indicate negation. The fields map to those - * defined in the Asset resource. Examples include: - * - * * name - * * security_center_properties.resource_name - * * resource_properties.a_property - * * security_marks.marks.marka - * - * The supported operators are: - * - * * `=` for all value types. - * * `>`, `<`, `>=`, `<=` for integer values. - * * `:`, meaning substring matching, for strings. - * - * The supported value types are: - * - * * string literals in quotes. - * * integer literals without quotes. - * * boolean literals `true` and `false` without quotes. - * - * The following are the allowed field and operator combinations: - * - * * name: `=` - * * update_time: `=`, `>`, `<`, `>=`, `<=` - * - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `update_time = "2019-06-10T16:07:18-07:00"` - * `update_time = 1560208038000` - * - * * create_time: `=`, `>`, `<`, `>=`, `<=` - * - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `create_time = "2019-06-10T16:07:18-07:00"` - * `create_time = 1560208038000` - * - * * iam_policy.policy_blob: `=`, `:` - * * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - * * security_marks.marks: `=`, `:` - * * security_center_properties.resource_name: `=`, `:` - * * security_center_properties.resource_display_name: `=`, `:` - * * security_center_properties.resource_type: `=`, `:` - * * security_center_properties.resource_parent: `=`, `:` - * * security_center_properties.resource_parent_display_name: `=`, `:` - * * security_center_properties.resource_project: `=`, `:` - * * security_center_properties.resource_project_display_name: `=`, `:` - * * security_center_properties.resource_owners: `=`, `:` - * - * For example, `resource_properties.size = 100` is a valid filter string. - * - * Use a partial match on the empty string to filter based on a property - * existing: `resource_properties.my_property : ""` - * - * Use a negated partial match on the empty string to filter based on a - * property not existing: `-resource_properties.my_property : ""` - * @type string $orderBy - * Expression that defines what fields and order to use for sorting. The - * string value should follow SQL syntax: comma separated list of fields. For - * example: "name,resource_properties.a_property". The default sorting order - * is ascending. To specify descending order for a field, a suffix " desc" - * should be appended to the field name. For example: "name - * desc,resource_properties.a_property". Redundant space characters in the - * syntax are insignificant. "name desc,resource_properties.a_property" and " - * name desc , resource_properties.a_property " are equivalent. - * - * The following fields are supported: - * name - * update_time - * resource_properties - * security_marks.marks - * security_center_properties.resource_name - * security_center_properties.resource_display_name - * security_center_properties.resource_parent - * security_center_properties.resource_parent_display_name - * security_center_properties.resource_project - * security_center_properties.resource_project_display_name - * security_center_properties.resource_type - * @type Timestamp $readTime - * Time used as a reference point when filtering assets. The filter is limited - * to assets existing at the supplied time and their values are those at that - * specific time. Absence of this field will default to the API's version of - * NOW. - * @type Duration $compareDuration - * When compare_duration is set, the ListAssetsResult's "state_change" - * attribute is updated to indicate whether the asset was added, removed, or - * remained present during the compare_duration period of time that precedes - * the read_time. This is the time between (read_time - compare_duration) and - * read_time. - * - * The state_change value is derived based on the presence of the asset at the - * two points in time. Intermediate state changes between the two times don't - * affect the result. For example, the results aren't affected if the asset is - * removed and re-created again. - * - * Possible "state_change" values when compare_duration is specified: - * - * * "ADDED": indicates that the asset was not present at the start of - * compare_duration, but present at read_time. - * * "REMOVED": indicates that the asset was present at the start of - * compare_duration, but not present at read_time. - * * "ACTIVE": indicates that the asset was present at both the - * start and the end of the time period defined by - * compare_duration and read_time. - * - * If compare_duration is not specified, then the only possible state_change - * is "UNUSED", which will be the state_change set for all assets present at - * read_time. - * @type FieldMask $fieldMask - * A field mask to specify the ListAssetsResult fields to be listed in the - * response. - * An empty field mask will list all fields. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @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 \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function listAssets($parent, array $optionalArgs = []) - { - $request = new ListAssetsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - if (isset($optionalArgs['readTime'])) { - $request->setReadTime($optionalArgs['readTime']); - } - - if (isset($optionalArgs['compareDuration'])) { - $request->setCompareDuration($optionalArgs['compareDuration']); - } - - if (isset($optionalArgs['fieldMask'])) { - $request->setFieldMask($optionalArgs['fieldMask']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListAssets', $optionalArgs, ListAssetsResponse::class, $request); - } - - /** - * Lists an organization or source's findings. - * - * To list across all sources provide a `-` as the source id. - * Example: /v1p1beta1/organizations/{organization_id}/sources/-/findings - * - * Sample code: - * ``` - * $securityCenterClient = new SecurityCenterClient(); - * try { - * $formattedParent = $securityCenterClient->sourceName('[ORGANIZATION]', '[SOURCE]'); - * // Iterate over pages of elements - * $pagedResponse = $securityCenterClient->listFindings($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $securityCenterClient->listFindings($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $securityCenterClient->close(); - * } - * ``` - * - * @param string $parent Required. Name of the source the findings belong to. Its format is - * "organizations/[organization_id]/sources/[source_id], - * folders/[folder_id]/sources/[source_id], or - * projects/[project_id]/sources/[source_id]". To list across all sources - * provide a source_id of `-`. For example: - * organizations/{organization_id}/sources/-, folders/{folder_id}/sources/- or - * projects/{projects_id}/sources/- - * @param array $optionalArgs { - * Optional. - * - * @type string $filter - * Expression that defines the filter to apply across findings. - * The expression is a list of one or more restrictions combined via logical - * operators `AND` and `OR`. - * Parentheses are supported, and `OR` has higher precedence than `AND`. - * - * Restrictions have the form ` ` and may have a `-` - * character in front of them to indicate negation. Examples include: - * - * * name - * * source_properties.a_property - * * security_marks.marks.marka - * - * The supported operators are: - * - * * `=` for all value types. - * * `>`, `<`, `>=`, `<=` for integer values. - * * `:`, meaning substring matching, for strings. - * - * The supported value types are: - * - * * string literals in quotes. - * * integer literals without quotes. - * * boolean literals `true` and `false` without quotes. - * - * The following field and operator combinations are supported: - * - * * name: `=` - * * parent: `=`, `:` - * * resource_name: `=`, `:` - * * state: `=`, `:` - * * category: `=`, `:` - * * external_uri: `=`, `:` - * * event_time: `=`, `>`, `<`, `>=`, `<=` - * * severity: `=`, `:` - * - * Usage: This should be milliseconds since epoch or an RFC3339 string. - * Examples: - * `event_time = "2019-06-10T16:07:18-07:00"` - * `event_time = 1560208038000` - * - * security_marks.marks: `=`, `:` - * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` - * - * For example, `source_properties.size = 100` is a valid filter string. - * - * Use a partial match on the empty string to filter based on a property - * existing: `source_properties.my_property : ""` - * - * Use a negated partial match on the empty string to filter based on a - * property not existing: `-source_properties.my_property : ""` - * @type string $orderBy - * Expression that defines what fields and order to use for sorting. The - * string value should follow SQL syntax: comma separated list of fields. For - * example: "name,resource_properties.a_property". The default sorting order - * is ascending. To specify descending order for a field, a suffix " desc" - * should be appended to the field name. For example: "name - * desc,source_properties.a_property". Redundant space characters in the - * syntax are insignificant. "name desc,source_properties.a_property" and " - * name desc , source_properties.a_property " are equivalent. - * - * The following fields are supported: - * name - * parent - * state - * category - * resource_name - * event_time - * source_properties - * security_marks.marks - * @type Timestamp $readTime - * Time used as a reference point when filtering findings. The filter is - * limited to findings existing at the supplied time and their values are - * those at that specific time. Absence of this field will default to the - * API's version of NOW. - * @type Duration $compareDuration - * When compare_duration is set, the ListFindingsResult's "state_change" - * attribute is updated to indicate whether the finding had its state changed, - * the finding's state remained unchanged, or if the finding was added in any - * state during the compare_duration period of time that precedes the - * read_time. This is the time between (read_time - compare_duration) and - * read_time. - * - * The state_change value is derived based on the presence and state of the - * finding at the two points in time. Intermediate state changes between the - * two times don't affect the result. For example, the results aren't affected - * if the finding is made inactive and then active again. - * - * Possible "state_change" values when compare_duration is specified: - * - * * "CHANGED": indicates that the finding was present and matched the given - * filter at the start of compare_duration, but changed its - * state at read_time. - * * "UNCHANGED": indicates that the finding was present and matched the given - * filter at the start of compare_duration and did not change - * state at read_time. - * * "ADDED": indicates that the finding did not match the given filter or - * was not present at the start of compare_duration, but was - * present at read_time. - * * "REMOVED": indicates that the finding was present and matched the - * filter at the start of compare_duration, but did not match - * the filter at read_time. - * - * If compare_duration is not specified, then the only possible state_change - * is "UNUSED", which will be the state_change set for all findings present at - * read_time. - * @type FieldMask $fieldMask - * A field mask to specify the Finding fields to be listed in the response. - * An empty field mask will list all fields. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @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 \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function listFindings($parent, array $optionalArgs = []) - { - $request = new ListFindingsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - if (isset($optionalArgs['readTime'])) { - $request->setReadTime($optionalArgs['readTime']); - } - - if (isset($optionalArgs['compareDuration'])) { - $request->setCompareDuration($optionalArgs['compareDuration']); - } - - if (isset($optionalArgs['fieldMask'])) { - $request->setFieldMask($optionalArgs['fieldMask']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListFindings', $optionalArgs, ListFindingsResponse::class, $request); - } - - /** - * Lists notification configs. - * - * Sample code: - * ``` - * $securityCenterClient = new SecurityCenterClient(); - * try { - * $formattedParent = $securityCenterClient->organizationName('[ORGANIZATION]'); - * // Iterate over pages of elements - * $pagedResponse = $securityCenterClient->listNotificationConfigs($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $securityCenterClient->listNotificationConfigs($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $securityCenterClient->close(); - * } - * ``` - * - * @param string $parent Required. Name of the organization to list notification configs. - * Its format is "organizations/[organization_id]". - * @param array $optionalArgs { - * Optional. - * - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @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 \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function listNotificationConfigs($parent, array $optionalArgs = []) - { - $request = new ListNotificationConfigsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListNotificationConfigs', $optionalArgs, ListNotificationConfigsResponse::class, $request); - } - - /** - * Lists all sources belonging to an organization. - * - * Sample code: - * ``` - * $securityCenterClient = new SecurityCenterClient(); - * try { - * $formattedParent = $securityCenterClient->projectName('[PROJECT]'); - * // Iterate over pages of elements - * $pagedResponse = $securityCenterClient->listSources($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $securityCenterClient->listSources($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $securityCenterClient->close(); - * } - * ``` - * - * @param string $parent Required. Resource name of the parent of sources to list. Its format should be - * "organizations/[organization_id], folders/[folder_id], or - * projects/[project_id]". - * @param array $optionalArgs { - * Optional. - * - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @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 \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function listSources($parent, array $optionalArgs = []) - { - $request = new ListSourcesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListSources', $optionalArgs, ListSourcesResponse::class, $request); - } - - /** - * Runs asset discovery. The discovery is tracked with a long-running - * operation. - * - * This API can only be called with limited frequency for an organization. If - * it is called too frequently the caller will receive a TOO_MANY_REQUESTS - * error. - * - * Sample code: - * ``` - * $securityCenterClient = new SecurityCenterClient(); - * try { - * $formattedParent = $securityCenterClient->organizationName('[ORGANIZATION]'); - * $operationResponse = $securityCenterClient->runAssetDiscovery($formattedParent); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $securityCenterClient->runAssetDiscovery($formattedParent); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $securityCenterClient->resumeOperation($operationName, 'runAssetDiscovery'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $securityCenterClient->close(); - * } - * ``` - * - * @param string $parent Required. Name of the organization to run asset discovery for. Its format is - * "organizations/[organization_id]". - * @param array $optionalArgs { - * 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 \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function runAssetDiscovery($parent, array $optionalArgs = []) - { - $request = new RunAssetDiscoveryRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('RunAssetDiscovery', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Updates the state of a finding. - * - * Sample code: - * ``` - * $securityCenterClient = new SecurityCenterClient(); - * try { - * $formattedName = $securityCenterClient->findingName('[ORGANIZATION]', '[SOURCE]', '[FINDING]'); - * $state = State::STATE_UNSPECIFIED; - * $startTime = new Timestamp(); - * $response = $securityCenterClient->setFindingState($formattedName, $state, $startTime); - * } finally { - * $securityCenterClient->close(); - * } - * ``` - * - * @param string $name Required. The relative resource name of the finding. See: - * https://cloud.google.com/apis/design/resource_names#relative_resource_name - * Example: - * "organizations/{organization_id}/sources/{source_id}/finding/{finding_id}". - * @param int $state Required. The desired State of the finding. - * For allowed values, use constants defined on {@see \Google\Cloud\SecurityCenter\V1p1beta1\Finding\State} - * @param Timestamp $startTime Required. The time at which the updated state takes effect. - * @param array $optionalArgs { - * 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 \Google\Cloud\SecurityCenter\V1p1beta1\Finding - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function setFindingState($name, $state, $startTime, array $optionalArgs = []) - { - $request = new SetFindingStateRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setState($state); - $request->setStartTime($startTime); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('SetFindingState', Finding::class, $optionalArgs, $request)->wait(); - } - - /** - * Sets the access control policy on the specified Source. - * - * Sample code: - * ``` - * $securityCenterClient = new SecurityCenterClient(); - * try { - * $resource = 'resource'; - * $policy = new Policy(); - * $response = $securityCenterClient->setIamPolicy($resource, $policy); - * } finally { - * $securityCenterClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being specified. - * See the operation documentation for the appropriate value for this field. - * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of - * the policy is limited to a few 10s of KB. An empty policy is a - * valid policy but certain Cloud Platform services (such as Projects) - * might reject them. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - * the fields in the mask will be modified. If no mask is provided, the - * following default mask is used: - * - * `paths: "bindings, etag"` - * @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 \Google\Cloud\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function setIamPolicy($resource, $policy, array $optionalArgs = []) - { - $request = new SetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPolicy($policy); - $requestParamHeaders['resource'] = $resource; - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('SetIamPolicy', Policy::class, $optionalArgs, $request)->wait(); - } - - /** - * Returns the permissions that a caller has on the specified source. - * - * Sample code: - * ``` - * $securityCenterClient = new SecurityCenterClient(); - * try { - * $resource = 'resource'; - * $permissions = []; - * $response = $securityCenterClient->testIamPermissions($resource, $permissions); - * } finally { - * $securityCenterClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see - * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * @param array $optionalArgs { - * 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 \Google\Cloud\Iam\V1\TestIamPermissionsResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function testIamPermissions($resource, $permissions, array $optionalArgs = []) - { - $request = new TestIamPermissionsRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPermissions($permissions); - $requestParamHeaders['resource'] = $resource; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates or updates a finding. The corresponding source must exist for a - * finding creation to succeed. - * - * Sample code: - * ``` - * $securityCenterClient = new SecurityCenterClient(); - * try { - * $finding = new Finding(); - * $response = $securityCenterClient->updateFinding($finding); - * } finally { - * $securityCenterClient->close(); - * } - * ``` - * - * @param Finding $finding Required. The finding resource to update or create if it does not already exist. - * parent, security_marks, and update_time will be ignored. - * - * In the case of creation, the finding id portion of the name must be - * alphanumeric and less than or equal to 32 characters and greater than 0 - * characters in length. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * The FieldMask to use when updating the finding resource. This field should - * not be specified when creating a finding. - * - * When updating a finding, an empty mask is treated as updating all mutable - * fields and replacing source_properties. Individual source_properties can - * be added/updated by using "source_properties." in the field - * mask. - * @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 \Google\Cloud\SecurityCenter\V1p1beta1\Finding - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function updateFinding($finding, array $optionalArgs = []) - { - $request = new UpdateFindingRequest(); - $requestParamHeaders = []; - $request->setFinding($finding); - $requestParamHeaders['finding.name'] = $finding->getName(); - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateFinding', Finding::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates a notification config. The following update - * fields are allowed: description, pubsub_topic, streaming_config.filter - * - * Sample code: - * ``` - * $securityCenterClient = new SecurityCenterClient(); - * try { - * $notificationConfig = new NotificationConfig(); - * $response = $securityCenterClient->updateNotificationConfig($notificationConfig); - * } finally { - * $securityCenterClient->close(); - * } - * ``` - * - * @param NotificationConfig $notificationConfig Required. The notification config to update. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * The FieldMask to use when updating the notification config. - * - * If empty all mutable fields will be updated. - * @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 \Google\Cloud\SecurityCenter\V1p1beta1\NotificationConfig - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function updateNotificationConfig($notificationConfig, array $optionalArgs = []) - { - $request = new UpdateNotificationConfigRequest(); - $requestParamHeaders = []; - $request->setNotificationConfig($notificationConfig); - $requestParamHeaders['notification_config.name'] = $notificationConfig->getName(); - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateNotificationConfig', NotificationConfig::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates an organization's settings. - * - * Sample code: - * ``` - * $securityCenterClient = new SecurityCenterClient(); - * try { - * $organizationSettings = new OrganizationSettings(); - * $response = $securityCenterClient->updateOrganizationSettings($organizationSettings); - * } finally { - * $securityCenterClient->close(); - * } - * ``` - * - * @param OrganizationSettings $organizationSettings Required. The organization settings resource to update. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * The FieldMask to use when updating the settings resource. - * - * If empty all mutable fields will be updated. - * @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 \Google\Cloud\SecurityCenter\V1p1beta1\OrganizationSettings - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function updateOrganizationSettings($organizationSettings, array $optionalArgs = []) - { - $request = new UpdateOrganizationSettingsRequest(); - $requestParamHeaders = []; - $request->setOrganizationSettings($organizationSettings); - $requestParamHeaders['organization_settings.name'] = $organizationSettings->getName(); - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateOrganizationSettings', OrganizationSettings::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates security marks. - * - * Sample code: - * ``` - * $securityCenterClient = new SecurityCenterClient(); - * try { - * $securityMarks = new SecurityMarks(); - * $response = $securityCenterClient->updateSecurityMarks($securityMarks); - * } finally { - * $securityCenterClient->close(); - * } - * ``` - * - * @param SecurityMarks $securityMarks Required. The security marks resource to update. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * The FieldMask to use when updating the security marks resource. - * - * The field mask must not contain duplicate fields. - * If empty or set to "marks", all marks will be replaced. Individual - * marks can be updated using "marks.". - * @type Timestamp $startTime - * The time at which the updated SecurityMarks take effect. - * If not set uses current server time. Updates will be applied to the - * SecurityMarks that are active immediately preceding this time. - * @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 \Google\Cloud\SecurityCenter\V1p1beta1\SecurityMarks - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function updateSecurityMarks($securityMarks, array $optionalArgs = []) - { - $request = new UpdateSecurityMarksRequest(); - $requestParamHeaders = []; - $request->setSecurityMarks($securityMarks); - $requestParamHeaders['security_marks.name'] = $securityMarks->getName(); - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - if (isset($optionalArgs['startTime'])) { - $request->setStartTime($optionalArgs['startTime']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateSecurityMarks', SecurityMarks::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates a source. - * - * Sample code: - * ``` - * $securityCenterClient = new SecurityCenterClient(); - * try { - * $source = new Source(); - * $response = $securityCenterClient->updateSource($source); - * } finally { - * $securityCenterClient->close(); - * } - * ``` - * - * @param Source $source Required. The source resource to update. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * The FieldMask to use when updating the source resource. - * - * If empty all mutable fields will be updated. - * @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 \Google\Cloud\SecurityCenter\V1p1beta1\Source - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function updateSource($source, array $optionalArgs = []) - { - $request = new UpdateSourceRequest(); - $requestParamHeaders = []; - $request->setSource($source); - $requestParamHeaders['source.name'] = $source->getName(); - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateSource', Source::class, $optionalArgs, $request)->wait(); - } -} diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/src/V1p1beta1/SecurityCenterClient.php b/owl-bot-staging/SecurityCenter/v1p1beta1/src/V1p1beta1/SecurityCenterClient.php deleted file mode 100644 index 6cd84e56cabc..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/src/V1p1beta1/SecurityCenterClient.php +++ /dev/null @@ -1,36 +0,0 @@ - [ - 'google.cloud.securitycenter.v1p1beta1.SecurityCenter' => [ - 'RunAssetDiscovery' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\SecurityCenter\V1p1beta1\RunAssetDiscoveryResponse', - 'metadataReturnType' => '\Google\Protobuf\GPBEmpty', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'GroupAssets' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getGroupByResults', - ], - ], - 'GroupFindings' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getGroupByResults', - ], - ], - 'ListAssets' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getListAssetsResults', - ], - ], - 'ListFindings' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getListFindingsResults', - ], - ], - 'ListNotificationConfigs' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getNotificationConfigs', - ], - ], - 'ListSources' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getSources', - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/src/V1p1beta1/resources/security_center_rest_client_config.php b/owl-bot-staging/SecurityCenter/v1p1beta1/src/V1p1beta1/resources/security_center_rest_client_config.php deleted file mode 100644 index f6c1499e95f3..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/src/V1p1beta1/resources/security_center_rest_client_config.php +++ /dev/null @@ -1,440 +0,0 @@ - [ - 'google.cloud.securitycenter.v1p1beta1.SecurityCenter' => [ - 'CreateFinding' => [ - 'method' => 'post', - 'uriTemplate' => '/v1p1beta1/{parent=organizations/*/sources/*}/findings', - 'body' => 'finding', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'finding_id', - ], - ], - 'CreateNotificationConfig' => [ - 'method' => 'post', - 'uriTemplate' => '/v1p1beta1/{parent=organizations/*}/notificationConfigs', - 'body' => 'notification_config', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'config_id', - ], - ], - 'CreateSource' => [ - 'method' => 'post', - 'uriTemplate' => '/v1p1beta1/{parent=organizations/*}/sources', - 'body' => 'source', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteNotificationConfig' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1p1beta1/{name=organizations/*/notificationConfigs/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1p1beta1/{resource=organizations/*/sources/*}:getIamPolicy', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'GetNotificationConfig' => [ - 'method' => 'get', - 'uriTemplate' => '/v1p1beta1/{name=organizations/*/notificationConfigs/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOrganizationSettings' => [ - 'method' => 'get', - 'uriTemplate' => '/v1p1beta1/{name=organizations/*/organizationSettings}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetSource' => [ - 'method' => 'get', - 'uriTemplate' => '/v1p1beta1/{name=organizations/*/sources/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GroupAssets' => [ - 'method' => 'post', - 'uriTemplate' => '/v1p1beta1/{parent=organizations/*}/assets:group', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1p1beta1/{parent=folders/*}/assets:group', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1p1beta1/{parent=projects/*}/assets:group', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'GroupFindings' => [ - 'method' => 'post', - 'uriTemplate' => '/v1p1beta1/{parent=organizations/*/sources/*}/findings:group', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1p1beta1/{parent=folders/*/sources/*}/findings:group', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1p1beta1/{parent=projects/*/sources/*}/findings:group', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListAssets' => [ - 'method' => 'get', - 'uriTemplate' => '/v1p1beta1/{parent=organizations/*}/assets', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1p1beta1/{parent=folders/*}/assets', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1p1beta1/{parent=projects/*}/assets', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListFindings' => [ - 'method' => 'get', - 'uriTemplate' => '/v1p1beta1/{parent=organizations/*/sources/*}/findings', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1p1beta1/{parent=folders/*/sources/*}/findings', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1p1beta1/{parent=projects/*/sources/*}/findings', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListNotificationConfigs' => [ - 'method' => 'get', - 'uriTemplate' => '/v1p1beta1/{parent=organizations/*}/notificationConfigs', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListSources' => [ - 'method' => 'get', - 'uriTemplate' => '/v1p1beta1/{parent=organizations/*}/sources', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1p1beta1/{parent=folders/*}/sources', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1p1beta1/{parent=projects/*}/sources', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'RunAssetDiscovery' => [ - 'method' => 'post', - 'uriTemplate' => '/v1p1beta1/{parent=organizations/*}/assets:runDiscovery', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'SetFindingState' => [ - 'method' => 'post', - 'uriTemplate' => '/v1p1beta1/{name=organizations/*/sources/*/findings/*}:setState', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1p1beta1/{name=folders/*/sources/*/findings/*}:setState', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1p1beta1/{name=projects/*/sources/*/findings/*}:setState', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1p1beta1/{resource=organizations/*/sources/*}:setIamPolicy', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1p1beta1/{resource=organizations/*/sources/*}:testIamPermissions', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'UpdateFinding' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1p1beta1/{finding.name=organizations/*/sources/*/findings/*}', - 'body' => 'finding', - 'additionalBindings' => [ - [ - 'method' => 'patch', - 'uriTemplate' => '/v1p1beta1/{finding.name=folders/*/sources/*/findings/*}', - 'body' => 'finding', - ], - [ - 'method' => 'patch', - 'uriTemplate' => '/v1p1beta1/{finding.name=projects/*/sources/*/findings/*}', - 'body' => 'finding', - ], - ], - 'placeholders' => [ - 'finding.name' => [ - 'getters' => [ - 'getFinding', - 'getName', - ], - ], - ], - ], - 'UpdateNotificationConfig' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1p1beta1/{notification_config.name=organizations/*/notificationConfigs/*}', - 'body' => 'notification_config', - 'placeholders' => [ - 'notification_config.name' => [ - 'getters' => [ - 'getNotificationConfig', - 'getName', - ], - ], - ], - ], - 'UpdateOrganizationSettings' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1p1beta1/{organization_settings.name=organizations/*/organizationSettings}', - 'body' => 'organization_settings', - 'placeholders' => [ - 'organization_settings.name' => [ - 'getters' => [ - 'getOrganizationSettings', - 'getName', - ], - ], - ], - ], - 'UpdateSecurityMarks' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1p1beta1/{security_marks.name=organizations/*/assets/*/securityMarks}', - 'body' => 'security_marks', - 'additionalBindings' => [ - [ - 'method' => 'patch', - 'uriTemplate' => '/v1p1beta1/{security_marks.name=folders/*/assets/*/securityMarks}', - 'body' => 'security_marks', - ], - [ - 'method' => 'patch', - 'uriTemplate' => '/v1p1beta1/{security_marks.name=projects/*/assets/*/securityMarks}', - 'body' => 'security_marks', - ], - [ - 'method' => 'patch', - 'uriTemplate' => '/v1p1beta1/{security_marks.name=organizations/*/sources/*/findings/*/securityMarks}', - 'body' => 'security_marks', - ], - [ - 'method' => 'patch', - 'uriTemplate' => '/v1p1beta1/{security_marks.name=folders/*/sources/*/findings/*/securityMarks}', - 'body' => 'security_marks', - ], - [ - 'method' => 'patch', - 'uriTemplate' => '/v1p1beta1/{security_marks.name=projects/*/sources/*/findings/*/securityMarks}', - 'body' => 'security_marks', - ], - ], - 'placeholders' => [ - 'security_marks.name' => [ - 'getters' => [ - 'getSecurityMarks', - 'getName', - ], - ], - ], - ], - 'UpdateSource' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1p1beta1/{source.name=organizations/*/sources/*}', - 'body' => 'source', - 'placeholders' => [ - 'source.name' => [ - 'getters' => [ - 'getSource', - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1p1beta1/{name=organizations/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1p1beta1/{name=organizations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1p1beta1/{name=organizations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1p1beta1/{name=organizations/*/operations}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/SecurityCenter/v1p1beta1/tests/Unit/V1p1beta1/SecurityCenterClientTest.php b/owl-bot-staging/SecurityCenter/v1p1beta1/tests/Unit/V1p1beta1/SecurityCenterClientTest.php deleted file mode 100644 index ed4dc410ed08..000000000000 --- a/owl-bot-staging/SecurityCenter/v1p1beta1/tests/Unit/V1p1beta1/SecurityCenterClientTest.php +++ /dev/null @@ -1,1692 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return SecurityCenterClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new SecurityCenterClient($options); - } - - /** @test */ - public function createFindingTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $parent2 = 'parent21175163357'; - $resourceName = 'resourceName979421212'; - $category = 'category50511102'; - $externalUri = 'externalUri-1385596168'; - $canonicalName = 'canonicalName1385400054'; - $expectedResponse = new Finding(); - $expectedResponse->setName($name); - $expectedResponse->setParent($parent2); - $expectedResponse->setResourceName($resourceName); - $expectedResponse->setCategory($category); - $expectedResponse->setExternalUri($externalUri); - $expectedResponse->setCanonicalName($canonicalName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->sourceName('[ORGANIZATION]', '[SOURCE]'); - $findingId = 'findingId728776081'; - $finding = new Finding(); - $response = $gapicClient->createFinding($formattedParent, $findingId, $finding); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/CreateFinding', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getFindingId(); - $this->assertProtobufEquals($findingId, $actualValue); - $actualValue = $actualRequestObject->getFinding(); - $this->assertProtobufEquals($finding, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createFindingExceptionTest() - { - $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->sourceName('[ORGANIZATION]', '[SOURCE]'); - $findingId = 'findingId728776081'; - $finding = new Finding(); - try { - $gapicClient->createFinding($formattedParent, $findingId, $finding); - // 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 createNotificationConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $description = 'description-1724546052'; - $pubsubTopic = 'pubsubTopic-338126829'; - $serviceAccount = 'serviceAccount-1948028253'; - $expectedResponse = new NotificationConfig(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setPubsubTopic($pubsubTopic); - $expectedResponse->setServiceAccount($serviceAccount); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->organizationName('[ORGANIZATION]'); - $configId = 'configId-804450504'; - $notificationConfig = new NotificationConfig(); - $response = $gapicClient->createNotificationConfig($formattedParent, $configId, $notificationConfig); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/CreateNotificationConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getConfigId(); - $this->assertProtobufEquals($configId, $actualValue); - $actualValue = $actualRequestObject->getNotificationConfig(); - $this->assertProtobufEquals($notificationConfig, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createNotificationConfigExceptionTest() - { - $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->organizationName('[ORGANIZATION]'); - $configId = 'configId-804450504'; - $notificationConfig = new NotificationConfig(); - try { - $gapicClient->createNotificationConfig($formattedParent, $configId, $notificationConfig); - // 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 createSourceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $canonicalName = 'canonicalName1385400054'; - $expectedResponse = new Source(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setCanonicalName($canonicalName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->organizationName('[ORGANIZATION]'); - $source = new Source(); - $response = $gapicClient->createSource($formattedParent, $source); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/CreateSource', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getSource(); - $this->assertProtobufEquals($source, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createSourceExceptionTest() - { - $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->organizationName('[ORGANIZATION]'); - $source = new Source(); - try { - $gapicClient->createSource($formattedParent, $source); - // 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 deleteNotificationConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->notificationConfigName('[ORGANIZATION]', '[NOTIFICATION_CONFIG]'); - $gapicClient->deleteNotificationConfig($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/DeleteNotificationConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteNotificationConfigExceptionTest() - { - $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->notificationConfigName('[ORGANIZATION]', '[NOTIFICATION_CONFIG]'); - try { - $gapicClient->deleteNotificationConfig($formattedName); - // 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 getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $response = $gapicClient->getIamPolicy($resource); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $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 - $resource = 'resource-341064690'; - try { - $gapicClient->getIamPolicy($resource); - // 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 getNotificationConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $pubsubTopic = 'pubsubTopic-338126829'; - $serviceAccount = 'serviceAccount-1948028253'; - $expectedResponse = new NotificationConfig(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setPubsubTopic($pubsubTopic); - $expectedResponse->setServiceAccount($serviceAccount); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->notificationConfigName('[ORGANIZATION]', '[NOTIFICATION_CONFIG]'); - $response = $gapicClient->getNotificationConfig($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/GetNotificationConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getNotificationConfigExceptionTest() - { - $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->notificationConfigName('[ORGANIZATION]', '[NOTIFICATION_CONFIG]'); - try { - $gapicClient->getNotificationConfig($formattedName); - // 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 getOrganizationSettingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $enableAssetDiscovery = false; - $expectedResponse = new OrganizationSettings(); - $expectedResponse->setName($name2); - $expectedResponse->setEnableAssetDiscovery($enableAssetDiscovery); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->organizationSettingsName('[ORGANIZATION]'); - $response = $gapicClient->getOrganizationSettings($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/GetOrganizationSettings', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getOrganizationSettingsExceptionTest() - { - $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->organizationSettingsName('[ORGANIZATION]'); - try { - $gapicClient->getOrganizationSettings($formattedName); - // 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 getSourceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $canonicalName = 'canonicalName1385400054'; - $expectedResponse = new Source(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setCanonicalName($canonicalName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->sourceName('[ORGANIZATION]', '[SOURCE]'); - $response = $gapicClient->getSource($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/GetSource', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSourceExceptionTest() - { - $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->sourceName('[ORGANIZATION]', '[SOURCE]'); - try { - $gapicClient->getSource($formattedName); - // 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 groupAssetsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $totalSize = 705419236; - $groupByResultsElement = new GroupResult(); - $groupByResults = [ - $groupByResultsElement, - ]; - $expectedResponse = new GroupAssetsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTotalSize($totalSize); - $expectedResponse->setGroupByResults($groupByResults); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $groupBy = 'groupBy506361367'; - $response = $gapicClient->groupAssets($formattedParent, $groupBy); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getGroupByResults()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/GroupAssets', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getGroupBy(); - $this->assertProtobufEquals($groupBy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function groupAssetsExceptionTest() - { - $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->projectName('[PROJECT]'); - $groupBy = 'groupBy506361367'; - try { - $gapicClient->groupAssets($formattedParent, $groupBy); - // 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 groupFindingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $totalSize = 705419236; - $groupByResultsElement = new GroupResult(); - $groupByResults = [ - $groupByResultsElement, - ]; - $expectedResponse = new GroupFindingsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTotalSize($totalSize); - $expectedResponse->setGroupByResults($groupByResults); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->sourceName('[ORGANIZATION]', '[SOURCE]'); - $groupBy = 'groupBy506361367'; - $response = $gapicClient->groupFindings($formattedParent, $groupBy); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getGroupByResults()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/GroupFindings', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getGroupBy(); - $this->assertProtobufEquals($groupBy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function groupFindingsExceptionTest() - { - $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->sourceName('[ORGANIZATION]', '[SOURCE]'); - $groupBy = 'groupBy506361367'; - try { - $gapicClient->groupFindings($formattedParent, $groupBy); - // 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 listAssetsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $totalSize = 705419236; - $listAssetsResultsElement = new ListAssetsResult(); - $listAssetsResults = [ - $listAssetsResultsElement, - ]; - $expectedResponse = new ListAssetsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTotalSize($totalSize); - $expectedResponse->setListAssetsResults($listAssetsResults); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $response = $gapicClient->listAssets($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getListAssetsResults()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/ListAssets', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAssetsExceptionTest() - { - $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->projectName('[PROJECT]'); - try { - $gapicClient->listAssets($formattedParent); - // 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 listFindingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $totalSize = 705419236; - $listFindingsResultsElement = new ListFindingsResult(); - $listFindingsResults = [ - $listFindingsResultsElement, - ]; - $expectedResponse = new ListFindingsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTotalSize($totalSize); - $expectedResponse->setListFindingsResults($listFindingsResults); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->sourceName('[ORGANIZATION]', '[SOURCE]'); - $response = $gapicClient->listFindings($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getListFindingsResults()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/ListFindings', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listFindingsExceptionTest() - { - $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->sourceName('[ORGANIZATION]', '[SOURCE]'); - try { - $gapicClient->listFindings($formattedParent); - // 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 listNotificationConfigsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $notificationConfigsElement = new NotificationConfig(); - $notificationConfigs = [ - $notificationConfigsElement, - ]; - $expectedResponse = new ListNotificationConfigsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setNotificationConfigs($notificationConfigs); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->organizationName('[ORGANIZATION]'); - $response = $gapicClient->listNotificationConfigs($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getNotificationConfigs()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/ListNotificationConfigs', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listNotificationConfigsExceptionTest() - { - $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->organizationName('[ORGANIZATION]'); - try { - $gapicClient->listNotificationConfigs($formattedParent); - // 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 listSourcesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $sourcesElement = new Source(); - $sources = [ - $sourcesElement, - ]; - $expectedResponse = new ListSourcesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setSources($sources); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $response = $gapicClient->listSources($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getSources()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/ListSources', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSourcesExceptionTest() - { - $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->projectName('[PROJECT]'); - try { - $gapicClient->listSources($formattedParent); - // 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 runAssetDiscoveryTest() - { - $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/runAssetDiscoveryTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new RunAssetDiscoveryResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/runAssetDiscoveryTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->organizationName('[ORGANIZATION]'); - $response = $gapicClient->runAssetDiscovery($formattedParent); - $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.securitycenter.v1p1beta1.SecurityCenter/RunAssetDiscovery', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/runAssetDiscoveryTest'); - $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 runAssetDiscoveryExceptionTest() - { - $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/runAssetDiscoveryTest'); - $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 - $formattedParent = $gapicClient->organizationName('[ORGANIZATION]'); - $response = $gapicClient->runAssetDiscovery($formattedParent); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/runAssetDiscoveryTest'); - 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 setFindingStateTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $parent = 'parent-995424086'; - $resourceName = 'resourceName979421212'; - $category = 'category50511102'; - $externalUri = 'externalUri-1385596168'; - $canonicalName = 'canonicalName1385400054'; - $expectedResponse = new Finding(); - $expectedResponse->setName($name2); - $expectedResponse->setParent($parent); - $expectedResponse->setResourceName($resourceName); - $expectedResponse->setCategory($category); - $expectedResponse->setExternalUri($externalUri); - $expectedResponse->setCanonicalName($canonicalName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->findingName('[ORGANIZATION]', '[SOURCE]', '[FINDING]'); - $state = State::STATE_UNSPECIFIED; - $startTime = new Timestamp(); - $response = $gapicClient->setFindingState($formattedName, $state, $startTime); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/SetFindingState', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getState(); - $this->assertProtobufEquals($state, $actualValue); - $actualValue = $actualRequestObject->getStartTime(); - $this->assertProtobufEquals($startTime, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setFindingStateExceptionTest() - { - $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->findingName('[ORGANIZATION]', '[SOURCE]', '[FINDING]'); - $state = State::STATE_UNSPECIFIED; - $startTime = new Timestamp(); - try { - $gapicClient->setFindingState($formattedName, $state, $startTime); - // 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 setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $response = $gapicClient->setIamPolicy($resource, $policy); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $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 - $resource = 'resource-341064690'; - $policy = new Policy(); - try { - $gapicClient->setIamPolicy($resource, $policy); - // 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 testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $response = $gapicClient->testIamPermissions($resource, $permissions); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $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 - $resource = 'resource-341064690'; - $permissions = []; - try { - $gapicClient->testIamPermissions($resource, $permissions); - // 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 updateFindingTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $parent = 'parent-995424086'; - $resourceName = 'resourceName979421212'; - $category = 'category50511102'; - $externalUri = 'externalUri-1385596168'; - $canonicalName = 'canonicalName1385400054'; - $expectedResponse = new Finding(); - $expectedResponse->setName($name); - $expectedResponse->setParent($parent); - $expectedResponse->setResourceName($resourceName); - $expectedResponse->setCategory($category); - $expectedResponse->setExternalUri($externalUri); - $expectedResponse->setCanonicalName($canonicalName); - $transport->addResponse($expectedResponse); - // Mock request - $finding = new Finding(); - $response = $gapicClient->updateFinding($finding); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/UpdateFinding', $actualFuncCall); - $actualValue = $actualRequestObject->getFinding(); - $this->assertProtobufEquals($finding, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateFindingExceptionTest() - { - $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 - $finding = new Finding(); - try { - $gapicClient->updateFinding($finding); - // 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 updateNotificationConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $description = 'description-1724546052'; - $pubsubTopic = 'pubsubTopic-338126829'; - $serviceAccount = 'serviceAccount-1948028253'; - $expectedResponse = new NotificationConfig(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setPubsubTopic($pubsubTopic); - $expectedResponse->setServiceAccount($serviceAccount); - $transport->addResponse($expectedResponse); - // Mock request - $notificationConfig = new NotificationConfig(); - $response = $gapicClient->updateNotificationConfig($notificationConfig); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/UpdateNotificationConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getNotificationConfig(); - $this->assertProtobufEquals($notificationConfig, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateNotificationConfigExceptionTest() - { - $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 - $notificationConfig = new NotificationConfig(); - try { - $gapicClient->updateNotificationConfig($notificationConfig); - // 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 updateOrganizationSettingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $enableAssetDiscovery = false; - $expectedResponse = new OrganizationSettings(); - $expectedResponse->setName($name); - $expectedResponse->setEnableAssetDiscovery($enableAssetDiscovery); - $transport->addResponse($expectedResponse); - // Mock request - $organizationSettings = new OrganizationSettings(); - $response = $gapicClient->updateOrganizationSettings($organizationSettings); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/UpdateOrganizationSettings', $actualFuncCall); - $actualValue = $actualRequestObject->getOrganizationSettings(); - $this->assertProtobufEquals($organizationSettings, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateOrganizationSettingsExceptionTest() - { - $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 - $organizationSettings = new OrganizationSettings(); - try { - $gapicClient->updateOrganizationSettings($organizationSettings); - // 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 updateSecurityMarksTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $canonicalName = 'canonicalName1385400054'; - $expectedResponse = new SecurityMarks(); - $expectedResponse->setName($name); - $expectedResponse->setCanonicalName($canonicalName); - $transport->addResponse($expectedResponse); - // Mock request - $securityMarks = new SecurityMarks(); - $response = $gapicClient->updateSecurityMarks($securityMarks); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/UpdateSecurityMarks', $actualFuncCall); - $actualValue = $actualRequestObject->getSecurityMarks(); - $this->assertProtobufEquals($securityMarks, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateSecurityMarksExceptionTest() - { - $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 - $securityMarks = new SecurityMarks(); - try { - $gapicClient->updateSecurityMarks($securityMarks); - // 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 updateSourceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $canonicalName = 'canonicalName1385400054'; - $expectedResponse = new Source(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setCanonicalName($canonicalName); - $transport->addResponse($expectedResponse); - // Mock request - $source = new Source(); - $response = $gapicClient->updateSource($source); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securitycenter.v1p1beta1.SecurityCenter/UpdateSource', $actualFuncCall); - $actualValue = $actualRequestObject->getSource(); - $this->assertProtobufEquals($source, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateSourceExceptionTest() - { - $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 - $source = new Source(); - try { - $gapicClient->updateSource($source); - // 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()); - } -}